diff --git a/api/index.html b/api/index.html index 3946eb6fa..632aba5f5 100644 --- a/api/index.html +++ b/api/index.html @@ -1125,7 +1125,7 @@

GoJS Class Index

diff --git a/api/symbols/ActionTool.html b/api/symbols/ActionTool.html index 2d29b8d46..9e3093136 100644 --- a/api/symbols/ActionTool.html +++ b/api/symbols/ActionTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Adornment.html b/api/symbols/Adornment.html index ccd736e98..0fb0d42d0 100644 --- a/api/symbols/Adornment.html +++ b/api/symbols/Adornment.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/AnimationManager.html b/api/symbols/AnimationManager.html index f8f21c1a2..57cee5278 100644 --- a/api/symbols/AnimationManager.html +++ b/api/symbols/AnimationManager.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Binding.html b/api/symbols/Binding.html index 90ce015e8..a3a0b924d 100644 --- a/api/symbols/Binding.html +++ b/api/symbols/Binding.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Brush.html b/api/symbols/Brush.html index 039719d78..499fc4d93 100644 --- a/api/symbols/Brush.html +++ b/api/symbols/Brush.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ChangedEvent.html b/api/symbols/ChangedEvent.html index 986d114cc..e9e49f53b 100644 --- a/api/symbols/ChangedEvent.html +++ b/api/symbols/ChangedEvent.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/CircularEdge.html b/api/symbols/CircularEdge.html index e7248ae40..30b0a18ae 100644 --- a/api/symbols/CircularEdge.html +++ b/api/symbols/CircularEdge.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/CircularLayout.html b/api/symbols/CircularLayout.html index ae39cdaf5..f28f13abc 100644 --- a/api/symbols/CircularLayout.html +++ b/api/symbols/CircularLayout.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/CircularVertex.html b/api/symbols/CircularVertex.html index ee521f15e..7daca910d 100644 --- a/api/symbols/CircularVertex.html +++ b/api/symbols/CircularVertex.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ClickCreatingTool.html b/api/symbols/ClickCreatingTool.html index cb2204bd1..9dbdd21d0 100644 --- a/api/symbols/ClickCreatingTool.html +++ b/api/symbols/ClickCreatingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ClickSelectingTool.html b/api/symbols/ClickSelectingTool.html index 365581d3a..64c6c0f52 100644 --- a/api/symbols/ClickSelectingTool.html +++ b/api/symbols/ClickSelectingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/CommandHandler.html b/api/symbols/CommandHandler.html index 23b2316d4..48363b54f 100644 --- a/api/symbols/CommandHandler.html +++ b/api/symbols/CommandHandler.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ContextMenuTool.html b/api/symbols/ContextMenuTool.html index cff5e4566..e445f94f3 100644 --- a/api/symbols/ContextMenuTool.html +++ b/api/symbols/ContextMenuTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Diagram.html b/api/symbols/Diagram.html index 4b70e8f6c..07a00a704 100644 --- a/api/symbols/Diagram.html +++ b/api/symbols/Diagram.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/DiagramEvent.html b/api/symbols/DiagramEvent.html index 759244369..457e4dada 100644 --- a/api/symbols/DiagramEvent.html +++ b/api/symbols/DiagramEvent.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/DragSelectingTool.html b/api/symbols/DragSelectingTool.html index bda2cc4a6..f1b70469c 100644 --- a/api/symbols/DragSelectingTool.html +++ b/api/symbols/DragSelectingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/DraggingTool.html b/api/symbols/DraggingTool.html index 0e3ee2812..2b8c8b24e 100644 --- a/api/symbols/DraggingTool.html +++ b/api/symbols/DraggingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ForceDirectedEdge.html b/api/symbols/ForceDirectedEdge.html index 464a3016e..013ef5d0b 100644 --- a/api/symbols/ForceDirectedEdge.html +++ b/api/symbols/ForceDirectedEdge.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ForceDirectedLayout.html b/api/symbols/ForceDirectedLayout.html index 08e011a58..45239cb6c 100644 --- a/api/symbols/ForceDirectedLayout.html +++ b/api/symbols/ForceDirectedLayout.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ForceDirectedVertex.html b/api/symbols/ForceDirectedVertex.html index bb04d691c..255fec366 100644 --- a/api/symbols/ForceDirectedVertex.html +++ b/api/symbols/ForceDirectedVertex.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Geometry.html b/api/symbols/Geometry.html index 1b281228a..63dfe91d9 100644 --- a/api/symbols/Geometry.html +++ b/api/symbols/Geometry.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/GraphLinksModel.html b/api/symbols/GraphLinksModel.html index a5e2a49aa..ad2381dce 100644 --- a/api/symbols/GraphLinksModel.html +++ b/api/symbols/GraphLinksModel.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/GraphObject.html b/api/symbols/GraphObject.html index 256b75c93..bb46ba629 100644 --- a/api/symbols/GraphObject.html +++ b/api/symbols/GraphObject.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/GridLayout.html b/api/symbols/GridLayout.html index e7d518917..94608689e 100644 --- a/api/symbols/GridLayout.html +++ b/api/symbols/GridLayout.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Group.html b/api/symbols/Group.html index 077ecd7ef..2fa7d3df7 100644 --- a/api/symbols/Group.html +++ b/api/symbols/Group.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/HTMLInfo.html b/api/symbols/HTMLInfo.html index ef14775da..58bb0dd4e 100644 --- a/api/symbols/HTMLInfo.html +++ b/api/symbols/HTMLInfo.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/InputEvent.html b/api/symbols/InputEvent.html index ba66454b8..93351c22f 100644 --- a/api/symbols/InputEvent.html +++ b/api/symbols/InputEvent.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Iterable.html b/api/symbols/Iterable.html index 08fda5c57..c22ff469b 100644 --- a/api/symbols/Iterable.html +++ b/api/symbols/Iterable.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Iterator.html b/api/symbols/Iterator.html index 09dc90dc2..d963d566a 100644 --- a/api/symbols/Iterator.html +++ b/api/symbols/Iterator.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Layer.html b/api/symbols/Layer.html index a8313de6a..2f7c74908 100644 --- a/api/symbols/Layer.html +++ b/api/symbols/Layer.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LayeredDigraphEdge.html b/api/symbols/LayeredDigraphEdge.html index 075573ebd..9d8d2a78b 100644 --- a/api/symbols/LayeredDigraphEdge.html +++ b/api/symbols/LayeredDigraphEdge.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LayeredDigraphLayout.html b/api/symbols/LayeredDigraphLayout.html index a317095b4..361ac252a 100644 --- a/api/symbols/LayeredDigraphLayout.html +++ b/api/symbols/LayeredDigraphLayout.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LayeredDigraphVertex.html b/api/symbols/LayeredDigraphVertex.html index 0b16a29bd..032bb5ae0 100644 --- a/api/symbols/LayeredDigraphVertex.html +++ b/api/symbols/LayeredDigraphVertex.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Layout.html b/api/symbols/Layout.html index 20907aee6..434d2a205 100644 --- a/api/symbols/Layout.html +++ b/api/symbols/Layout.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LayoutEdge.html b/api/symbols/LayoutEdge.html index 70a81d76c..7e37f832d 100644 --- a/api/symbols/LayoutEdge.html +++ b/api/symbols/LayoutEdge.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LayoutNetwork.html b/api/symbols/LayoutNetwork.html index 86eb7c798..103748741 100644 --- a/api/symbols/LayoutNetwork.html +++ b/api/symbols/LayoutNetwork.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LayoutVertex.html b/api/symbols/LayoutVertex.html index 304118b55..dadabb563 100644 --- a/api/symbols/LayoutVertex.html +++ b/api/symbols/LayoutVertex.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Link.html b/api/symbols/Link.html index e0ab7fa8d..afc5ccc33 100644 --- a/api/symbols/Link.html +++ b/api/symbols/Link.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LinkReshapingTool.html b/api/symbols/LinkReshapingTool.html index bf1a8e04d..43771adc3 100644 --- a/api/symbols/LinkReshapingTool.html +++ b/api/symbols/LinkReshapingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LinkingBaseTool.html b/api/symbols/LinkingBaseTool.html index 3c02be4e2..33a1df6df 100644 --- a/api/symbols/LinkingBaseTool.html +++ b/api/symbols/LinkingBaseTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/LinkingTool.html b/api/symbols/LinkingTool.html index e134d3c98..61487b8f2 100644 --- a/api/symbols/LinkingTool.html +++ b/api/symbols/LinkingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/List.html b/api/symbols/List.html index 8922f7f1f..b3d0f54a4 100644 --- a/api/symbols/List.html +++ b/api/symbols/List.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Map.html b/api/symbols/Map.html index 06747f53d..ac89032fc 100644 --- a/api/symbols/Map.html +++ b/api/symbols/Map.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Margin.html b/api/symbols/Margin.html index ea7d79e20..e948af3ca 100644 --- a/api/symbols/Margin.html +++ b/api/symbols/Margin.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Model.html b/api/symbols/Model.html index 7fa0f8198..228c5a501 100644 --- a/api/symbols/Model.html +++ b/api/symbols/Model.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Node.html b/api/symbols/Node.html index c0f09699d..1428e022b 100644 --- a/api/symbols/Node.html +++ b/api/symbols/Node.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Overview.html b/api/symbols/Overview.html index bcf0fd7e6..1c72b8308 100644 --- a/api/symbols/Overview.html +++ b/api/symbols/Overview.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Palette.html b/api/symbols/Palette.html index 8eb163d53..7d2a43425 100644 --- a/api/symbols/Palette.html +++ b/api/symbols/Palette.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Panel.html b/api/symbols/Panel.html index 1e3c9fa09..5202dfefa 100644 --- a/api/symbols/Panel.html +++ b/api/symbols/Panel.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/PanningTool.html b/api/symbols/PanningTool.html index 4ad7e776a..1ec3a176d 100644 --- a/api/symbols/PanningTool.html +++ b/api/symbols/PanningTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Part.html b/api/symbols/Part.html index 184df0b99..ec8560f9f 100644 --- a/api/symbols/Part.html +++ b/api/symbols/Part.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/PathFigure.html b/api/symbols/PathFigure.html index 75721decb..731771ca7 100644 --- a/api/symbols/PathFigure.html +++ b/api/symbols/PathFigure.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/PathSegment.html b/api/symbols/PathSegment.html index a13ce9bd7..c6faac9cd 100644 --- a/api/symbols/PathSegment.html +++ b/api/symbols/PathSegment.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Picture.html b/api/symbols/Picture.html index 60e0d0319..2115b61f3 100644 --- a/api/symbols/Picture.html +++ b/api/symbols/Picture.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Placeholder.html b/api/symbols/Placeholder.html index 61d51136d..4798645bb 100644 --- a/api/symbols/Placeholder.html +++ b/api/symbols/Placeholder.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Point.html b/api/symbols/Point.html index aa9f7534a..03ab105f4 100644 --- a/api/symbols/Point.html +++ b/api/symbols/Point.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Rect.html b/api/symbols/Rect.html index 0b77ae47d..948d22027 100644 --- a/api/symbols/Rect.html +++ b/api/symbols/Rect.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/RelinkingTool.html b/api/symbols/RelinkingTool.html index bbdb3ab1b..9e8378c8a 100644 --- a/api/symbols/RelinkingTool.html +++ b/api/symbols/RelinkingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ResizingTool.html b/api/symbols/ResizingTool.html index 7b5c81570..1b5858d37 100644 --- a/api/symbols/ResizingTool.html +++ b/api/symbols/ResizingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/RotatingTool.html b/api/symbols/RotatingTool.html index ec250a325..102a7abb1 100644 --- a/api/symbols/RotatingTool.html +++ b/api/symbols/RotatingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/RowColumnDefinition.html b/api/symbols/RowColumnDefinition.html index 470312b1e..673941ec4 100644 --- a/api/symbols/RowColumnDefinition.html +++ b/api/symbols/RowColumnDefinition.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Set.html b/api/symbols/Set.html index 19dcb0c16..bf95563da 100644 --- a/api/symbols/Set.html +++ b/api/symbols/Set.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Shape.html b/api/symbols/Shape.html index 42bfc73d8..e34ad3c17 100644 --- a/api/symbols/Shape.html +++ b/api/symbols/Shape.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Size.html b/api/symbols/Size.html index 0706badd8..c6d391f21 100644 --- a/api/symbols/Size.html +++ b/api/symbols/Size.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Spot.html b/api/symbols/Spot.html index 40944d1bf..b80cfcfc1 100644 --- a/api/symbols/Spot.html +++ b/api/symbols/Spot.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/TextBlock.html b/api/symbols/TextBlock.html index cde5133f7..abfda20ae 100644 --- a/api/symbols/TextBlock.html +++ b/api/symbols/TextBlock.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/TextEditingTool.html b/api/symbols/TextEditingTool.html index 7cbbfc836..4d9fc8410 100644 --- a/api/symbols/TextEditingTool.html +++ b/api/symbols/TextEditingTool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Tool.html b/api/symbols/Tool.html index 5c35c3879..587d586f1 100644 --- a/api/symbols/Tool.html +++ b/api/symbols/Tool.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/ToolManager.html b/api/symbols/ToolManager.html index 4df11ab46..6cb273d4a 100644 --- a/api/symbols/ToolManager.html +++ b/api/symbols/ToolManager.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/Transaction.html b/api/symbols/Transaction.html index 18cf86737..164da6e8d 100644 --- a/api/symbols/Transaction.html +++ b/api/symbols/Transaction.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/TreeEdge.html b/api/symbols/TreeEdge.html index cd2809b17..f11d34c81 100644 --- a/api/symbols/TreeEdge.html +++ b/api/symbols/TreeEdge.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/TreeLayout.html b/api/symbols/TreeLayout.html index 014c2bebd..747093a1f 100644 --- a/api/symbols/TreeLayout.html +++ b/api/symbols/TreeLayout.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/TreeModel.html b/api/symbols/TreeModel.html index c74a1eb50..1ad645444 100644 --- a/api/symbols/TreeModel.html +++ b/api/symbols/TreeModel.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/TreeVertex.html b/api/symbols/TreeVertex.html index 2a9d5aeb4..d5db3b077 100644 --- a/api/symbols/TreeVertex.html +++ b/api/symbols/TreeVertex.html @@ -1133,7 +1133,7 @@ diff --git a/api/symbols/UndoManager.html b/api/symbols/UndoManager.html index 6961fe814..eac9c6b82 100644 --- a/api/symbols/UndoManager.html +++ b/api/symbols/UndoManager.html @@ -1133,7 +1133,7 @@ diff --git a/doc/changelog.html b/doc/changelog.html index dea8f4e68..f53a8cfe6 100644 --- a/doc/changelog.html +++ b/doc/changelog.html @@ -78,6 +78,15 @@

GoJS Change Log


+

+ Changes for 1.8.18 +

+ +

Changes for 1.8.17

diff --git a/intro/grids.html b/intro/grids.html index 44b9f0bb7..41d449006 100644 --- a/intro/grids.html +++ b/intro/grids.html @@ -18,7 +18,7 @@

Grid Patterns

You may also want to force dragged parts to be aligned on grid points, and to resize parts to be multiples of the grid cell size.

-Grids are implemented using a type of Panel, Panel.Grid. +Grids are implemented using a type of Panel, Panel,Grid. Grid Panels, like most other types of Panels, can be used within Nodes or any other kind of Part. However when they are used as the Diagram.grid, they are effectively infinite in extent.

@@ -36,8 +36,6 @@

Default Grid

   diagram.grid.visible = true;
 
-  diagram.initialContentAlignment = go.Spot.Center;
-
   diagram.nodeTemplate =
     $(go.Node, "Auto",
       $(go.Shape, "Rectangle", { fill: "lightgray" }),
@@ -61,7 +59,6 @@ 

Grid Snapping

diagram.toolManager.draggingTool.isGridSnapEnabled = true; diagram.toolManager.resizingTool.isGridSnapEnabled = true; - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -87,7 +84,6 @@

Simple Grid Customization

diagram.toolManager.draggingTool.isGridSnapEnabled = true; diagram.toolManager.resizingTool.isGridSnapEnabled = true; - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -106,7 +102,9 @@

Simple Grid Customization

The cell size used when snapping the locations of Parts during a drag need not be exactly the same as the background grid's cell size. -The value of DraggingTool.gridSnapCellSize takes precedence over the Panel.gridCellSize. +The value of DraggingTool.gridSnapCellSize takes precedence over the Panel.gridCellSize. +Note that if DraggingTool.gridSnapCellSize is set but ResizingTool.cellSize is not, +Parts will use the DraggingTool.gridSnapCellSize value when resizing.

   diagram.grid.visible = true;
@@ -117,7 +115,6 @@ 

Simple Grid Customization

// (the default background grid has a cell size of 10x10) diagram.toolManager.draggingTool.gridSnapCellSize = new go.Size(20, 20); - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -135,7 +132,7 @@

Simple Grid Customization

Custom Grids

-Grid patterns are implemented by the Panel class when its Panel.type is Panel.Grid. +Grid patterns are implemented by the Panel class when its Panel.type is Panel,Grid. The elements of a Grid Panel must be Shapes whose Shape.figure is one of a small set of known kinds of figures. The only figures it can accept are: "LineH", "LineV", "BarH", and "BarV". The two "Line" figures result in stroked lines separating the grid cells; @@ -169,7 +166,6 @@

Custom Grids

$(go.Shape, "LineV", { stroke: "green", interval: 5 }) ); - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -224,7 +220,6 @@

Custom Grids

$(go.Shape, "BarH", { fill: "lightgreen", interval: 2, height: 50 }) ); - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -260,7 +255,6 @@

Custom Grids

$(go.Shape, "BarH", { fill: "rgba(255,0,0,0.1)", height: 50 }) ); - diagram.initialContentAlignment = go.Spot.Center; diagram.toolManager.draggingTool.isGridSnapEnabled = true; diagram.nodeTemplate = @@ -283,7 +277,6 @@

Custom Grids

Here is an example of using a "Grid" Panel as a regular data bound element in a Node:

-  diagram.initialContentAlignment = go.Spot.Center;
 
   diagram.nodeTemplate =
     $(go.Node, "Auto",
diff --git a/learn/index.html b/learn/index.html
index d724583b2..3ba8faf56 100644
--- a/learn/index.html
+++ b/learn/index.html
@@ -69,25 +69,25 @@ 

Get Started with GoJS

-

GoJS Tutorials

-

For video tutorials, click here.

-

For a GraphObject manipulation tutorial, click here.

-

For the text tutorial, read on.

- -

Text Tutorial

-

- GoJS is a JavaScript library for implementing interactive diagrams. - This page will show you the essentials of using GoJS. - If you would rather watch videos instead, see our YouTube videos. -

- -

- Because GoJS is a JavaScript library that depends on HTML5 features, - you will need to make sure that your page declares that it is an HTML5 document. - And of course you need to load the library: -

- -

+      

GoJS Tutorials

+

+ For video tutorials, click here. + For the textual tutorials, read on. +

+ +

+ GoJS is a JavaScript library for implementing interactive diagrams. + This page will show you the essentials of using GoJS. + If you would rather watch videos instead, see our YouTube videos. +

+ +

+ Because GoJS is a JavaScript library that depends on HTML5 features, + you will need to make sure that your page declares that it is an HTML5 document. + And of course you need to load the library: +

+ +

 <!DOCTYPE html>  <!-- HTML5 document type -->
 <html>
 <head>
@@ -96,85 +96,85 @@ 

Text Tutorial

. . .
-

- You can download GoJS (and all the samples) here. - Alternatively you can link straight to the GoJS library provided by CDNJS: +

+ You can download GoJS (and all the samples) here. + Alternatively you can link straight to the GoJS library provided by CDNJS: -

+
- + -

- Each GoJS diagram is contained in an HTML <div> element in your - HTML page that you give an explicit size: -

+

+ Each GoJS diagram is contained in an HTML <div> element in your + HTML page that you give an explicit size: +

-

+      

 <!-- The DIV for a Diagram needs an explicit size or else we will not see anything.
      In this case we also add a background color so we can see that area. -->
 <div id="myDiagramDiv"
      style="width:400px; height:150px; background-color: #DAE4E4;"></div>
     
-

- In JavaScript code you pass the <div>'s id when making a Diagram: -

+

+ In JavaScript code you pass the <div>'s id when making a Diagram: +

-

+      

 var $ = go.GraphObject.make;
 var myDiagram =
   $(go.Diagram, "myDiagramDiv");
     
-

- Together, this creates an empty diagram: -

- - -
- - -

- Notice that go is the "namespace" in which all GoJS types reside. - All code uses of GoJS classes such as Diagram or Node or Panel or Shape or TextBlock - will be prefixed with "go.". -

-

- This article will show you by example how to use go.GraphObject.make to build GoJS objects. - For more detail, read Building Objects in GoJS. - Using $ as an abbreviation for go.GraphObject.make - is so handy that we will assume its use from now on. - If you use $ for something else in your code, - you can always pick a different short variable name, - such as $$ or MAKE or GO. -

- -

Diagrams and Models

- -

- The Nodes and Links of a Diagram are visualizations of data that is managed by a Model. - GoJS has a model-view architecture, - where Models hold the data (arrays of JavaScript objects) that describe nodes and links, - and Diagrams act as views to visualize this data using actual Node and Link objects. - Models, not Diagrams, are what you load and then save after editing. - You add whatever properties you need for your app on the data objects in the model; - you do not add properties to or modify the prototype of the Diagram and GraphObject classes. -

- -

- Here's an example of a Model and Diagram, followed by the actual diagram it generates: -

- -

+      

+ Together, this creates an empty diagram: +

+ + +
+ + +

+ Notice that go is the "namespace" in which all GoJS types reside. + All code uses of GoJS classes such as Diagram or Node or Panel or Shape or TextBlock + will be prefixed with "go.". +

+

+ This article will show you by example how to use go.GraphObject.make to build GoJS objects. + For more detail, read Building Objects in GoJS. + Using $ as an abbreviation for go.GraphObject.make + is so handy that we will assume its use from now on. + If you use $ for something else in your code, + you can always pick a different short variable name, + such as $$ or MAKE or GO. +

+ +

Diagrams and Models

+ +

+ The Nodes and Links of a Diagram are visualizations of data that is managed by a Model. + GoJS has a model-view architecture, + where Models hold the data (arrays of JavaScript objects) that describe nodes and links, + and Diagrams act as views to visualize this data using actual Node and Link objects. + Models, not Diagrams, are what you load and then save after editing. + You add whatever properties you need for your app on the data objects in the model; + you do not add properties to or modify the prototype of the Diagram and GraphObject classes. +

+ +

+ Here's an example of a Model and Diagram, followed by the actual diagram it generates: +

+ +

 var $ = go.GraphObject.make;
 var myDiagram =
   $(go.Diagram, "myDiagramDiv",
@@ -192,78 +192,82 @@ 

Diagrams and Models

myDiagram.model = myModel;
- -
- - -

- The diagram displays the three nodes that are in the model. Some interaction is already possible: -

-
    -
  • Click and drag the background in the above diagram to pan the view.
  • -
  • Click a node to select it, or press down on and drag a node to move it around.
  • -
  • To create a selection box, click and hold on the background, then start dragging.
  • -
  • Use CTRL-C and CTRL-V, or control-drag-and-drop, to make a copy of the selection.
  • -
  • Press the Delete key to delete selected nodes. - (Read about more Keyboard Commands.)
  • -
  • Since the undo manager was enabled, CTRL-Z and CTRL-Y will undo and redo moves and copies and deletions.
  • -
- -

Styling Nodes

- -

- Nodes are styled by creating templates consisting of GraphObjects and setting properties on those objects. - To create a Node, we have several building block classes at our disposal: -

-
    -
  • Shape, to display pre-defined or custom geometry with colors
  • -
  • TextBlock, to display (potentially editable) text in various fonts
  • -
  • Picture, to display images
  • -
  • Panel, containers to hold a collection of other objects that - can be positioned and sized in different manners according to the type of the Panel (like tables, - vertical stacks, and stretching containers)
  • -
- -

- All of these building blocks are derived from the - GraphObject abstract class, - so we casually refer to them as GraphObjects or objects or elements. - Note that a GraphObject is not an HTML DOM element, so there is not as much overhead in - creating or modifying such objects. -

- -

- We want the model data properties to affect our Nodes, and this is done by way of data bindings. - Data bindings allow us to change the appearance and behavior of GraphObjects in Nodes by automatically setting - properties on those GraphObjects to values that are taken from the model data. - The model data objects are plain JavaScript objects. - You can choose to use whatever property names you like on the node data in the model. -

- -

- The default Node template is simple: A Node which contains one TextBlock. - There is a data binding between a TextBlock's text property and - the model data's key property. - In code, the template looks something like this: -

- -

+            });
+
+        var myModel = $(go.Model);
+        // in the model data, each node is represented by a JavaScript object:
+        myModel.nodeDataArray = [
+          { key: "Alpha" },
+          { key: "Beta" },
+          { key: "Gamma" }
+        ];
+        myDiagram.model = myModel;
+      
+
+      

+ The diagram displays the three nodes that are in the model. Some interaction is already possible: +

+
    +
  • Click and drag the background in the above diagram to pan the view.
  • +
  • Click a node to select it, or press down on and drag a node to move it around.
  • +
  • To create a selection box, click and hold on the background, then start dragging.
  • +
  • Use CTRL-C and CTRL-V, or control-drag-and-drop, to make a copy of the selection.
  • +
  • + Press the Delete key to delete selected nodes. + (Read about more Keyboard Commands.) +
  • +
  • Since the undo manager was enabled, CTRL-Z and CTRL-Y will undo and redo moves and copies and deletions.
  • +
+ +

Styling Nodes

+ +

+ Nodes are styled by creating templates consisting of GraphObjects and setting properties on those objects. + To create a Node, we have several building block classes at our disposal: +

+
    +
  • Shape, to display pre-defined or custom geometry with colors
  • +
  • TextBlock, to display (potentially editable) text in various fonts
  • +
  • Picture, to display images
  • +
  • + Panel, containers to hold a collection of other objects that + can be positioned and sized in different manners according to the type of the Panel (like tables, + vertical stacks, and stretching containers) +
  • +
+ +

+ All of these building blocks are derived from the + GraphObject abstract class, + so we casually refer to them as GraphObjects or objects or elements. + Note that a GraphObject is not an HTML DOM element, so there is not as much overhead in + creating or modifying such objects. +

+ +

+ We want the model data properties to affect our Nodes, and this is done by way of data bindings. + Data bindings allow us to change the appearance and behavior of GraphObjects in Nodes by automatically setting + properties on those GraphObjects to values that are taken from the model data. + The model data objects are plain JavaScript objects. + You can choose to use whatever property names you like on the node data in the model. +

+ +

+ The default Node template is simple: A Node which contains one TextBlock. + There is a data binding between a TextBlock's text property and + the model data's key property. + In code, the template looks something like this: +

+ +

 myDiagram.nodeTemplate =
   $(go.Node,
     $(go.TextBlock,
@@ -271,17 +275,17 @@ 

Styling Nodes

new go.Binding("text", "key")) );
-

- TextBlocks, Shapes, and Pictures are the primitive building blocks of GoJS. - TextBlocks cannot contain images; Shapes cannot contain text. - If you want your node to show some text, you must use a TextBlock. - If you want to draw or fill some geometrical figures, you must use a Shape. -

-

- More generally, the skeleton of a Node template will look something like this: -

- -

+      

+ TextBlocks, Shapes, and Pictures are the primitive building blocks of GoJS. + TextBlocks cannot contain images; Shapes cannot contain text. + If you want your node to show some text, you must use a TextBlock. + If you want to draw or fill some geometrical figures, you must use a Shape. +

+

+ More generally, the skeleton of a Node template will look something like this: +

+ +

 myDiagram.nodeTemplate =
   $(go.Node, "Vertical", // second argument of a Node/Panel can be a Panel type
     /* set Node properties here */
@@ -309,28 +313,29 @@ 

Styling Nodes

);
-

- The nesting of GraphObjects within Panels can be arbitrarily deep, - and every class has its own unique set of properties to explore, - but this shows the general idea. -

- -

- Now that we have seen how to make a Node template, let's see a live example. - We will make a simple template commonly seen in organizational diagrams — an image next to a name. - Consider the following Node template: -

-
    -
  • A Node of "Horizontal" Panel type, meaning that its elements will be laid out horizontally side-by-side. - It has two elements: -
      -
    • A Picture for the portrait, with the image source data bound
    • -
    • A TextBlock for the name, with the text data bound
    • -
    -
  • -
- -

+      

+ The nesting of GraphObjects within Panels can be arbitrarily deep, + and every class has its own unique set of properties to explore, + but this shows the general idea. +

+ +

+ Now that we have seen how to make a Node template, let's see a live example. + We will make a simple template commonly seen in organizational diagrams — an image next to a name. + Consider the following Node template: +

+
    +
  • + A Node of "Horizontal" Panel type, meaning that its elements will be laid out horizontally side-by-side. + It has two elements: +
      +
    • A Picture for the portrait, with the image source data bound
    • +
    • A TextBlock for the name, with the text data bound
    • +
    +
  • +
+ +

 var $ = go.GraphObject.make;
 var myDiagram =
   $(go.Diagram, "myDiagramDiv",
@@ -370,79 +375,79 @@ 

Styling Nodes

myDiagram.model = model;
-

That code produces this diagram:

+

That code produces this diagram:

- -
- - -

- We may want to show some "default" state when not all information is present, - for instance when an image does not load or when a name is not known. - The "empty" node data in this example is used to show that node templates can work - perfectly well without any of the properties on the bound data. -

- -

Kinds of Models

- -

- With a custom node template our diagram is becoming a pretty sight, but perhaps we want to show more. - Perhaps we want an organizational chart to show that Don Meow is really the boss of a cat cartel. - So we will create a complete organization chart diagram by adding some Links to show the relationship - between individual nodes and a Layout to automatically position the nodes. -

- -

- In order to get links into our diagram, the basic Model is not going to cut it. - We are going to have to pick one of the other two models in GoJS, both of which support Links. - These are GraphLinksModel and TreeModel. - (Read more about models here.) -

- -

- In GraphLinksModel, we have model.linkDataArray in addition to the model.nodeDataArray. - It holds an array of JavaScript objects, each describing a link by specifying the "to" and "from" node keys. - Here's an example where node A links to node B and where node B links to node C: -

- -

+            });
+
+        // define a simple Node template
+        myDiagram.nodeTemplate =
+          $(go.Node, "Horizontal",
+            // the entire node will have a light-blue background
+            { background: "#44CCFF" },
+            $(go.Picture,
+              // the picture has a red background, only visible when there is no source set
+              // or when the image is partially transparent
+              { margin: 10, width: 50, height: 50, background: "red" },
+              // Picture.source is data bound to the "source" attribute of model data:
+              new go.Binding("source")),
+            $(go.TextBlock,
+              "Default Text",  // the initial value for TextBlock.text
+              // some room around the text, a larger font, and a white stroke
+              { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
+              // TextBlock.text is data bound to the "name" attribute of model data:
+              new go.Binding("text", "name"))
+          );
+
+        var model = $(go.Model);
+        model.nodeDataArray =
+          [ // note that each node data object holds whatever properties it needs;
+            // for this app we add the "name" and "source" properties
+            { name: "Don Meow", source: "cat1.png" },
+            { name: "Copricat", source: "cat2.png" },
+            { name: "Demeter", source: "cat3.png" },
+            { /* Empty node data */ }
+          ];
+        myDiagram.model = model;
+      
+
+      

+ We may want to show some "default" state when not all information is present, + for instance when an image does not load or when a name is not known. + The "empty" node data in this example is used to show that node templates can work + perfectly well without any of the properties on the bound data. +

+ +

Kinds of Models

+ +

+ With a custom node template our diagram is becoming a pretty sight, but perhaps we want to show more. + Perhaps we want an organizational chart to show that Don Meow is really the boss of a cat cartel. + So we will create a complete organization chart diagram by adding some Links to show the relationship + between individual nodes and a Layout to automatically position the nodes. +

+ +

+ In order to get links into our diagram, the basic Model is not going to cut it. + We are going to have to pick one of the other two models in GoJS, both of which support Links. + These are GraphLinksModel and TreeModel. + (Read more about models here.) +

+ +

+ In GraphLinksModel, we have model.linkDataArray in addition to the model.nodeDataArray. + It holds an array of JavaScript objects, each describing a link by specifying the "to" and "from" node keys. + Here's an example where node A links to node B and where node B links to node C: +

+ +

 var model = $(go.GraphLinksModel);
 model.nodeDataArray =
 [
@@ -458,20 +463,20 @@ 

Kinds of Models

myDiagram.model = model;
-

- A GraphLinksModel allows you to have any number of links between nodes, going in any direction. - There could be ten links running from A to B, and three more running the opposite way, from B to A. -

+

+ A GraphLinksModel allows you to have any number of links between nodes, going in any direction. + There could be ten links running from A to B, and three more running the opposite way, from B to A. +

-

- A TreeModel works a little differently. - Instead of maintaining a separate array of link data, - the links in a tree model are created by specifying a "parent" for a node data. - Links are then created from this association. - Here's the same example done as a TreeModel, with node A linking to node B and node B linking to node C: -

+

+ A TreeModel works a little differently. + Instead of maintaining a separate array of link data, + the links in a tree model are created by specifying a "parent" for a node data. + Links are then created from this association. + Here's the same example done as a TreeModel, with node A linking to node B and node B linking to node C: +

-

+      

 var model = $(go.TreeModel);
 model.nodeDataArray =
 [
@@ -482,19 +487,19 @@ 

Kinds of Models

myDiagram.model = model;
-

- TreeModel is simpler than GraphLinksModel, but it cannot make arbitrary link relationships, - such as multiple links between the same two nodes, or having multiple parents. - Our organizational diagram is a simple hierarchical tree-like structure, - so we will choose TreeModel for this example. -

+

+ TreeModel is simpler than GraphLinksModel, but it cannot make arbitrary link relationships, + such as multiple links between the same two nodes, or having multiple parents. + Our organizational diagram is a simple hierarchical tree-like structure, + so we will choose TreeModel for this example. +

-

- First, we will complete the data by adding a few more nodes, using a TreeModel, - and specifying keys and parents in the data. -

+

+ First, we will complete the data by adding a few more nodes, using a TreeModel, + and specifying keys and parents in the data. +

-

+      

 var $ = go.GraphObject.make;
 var myDiagram =
   $(go.Diagram, "myDiagramDiv",
@@ -528,84 +533,84 @@ 

Kinds of Models

myDiagram.model = model;
- -
- - -

Diagram Layouts

- -

- As you can see the TreeModel automatically creates the necessary Links to associate the Nodes, - but it's hard to tell whose parent is who. -

- -

- Diagrams have a default layout which takes all nodes that do not have a location and gives them locations, - arranging them in a grid. - We could explicitly give each of our nodes a location to sort out this organizational mess, - but as an easier solution in our case, we will use a layout that gives us good locations automatically. -

- -

- We want to show a hierarchy, and are already using a TreeModel, so the most natural layout choice is TreeLayout. - TreeLayout defaults to flowing from left to right, so to get it to flow from top to bottom - (as is common in organizational diagrams), we will set the angle property to 90. -

- -

- Using layouts in GoJS is usually simple. - Each kind of layout has a number of properties that affect the results. - There are samples for each layout (like TreeLayout Demo) - that showcase its properties. -

- -

+            });
+
+        // the template we defined earlier
+        myDiagram.nodeTemplate =
+          $(go.Node, "Horizontal",
+            { background: "#44CCFF" },
+            $(go.Picture,
+              { margin: 10, width: 50, height: 50, background: "red" },
+              new go.Binding("source")),
+            $(go.TextBlock, "Default Text",
+              { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
+              new go.Binding("text", "name"))
+          );
+
+        var model = $(go.TreeModel);
+        model.nodeDataArray =
+          [
+            { key: "1", name: "Don Meow", source: "cat1.png" },
+            { key: "2", parent: "1", name: "Demeter", source: "cat2.png" },
+            { key: "3", parent: "1", name: "Copricat", source: "cat3.png" },
+            { key: "4", parent: "3", name: "Jellylorum", source: "cat4.png" },
+            { key: "5", parent: "3", name: "Alonzo", source: "cat5.png" },
+            { key: "6", parent: "2", name: "Munkustrap", source: "cat6.png" }
+          ];
+        myDiagram.model = model;
+      
+
+      

Diagram Layouts

+ +

+ As you can see the TreeModel automatically creates the necessary Links to associate the Nodes, + but it's hard to tell whose parent is who. +

+ +

+ Diagrams have a default layout which takes all nodes that do not have a location and gives them locations, + arranging them in a grid. + We could explicitly give each of our nodes a location to sort out this organizational mess, + but as an easier solution in our case, we will use a layout that gives us good locations automatically. +

+ +

+ We want to show a hierarchy, and are already using a TreeModel, so the most natural layout choice is TreeLayout. + TreeLayout defaults to flowing from left to right, so to get it to flow from top to bottom + (as is common in organizational diagrams), we will set the angle property to 90. +

+ +

+ Using layouts in GoJS is usually simple. + Each kind of layout has a number of properties that affect the results. + There are samples for each layout (like TreeLayout Demo) + that showcase its properties. +

+ +

 // define a TreeLayout that flows from top to bottom
 myDiagram.layout =
   $(go.TreeLayout,
     { angle: 90, layerSpacing: 35 });
     
-

- GoJS has several other layouts, which you can read about here. -

+

+ GoJS has several other layouts, which you can read about here. +

-

- Adding the layout to the diagram and model so far, we can see our results: -

+

+ Adding the layout to the diagram and model so far, we can see our results: +

-

+      

 var $ = go.GraphObject.make;
 var myDiagram =
   $(go.Diagram, "myDiagramDiv",
@@ -640,62 +645,62 @@ 

Diagram Layouts

myDiagram.model = model;
- -
- - -

- Our diagram is starting to look like a proper organization chart, but we could do better with the links. -

- -

Link Templates

- -

- We will construct a new Link template that will better suit our wide, boxy nodes. - A Link is a different kind of Part, not like a Node. - The main element of a Link is the Link's shape, - and must be a Shape that will have its geometry computed dynamically by GoJS. - Our link is going to consist of just this shape, - with its stroke a little thicker than normal and dark gray instead of black. - Unlike the default link template we will not have an arrowhead. - And we will change the Link routing property from Normal to Orthogonal, - and give it a corner value so that right-angle turns are rounded. -

- -

+              layout: $(go.TreeLayout, // specify a Diagram.layout that arranges trees
+                { angle: 90, layerSpacing: 35 })
+            });
+
+        // the template we defined earlier
+        myDiagram.nodeTemplate =
+          $(go.Node, "Horizontal",
+            { background: "#44CCFF" },
+            $(go.Picture,
+              { margin: 10, width: 50, height: 50, background: "red" },
+              new go.Binding("source")),
+            $(go.TextBlock, "Default Text",
+              { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
+              new go.Binding("text", "name"))
+          );
+
+        var model = $(go.TreeModel);
+        model.nodeDataArray =
+          [
+            { key: "1", name: "Don Meow", source: "cat1.png" },
+            { key: "2", parent: "1", name: "Demeter", source: "cat2.png" },
+            { key: "3", parent: "1", name: "Copricat", source: "cat3.png" },
+            { key: "4", parent: "3", name: "Jellylorum", source: "cat4.png" },
+            { key: "5", parent: "3", name: "Alonzo", source: "cat5.png" },
+            { key: "6", parent: "2", name: "Munkustrap", source: "cat6.png" }
+          ];
+        myDiagram.model = model;
+      
+
+      

+ Our diagram is starting to look like a proper organization chart, but we could do better with the links. +

+ +

Link Templates

+ +

+ We will construct a new Link template that will better suit our wide, boxy nodes. + A Link is a different kind of Part, not like a Node. + The main element of a Link is the Link's shape, + and must be a Shape that will have its geometry computed dynamically by GoJS. + Our link is going to consist of just this shape, + with its stroke a little thicker than normal and dark gray instead of black. + Unlike the default link template we will not have an arrowhead. + And we will change the Link routing property from Normal to Orthogonal, + and give it a corner value so that right-angle turns are rounded. +

+ +

 // define a Link template that routes orthogonally, with no arrowhead
 myDiagram.linkTemplate =
   $(go.Link,
@@ -709,13 +714,13 @@ 

Link Templates

);
-

- Combining our Link template with our Node template, TreeModel, and TreeLayout, - we finally have a full organization diagram. - The complete code is repeated below, and the resulting diagram follows: -

+

+ Combining our Link template with our Node template, TreeModel, and TreeLayout, + we finally have a full organization diagram. + The complete code is repeated below, and the resulting diagram follows: +

-

+      

 var $ = go.GraphObject.make;
 
 var myDiagram =
@@ -757,62 +762,65 @@ 

Link Templates

myDiagram.model = model;
- -
- - -

- Now that you are familiar with some of the basics of GoJS, - consider perusing the samples to see some of the diagrams possible with GoJS, - or read the technical introduction to get - an in-depth look at the components of GoJS. -

- - - - -
+ layout: $(go.TreeLayout, + { angle: 90, layerSpacing: 35 }) + }); + + // the template we defined earlier + myDiagram.nodeTemplate = + $(go.Node, "Horizontal", + { background: "#44CCFF" }, + $(go.Picture, + { margin: 10, width: 50, height: 50, background: "red" }, + new go.Binding("source")), + $(go.TextBlock, "Default Text", + { margin: 12, stroke: "white", font: "bold 16px sans-serif" }, + new go.Binding("text", "name")) + ); + + // define a Link template that routes orthogonally, with no arrowhead + myDiagram.linkTemplate = + $(go.Link, + { routing: go.Link.Orthogonal, corner: 5 }, + $(go.Shape, { strokeWidth: 3, stroke: "#555" })); // the link shape + + var model = $(go.TreeModel); + model.nodeDataArray = + [ + { key: "1", name: "Don Meow", source: "cat1.png" }, + { key: "2", parent: "1", name: "Demeter", source: "cat2.png" }, + { key: "3", parent: "1", name: "Copricat", source: "cat3.png" }, + { key: "4", parent: "3", name: "Jellylorum", source: "cat4.png" }, + { key: "5", parent: "3", name: "Alonzo", source: "cat5.png" }, + { key: "6", parent: "2", name: "Munkustrap", source: "cat6.png" } + ]; + myDiagram.model = model; + + +

Learn More

+

+ You may want to read more tutorials, such as the GraphObject manipulation tutorial. + You can also watch tutorials on YouTube. +

+

+ Also consider perusing the samples to see some of the diagrams possible with GoJS, + or read the technical introduction to get + an in-depth look at the components of GoJS. +

+ + + + diff --git a/package.json b/package.json index dfa4824d0..a305fede1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gojs", - "version": "1.8.17", + "version": "1.8.18", "description": "Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams", "keywords": [ "diagram", "chart", "tree", "flowchart", "orgchart", "uml", "bpmn", "graphics", "editor", "inspector", "drawing", "canvas", "shape", "svg", "hierarchy", "node", "link", "group", "vertex", "edge", "connection", "port", "label", "arrowhead", "family-tree", "decision-tree", "mindmap", "tournament", "treeview", "pipe-tree", "genogram", "ivr-tree", "parse-tree", "concept-map", "euler", "visualization", "entity-relationship", "er-diagram", "friend-wheel", "radial", "graph-distances", "graph-paths", "sankey", "pert", "gantt", "timeline", "monitor", "layer", "swimlane", "spreadsheet", "virtualization", "flow", "process", "state", "sequential-function", "grafcet", "sequence", "circuit", "record", "field", "table", "dataflow", "data-flow", "planogram", "seating", "pipes", "overview", "palette", "comment", "layout", "grid-layout", "tree-layout", "force-directed", "layered", "hierarchical", "circular", "fishbone", "ishikawa", "parallel", "serpentine", "treemap", "tree-map", "freehand", "polygon", "polyline", "bezier", "panel", "view", "model", "databinding", "data-binding", "binding", "transaction", "coordinates", "subgraph", "selection", "highlight", "tooltip", "context-menu", "tool", "command", "validation", "button", "template", "legend", "grid", "printing" ], "homepage": "https://gojs.net", diff --git a/release/go-debug.js b/release/go-debug.js index 7a2577b32..a83d85da9 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,9 +1,9 @@ /* - * GoJS v1.8.17 JavaScript Library for HTML Diagrams + * GoJS v1.8.18 JavaScript Library for HTML Diagrams * Northwoods Software, https://www.nwoods.com/ * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. * Copyright (C) 1998-2018 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.8.17/doc/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.8.18/doc/license.html. */ (function(window) { var f,ca={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript"); Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return g.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),g=this;c.prototype=this.prototype;b.prototype=new c;return b}); @@ -43,7 +43,7 @@ c).trim();if(""!==b)return a.vz=b}else if(D.Qa(a)&&a.constructor)return D.yf(a.c (c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){v&&D.trace("property get error: "+d.toString())}return c},Ua:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){v&&D.trace("property set error: "+d.toString())}},nv:function(a,b){D.h(a,"object","Setting properties requires Objects as arguments");D.h(b,"object","Setting properties requires Objects as arguments");var c=a instanceof x,d=a instanceof E,e;for(e in b){""=== e&&D.k("Setting properties requires non-empty property names");var g=a,h=e;if(c||d){var k=e.indexOf(".");if(0c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0, -g="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cd;d++)b[D.Wg("7ca11abfd7330390")](D.Wg(c[d-1]),10,15*d+0);b[D.Wg("7ca11abfd022028846")]=D.Wg("39f046ebb36e4b");for(d=1;5>d;d++)b[D.Wg("7ca11abfd7330390")](D.Wg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])D.s=function(a,b){var c=new ya(a,b,2);Object.freeze(c);a[b]=c;var d=a.Av;d instanceof na||(d=new na("string",ya),a.Av=d);d.add(b,c);return c};return a}();function ya(a,b,c){D.xc(this);this.NC=a;this.ac=b;this.SH=c}D.ka("EnumValue",ya);ya.prototype.toString=function(){return D.yf(this.NC)+"."+this.ac};D.w(ya,{Re:"classType"},function(){return this.NC});D.w(ya,{name:"name"},function(){return this.ac});D.w(ya,{value:"value"},function(){return this.SH}); @@ -198,713 +198,713 @@ hd.prototype.copy=function(){var a=new hd;a.bc[0]=this.bc[0];a.bc[1]=this.bc[1]; id.prototype.addColorStop=function(a,b){this.gF.push({offset:a,color:b})}; function qd(a,b,c){this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.eo=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.strokeStyle="#000000";this.textAlign="start";this.eq=!1;this.Pg=this.Gt=this.Ft=0;this.document=b||document;this.AF=c;this.ny=null;this.path=[];this.Mh=new hd;this.stack=[];this.zf=[];this.Sx=a;this.WJ="http://www.w3.org/2000/svg"; this.width=this.Sx.width;this.height=this.Sx.height;this.Gm=rd(this,"svg",{width:this.width+"px",height:this.height+"px",viewBox:"0 0 "+this.Sx.width+" "+this.Sx.height});this.Gm.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg");this.Gm.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");sd(this,1,0,0,1,0,0);a=D.Mm++;b=rd(this,"clipPath",{id:"mainClip"+a});b.appendChild(rd(this,"rect",{x:0,y:0,width:this.width,height:this.height})); -this.Gm.appendChild(b);this.zf[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}f=qd.prototype;f.arc=function(a,b,c,d,e,g){td(this,a,b,c,d,e,g)};f.beginPath=function(){this.path=[]};f.bezierCurveTo=function(a,b,c,d,e,g){this.path.push(["C",a,b,c,d,e,g])};f.clearRect=function(){};f.clip=function(){ud(this,"clipPath",this.path,new hd)};f.closePath=function(){this.path.push(["z"])};f.createLinearGradient=function(a,b,c,d){var e=new id("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -f.createPattern=function(){return null};f.createRadialGradient=function(a,b,c,d,e,g){var h=new id("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=e;h.r2=g;return h}; +this.Gm.appendChild(b);this.zf[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}f=qd.prototype;f.arc=function(a,b,c,d,e,g){var h=2*Math.PI,k=c*Math.cos(d),l=c*Math.sin(d),m=a+k,n=b+l,p=g?0:1;d=g?d-e:e-d;0>d&&(d=d%h+h);d>h-1E-6?(this.path.push(["A",c,c,0,1,p,a-k,b-l]),this.path.push(["A",c,c,0,1,p,m,n])):1E-6=Math.PI),p,a+c*Math.cos(e),b+c*Math.sin(e)])};f.beginPath=function(){this.path=[]}; +f.bezierCurveTo=function(a,b,c,d,e,g){this.path.push(["C",a,b,c,d,e,g])};f.clearRect=function(){};f.clip=function(){td(this,"clipPath",this.path,new hd)};f.closePath=function(){this.path.push(["z"])};f.createLinearGradient=function(a,b,c,d){var e=new id("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e};f.createPattern=function(){return null};f.createRadialGradient=function(a,b,c,d,e,g){var h=new id("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=e;h.r2=g;return h}; f.drawImage=function(a,b,c,d,e,g,h,k,l){var m="";a instanceof HTMLCanvasElement&&(m=a.toDataURL());a instanceof HTMLImageElement&&(m=a.src);void 0===d&&(g=b,h=c,k=d=a.naturalWidth,l=e=a.naturalHeight);d=d||0;e=e||0;g=g||0;h=h||0;k=k||0;l=l||0;m={x:0,y:0,width:a.naturalWidth,height:a.naturalHeight,href:m,preserveAspectRatio:"xMidYMid slice"};Eb(d,k)&&Eb(e,l)||(m.preserveAspectRatio="none");var n="";k/=d;l/=e;if(0!==g||0!==h)n+=" translate("+g+", "+h+")";if(1!==k||1!==l)n+=" scale("+k+", "+l+")";if(0!== -b||0!==c)n+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==a.naturalWidth||e!==a.naturalHeight)a="CLIP"+D.Mm++,g=rd(this,"clipPath",{id:a}),g.appendChild(rd(this,"rect",{x:b,y:c,width:d,height:e})),this.Gm.appendChild(g),m["clip-path"]="url(#"+a+")";Ed(this,"image",m,this.Mh,n);this.addElement("image",m)};f.fill=function(){ud(this,"fill",this.path,this.Mh)};f.Xg=function(){this.eq?this.clip():this.fill()};f.fillRect=function(a,b,c,d){Fd(this,"fill",[a,b,c,d],this.Mh)}; -f.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};Ed(this,"fill",b,this.Mh);this.addElement("text",b,a[0])};f.lineTo=function(a,b){this.path.push(["L",a,b])};f.moveTo=function(a,b){this.path.push(["M",a,b])};f.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};f.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; +b||0!==c)n+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==a.naturalWidth||e!==a.naturalHeight)a="CLIP"+D.Mm++,g=rd(this,"clipPath",{id:a}),g.appendChild(rd(this,"rect",{x:b,y:c,width:d,height:e})),this.Gm.appendChild(g),m["clip-path"]="url(#"+a+")";ud(this,"image",m,this.Mh,n);this.addElement("image",m)};f.fill=function(){td(this,"fill",this.path,this.Mh)};f.Xg=function(){this.eq?this.clip():this.fill()};f.fillRect=function(a,b,c,d){Ed(this,"fill",[a,b,c,d],this.Mh)}; +f.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};ud(this,"fill",b,this.Mh);this.addElement("text",b,a[0])};f.lineTo=function(a,b){this.path.push(["L",a,b])};f.moveTo=function(a,b){this.path.push(["M",a,b])};f.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};f.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; f.restore=function(){this.Mh=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.eo=a.eo;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign}; f.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,eo:this.eo,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(k=0;k=2*Math.PI?(td(a,b,c,d,e,e+Math.PI,h),td(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,g])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,g]))}}function sd(a,b,c,d,e,g,h){var k=new hd;k.bc=[b,c,d,e,g,h];b={};Ed(a,"g",b,k);k=a.addElement("g",b);a.zf.push(k)} +return"url(#"+c+")"}function Ed(a,b,c,d){c={x:c[0],y:c[1],width:c[2],height:c[3]};ud(a,b,c,d);a.addElement("rect",c)} +function td(a,b,c,d){for(var e=[],g=0;gb?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.vr?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.vr?this.clip():this.fill()}; -f.Zj=function(){this.vr||this.stroke()};D.defineProperty(Hd,{eq:"clipInsteadOfFill"},function(){return this.vr},function(a){this.vr=a});f=Hd.prototype;f.fC=function(a,b,c){this.Ft=a;this.Gt=b;this.Pg=c};f.Em=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.xo=function(){this.shadowOffsetX=this.Ft;this.shadowOffsetY=this.Gt;this.shadowBlur=this.Pg}; +f.quadraticCurveTo=function(a,b,c,d){this.za.quadraticCurveTo(a,b,c,d)};f.rect=function(a,b,c,d){this.za.rect(a,b,c,d)};f.restore=function(){this.za.restore()};Gd.prototype.rotate=function(a){this.za.rotate(a)};f=Gd.prototype;f.save=function(){this.za.save()};f.setTransform=function(a,b,c,d,e,g){this.za.setTransform(a,b,c,d,e,g)};f.scale=function(a,b){this.za.scale(a,b)};f.stroke=function(){this.za.stroke()}; +f.transform=function(a,b,c,d,e,g){1===a&&0===b&&0===c&&1===d&&0===e&&0===g||this.za.transform(a,b,c,d,e,g)};f.translate=function(a,b){this.za.translate(a,b)};f.Xg=function(a){if(a instanceof Ba&&a.type===Hd){var b=a.Mo;a=a.xz;a>b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.vr?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.vr?this.clip():this.fill()}; +f.Zj=function(){this.vr||this.stroke()};D.defineProperty(Gd,{eq:"clipInsteadOfFill"},function(){return this.vr},function(a){this.vr=a});f=Gd.prototype;f.fC=function(a,b,c){this.Ft=a;this.Gt=b;this.Pg=c};f.Em=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.xo=function(){this.shadowOffsetX=this.Ft;this.shadowOffsetY=this.Gt;this.shadowBlur=this.Pg}; f.YA=function(a,b){var c=this.za;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else return!1;return!0};f.TA=function(){var a=this.za;void 0!==a.setLineDash?(a.setLineDash(D.ml),a.lineDashOffset=0):void 0!==a.webkitLineDash&&(a.webkitLineDash=D.ml,a.webkitLineDashOffset=0)};f.De=function(a){a&&(this.rz="");this.qz=this.sz=""}; -var Jd=(Math.sqrt(2)-1)/3*4,Kd=(new N(0,0)).Oa(),Ld=(new C(0,0,0,0)).Oa(),Sd=(new Lb(0,0,0,0)).Oa(),Td=(new Lb(2,2,2,2)).Oa(),Ud=(new N(6,6)).Oa(),Vd=(new N(-Infinity,-Infinity)).Oa(),Wd=(new N(Infinity,Infinity)).Oa(),Xd=(new Ca(0,0)).Oa(),Yd=(new Ca(1,1)).Oa(),Zd=(new Ca(6,6)).Oa(),$d=(new Ca(8,8)).Oa(),ae=(new Ca(10,10)).Oa(),ge=(new Ca(Infinity,Infinity)).Oa(),he=(new N(NaN,NaN)).Oa(),ie=(new Ca(NaN,NaN)).Oa(),je=(new C(NaN,NaN,NaN,NaN)).Oa(),ke=(new S(.156,.156)).Oa(),le=(new S(.844,.844)).Oa(), -me=new ma,ne=new ma,oe=null;function pe(a){if(0>=a)return 0;var b=oe;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);oe=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function Q(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(g=(d-b)/(c-a)*(g-a)+b,g-e<=h&&h<=g+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=g&&g<=h+e)return!0}else return!0;return!1} -function re(a,b,c,d,e,g,h,k,l,m,n,p){if(qe(a,b,h,k,p,c,d)&&qe(a,b,h,k,p,e,g))return qe(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+g)/2,t=(d+s)/2,y=(c+u)/2;return re(a,b,q,r,d,c,t,y,l,m,n,p)||re(t,y,s,u,e,g,h,k,l,m,n,p)} -function Ae(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,h,k,l,c,d)&&qe(a,b,h,k,l,e,g))Ub(m,a,b,0,0),Ub(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Ae(a,b,n,p,d,c,s,u,l,m);Ae(s,u,q,r,e,g,h,k,l,m)}} -function Be(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,h,k,l,c,d)&&qe(a,b,h,k,l,e,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Be(a,b,n,p,d,c,s,u,l,m);Be(s,u,q,r,e,g,h,k,l,m)}} -function Ce(a,b,c,d,e,g,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+g*l;e=e*s+h*l;g=g*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+g*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=g}function De(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,e,g,m,c,d))return qe(a,b,e,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return De(a,b,n,p,q,r,h,k,l,m)||De(q,r,c,d,e,g,h,k,l,m)} -function Ee(a,b,c,d,e,g,h,k){if(qe(a,b,e,g,h,c,d))Ub(k,a,b,0,0),Ub(k,e,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Ee(a,b,l,m,n,p,h,k);Ee(n,p,c,d,e,g,h,k)}}function Fe(a,b,c,d,e,g,h,k){if(qe(a,b,e,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Fe(a,b,l,m,n,p,h,k);Fe(n,p,c,d,e,g,h,k)}} -function Ge(a,b,c,d,e,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(qe(a,b,h,k,q,c,d)&&qe(a,b,h,k,q,e,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+g)/2;e=(e+h)/2;g=(g+k)/2;var t=(s+c)/2,y=(u+d)/2;c=(c+e)/2;d=(d+g)/2;var w=(t+c)/2,A=(y+d)/2, -B=(n-l)*(n-l)+(p-m)*(p-m),P=!1;Ge(a,b,s,u,t,y,w,A,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(qe(a,b,h,k,q,c,d)&&qe(a,b,h,k,q,e,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,y=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(s+t)/2;c=(u+y)/2;var t=(t+e)/2,y=(y+g)/2, -w=(d+t)/2,A=(c+y)/2,r=r+He(a,b,s,u,d,c,w,A,l,m,n,p,q),r=r+He(w,A,t,y,e,g,h,k,l,m,n,p,q)}return r} +var Id=(Math.sqrt(2)-1)/3*4,Jd=(new N(0,0)).Oa(),Kd=(new C(0,0,0,0)).Oa(),Ld=(new Lb(0,0,0,0)).Oa(),Sd=(new Lb(2,2,2,2)).Oa(),Td=(new N(6,6)).Oa(),Ud=(new N(-Infinity,-Infinity)).Oa(),Vd=(new N(Infinity,Infinity)).Oa(),Wd=(new Ca(0,0)).Oa(),Xd=(new Ca(1,1)).Oa(),Yd=(new Ca(6,6)).Oa(),Zd=(new Ca(8,8)).Oa(),$d=(new Ca(10,10)).Oa(),ae=(new Ca(Infinity,Infinity)).Oa(),ge=(new N(NaN,NaN)).Oa(),he=(new Ca(NaN,NaN)).Oa(),ie=(new C(NaN,NaN,NaN,NaN)).Oa(),je=(new S(.156,.156)).Oa(),ke=(new S(.844,.844)).Oa(), +le=new ma,me=new ma,ne=null;function oe(a){if(0>=a)return 0;var b=ne;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);ne=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function Q(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(g=(d-b)/(c-a)*(g-a)+b,g-e<=h&&h<=g+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=g&&g<=h+e)return!0}else return!0;return!1} +function qe(a,b,c,d,e,g,h,k,l,m,n,p){if(pe(a,b,h,k,p,c,d)&&pe(a,b,h,k,p,e,g))return pe(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+g)/2,t=(d+s)/2,y=(c+u)/2;return qe(a,b,q,r,d,c,t,y,l,m,n,p)||qe(t,y,s,u,e,g,h,k,l,m,n,p)} +function re(a,b,c,d,e,g,h,k,l,m){if(pe(a,b,h,k,l,c,d)&&pe(a,b,h,k,l,e,g))Ub(m,a,b,0,0),Ub(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;re(a,b,n,p,d,c,s,u,l,m);re(s,u,q,r,e,g,h,k,l,m)}} +function Ae(a,b,c,d,e,g,h,k,l,m){if(pe(a,b,h,k,l,c,d)&&pe(a,b,h,k,l,e,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Ae(a,b,n,p,d,c,s,u,l,m);Ae(s,u,q,r,e,g,h,k,l,m)}} +function Be(a,b,c,d,e,g,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+g*l;e=e*s+h*l;g=g*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+g*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=g}function Ce(a,b,c,d,e,g,h,k,l,m){if(pe(a,b,e,g,m,c,d))return pe(a,b,e,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return Ce(a,b,n,p,q,r,h,k,l,m)||Ce(q,r,c,d,e,g,h,k,l,m)} +function De(a,b,c,d,e,g,h,k){if(pe(a,b,e,g,h,c,d))Ub(k,a,b,0,0),Ub(k,e,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;De(a,b,l,m,n,p,h,k);De(n,p,c,d,e,g,h,k)}}function Ee(a,b,c,d,e,g,h,k){if(pe(a,b,e,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Ee(a,b,l,m,n,p,h,k);Ee(n,p,c,d,e,g,h,k)}} +function Fe(a,b,c,d,e,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(pe(a,b,h,k,q,c,d)&&pe(a,b,h,k,q,e,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+g)/2;e=(e+h)/2;g=(g+k)/2;var t=(s+c)/2,y=(u+d)/2;c=(c+e)/2;d=(d+g)/2;var w=(t+c)/2,A=(y+d)/2, +B=(n-l)*(n-l)+(p-m)*(p-m),P=!1;Fe(a,b,s,u,t,y,w,A,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(pe(a,b,h,k,q,c,d)&&pe(a,b,h,k,q,e,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,y=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(s+t)/2;c=(u+y)/2;var t=(t+e)/2,y=(y+g)/2, +w=(d+t)/2,A=(c+y)/2,r=r+Ge(a,b,s,u,d,c,w,A,l,m,n,p,q),r=r+Ge(w,A,t,y,e,g,h,k,l,m,n,p,q)}return r} function db(a,b,c,d,e,g,h){if(Eb(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(Eb(b,d)){ac)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-g)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005c)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(Eb(k,h))return db(a,b,c,d,e,g,l),!1;e=(h*a-k*e+g-b)/(h-k);if(Eb(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}g= -h*(e-a)+b;return db(a,b,c,d,e,g,l)}function Je(a,b,c,d,e,g,h,k,l){var m=1E21,n=a,p=b;if(Ie(a,b,a,d,e,g,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g);qm} -function Ke(a,b,c,d,e,g,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(g-k)/m,h=a,n=k*h+(g-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(g-k)/m,a=b-d*a,h=(g-k*e-a)/(d-k),n=d*h+a);l.n(h,n);return l} -function Le(a,b,c){var d=b.x,e=b.y,g=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===g?(g=a=0,e=m):e===h?(d=k):a.Pa(b)||a.Pa(c)||Pe(k,m,l,m,d,e,g,h)||Pe(l,m,l,n,d,e,g,h)||Pe(l,n,k,n,d,e,g,h)||Pe(k,n,k,m,d,e,g,h)?!0:!1}function Pe(a,b,c,d,e,g,h,k){return 0>=Qe(a,b,c,d,e,g)*Qe(a,b,c,d,h,k)&&0>=Qe(e,g,h,k,a,b)*Qe(e,g,h,k,c,d)} -function Qe(a,b,c,d,e,g){c-=a;d-=b;a=e-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0g&&(g=0)));return 0>g?-1:0a&&(a+=360);360<=a&&(a-=360);return a} -function Se(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);var g=b>c?-1:1;d=[];var h=e/2,k=b;c=Math.min(2*e,Math.abs(c-b));if(1E-5>c)return b=k+g*Math.min(c,h),g=0+a*Math.cos(k),k=0+a*Math.sin(k),h=0+a*Math.cos(b),a=0+a*Math.sin(b),b=(g+h)/2,c=(k+a)/2,d.push([g,k,b,c,b,c,h,a]),d;for(;1E-5c,g=0>d,h=0,k=h=0;ag;++g){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.la.toString()+" "+this.ja.toString()+"L"+this.F.toString()+" "+this.G.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a)+"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);case tf:var b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ -"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case uf:b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ -2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case We:for(var b="",c=this.nc.o,d=c.length,e=0;e=P-1?!0:null!==l[t+1].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)}function d(){t++;return l[t]}function e(){var a=new N(parseFloat(d()),parseFloat(d()));y===y.toLowerCase()&&(a.x=B.x+a.x,a.y=B.y+a.y);return a}function g(){return B=e()}function h(){return A=e()}function k(){return"c"!==w.toLowerCase()&&"s"!==w.toLowerCase()?B:new N(2*B.x-A.x,2*B.y-A.y)}void 0===b&&(b=!1);"string"!==typeof a&&D.kc(a,"string",Ve,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, +function He(a,b,c,d,e,g,h,k,l){if(Q(a,c)&&Q(b,d))return l.x=a,l.y=b,!1;if(Eb(e,h)){if(Eb(a,c))return db(a,b,c,d,e,g,l),!1;g=(d-b)/(c-a)*(e-a)+b;return db(a,b,c,d,e,g,l)}k=(k-g)/(h-e);if(Eb(a,c)){g=k*(a-e)+g;c=h=0;bc)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(Eb(k,h))return db(a,b,c,d,e,g,l),!1;e=(h*a-k*e+g-b)/(h-k);if(Eb(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}g= +h*(e-a)+b;return db(a,b,c,d,e,g,l)}function Ie(a,b,c,d,e,g,h,k,l){var m=1E21,n=a,p=b;if(He(a,b,a,d,e,g,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g);qm} +function Je(a,b,c,d,e,g,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(g-k)/m,h=a,n=k*h+(g-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(g-k)/m,a=b-d*a,h=(g-k*e-a)/(d-k),n=d*h+a);l.n(h,n);return l} +function Ke(a,b,c){var d=b.x,e=b.y,g=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===g?(g=a=0,e=m):e===h?(d=k):a.Pa(b)||a.Pa(c)||Le(k,m,l,m,d,e,g,h)||Le(l,m,l,n,d,e,g,h)||Le(l,n,k,n,d,e,g,h)||Le(k,n,k,m,d,e,g,h)?!0:!1}function Le(a,b,c,d,e,g,h,k){return 0>=Pe(a,b,c,d,e,g)*Pe(a,b,c,d,h,k)&&0>=Pe(e,g,h,k,a,b)*Pe(e,g,h,k,c,d)} +function Pe(a,b,c,d,e,g){c-=a;d-=b;a=e-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0g&&(g=0)));return 0>g?-1:0a&&(a+=360);360<=a&&(a-=360);return a} +function Re(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);var g=b>c?-1:1;d=[];var h=e/2,k=b;c=Math.min(2*e,Math.abs(c-b));if(1E-5>c)return b=k+g*Math.min(c,h),g=0+a*Math.cos(k),k=0+a*Math.sin(k),h=0+a*Math.cos(b),a=0+a*Math.sin(b),b=(g+h)/2,c=(k+a)/2,d.push([g,k,b,c,b,c,h,a]),d;for(;1E-5c,g=0>d,h=0,k=h=0;ag;++g){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.la.toString()+" "+this.ja.toString()+"L"+this.F.toString()+" "+this.G.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a)+"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);case Ze:var b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ +"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case tf:b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ +2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ve:for(var b="",c=this.nc.o,d=c.length,e=0;e=P-1?!0:null!==l[t+1].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)}function d(){t++;return l[t]}function e(){var a=new N(parseFloat(d()),parseFloat(d()));y===y.toLowerCase()&&(a.x=B.x+a.x,a.y=B.y+a.y);return a}function g(){return B=e()}function h(){return A=e()}function k(){return"c"!==w.toLowerCase()&&"s"!==w.toLowerCase()?B:new N(2*B.x-A.x,2*B.y-A.y)}void 0===b&&(b=!1);"string"!==typeof a&&D.kc(a,"string",Ue,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=0;m=P-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":s=!0;r=q=!1;break;case "M":m=g();null===p.fc||!0===s?(T(p,m.x,m.y,q,!1,!r),s=!1):p.moveTo(m.x,m.y);for(n=B;!c();)m=g(),p.lineTo(m.x,m.y);break;case "L":for(;!c();)m= -g(),p.lineTo(m.x,m.y);break;case "H":for(;!c();)B=m=new N((y===y.toLowerCase()?B.x:0)+parseFloat(d()),B.y),p.lineTo(B.x,B.y);break;case "V":for(;!c();)B=m=new N(B.x,(y===y.toLowerCase()?B.y:0)+parseFloat(d())),p.lineTo(B.x,B.y);break;case "C":for(;!c();){var u=e(),H=h(),m=g();U(p,u.x,u.y,H.x,H.y,m.x,m.y)}break;case "S":for(;!c();)u=k(),H=h(),m=g(),U(p,u.x,u.y,H.x,H.y,m.x,m.y);break;case "Q":for(;!c();)H=h(),m=g(),zf(p,H.x,H.y,m.x,m.y);break;case "T":for(;!c();)A=H=k(),m=g(),zf(p,H.x,H.y,m.x,m.y); -break;case "B":for(;!c();){var m=parseFloat(d()),u=parseFloat(d()),H=parseFloat(d()),R=parseFloat(d()),aa=parseFloat(d()),V=aa,ea=!1;c()||(V=parseFloat(d()),c()||(ea=0!==parseFloat(d())));y===y.toLowerCase()&&(H+=B.x,R+=B.y);p.arcTo(m,u,H,R,aa,V,ea)}break;case "A":for(;!c();)u=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),R=parseFloat(d()),aa=!!parseFloat(d()),V=!!parseFloat(d()),m=g(),Af(p,u,H,R,aa,V,m.x,m.y);break;case "Z":m=p.q.nc.o[p.q.nc.length-1];X(p);B=n;break;case "F":u="";for(m=1;l[t+ -m];)if(null!==l[t+m].match(/[Uu]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?q=!0:Bf(p);break;case "U":u="";for(m=1;l[t+m];)if(null!==l[t+m].match(/[Ff]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?r=!0:p.kb(!1)}n=p.q;D.u(p);if(b)for(p=n.nc.j;p.next();)m=p.value,m.Ku=!0;return n}; -function Cf(a,b){for(var c=a.length,d=D.P(),e=0;eh&&(h+=360),s.Ne+=h);0>a&&(s.Ne=180-s.Ne,s.Ff=-s.Ff);0>d&&(s.Ne=-s.Ne,s.Ff=-s.Ff);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case If:h=s.F;k=s.G;s.F=h* +g(),p.lineTo(m.x,m.y);break;case "H":for(;!c();)B=m=new N((y===y.toLowerCase()?B.x:0)+parseFloat(d()),B.y),p.lineTo(B.x,B.y);break;case "V":for(;!c();)B=m=new N(B.x,(y===y.toLowerCase()?B.y:0)+parseFloat(d())),p.lineTo(B.x,B.y);break;case "C":for(;!c();){var u=e(),H=h(),m=g();U(p,u.x,u.y,H.x,H.y,m.x,m.y)}break;case "S":for(;!c();)u=k(),H=h(),m=g(),U(p,u.x,u.y,H.x,H.y,m.x,m.y);break;case "Q":for(;!c();)H=h(),m=g(),yf(p,H.x,H.y,m.x,m.y);break;case "T":for(;!c();)A=H=k(),m=g(),yf(p,H.x,H.y,m.x,m.y); +break;case "B":for(;!c();){var m=parseFloat(d()),u=parseFloat(d()),H=parseFloat(d()),R=parseFloat(d()),aa=parseFloat(d()),V=aa,ea=!1;c()||(V=parseFloat(d()),c()||(ea=0!==parseFloat(d())));y===y.toLowerCase()&&(H+=B.x,R+=B.y);p.arcTo(m,u,H,R,aa,V,ea)}break;case "A":for(;!c();)u=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),R=parseFloat(d()),aa=!!parseFloat(d()),V=!!parseFloat(d()),m=g(),zf(p,u,H,R,aa,V,m.x,m.y);break;case "Z":m=p.q.nc.o[p.q.nc.length-1];X(p);B=n;break;case "F":u="";for(m=1;l[t+ +m];)if(null!==l[t+m].match(/[Uu]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?q=!0:Af(p);break;case "U":u="";for(m=1;l[t+m];)if(null!==l[t+m].match(/[Ff]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?r=!0:p.kb(!1)}n=p.q;D.u(p);if(b)for(p=n.nc.j;p.next();)m=p.value,m.Ku=!0;return n}; +function Bf(a,b){for(var c=a.length,d=D.P(),e=0;eh&&(h+=360),s.Ne+=h);0>a&&(s.Ne=180-s.Ne,s.Ff=-s.Ff);0>d&&(s.Ne=-s.Ne,s.Ff=-s.Ff);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case Hf:h=s.F;k=s.G;s.F=h* a+k*c+e;s.G=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.ck+=h);0>a&&(s.ck=180-s.ck,s.xm=!s.xm);0>d&&(s.ck=-s.ck,s.xm=!s.xm);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:D.k("Unknown Segment type: "+s.type)}}}}this.pb=!0;return this}; -Ve.prototype.Pa=function(a,b,c,d){var e=a.x,g=a.y,h=this.ib.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.nc.o,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(g>k?g-k:k-g)){if(e=a=0,ge)return 0}else if(ee)return 0;return 0a?a=0:1=g)return d=(g-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.n(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.n(NaN,NaN);return b}; -Ve.prototype.getAngleAlongPath=Ve.prototype.NF=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;g+=m}}return NaN}; -Ve.prototype.getFractionForPoint=Ve.prototype.SI=function(a){if(this.type===Ze){var b=this.la,c=this.ja,d=this.F,e=this.G;if(b!==d||c!==e){var g=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(g-b)/(k-h)):((g-b)*(g-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===tf){if(b=this.la,c=this.ja,d=this.F,e=this.G,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,g=a.x; +Ue.prototype.Pa=function(a,b,c,d){var e=a.x,g=a.y,h=this.ib.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.nc.o,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(g>k?g-k:k-g)){if(e=a=0,ge)return 0}else if(ee)return 0;return 0a?a=0:1=g)return d=(g-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.n(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.n(NaN,NaN);return b}; +Ue.prototype.getAngleAlongPath=Ue.prototype.NF=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;g+=m}}return NaN}; +Ue.prototype.getFractionForPoint=Ue.prototype.SI=function(a){if(this.type===Ye){var b=this.la,c=this.ja,d=this.F,e=this.G;if(b!==d||c!==e){var g=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(g-b)/(k-h)):((g-b)*(g-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===Ze){if(b=this.la,c=this.ja,d=this.F,e=this.G,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,g=a.x; a=a.y;g=Math.min(Math.max(g,b),d);a=Math.min(Math.max(a,c),e);var b=Math.abs(g-b),d=Math.abs(g-d),c=Math.abs(a-c),e=Math.abs(a-e),m=Math.min(b,d,c,e);if(m===c)return g/l;if(m===d)return(h+a)/l;if(m===e)return(2*h+k-g)/l;if(m===b)return(2*h+2*k-a)/l}}else{for(var e=this.$x,h=this.uu,k=this.vu,l=D.P(),c=Infinity,b=d=0,g=e.length,n=m=0,p=0;pa?0:1a?"M"+this.la.toString()+" "+this.ja.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a),c=this.Eb.o,d=c.length,e=0;ea&&(a+=360),this.Xd=a,this.ff=0,v&&D.p(d,$f,"x1"),this.Ch=Math.max(d,0),v&&D.p(e,$f,"y1"),this.Og=Math.max(e,0),this.qp="boolean"===typeof h?!!h:!1,this.Ko=!!k):(v&&D.p(d,$f,"x1"),this.Xd=d,v&&D.p(e, -$f,"y1"),this.ff=e,v&&D.p(g,$f,"x2"),a===Hf&&(g=Math.max(g,0)),this.Ch=g,"number"===typeof h?(a===Hf&&(h=Math.max(h,0)),this.Og=h):this.Og=0,this.Ko=this.qp=!1);this.hi=!1;this.pb=!0;this.$h=null}D.ka("PathSegment",$f);D.Di($f);$f.prototype.copy=function(){var a=new $f;a.da=this.da;a.Cb=this.Cb;a.Jb=this.Jb;a.Xd=this.Xd;a.ff=this.ff;a.Ch=this.Ch;a.Og=this.Og;a.qp=this.qp;a.Ko=this.Ko;a.hi=this.hi;a.pb=this.pb;return a}; -$f.prototype.equalsApprox=$f.prototype.Wc=function(a){if(!(a instanceof $f)||this.type!==a.type||this.gy!==a.gy)return!1;switch(this.type){case Ef:case wf:return Q(this.F,a.F)&&Q(this.G,a.G);case Ff:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c)&&Q(this.Uh,a.Uh)&&Q(this.Vh,a.Vh);case Gf:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c);case Hf:return Q(this.Ne,a.Ne)&&Q(this.Ff,a.Ff)&&Q(this.pa,a.pa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, -a.radiusY);case If:return this.xm===a.xm&&this.jy===a.jy&&Q(this.ck,a.ck)&&Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};$f.prototype.qc=function(a){a.Re===$f?this.type=a:D.ak(this,a)}; -$f.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Ef:b=0>a?"M"+this.F.toString()+" "+this.G.toString():"M"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case wf:b=0>a?"L"+this.F.toString()+" "+this.G.toString():"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Ff:b=0>a?"C"+this.Ec.toString()+" "+this.$c.toString()+" "+this.Uh.toString()+" "+this.Vh.toString()+" "+this.F.toString()+" "+this.G.toString():"C"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.Uh.toFixed(a)+ -" "+this.Vh.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Gf:b=0>a?"Q"+this.Ec.toString()+" "+this.$c.toString()+" "+this.F.toString()+" "+this.G.toString():"Q"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Hf:b=0>a?"B"+this.Ne.toString()+" "+this.Ff.toString()+" "+this.pa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Ne.toFixed(a)+" "+this.Ff.toFixed(a)+" "+this.pa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; -break;case If:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.ck.toString()+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toString()+" "+this.G.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.ck.toFixed(a)+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;default:b=this.type.toString()}return b+(this.hi?"z":"")};var Ef;$f.Move=Ef=D.s($f,"Move",0);var wf;$f.Line=wf=D.s($f,"Line",1);var Ff; -$f.Bezier=Ff=D.s($f,"Bezier",2);var Gf;$f.QuadraticBezier=Gf=D.s($f,"QuadraticBezier",3);var Hf;$f.Arc=Hf=D.s($f,"Arc",4);var If;$f.SvgArc=If=D.s($f,"SvgArc",4);$f.prototype.freeze=function(){this.J=!0;return this};$f.prototype.Xa=function(){this.J=!1;return this};$f.prototype.close=$f.prototype.close=function(){this.hi=!0;return this}; -function Vf(a,b){if(null!==a.$h&&!1===b.pb)return a.$h;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$h=[],a.$h;var e=a.Xd,g=a.ff,h=Se(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>g?1:b/g;r=b>g?g/b:1;b=Se(b>g?b:g,n,n+h,!0);g=D.hh();g.reset();g.translate(c,d);g.rotate(a.Xd,0,0);g.scale(l,r);Cf(b,g);D.nf(g);a.$h=b;return a.$h} -D.defineProperty($f,{gy:"isClosed"},function(){return this.hi},function(a){this.hi!==a&&(this.hi=a,this.pb=!0)});D.defineProperty($f,{type:"type"},function(){return this.da},function(a){v&&D.Da(a,$f,$f,"type");this.J&&D.qa(this,a);this.da=a;this.pb=!0});D.defineProperty($f,{F:"endX"},function(){return this.Cb},function(a){v&&D.p(a,$f,"endX");this.J&&D.qa(this,a);this.Cb=a;this.pb=!0}); -D.defineProperty($f,{G:"endY"},function(){return this.Jb},function(a){v&&D.p(a,$f,"endY");this.J&&D.qa(this,a);this.Jb=a;this.pb=!0});D.defineProperty($f,{Ec:"point1X"},function(){return this.Xd},function(a){v&&D.p(a,$f,"point1X");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0});D.defineProperty($f,{$c:"point1Y"},function(){return this.ff},function(a){v&&D.p(a,$f,"point1Y");this.J&&D.qa(this,a);this.ff=a;this.pb=!0}); -D.defineProperty($f,{Uh:"point2X"},function(){return this.Ch},function(a){v&&D.p(a,$f,"point2X");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty($f,{Vh:"point2Y"},function(){return this.Og},function(a){v&&D.p(a,$f,"point2Y");this.J&&D.qa(this,a);this.Og=a;this.pb=!0});D.defineProperty($f,{pa:"centerX"},function(){return this.Xd},function(a){v&&D.p(a,$f,"centerX");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); -D.defineProperty($f,{va:"centerY"},function(){return this.ff},function(a){v&&D.p(a,$f,"centerY");this.J&&D.qa(this,a);this.ff=a;this.pb=!0});D.defineProperty($f,{radiusX:"radiusX"},function(){return this.Ch},function(a){v&&D.p(a,$f,"radiusX");0>a&&D.ua(a,">= zero",$f,"radiusX");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty($f,{radiusY:"radiusY"},function(){return this.Og},function(a){v&&D.p(a,$f,"radiusY");0>a&&D.ua(a,">= zero",$f,"radiusY");this.J&&D.qa(this,a);this.Og=a;this.pb=!0}); -D.defineProperty($f,{Ne:"startAngle"},function(){return this.Cb},function(a){this.Cb!==a&&(this.J&&D.qa(this,a),v&&D.p(a,$f,"startAngle"),a%=360,0>a&&(a+=360),this.Cb=a,this.pb=!0)});D.defineProperty($f,{Ff:"sweepAngle"},function(){return this.Jb},function(a){v&&D.p(a,$f,"sweepAngle");this.J&&D.qa(this,a);360a&&(a=-360);this.Jb=a;this.pb=!0});D.defineProperty($f,{xm:"isClockwiseArc"},function(){return this.Ko},function(a){this.J&&D.qa(this,a);this.Ko=a;this.pb=!0}); -D.defineProperty($f,{jy:"isLargeArc"},function(){return this.qp},function(a){this.J&&D.qa(this,a);this.qp=a;this.pb=!0});D.defineProperty($f,{ck:"xAxisRotation"},function(){return this.Xd},function(a){v&&D.p(a,$f,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); -function bg(){this.ca=null;this.AA=(new N(0,0)).freeze();this.Gz=(new N(0,0)).freeze();this.Nv=this.Jw=0;this.Ov=1;this.ww="";this.tx=this.aw=!1;this.Zv=this.Pv=0;this.fk=this.iw=this.sw=!1;this.$r=null;this.qx=0;this.Sg=this.px=null}D.ka("InputEvent",bg); -bg.prototype.copy=function(){var a=new bg;a.ca=this.ca;a.AA.assign(this.Sd);a.Gz.assign(this.ha);a.Jw=this.Jw;a.Nv=this.Nv;a.Ov=this.Ov;a.ww=this.ww;a.aw=this.aw;a.tx=this.tx;a.Pv=this.Pv;a.Zv=this.Zv;a.sw=this.sw;a.iw=this.iw;a.fk=this.fk;a.$r=this.$r;a.qx=this.qx;a.px=this.px;a.Sg=this.Sg;return a}; -bg.prototype.toString=function(){var a="^";0!==this.xd&&(a+="M:"+this.xd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ee&&(a+="C:"+this.Ee);0!==this.Vk&&(a+="D:"+this.Vk);this.Cc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(bg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(bg,{Sd:"viewPoint"},function(){return this.AA},function(a){D.l(a,N,bg,"viewPoint");this.AA.assign(a)}); -D.defineProperty(bg,{ha:"documentPoint"},function(){return this.Gz},function(a){D.l(a,N,bg,"documentPoint");this.Gz.assign(a)});bg.prototype.getMultiTouchViewPoint=bg.prototype.ay=function(a,b){var c=this.g;if(null===c)return b;cg(c,this.event,a,b);return b};bg.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;cg(c,this.event,a,b);b.assign(c.pC(b));return b};D.defineProperty(bg,{xd:"modifiers"},function(){return this.Jw},function(a){this.Jw=a}); -D.defineProperty(bg,{button:"button"},function(){return this.Nv},function(a){this.Nv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});D.defineProperty(bg,{buttons:"buttons"},function(){return this.Ov},function(a){this.Ov=a});D.defineProperty(bg,{key:"key"},function(){return this.ww},function(a){this.ww=a});D.defineProperty(bg,{Wk:"down"},function(){return this.aw},function(a){this.aw=a}); -D.defineProperty(bg,{up:"up"},function(){return this.tx},function(a){this.tx=a});D.defineProperty(bg,{Ee:"clickCount"},function(){return this.Pv},function(a){this.Pv=a});D.defineProperty(bg,{Vk:"delta"},function(){return this.Zv},function(a){this.Zv=a});D.defineProperty(bg,{Ou:"isMultiTouch"},function(){return this.sw},function(a){this.sw=a});D.defineProperty(bg,{Cc:"handled"},function(){return this.iw},function(a){this.iw=a}); -D.defineProperty(bg,{bubbles:"bubbles"},function(){return this.fk},function(a){this.fk=a});D.defineProperty(bg,{event:"event"},function(){return this.$r},function(a){this.$r=a});D.w(bg,{Qj:"isTouchEvent"},function(){var a=window.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=window.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)});D.w(bg,{Qh:"isMac"},function(){return D.Qh}); -D.defineProperty(bg,{timestamp:"timestamp"},function(){return this.qx},function(a){this.qx=a});D.defineProperty(bg,{Qf:"targetDiagram"},function(){return this.px},function(a){this.px=a});D.defineProperty(bg,{Oe:"targetObject"},function(){return this.Sg},function(a){this.Sg=a});D.defineProperty(bg,{control:"control"},function(){return 0!==(this.xd&1)},function(a){this.xd=a?this.xd|1:this.xd&-2}); -D.defineProperty(bg,{shift:"shift"},function(){return 0!==(this.xd&4)},function(a){this.xd=a?this.xd|4:this.xd&-5});D.defineProperty(bg,{alt:"alt"},function(){return 0!==(this.xd&2)},function(a){this.xd=a?this.xd|2:this.xd&-3});D.defineProperty(bg,{Xu:"meta"},function(){return 0!==(this.xd&8)},function(a){this.xd=a?this.xd|8:this.xd&-9}); -D.defineProperty(bg,{left:"left"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); -D.defineProperty(bg,{right:"right"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},function(a){this.buttons=a?this.buttons|2:this.buttons&-3}); -D.defineProperty(bg,{iM:"middle"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});function dg(){this.ca=null;this.ac="";this.Tw=this.nx=null;this.sr=!1}D.ka("DiagramEvent",dg);dg.prototype.copy=function(){var a=new dg;a.ca=this.ca;a.ac=this.ac;a.nx=this.nx;a.Tw=this.Tw;a.sr=this.sr;return a}; -dg.prototype.toString=function(){var a="*"+this.name;null!==this.hC&&(a+=":"+this.hC.toString());null!==this.LB&&(a+="("+this.LB.toString()+")");return a};D.defineProperty(dg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(dg,{name:"name"},function(){return this.ac},function(a){this.ac=a});D.defineProperty(dg,{hC:"subject"},function(){return this.nx},function(a){this.nx=a});D.defineProperty(dg,{LB:"parameter"},function(){return this.Tw},function(a){this.Tw=a}); -D.defineProperty(dg,{cancel:"cancel"},function(){return this.sr},function(a){this.sr!==a&&D.Qn("DiagramEvent.cancel","2.0");this.sr=a});function eg(){this.tr=fg;this.pn=this.Iw="";this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null}D.ka("ChangedEvent",eg);var gg;eg.Transaction=gg=D.s(eg,"Transaction",-1);var fg;eg.Property=fg=D.s(eg,"Property",0);var hg;eg.Insert=hg=D.s(eg,"Insert",1);var ig;eg.Remove=ig=D.s(eg,"Remove",2); -eg.prototype.clear=eg.prototype.clear=function(){this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null};eg.prototype.copy=function(){var a=new eg;a.tr=this.tr;a.Iw=this.Iw;a.pn=this.pn;a.ye=this.ye;a.ca=this.ca;a.at=this.at;var b=this.dt;a.dt=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.ct;a.ct=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Ys;a.Ys=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Xs;a.Xs=D.Qa(b)&&"function"===typeof b.V?b.V():b;return a}; -eg.prototype.qc=function(a){a.Re===eg?this.Oc=a:D.ak(this,a)}; -eg.prototype.toString=function(){var a="",a=this.Oc===gg?a+"* ":this.Oc===fg?a+(null!==this.ea?"!m":"!d"):a+((null!==this.ea?"!m":"!d")+this.Oc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Ef&&this.Ef!==this.propertyName&&(a+=" "+this.Ef);a+=": ";this.Oc===gg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ia(this.object)),null!==this.oldValue&&(a+=" old: "+ia(this.oldValue)),null!==this.Wj&&(a+=" "+this.Wj),null!==this.newValue&& -(a+=" new: "+ia(this.newValue)),null!==this.Uj&&(a+=" "+this.Uj));return a};eg.prototype.getValue=eg.prototype.oa=function(a){return a?this.oldValue:this.newValue};eg.prototype.getParam=function(a){return a?this.Wj:this.Uj};eg.prototype.canUndo=eg.prototype.canUndo=function(){return null!==this.ea||null!==this.g?!0:!1};eg.prototype.undo=eg.prototype.undo=function(){this.canUndo()&&(null!==this.ea?this.ea.Hn(this,!0):null!==this.g&&this.g.Hn(this,!0))}; -eg.prototype.canRedo=eg.prototype.canRedo=function(){return null!==this.ea||null!==this.g?!0:!1};eg.prototype.redo=eg.prototype.redo=function(){this.canRedo()&&(null!==this.ea?this.ea.Hn(this,!1):null!==this.g&&this.g.Hn(this,!1))};D.defineProperty(eg,{ea:"model"},function(){return this.ye},function(a){this.ye=a});D.defineProperty(eg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a}); -D.defineProperty(eg,{Oc:"change"},function(){return this.tr},function(a){v&&D.Da(a,eg,eg,"change");this.tr=a});D.defineProperty(eg,{Ef:"modelChange"},function(){return this.Iw},function(a){v&&D.h(a,"string",eg,"modelChange");this.Iw=a});D.defineProperty(eg,{propertyName:"propertyName"},function(){return this.pn},function(a){v&&"string"!==typeof a&&D.h(a,"function",eg,"propertyName");this.pn=a}); -D.w(eg,{mG:"isTransactionFinished"},function(){return this.tr===gg&&("CommittedTransaction"===this.pn||"FinishedUndo"===this.pn||"FinishedRedo"===this.pn)});D.defineProperty(eg,{object:"object"},function(){return this.at},function(a){this.at=a});D.defineProperty(eg,{oldValue:"oldValue"},function(){return this.dt},function(a){this.dt=a});D.defineProperty(eg,{Wj:"oldParam"},function(){return this.ct},function(a){this.ct=a}); -D.defineProperty(eg,{newValue:"newValue"},function(){return this.Ys},function(a){this.Ys=a});D.defineProperty(eg,{Uj:"newParam"},function(){return this.Xs},function(a){this.Xs=a}); -function M(a){1a?0:1a?"M"+this.la.toString()+" "+this.ja.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a),c=this.Eb.o,d=c.length,e=0;ea&&(a+=360),this.Xd=a,this.ff=0,v&&D.p(d,Zf,"x1"),this.Ch=Math.max(d,0),v&&D.p(e,Zf,"y1"),this.Og=Math.max(e,0),this.qp="boolean"===typeof h?!!h:!1,this.Ko=!!k):(v&&D.p(d,Zf,"x1"),this.Xd=d,v&&D.p(e, +Zf,"y1"),this.ff=e,v&&D.p(g,Zf,"x2"),a===Gf&&(g=Math.max(g,0)),this.Ch=g,"number"===typeof h?(a===Gf&&(h=Math.max(h,0)),this.Og=h):this.Og=0,this.Ko=this.qp=!1);this.hi=!1;this.pb=!0;this.$h=null}D.ka("PathSegment",Zf);D.Di(Zf);Zf.prototype.copy=function(){var a=new Zf;a.da=this.da;a.Cb=this.Cb;a.Jb=this.Jb;a.Xd=this.Xd;a.ff=this.ff;a.Ch=this.Ch;a.Og=this.Og;a.qp=this.qp;a.Ko=this.Ko;a.hi=this.hi;a.pb=this.pb;return a}; +Zf.prototype.equalsApprox=Zf.prototype.Wc=function(a){if(!(a instanceof Zf)||this.type!==a.type||this.gy!==a.gy)return!1;switch(this.type){case Df:case vf:return Q(this.F,a.F)&&Q(this.G,a.G);case Ef:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c)&&Q(this.Uh,a.Uh)&&Q(this.Vh,a.Vh);case Ff:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c);case Gf:return Q(this.Ne,a.Ne)&&Q(this.Ff,a.Ff)&&Q(this.pa,a.pa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, +a.radiusY);case Hf:return this.xm===a.xm&&this.jy===a.jy&&Q(this.ck,a.ck)&&Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};Zf.prototype.qc=function(a){a.Re===Zf?this.type=a:D.ak(this,a)}; +Zf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Df:b=0>a?"M"+this.F.toString()+" "+this.G.toString():"M"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case vf:b=0>a?"L"+this.F.toString()+" "+this.G.toString():"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Ef:b=0>a?"C"+this.Ec.toString()+" "+this.$c.toString()+" "+this.Uh.toString()+" "+this.Vh.toString()+" "+this.F.toString()+" "+this.G.toString():"C"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.Uh.toFixed(a)+ +" "+this.Vh.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Ff:b=0>a?"Q"+this.Ec.toString()+" "+this.$c.toString()+" "+this.F.toString()+" "+this.G.toString():"Q"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Gf:b=0>a?"B"+this.Ne.toString()+" "+this.Ff.toString()+" "+this.pa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Ne.toFixed(a)+" "+this.Ff.toFixed(a)+" "+this.pa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; +break;case Hf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.ck.toString()+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toString()+" "+this.G.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.ck.toFixed(a)+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;default:b=this.type.toString()}return b+(this.hi?"z":"")};var Df;Zf.Move=Df=D.s(Zf,"Move",0);var vf;Zf.Line=vf=D.s(Zf,"Line",1);var Ef; +Zf.Bezier=Ef=D.s(Zf,"Bezier",2);var Ff;Zf.QuadraticBezier=Ff=D.s(Zf,"QuadraticBezier",3);var Gf;Zf.Arc=Gf=D.s(Zf,"Arc",4);var Hf;Zf.SvgArc=Hf=D.s(Zf,"SvgArc",4);Zf.prototype.freeze=function(){this.J=!0;return this};Zf.prototype.Xa=function(){this.J=!1;return this};Zf.prototype.close=Zf.prototype.close=function(){this.hi=!0;return this}; +function If(a,b){if(null!==a.$h&&!1===b.pb)return a.$h;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$h=[],a.$h;var e=a.Xd,g=a.ff,h=Re(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>g?1:b/g;r=b>g?g/b:1;b=Re(b>g?b:g,n,n+h,!0);g=D.hh();g.reset();g.translate(c,d);g.rotate(a.Xd,0,0);g.scale(l,r);Bf(b,g);D.nf(g);a.$h=b;return a.$h} +D.defineProperty(Zf,{gy:"isClosed"},function(){return this.hi},function(a){this.hi!==a&&(this.hi=a,this.pb=!0)});D.defineProperty(Zf,{type:"type"},function(){return this.da},function(a){v&&D.Da(a,Zf,Zf,"type");this.J&&D.qa(this,a);this.da=a;this.pb=!0});D.defineProperty(Zf,{F:"endX"},function(){return this.Cb},function(a){v&&D.p(a,Zf,"endX");this.J&&D.qa(this,a);this.Cb=a;this.pb=!0}); +D.defineProperty(Zf,{G:"endY"},function(){return this.Jb},function(a){v&&D.p(a,Zf,"endY");this.J&&D.qa(this,a);this.Jb=a;this.pb=!0});D.defineProperty(Zf,{Ec:"point1X"},function(){return this.Xd},function(a){v&&D.p(a,Zf,"point1X");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0});D.defineProperty(Zf,{$c:"point1Y"},function(){return this.ff},function(a){v&&D.p(a,Zf,"point1Y");this.J&&D.qa(this,a);this.ff=a;this.pb=!0}); +D.defineProperty(Zf,{Uh:"point2X"},function(){return this.Ch},function(a){v&&D.p(a,Zf,"point2X");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty(Zf,{Vh:"point2Y"},function(){return this.Og},function(a){v&&D.p(a,Zf,"point2Y");this.J&&D.qa(this,a);this.Og=a;this.pb=!0});D.defineProperty(Zf,{pa:"centerX"},function(){return this.Xd},function(a){v&&D.p(a,Zf,"centerX");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); +D.defineProperty(Zf,{va:"centerY"},function(){return this.ff},function(a){v&&D.p(a,Zf,"centerY");this.J&&D.qa(this,a);this.ff=a;this.pb=!0});D.defineProperty(Zf,{radiusX:"radiusX"},function(){return this.Ch},function(a){v&&D.p(a,Zf,"radiusX");0>a&&D.ua(a,">= zero",Zf,"radiusX");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty(Zf,{radiusY:"radiusY"},function(){return this.Og},function(a){v&&D.p(a,Zf,"radiusY");0>a&&D.ua(a,">= zero",Zf,"radiusY");this.J&&D.qa(this,a);this.Og=a;this.pb=!0}); +D.defineProperty(Zf,{Ne:"startAngle"},function(){return this.Cb},function(a){this.Cb!==a&&(this.J&&D.qa(this,a),v&&D.p(a,Zf,"startAngle"),a%=360,0>a&&(a+=360),this.Cb=a,this.pb=!0)});D.defineProperty(Zf,{Ff:"sweepAngle"},function(){return this.Jb},function(a){v&&D.p(a,Zf,"sweepAngle");this.J&&D.qa(this,a);360a&&(a=-360);this.Jb=a;this.pb=!0});D.defineProperty(Zf,{xm:"isClockwiseArc"},function(){return this.Ko},function(a){this.J&&D.qa(this,a);this.Ko=a;this.pb=!0}); +D.defineProperty(Zf,{jy:"isLargeArc"},function(){return this.qp},function(a){this.J&&D.qa(this,a);this.qp=a;this.pb=!0});D.defineProperty(Zf,{ck:"xAxisRotation"},function(){return this.Xd},function(a){v&&D.p(a,Zf,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); +function ag(){this.ca=null;this.AA=(new N(0,0)).freeze();this.Gz=(new N(0,0)).freeze();this.Nv=this.Jw=0;this.Ov=1;this.ww="";this.tx=this.aw=!1;this.Zv=this.Pv=0;this.fk=this.iw=this.sw=!1;this.$r=null;this.qx=0;this.Sg=this.px=null}D.ka("InputEvent",ag); +ag.prototype.copy=function(){var a=new ag;a.ca=this.ca;a.AA.assign(this.Sd);a.Gz.assign(this.ha);a.Jw=this.Jw;a.Nv=this.Nv;a.Ov=this.Ov;a.ww=this.ww;a.aw=this.aw;a.tx=this.tx;a.Pv=this.Pv;a.Zv=this.Zv;a.sw=this.sw;a.iw=this.iw;a.fk=this.fk;a.$r=this.$r;a.qx=this.qx;a.px=this.px;a.Sg=this.Sg;return a}; +ag.prototype.toString=function(){var a="^";0!==this.xd&&(a+="M:"+this.xd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ee&&(a+="C:"+this.Ee);0!==this.Vk&&(a+="D:"+this.Vk);this.Cc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(ag,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(ag,{Sd:"viewPoint"},function(){return this.AA},function(a){D.l(a,N,ag,"viewPoint");this.AA.assign(a)}); +D.defineProperty(ag,{ha:"documentPoint"},function(){return this.Gz},function(a){D.l(a,N,ag,"documentPoint");this.Gz.assign(a)});ag.prototype.getMultiTouchViewPoint=ag.prototype.ay=function(a,b){var c=this.g;if(null===c)return b;bg(c,this.event,a,b);return b};ag.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;bg(c,this.event,a,b);b.assign(c.pC(b));return b};D.defineProperty(ag,{xd:"modifiers"},function(){return this.Jw},function(a){this.Jw=a}); +D.defineProperty(ag,{button:"button"},function(){return this.Nv},function(a){this.Nv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});D.defineProperty(ag,{buttons:"buttons"},function(){return this.Ov},function(a){this.Ov=a});D.defineProperty(ag,{key:"key"},function(){return this.ww},function(a){this.ww=a});D.defineProperty(ag,{Wk:"down"},function(){return this.aw},function(a){this.aw=a}); +D.defineProperty(ag,{up:"up"},function(){return this.tx},function(a){this.tx=a});D.defineProperty(ag,{Ee:"clickCount"},function(){return this.Pv},function(a){this.Pv=a});D.defineProperty(ag,{Vk:"delta"},function(){return this.Zv},function(a){this.Zv=a});D.defineProperty(ag,{Ou:"isMultiTouch"},function(){return this.sw},function(a){this.sw=a});D.defineProperty(ag,{Cc:"handled"},function(){return this.iw},function(a){this.iw=a}); +D.defineProperty(ag,{bubbles:"bubbles"},function(){return this.fk},function(a){this.fk=a});D.defineProperty(ag,{event:"event"},function(){return this.$r},function(a){this.$r=a});D.w(ag,{Qj:"isTouchEvent"},function(){var a=window.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=window.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)});D.w(ag,{Qh:"isMac"},function(){return D.Qh}); +D.defineProperty(ag,{timestamp:"timestamp"},function(){return this.qx},function(a){this.qx=a});D.defineProperty(ag,{Qf:"targetDiagram"},function(){return this.px},function(a){this.px=a});D.defineProperty(ag,{Oe:"targetObject"},function(){return this.Sg},function(a){this.Sg=a});D.defineProperty(ag,{control:"control"},function(){return 0!==(this.xd&1)},function(a){this.xd=a?this.xd|1:this.xd&-2}); +D.defineProperty(ag,{shift:"shift"},function(){return 0!==(this.xd&4)},function(a){this.xd=a?this.xd|4:this.xd&-5});D.defineProperty(ag,{alt:"alt"},function(){return 0!==(this.xd&2)},function(a){this.xd=a?this.xd|2:this.xd&-3});D.defineProperty(ag,{Xu:"meta"},function(){return 0!==(this.xd&8)},function(a){this.xd=a?this.xd|8:this.xd&-9}); +D.defineProperty(ag,{left:"left"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); +D.defineProperty(ag,{right:"right"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},function(a){this.buttons=a?this.buttons|2:this.buttons&-3}); +D.defineProperty(ag,{iM:"middle"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});function cg(){this.ca=null;this.ac="";this.Tw=this.nx=null;this.sr=!1}D.ka("DiagramEvent",cg);cg.prototype.copy=function(){var a=new cg;a.ca=this.ca;a.ac=this.ac;a.nx=this.nx;a.Tw=this.Tw;a.sr=this.sr;return a}; +cg.prototype.toString=function(){var a="*"+this.name;null!==this.hC&&(a+=":"+this.hC.toString());null!==this.LB&&(a+="("+this.LB.toString()+")");return a};D.defineProperty(cg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(cg,{name:"name"},function(){return this.ac},function(a){this.ac=a});D.defineProperty(cg,{hC:"subject"},function(){return this.nx},function(a){this.nx=a});D.defineProperty(cg,{LB:"parameter"},function(){return this.Tw},function(a){this.Tw=a}); +D.defineProperty(cg,{cancel:"cancel"},function(){return this.sr},function(a){this.sr!==a&&D.Qn("DiagramEvent.cancel","2.0");this.sr=a});function dg(){this.tr=eg;this.pn=this.Iw="";this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null}D.ka("ChangedEvent",dg);var fg;dg.Transaction=fg=D.s(dg,"Transaction",-1);var eg;dg.Property=eg=D.s(dg,"Property",0);var gg;dg.Insert=gg=D.s(dg,"Insert",1);var hg;dg.Remove=hg=D.s(dg,"Remove",2); +dg.prototype.clear=dg.prototype.clear=function(){this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null};dg.prototype.copy=function(){var a=new dg;a.tr=this.tr;a.Iw=this.Iw;a.pn=this.pn;a.ye=this.ye;a.ca=this.ca;a.at=this.at;var b=this.dt;a.dt=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.ct;a.ct=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Ys;a.Ys=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Xs;a.Xs=D.Qa(b)&&"function"===typeof b.V?b.V():b;return a}; +dg.prototype.qc=function(a){a.Re===dg?this.Oc=a:D.ak(this,a)}; +dg.prototype.toString=function(){var a="",a=this.Oc===fg?a+"* ":this.Oc===eg?a+(null!==this.ea?"!m":"!d"):a+((null!==this.ea?"!m":"!d")+this.Oc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Ef&&this.Ef!==this.propertyName&&(a+=" "+this.Ef);a+=": ";this.Oc===fg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ia(this.object)),null!==this.oldValue&&(a+=" old: "+ia(this.oldValue)),null!==this.Wj&&(a+=" "+this.Wj),null!==this.newValue&& +(a+=" new: "+ia(this.newValue)),null!==this.Uj&&(a+=" "+this.Uj));return a};dg.prototype.getValue=dg.prototype.oa=function(a){return a?this.oldValue:this.newValue};dg.prototype.getParam=function(a){return a?this.Wj:this.Uj};dg.prototype.canUndo=dg.prototype.canUndo=function(){return null!==this.ea||null!==this.g?!0:!1};dg.prototype.undo=dg.prototype.undo=function(){this.canUndo()&&(null!==this.ea?this.ea.Hn(this,!0):null!==this.g&&this.g.Hn(this,!0))}; +dg.prototype.canRedo=dg.prototype.canRedo=function(){return null!==this.ea||null!==this.g?!0:!1};dg.prototype.redo=dg.prototype.redo=function(){this.canRedo()&&(null!==this.ea?this.ea.Hn(this,!1):null!==this.g&&this.g.Hn(this,!1))};D.defineProperty(dg,{ea:"model"},function(){return this.ye},function(a){this.ye=a});D.defineProperty(dg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a}); +D.defineProperty(dg,{Oc:"change"},function(){return this.tr},function(a){v&&D.Da(a,dg,dg,"change");this.tr=a});D.defineProperty(dg,{Ef:"modelChange"},function(){return this.Iw},function(a){v&&D.h(a,"string",dg,"modelChange");this.Iw=a});D.defineProperty(dg,{propertyName:"propertyName"},function(){return this.pn},function(a){v&&"string"!==typeof a&&D.h(a,"function",dg,"propertyName");this.pn=a}); +D.w(dg,{mG:"isTransactionFinished"},function(){return this.tr===fg&&("CommittedTransaction"===this.pn||"FinishedUndo"===this.pn||"FinishedRedo"===this.pn)});D.defineProperty(dg,{object:"object"},function(){return this.at},function(a){this.at=a});D.defineProperty(dg,{oldValue:"oldValue"},function(){return this.dt},function(a){this.dt=a});D.defineProperty(dg,{Wj:"oldParam"},function(){return this.ct},function(a){this.ct=a}); +D.defineProperty(dg,{newValue:"newValue"},function(){return this.Ys},function(a){this.Ys=a});D.defineProperty(dg,{Uj:"newParam"},function(){return this.Xs},function(a){this.Xs=a}); +function M(a){1g?b+("\\u000"+a.charCodeAt(d).toString(16)):32>g?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===g?b+"\\u2028":8233===g?b+"\\u2029":b+e}return'"'+b+'"'}; -M.prototype.writeJsonValue=M.prototype.yv=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.yv(a.valueOf()):D.isArray(a)?yg(this,a):D.Qa(a)?vg(this,a):"function"===typeof a?"null":a.toString()}; -function yg(a,b,c){void 0===c&&(c=!1);var d=D.cb(b);if(0>=d)return"[]";var e=new xa;e.add("[ ");c&&1=d)return"[]";var e=new xa;e.add("[ ");c&&1d)return;D.Vg(a.ze,d)}ah(a,"nodeDataArray",ig,"nodeDataArray",a,b,null,d,null);a.xv(b)} -M.prototype.removeNodeDataCollection=function(a){if(D.isArray(a))for(var b=D.cb(a),c=0;cd)return;D.Vg(a.ze,d)}$g(a,"nodeDataArray",hg,"nodeDataArray",a,b,null,d,null);a.xv(b)} +M.prototype.removeNodeDataCollection=function(a){if(D.isArray(a))for(var b=D.cb(a),c=0;cb&&(b=D.cb(a));D.Ih(a,b,c);ah(this,"",hg,"",a,null,c,null,b)}; -M.prototype.removeArrayItem=M.prototype.HG=function(a,b){void 0===b&&(b=-1);v&&(D.gu(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.ze&&D.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=D.cb(a)-1);var c=D.La(a,b);D.Vg(a,b);ah(this,"",ig,"",a,c,null,b,null)};D.defineProperty(M,{qo:"nodeCategoryProperty"},function(){return this.kn},function(a){var b=this.kn;b!==a&&(bh(a,M,"nodeCategoryProperty"),this.kn=a,this.i("nodeCategoryProperty",b,a))}); +D.defineProperty(M,{OA:"copiesArrayObjects"},function(){return this.zr},function(a){var b=this.zr;b!==a&&(null!==a&&D.h(a,"boolean",M,"copiesArrayObjects"),this.zr=a,this.i("copiesArrayObjects",b,a))});M.prototype.copyNodeData=function(a){if(null===a)return null;var b=null,b=this.Po,b=null!==b?b(a,this):hh(this,a,!0);D.Qa(b)&&D.xc(b);return b}; +function hh(a,b,c){if(a.PA&&Array.isArray(b)){var d=[];for(c=0;cb&&(b=D.cb(a));D.Ih(a,b,c);$g(this,"",gg,"",a,null,c,null,b)}; +M.prototype.removeArrayItem=M.prototype.HG=function(a,b){void 0===b&&(b=-1);v&&(D.gu(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.ze&&D.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=D.cb(a)-1);var c=D.La(a,b);D.Vg(a,b);$g(this,"",hg,"",a,c,null,b,null)};D.defineProperty(M,{qo:"nodeCategoryProperty"},function(){return this.kn},function(a){var b=this.kn;b!==a&&(ah(a,M,"nodeCategoryProperty"),this.kn=a,this.i("nodeCategoryProperty",b,a))}); M.prototype.getCategoryForNodeData=M.prototype.eB=function(a){if(null===a)return"";var b=this.kn;if(""===b)return"";b=D.xb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;D.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -M.prototype.setCategoryForNodeData=M.prototype.Sy=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.kn;if(""!==c)if(this.le(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"nodeCategory",fg,c,a,d,b))}else D.Ua(a,c,b)}}; +M.prototype.setCategoryForNodeData=M.prototype.Sy=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.kn;if(""!==c)if(this.le(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),$g(this,"nodeCategory",eg,c,a,d,b))}else D.Ua(a,c,b)}}; function Y(a,b){M.call(this);2D.im(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Oc=== -ig){c=a.Wj;if("linkDataArray"===a.Ef){d=a.oldValue;D.Qa(d)&&"number"===typeof c&&(e=this.of(d),b?(this.ki.add(d),D.La(this.df,c)!==d&&D.Ih(this.df,c,d),void 0!==e&&this.td.add(e,d)):(this.ki.remove(d),D.La(this.df,c)===d&&D.Vg(this.df,c),void 0!==e&&this.td.remove(e)));return}if("linkLabelKeys"===a.Ef){d=this.al(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.im(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.im(d,a.newValue),0<=c&&D.Vg(d,c)));return}}M.prototype.Hn.call(this,a,b)}; +f.Hn=function(a,b){if(a.Oc===gg){var c=a.Uj;if("linkDataArray"===a.Ef){var d=a.newValue;if(D.Qa(d)&&"number"===typeof c){var e=this.of(d);b?(this.ki.remove(d),D.La(this.df,c)===d&&D.Vg(this.df,c),void 0!==e&&this.td.remove(e)):(this.ki.add(d),D.La(this.df,c)!==d&&D.Ih(this.df,c,d),void 0!==e&&this.td.add(e,d))}return}if("linkLabelKeys"===a.Ef){d=this.al(a.object);D.isArray(d)&&"number"===typeof c&&(b?(c=D.im(d,a.newValue),0<=c&&D.Vg(d,c)):0>D.im(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Oc=== +hg){c=a.Wj;if("linkDataArray"===a.Ef){d=a.oldValue;D.Qa(d)&&"number"===typeof c&&(e=this.of(d),b?(this.ki.add(d),D.La(this.df,c)!==d&&D.Ih(this.df,c,d),void 0!==e&&this.td.add(e,d)):(this.ki.remove(d),D.La(this.df,c)===d&&D.Vg(this.df,c),void 0!==e&&this.td.remove(e)));return}if("linkLabelKeys"===a.Ef){d=this.al(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.im(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.im(d,a.newValue),0<=c&&D.Vg(d,c)));return}}M.prototype.Hn.call(this,a,b)}; D.defineProperty(Y,{GA:"archetypeNodeData"},function(){return this.zl},function(a){var b=this.zl;b!==a&&(null!==a&&D.l(a,Object,Y,"archetypeNodeData"),this.zl=a,this.i("archetypeNodeData",b,a))});Y.prototype.io=function(a){if(void 0!==a){var b=this.zl;if(null!==b){var c=this.Ie(a);null===c&&(c=this.copyNodeData(b),D.Ua(c,this.Dk,a),this.em(c))}return a}}; -D.defineProperty(Y,{fo:"linkFromKeyProperty"},function(){return this.li},function(a){var b=this.li;b!==a&&(bh(a,Y,"linkFromKeyProperty"),this.li=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.um=function(a){if(null!==a){var b=this.li;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(ch(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; -Y.prototype.setFromKeyForLinkData=Y.prototype.YB=function(a,b){null===b&&(b=void 0);void 0===b||ch(b)||D.kc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.li;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(hh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&gh(this,b,a),ah(this,"linkFromKey",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{ho:"linkToKeyProperty"},function(){return this.mi},function(a){var b=this.mi;b!==a&&(bh(a,Y,"linkToKeyProperty"),this.mi=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.vm=function(a){if(null!==a){var b=this.mi;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(ch(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; -Y.prototype.setToKeyForLinkData=Y.prototype.dC=function(a,b){null===b&&(b=void 0);void 0===b||ch(b)||D.kc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.mi;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(hh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&gh(this,b,a),ah(this,"linkToKey",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Tu:"linkFromPortIdProperty"},function(){return this.en},function(a){var b=this.en;b!==a&&(bh(a,Y,"linkFromPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.en=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.TI=function(a){if(null===a)return"";var b=this.en;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; -Y.prototype.setFromPortIdForLinkData=Y.prototype.ZB=function(a,b){D.h(b,"string",Y,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.en;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"linkFromPortId",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Vu:"linkToPortIdProperty"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(bh(a,Y,"linkToPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.fn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.XI=function(a){if(null===a)return"";var b=this.fn;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; -Y.prototype.setToPortIdForLinkData=Y.prototype.eC=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.fn;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"linkToPortId",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Uu:"linkLabelKeysProperty"},function(){return this.Kg},function(a){var b=this.Kg;b!==a&&(bh(a,Y,"linkLabelKeysProperty"),this.Kg=a,this.i("linkLabelKeysProperty",b,a))}); +D.defineProperty(Y,{fo:"linkFromKeyProperty"},function(){return this.li},function(a){var b=this.li;b!==a&&(ah(a,Y,"linkFromKeyProperty"),this.li=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.um=function(a){if(null!==a){var b=this.li;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(bh(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; +Y.prototype.setFromKeyForLinkData=Y.prototype.YB=function(a,b){null===b&&(b=void 0);void 0===b||bh(b)||D.kc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.li;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(gh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&fh(this,b,a),$g(this,"linkFromKey",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{ho:"linkToKeyProperty"},function(){return this.mi},function(a){var b=this.mi;b!==a&&(ah(a,Y,"linkToKeyProperty"),this.mi=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.vm=function(a){if(null!==a){var b=this.mi;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(bh(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; +Y.prototype.setToKeyForLinkData=Y.prototype.dC=function(a,b){null===b&&(b=void 0);void 0===b||bh(b)||D.kc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.mi;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(gh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&fh(this,b,a),$g(this,"linkToKey",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{Tu:"linkFromPortIdProperty"},function(){return this.en},function(a){var b=this.en;b!==a&&(ah(a,Y,"linkFromPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.en=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.TI=function(a){if(null===a)return"";var b=this.en;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; +Y.prototype.setFromPortIdForLinkData=Y.prototype.ZB=function(a,b){D.h(b,"string",Y,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.en;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),$g(this,"linkFromPortId",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{Vu:"linkToPortIdProperty"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(ah(a,Y,"linkToPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.fn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.XI=function(a){if(null===a)return"";var b=this.fn;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; +Y.prototype.setToPortIdForLinkData=Y.prototype.eC=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.fn;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),$g(this,"linkToPortId",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Uu:"linkLabelKeysProperty"},function(){return this.Kg},function(a){var b=this.Kg;b!==a&&(ah(a,Y,"linkLabelKeysProperty"),this.Kg=a,this.i("linkLabelKeysProperty",b,a))}); Y.prototype.getLabelKeysForLinkData=Y.prototype.al=function(a){if(null===a)return D.ml;var b=this.Kg;if(""===b)return D.ml;a=D.xb(a,b);return void 0===a?D.ml:a}; -Y.prototype.setLabelKeysForLinkData=Y.prototype.cH=function(a,b){D.gu(b,Y,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Kg;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d=D.ml);if(d!==b){for(var e=D.cb(d),g=0;ge||(D.Vg(d,e),this.Lh(a)&&(hh(this,b,a),ah(this,"linkLabelKeys",ig,c,a,b,null,e,null)))}else void 0!==d&&D.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +Y.prototype.setLabelKeysForLinkData=Y.prototype.cH=function(a,b){D.gu(b,Y,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Kg;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d=D.ml);if(d!==b){for(var e=D.cb(d),g=0;ge||(D.Vg(d,e),this.Lh(a)&&(gh(this,b,a),$g(this,"linkLabelKeys",hg,c,a,b,null,e,null)))}else void 0!==d&&D.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; D.defineProperty(Y,{$g:"linkDataArray"},function(){return this.df},function(a){var b=this.df;if(b!==a){D.gu(a,Y,"linkDataArray");this.td.clear();for(var c=D.cb(a),d=0;dd)return;D.Vg(a.df,d)}ah(a,"linkDataArray",ig,"linkDataArray",a,b,null,d,null);c=a.um(b);hh(a,c,b);c=a.vm(b);hh(a,c,b);d=a.al(b);if(D.isArray(d))for(var e=D.cb(d),g=0;gd)return;D.Vg(a.df,d)}$g(a,"linkDataArray",hg,"linkDataArray",a,b,null,d,null);c=a.um(b);gh(a,c,b);c=a.vm(b);gh(a,c,b);d=a.al(b);if(D.isArray(d))for(var e=D.cb(d),g=0;ga.Ki&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ki;d&&b&&a.vd("CommittingTransaction",c,a.Gj);var e=0;if(0a.Lj;e--)g=d.fa(e),null!==g&&g.clear(), +(m=d.Qu,n=d.R.fl,l.HG(n,m),l.mB(n,m,p))}catch(q){v&&D.trace("Binding error: "+q.toString()+' setting source property "'+c+'" on '+b.toString()+" with conversion function: "+g)}}finally{this.Pz.remove(a)}}}};function Bg(){this.BH=(new K(dg)).freeze();this.ac="";this.CD=!1}D.ka("Transaction",Bg); +Bg.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.fg.count.toString()+(this.Iu?"":", incomplete");if(void 0!==a&&0a.Ki&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ki;d&&b&&a.vd("CommittingTransaction",c,a.Gj);var e=0;if(0a.Lj;e--)g=d.fa(e),null!==g&&g.clear(), d.pd(e),a.$z=!0;e=a.uG;0===e&&(e=1);0=e&&(g=d.fa(0),null!==g&&g.clear(),d.pd(0),a.rh--);d.add(b);a.rh++;d.freeze();g=b}a.vd("CommittedTransaction",c,g)}else{a.uh=!0;try{a.isEnabled&&null!==g&&(g.Iu=!0,g.undo())}finally{a.vd("RolledBackTransaction",c,g),a.uh=!1}null!==g&&g.clear()}a.Yv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.fg;for(b=c.count-1;b>=a;b--)d=c.fa(b),null!==d&&d.undo(),c.Xa(),c.pd(b);c.freeze()}return!1} -tg.prototype.canUndo=tg.prototype.canUndo=function(){if(!this.isEnabled||0=this.Ki&&!this.Qz&&(a=a.g,null!==a&&!1===a.ao||D.trace("Change not within a transaction: "+c.toString()))}}; -tg.prototype.skipsEvent=function(a){if(null===a||0>a.Oc.value)return!0;a=a.object;if(a instanceof O){if(a=a.layer,null!==a&&a.Yc)return!0}else if(a instanceof Hg&&a.Yc)return!0;return!1};D.w(tg,{PJ:"models"},function(){return this.eA.j});D.defineProperty(tg,{isEnabled:"isEnabled"},function(){return this.tf},function(a){this.tf=a});D.w(tg,{rH:"transactionToUndo"},function(){return 0<=this.Lj&&this.Lj<=this.history.count-1?this.history.fa(this.Lj):null}); -D.w(tg,{qH:"transactionToRedo"},function(){return this.Lj=this.Ki&&!this.Qz&&(a=a.g,null!==a&&!1===a.ao||D.trace("Change not within a transaction: "+c.toString()))}}; +ig.prototype.skipsEvent=function(a){if(null===a||0>a.Oc.value)return!0;a=a.object;if(a instanceof O){if(a=a.layer,null!==a&&a.Yc)return!0}else if(a instanceof Gg&&a.Yc)return!0;return!1};D.w(ig,{PJ:"models"},function(){return this.eA.j});D.defineProperty(ig,{isEnabled:"isEnabled"},function(){return this.tf},function(a){this.tf=a});D.w(ig,{rH:"transactionToUndo"},function(){return 0<=this.Lj&&this.Lj<=this.history.count-1?this.history.fa(this.Lj):null}); +D.w(ig,{qH:"transactionToRedo"},function(){return this.Ljb.Rh||(b.scale=a))};qa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.$y);D.p(a,qa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Wh)return!1;a*=b.scale;return ab.Rh?!1:b.Gx}; -qa.prototype.increaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"increaseZoom:factor");var b=this.g;null!==b&&b.jm===Wh&&(a*=b.scale,ab.Rh||(b.scale=a))};qa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Wh)return!1;a*=b.scale;return ab.Rh?!1:b.Gx};qa.prototype.resetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"resetZoom:newscale");var b=this.g;null===b||ab.Rh||(b.scale=a)}; -qa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"canResetZoom:newscale");var b=this.g;return null===b||ab.Rh?!1:b.Gx};qa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.DA&&!isNaN(this.aA)&&a.kd.O(this.CA)?(a.scale=this.aA,a.position=this.OD,this.DA=NaN,this.CA=Ld):(this.aA=b,this.OD=c.copy(),a.zoomToFit(),this.DA=a.scale,this.CA=a.kd.copy())}};qa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Gx}; -qa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,qa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.uj&&(this.uj.next()?a=this.uj.value:this.uj=null)}catch(c){this.uj=null}null===a&&(0b.Rh||(b.scale=a))};qa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.$y);D.p(a,qa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Vh)return!1;a*=b.scale;return ab.Rh?!1:b.Gx}; +qa.prototype.increaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"increaseZoom:factor");var b=this.g;null!==b&&b.jm===Vh&&(a*=b.scale,ab.Rh||(b.scale=a))};qa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Vh)return!1;a*=b.scale;return ab.Rh?!1:b.Gx};qa.prototype.resetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"resetZoom:newscale");var b=this.g;null===b||ab.Rh||(b.scale=a)}; +qa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"canResetZoom:newscale");var b=this.g;return null===b||ab.Rh?!1:b.Gx};qa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.DA&&!isNaN(this.aA)&&a.kd.O(this.CA)?(a.scale=this.aA,a.position=this.OD,this.DA=NaN,this.CA=Kd):(this.aA=b,this.OD=c.copy(),a.zoomToFit(),this.DA=a.scale,this.CA=a.kd.copy())}};qa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Gx}; +qa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,qa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.uj&&(this.uj.next()?a=this.uj.value:this.uj=null)}catch(c){this.uj=null}null===a&&(0h&&(h=-3),0k&&(k=-3); +Hg.prototype.standardMouseOver=function(){var a=this.g;if(null!==a){var b=a.U;if(null!==b.g&&!0!==a.Ra.zc){var c=a.lb;a.lb=!0;var d=a.th?a.Je(b.ha,null,null):null;b.Oe=d;var e=!1;if(d!==a.Qo){var g=a.Qo,h=g;a.Qo=d;this.doCurrentObjectChanged(g,d);for(b.Cc=!1;null!==g;){var k=g.Zu;if(null!==k){if(d===g)break;if(null!==d&&d.ym(g))break;k(b,g,d);e=!0;if(b.Cc)break}g=g.R}g=h;for(b.Cc=!1;null!==d;){k=d.Yu;if(null!==k){if(g===d)break;if(null!==g&&g.ym(d))break;k(b,d,g);e=!0;if(b.Cc)break}d=d.R}d=a.Qo}if(null!== +d){g=d;for(h="";null!==g;){h=g.cursor;if(""!==h)break;g=g.R}a.sc=h;b.Cc=!1;for(g=d;null!==g;){d=g.FB;if(null!==d&&(d(b,g),e=!0,b.Cc))break;g=g.R}}else a.sc="",d=a.FB,null!==d&&(d(b),e=!0);e&&a.Le();a.lb=c}}};Hg.prototype.doCurrentObjectChanged=function(){}; +Hg.prototype.standardMouseWheel=function(){var a=this.g;if(null!==a){var b=a.U,c=b.Vk;if(0!==c&&a.kd.H()){var d=a.yb,e=a.ob.$u;if((e===$h&&!b.shift||e===ai&&b.control)&&(0h&&(h=-3),0k&&(k=-3); if(void 0===g||void 0===h||void 0===k||0===h&&0===k||b.shift)!b.shift&&a.Ce?(g=a.mv,e=3*e*g,0e||Math.abs(b.y-a.y)>d};D.w(Zg,{g:"diagram"},function(){return this.ca}); -D.defineProperty(Zg,{name:"name"},function(){return this.ac},function(a){D.h(a,"string",Zg,"name");this.ac=a});D.defineProperty(Zg,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",Zg,"isEnabled");this.tf=a});D.defineProperty(Zg,{wa:"isActive"},function(){return this.AD},function(a){D.h(a,"boolean",Zg,"isActive");this.AD=a});D.defineProperty(Zg,{Tf:"transactionResult"},function(){return this.IE},function(a){null!==a&&D.h(a,"string",Zg,"transactionResult");this.IE=a}); -function Vh(){Zg.call(this);0e&&(e=k),l>g&&(g=l))}}Infinity===c?b.n(0,0,0,0):b.n(c,d,e-c,g-d)} -function Pi(a,b){if(null===a.mc){var c=a.g;if(!(null===c||b&&(c.qb||c.Mf))&&null!==a.hc){var d=c.na;d.isEnabled&&d.iG?null!==d.Gj&&0c.ta)){var d=a.g;if(null!==d&&!d.qb){var e=a.sj;if(null!==e){var g=null,h=null;null===c.$&&(g=Zi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.ba&&(k=Zi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.iq=c.m(0),c.jq=c.m(c.ta-1),c.Ji=!1,c.$=h,null!==g&&(c.hg=g.yd),c.ba=l,null!==k&&(c.jh=k.yd),c.oc!==a.Mw&&d.Ja("LinkRelinked",c,a.Mw),c.Gc!==a.Nw&&d.Ja("LinkRelinked",c,a.Nw)):$i(e,h,g,l,k):$i(e,null,null,null,null)}}}} -Vh.prototype.doDragOver=function(){}; -function aj(a,b){var c=a.g;if(null!==c){a.Ij&&Wi(a,!0);Fi(a);var d=Xi(c,b,null,function(b){return!Ui(a,b)}),e=c.U;e.Oe=d;if(null!==d){e.Cc=!1;for(var g=d;null!==g;){var h=g.CB;if(null!==h&&(h(e,g),e.Cc))break;g=Yi(g)}}else g=c.CB,null!==g&&g(e);if(a.wa||null!==ei){for(e=(a.mc||a.hc).j;e.next();)g=e.key,g instanceof G&&g.Pd.each(function(a){a.Ji=!1});a.doDropOnto(b,d);if(a.wa||null!==ei){d=D.Sf();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&bj(c,g.getAvoidableRect(d));D.Lb(d)}}}} -function bj(a,b){var c=!1;a.wb.Tk(b)&&(c=!0);c=a.$A(b,function(a){return a.Y},function(a){return a instanceof J},!0,function(a){return a instanceof J},c);if(0!==c.count)for(c=c.j;c.next();){var d=c.value;d.Nj&&d.ec()}}Vh.prototype.doDropOnto=function(){}; -Vh.prototype.doMouseMove=function(){if(this.wa){var a=this.g;null!==a&&null!==this.On&&null!==this.hc&&(this.mayCopy()?(a.sc="copy",Pi(this,!1),di(this,this.mc),Qi(this,this.mc,!1),Gi(this,this.mc)):this.mayMove()?(Ji(this),Qi(this,this.hc,!0)):this.mayDragOut()?(a.sc="no-drop",Pi(this,!1),Qi(this,this.mc,!1)):Ji(this),Vi(this,a.U.ha))}}; -Vh.prototype.doMouseUp=function(){if(this.wa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.mc?(Ji(this),Pi(this,!0),di(this,this.mc),Qi(this,this.mc,!1),Gi(this,this.mc),null!==this.mc&&a.YG(this.mc.bk())):(b=!0,Ji(this),this.mayMove()&&(Qi(this,this.hc,!0),Vi(this,a.U.ha)));this.Vr=!0;aj(this,a.U.ha);if(this.wa){this.mc=null;if(b&&null!==this.hc)for(b=this.hc.j;b.next();){var d=b.key;d instanceof G&&(d=d.Ka,null===d||null===d.placeholder||this.hc.contains(d)||d.placeholder.K())}a.Qc(); -Gi(this,this.hc);this.Tf=c?"Copy":"Move";a.Ja(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Vh.prototype.mayCopy=function(){if(!this.fG)return!1;var a=this.g;if(null===a||a.qb||a.Mf||!a.Zp||!a.Qk||(D.Qh?!a.U.alt:!a.U.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1}; -Vh.prototype.mayDragOut=function(){if(!this.fG)return!1;var a=this.g;if(null===a||!a.du||!a.Qk||a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1};Vh.prototype.mayMove=function(){var a=this.g;if(null===a||a.qb||!a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canMove())return!0}return null!==this.wd&&this.Ij&&this.wd.canMove()?!0:!1};var Hi=new K(Vh),ei=null,fi=null; -Vh.prototype.getDraggingSource=function(){return ei};Vh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.WE||a.qb||a.Mf||!a.Zp)return!1;var b=ei;return null===b||null===b.g||b.g.ea.om!==a.ea.om?!1:!0};Vh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Ra.Yh();cj(a);a.Ra.Yh();a=ei;null!==a&&null!==a.g&&(a.g.sc="copy")}};Vh.prototype.doSimulatedDragLeave=function(){var a=ei;null!==a&&a.doSimulatedDragOut();this.doCancel()}; -Vh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=ei;null!==b&&null!==b.hc&&this.mayDragIn()&&(a.sc="copy",dj(this,b.hc.bk(),!1),Qi(this,this.mc,!1),Vi(this,a.U.ha))}}; -Vh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=ei;if(null!==b){var c=b.g;b.Vr=!0;Ji(this);this.mayDragIn()&&(this.Nb("Drop"),dj(this,b.hc.bk(),!0),Qi(this,this.mc,!1),null!==this.mc&&a.YG(this.mc.bk()),aj(this,a.U.ha),a.Qc(),b=a.selection,null!==this.mc?this.Tf="ExternalCopy":b=new L(F),this.mc=null,a.doFocus(),a.Ja("ExternalObjectsDropped",b,c),this.ll())}}}; -function dj(a,b,c){if(null===a.mc){var d=a.g;if(null!==d&&!d.qb&&!d.Mf){d.lb=!c;d.hr=!c;a.kl=d.U.ha;c=d.hq(b,d,!0);var e=D.Sf();Oi(b,e);var d=e.x+e.width/2,g=e.y+e.height/2;D.Lb(e);var e=a.lx,h=new na(F),k=D.P();for(b=b.j;b.next();){var l=b.value,m=c.oa(l);l.re()&&l.canCopy()?(l=l.location,k.n(e.x-(d-l.x),e.y-(g-l.y)),m.location=k,m.mf(),h.add(m,ii(a,k))):l instanceof J&&l.canCopy()&&(m.hl(e.x-d,e.y-g),h.add(m,ii(a)))}D.A(k);a.mc=h;ci(a,h.bk());null!==a.wd&&(c=a.wd,d=c.uo,c.hl(a.kl.x-(d.x+d.width/ -2),a.kl.y-(d.y+d.height/2)))}}}Vh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.sc="":a.sc="no-drop")};function ri(a){this.point=a;this.dH=Kd}D.ka("DraggingInfo",ri);function Ri(a,b,c){this.Zc=a;this.info=b;this.$I=c} -function ej(){0=d&&(d=.1);for(var e=this,g=b.Rn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.j;g.next();){var h=g.value,k=h.Y;if(k instanceof G){var l=h.fb(mc,D.P()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;lc){if(null!==this.vc&&a===this.bh&&b===this.dh)return!0;var d=b.yd;null===d&&(d="");if(a.Xx(d).count>=c)return!1}return!0}; -ej.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.Cq;if(null!==this.g&&this.g.eb===this&&(null!==a.layer&&!a.layer.eu||!0!==b.mH))return!1;var c=b.EK;if(Infinity>c){if(null!==this.vc&&a===this.eh&&b===this.fh)return!0;var d=b.yd;null===d&&(d="");if(a.Yg(d).count>=c)return!1}return!0};ej.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; -ej.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof G))return!1;var d=a.yd;null===d&&(d="");var e=b.Y;if(!(e instanceof G))return!1;var g=b.yd;null===g&&(g="");for(e=e.Yg(g);e.next();)if(g=e.value,g.$===c&&g.hg===d)return!0;return!1}; -ej.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.QI&&d.DK||!this.isInSameNode(b,d))&&(b.OI&&d.CK||!this.isLinked(b,d)))||null!==this.vc&&(null!==a&&this.isLabelDependentOnLink(a,this.vc)||null!==c&&this.isLabelDependentOnLink(c,this.vc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.vc))return!1;if(null!==a){var e=a.ty;if(null!==e&&!e(a,b,c,d,this.vc))return!1}if(null!== -c&&(e=c.ty,null!==e&&!e(a,b,c,d,this.vc)))return!1;e=this.ty;return null!==e?e(a,b,c,d,this.vc):!0};ej.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Yb;if(null===c)return!1;if(c===b)return!0;var d=new L(G);d.add(a);return fj(this,c,b,d)};function fj(a,b,c,d){if(b===c)return!0;var e=b.$;if(null!==e&&e.Lf&&(d.add(e),fj(a,e.Yb,c,d)))return!0;b=b.ba;return null!==b&&b.Lf&&(d.add(b),fj(a,b.Yb,c,d))?!0:!1} -ej.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.Cq;var d=null!==this.g?this.g.KK:gj;if(d!==gj){if(d===hj){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=b.Pd;d.next();){var e=d.value;if(e!==c&&e.jc&&e.ba===b)return!1}return!ij(this,a,b,c,!0)}if(d===jj){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=a.Pd;d.next();)if(e=d.value,e!==c&&e.jc&&e.$===a)return!1;return!ij(this,a,b,c,!0)}if(d===kj)return a===b?a=!0:(d=new L(G),d.add(b),a=lj(this,d,a,b,c)), -!a;if(d===mj)return!ij(this,a,b,c,!1);if(d===nj)return a===b?a=!0:(d=new L(G),d.add(b),a=oj(this,d,a,b,c)),!a}return!0};function ij(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Pd;g.next();){var h=g.value;if(h!==d&&(!e||h.jc)&&h.ba===b&&(h=h.$,h!==b&&ij(a,h,c,d,e)))return!0}return!1} -function lj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e&&h.ba===c&&(h=h.$,h!==c&&lj(a,b,h,d,e)))return!0}return!1}function oj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e){var k=h.$,h=h.ba,k=k===c?h:k;if(k!==c&&oj(a,b,k,d,e))return!0}}return!1} -D.defineProperty(ej,{ty:"linkValidation"},function(){return this.Ql},function(a){null!==a&&D.h(a,"function",ej,"linkValidation");this.Ql=a});D.defineProperty(ej,{Fy:"portTargeted"},function(){return this.jE},function(a){null!==a&&D.h(a,"function",ej,"portTargeted");this.jE=a});function ra(){0e||Math.abs(b.y-a.y)>d};D.w(Hg,{g:"diagram"},function(){return this.ca}); +D.defineProperty(Hg,{name:"name"},function(){return this.ac},function(a){D.h(a,"string",Hg,"name");this.ac=a});D.defineProperty(Hg,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",Hg,"isEnabled");this.tf=a});D.defineProperty(Hg,{wa:"isActive"},function(){return this.AD},function(a){D.h(a,"boolean",Hg,"isActive");this.AD=a});D.defineProperty(Hg,{Tf:"transactionResult"},function(){return this.IE},function(a){null!==a&&D.h(a,"string",Hg,"transactionResult");this.IE=a}); +function Uh(){Hg.call(this);0e&&(e=k),l>g&&(g=l))}}Infinity===c?b.n(0,0,0,0):b.n(c,d,e-c,g-d)} +function Oi(a,b){if(null===a.mc){var c=a.g;if(!(null===c||b&&(c.qb||c.Mf))&&null!==a.hc){var d=c.na;d.isEnabled&&d.iG?null!==d.Gj&&0c.ta)){var d=a.g;if(null!==d&&!d.qb){var e=a.sj;if(null!==e){var g=null,h=null;null===c.$&&(g=Yi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.ba&&(k=Yi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.iq=c.m(0),c.jq=c.m(c.ta-1),c.Ji=!1,c.$=h,null!==g&&(c.hg=g.yd),c.ba=l,null!==k&&(c.jh=k.yd),c.oc!==a.Mw&&d.Ja("LinkRelinked",c,a.Mw),c.Gc!==a.Nw&&d.Ja("LinkRelinked",c,a.Nw)):Zi(e,h,g,l,k):Zi(e,null,null,null,null)}}}} +Uh.prototype.doDragOver=function(){}; +function $i(a,b){var c=a.g;if(null!==c){a.Ij&&Vi(a,!0);Ei(a);var d=Wi(c,b,null,function(b){return!Ti(a,b)}),e=c.U;e.Oe=d;if(null!==d){e.Cc=!1;for(var g=d;null!==g;){var h=g.CB;if(null!==h&&(h(e,g),e.Cc))break;g=Xi(g)}}else g=c.CB,null!==g&&g(e);if(a.wa||null!==di){for(e=(a.mc||a.hc).j;e.next();)g=e.key,g instanceof G&&g.Pd.each(function(a){a.Ji=!1});a.doDropOnto(b,d);if(a.wa||null!==di){d=D.Sf();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&aj(c,g.getAvoidableRect(d));D.Lb(d)}}}} +function aj(a,b){var c=!1;a.wb.Tk(b)&&(c=!0);c=a.$A(b,function(a){return a.Y},function(a){return a instanceof J},!0,function(a){return a instanceof J},c);if(0!==c.count)for(c=c.j;c.next();){var d=c.value;d.Nj&&d.ec()}}Uh.prototype.doDropOnto=function(){}; +Uh.prototype.doMouseMove=function(){if(this.wa){var a=this.g;null!==a&&null!==this.On&&null!==this.hc&&(this.mayCopy()?(a.sc="copy",Oi(this,!1),ci(this,this.mc),Pi(this,this.mc,!1),Fi(this,this.mc)):this.mayMove()?(Ii(this),Pi(this,this.hc,!0)):this.mayDragOut()?(a.sc="no-drop",Oi(this,!1),Pi(this,this.mc,!1)):Ii(this),Ui(this,a.U.ha))}}; +Uh.prototype.doMouseUp=function(){if(this.wa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.mc?(Ii(this),Oi(this,!0),ci(this,this.mc),Pi(this,this.mc,!1),Fi(this,this.mc),null!==this.mc&&a.YG(this.mc.bk())):(b=!0,Ii(this),this.mayMove()&&(Pi(this,this.hc,!0),Ui(this,a.U.ha)));this.Vr=!0;$i(this,a.U.ha);if(this.wa){this.mc=null;if(b&&null!==this.hc)for(b=this.hc.j;b.next();){var d=b.key;d instanceof G&&(d=d.Ka,null===d||null===d.placeholder||this.hc.contains(d)||d.placeholder.K())}a.Qc(); +Fi(this,this.hc);this.Tf=c?"Copy":"Move";a.Ja(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Uh.prototype.mayCopy=function(){if(!this.fG)return!1;var a=this.g;if(null===a||a.qb||a.Mf||!a.Zp||!a.Qk||(D.Qh?!a.U.alt:!a.U.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1}; +Uh.prototype.mayDragOut=function(){if(!this.fG)return!1;var a=this.g;if(null===a||!a.du||!a.Qk||a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1};Uh.prototype.mayMove=function(){var a=this.g;if(null===a||a.qb||!a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canMove())return!0}return null!==this.wd&&this.Ij&&this.wd.canMove()?!0:!1};var Gi=new K(Uh),di=null,ei=null; +Uh.prototype.getDraggingSource=function(){return di};Uh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.WE||a.qb||a.Mf||!a.Zp)return!1;var b=di;return null===b||null===b.g||b.g.ea.om!==a.ea.om?!1:!0};Uh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Ra.Yh();bj(a);a.Ra.Yh();a=di;null!==a&&null!==a.g&&(a.g.sc="copy")}};Uh.prototype.doSimulatedDragLeave=function(){var a=di;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +Uh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=di;null!==b&&null!==b.hc&&this.mayDragIn()&&(a.sc="copy",cj(this,b.hc.bk(),!1),Pi(this,this.mc,!1),Ui(this,a.U.ha))}}; +Uh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=di;if(null!==b){var c=b.g;b.Vr=!0;Ii(this);this.mayDragIn()&&(this.Nb("Drop"),cj(this,b.hc.bk(),!0),Pi(this,this.mc,!1),null!==this.mc&&a.YG(this.mc.bk()),$i(this,a.U.ha),a.Qc(),b=a.selection,null!==this.mc?this.Tf="ExternalCopy":b=new L(F),this.mc=null,a.doFocus(),a.Ja("ExternalObjectsDropped",b,c),this.ll())}}}; +function cj(a,b,c){if(null===a.mc){var d=a.g;if(null!==d&&!d.qb&&!d.Mf){d.lb=!c;d.hr=!c;a.kl=d.U.ha;c=d.hq(b,d,!0);var e=D.Sf();Ni(b,e);var d=e.x+e.width/2,g=e.y+e.height/2;D.Lb(e);var e=a.lx,h=new na(F),k=D.P();for(b=b.j;b.next();){var l=b.value,m=c.oa(l);l.re()&&l.canCopy()?(l=l.location,k.n(e.x-(d-l.x),e.y-(g-l.y)),m.location=k,m.mf(),h.add(m,hi(a,k))):l instanceof J&&l.canCopy()&&(m.hl(e.x-d,e.y-g),h.add(m,hi(a)))}D.A(k);a.mc=h;bi(a,h.bk());null!==a.wd&&(c=a.wd,d=c.uo,c.hl(a.kl.x-(d.x+d.width/ +2),a.kl.y-(d.y+d.height/2)))}}}Uh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.sc="":a.sc="no-drop")};function ii(a){this.point=a;this.dH=Jd}D.ka("DraggingInfo",ii);function Qi(a,b,c){this.Zc=a;this.info=b;this.$I=c} +function dj(){0=d&&(d=.1);for(var e=this,g=b.Rn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.j;g.next();){var h=g.value,k=h.Y;if(k instanceof G){var l=h.fb(mc,D.P()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;lc){if(null!==this.vc&&a===this.bh&&b===this.dh)return!0;var d=b.yd;null===d&&(d="");if(a.Xx(d).count>=c)return!1}return!0}; +dj.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.Cq;if(null!==this.g&&this.g.eb===this&&(null!==a.layer&&!a.layer.eu||!0!==b.mH))return!1;var c=b.EK;if(Infinity>c){if(null!==this.vc&&a===this.eh&&b===this.fh)return!0;var d=b.yd;null===d&&(d="");if(a.Yg(d).count>=c)return!1}return!0};dj.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; +dj.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof G))return!1;var d=a.yd;null===d&&(d="");var e=b.Y;if(!(e instanceof G))return!1;var g=b.yd;null===g&&(g="");for(e=e.Yg(g);e.next();)if(g=e.value,g.$===c&&g.hg===d)return!0;return!1}; +dj.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.QI&&d.DK||!this.isInSameNode(b,d))&&(b.OI&&d.CK||!this.isLinked(b,d)))||null!==this.vc&&(null!==a&&this.isLabelDependentOnLink(a,this.vc)||null!==c&&this.isLabelDependentOnLink(c,this.vc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.vc))return!1;if(null!==a){var e=a.ty;if(null!==e&&!e(a,b,c,d,this.vc))return!1}if(null!== +c&&(e=c.ty,null!==e&&!e(a,b,c,d,this.vc)))return!1;e=this.ty;return null!==e?e(a,b,c,d,this.vc):!0};dj.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Yb;if(null===c)return!1;if(c===b)return!0;var d=new L(G);d.add(a);return ej(this,c,b,d)};function ej(a,b,c,d){if(b===c)return!0;var e=b.$;if(null!==e&&e.Lf&&(d.add(e),ej(a,e.Yb,c,d)))return!0;b=b.ba;return null!==b&&b.Lf&&(d.add(b),ej(a,b.Yb,c,d))?!0:!1} +dj.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.Cq;var d=null!==this.g?this.g.KK:fj;if(d!==fj){if(d===gj){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=b.Pd;d.next();){var e=d.value;if(e!==c&&e.jc&&e.ba===b)return!1}return!hj(this,a,b,c,!0)}if(d===ij){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=a.Pd;d.next();)if(e=d.value,e!==c&&e.jc&&e.$===a)return!1;return!hj(this,a,b,c,!0)}if(d===jj)return a===b?a=!0:(d=new L(G),d.add(b),a=kj(this,d,a,b,c)), +!a;if(d===lj)return!hj(this,a,b,c,!1);if(d===mj)return a===b?a=!0:(d=new L(G),d.add(b),a=nj(this,d,a,b,c)),!a}return!0};function hj(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Pd;g.next();){var h=g.value;if(h!==d&&(!e||h.jc)&&h.ba===b&&(h=h.$,h!==b&&hj(a,h,c,d,e)))return!0}return!1} +function kj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e&&h.ba===c&&(h=h.$,h!==c&&kj(a,b,h,d,e)))return!0}return!1}function nj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e){var k=h.$,h=h.ba,k=k===c?h:k;if(k!==c&&nj(a,b,k,d,e))return!0}}return!1} +D.defineProperty(dj,{ty:"linkValidation"},function(){return this.Ql},function(a){null!==a&&D.h(a,"function",dj,"linkValidation");this.Ql=a});D.defineProperty(dj,{Fy:"portTargeted"},function(){return this.jE},function(a){null!==a&&D.h(a,"function",dj,"portTargeted");this.jE=a});function ra(){0b.tu+1&&cb.tu+1&&c=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? -"ne-resize":"e-resize"}else if(a instanceof x)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};D.defineProperty(Xj,{Eu:"handleArchetype"},function(){return this.Gl},function(a){null!==a&&D.l(a,O,Xj,"handleArchetype");this.Gl=a});D.w(Xj,{handle:"handle"},function(){return this.pc});D.defineProperty(Xj,{Bb:"adornedObject"},function(){return this.Tc},function(a){null!==a&&D.l(a,O,Xj,"adornedObject");this.Tc=a}); -Xj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.qb&&a.fu&&a.U.left?null!==this.findToolHandleAt(a.Pc.ha,this.name):!1}; -Xj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.pc=this.findToolHandleAt(a.Pc.ha,this.name),null!==this.pc&&(this.Tc=this.pc.Y.Bb,this.Bp.set(this.Bb.fb(this.handle.alignment.CG())),this.fE.set(this.Tc.Y.location),this.aE.set(this.Tc.Ea),this.Mz=this.computeCellSize(),this.Oz=this.computeMinSize(),this.Nz=this.computeMaxSize(),a.qf=!0,this.YD=a.Ra.isEnabled,a.Ra.isEnabled=!1,this.Nb(this.name),this.wa=!0))}; -Xj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.ll(),this.Tc=this.pc=null,this.wa=a.qf=!1,a.Ra.isEnabled=this.YD)};Xj.prototype.doCancel=function(){null!==this.Bb&&(this.Bb.Ea=this.DG,this.Bb.Y.location=this.XJ);this.stopTool()};Xj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.lg();D.A(e)}}; -Xj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.Qc();this.Tf=this.name;a.Ja("PartResized",this.Bb,this.DG)}this.stopTool()}; -Xj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.Bb,d=c.Y;c.Ea=a.size;d.mf();a=this.Bb.fb(this.handle.alignment.CG());d instanceof I?(c=new K(F),c.add(d),b.moveParts(c,this.Bp.copy().$j(a),!0)):d.location=d.location.copy().$j(a).add(this.Bp)}}; -Xj.prototype.computeResize=function(a,b,c,d,e,g){b.ee()&&(b=mc);var h=this.Bb.Fa,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=D.P();gb(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? +"ne-resize":"e-resize"}else if(a instanceof x)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};D.defineProperty(Wj,{Eu:"handleArchetype"},function(){return this.Gl},function(a){null!==a&&D.l(a,O,Wj,"handleArchetype");this.Gl=a});D.w(Wj,{handle:"handle"},function(){return this.pc});D.defineProperty(Wj,{Bb:"adornedObject"},function(){return this.Tc},function(a){null!==a&&D.l(a,O,Wj,"adornedObject");this.Tc=a}); +Wj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.qb&&a.fu&&a.U.left?null!==this.findToolHandleAt(a.Pc.ha,this.name):!1}; +Wj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.pc=this.findToolHandleAt(a.Pc.ha,this.name),null!==this.pc&&(this.Tc=this.pc.Y.Bb,this.Bp.set(this.Bb.fb(this.handle.alignment.CG())),this.fE.set(this.Tc.Y.location),this.aE.set(this.Tc.Ea),this.Mz=this.computeCellSize(),this.Oz=this.computeMinSize(),this.Nz=this.computeMaxSize(),a.qf=!0,this.YD=a.Ra.isEnabled,a.Ra.isEnabled=!1,this.Nb(this.name),this.wa=!0))}; +Wj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.ll(),this.Tc=this.pc=null,this.wa=a.qf=!1,a.Ra.isEnabled=this.YD)};Wj.prototype.doCancel=function(){null!==this.Bb&&(this.Bb.Ea=this.DG,this.Bb.Y.location=this.XJ);this.stopTool()};Wj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.lg();D.A(e)}}; +Wj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.Qc();this.Tf=this.name;a.Ja("PartResized",this.Bb,this.DG)}this.stopTool()}; +Wj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.Bb,d=c.Y;c.Ea=a.size;d.mf();a=this.Bb.fb(this.handle.alignment.CG());d instanceof I?(c=new K(F),c.add(d),b.moveParts(c,this.Bp.copy().$j(a),!0)):d.location=d.location.copy().$j(a).add(this.Bp)}}; +Wj.prototype.computeResize=function(a,b,c,d,e,g){b.ee()&&(b=mc);var h=this.Bb.Fa,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=D.P();gb(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height), a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,g||(a.width=a.height/p,a.x= -k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));D.A(q);return a};Xj.prototype.computeReshape=function(){var a=ak;this.Bb instanceof z&&(a=bk(this.Bb));return!(a===ck||a===dk||null!==this.g&&this.g.U.shift)};Xj.prototype.computeMinSize=function(){var a=this.Bb.ah.copy(),b=this.ah;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; -Xj.prototype.computeMaxSize=function(){var a=this.Bb.rf.copy(),b=this.rf;!isNaN(b.width)&&b.widtha.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; +Wj.prototype.computeMaxSize=function(){var a=this.Bb.rf.copy(),b=this.rf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.vK),180),c=Math.min(Math.abs(this.uK),b/2);(null===this.g||!this.g.U.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};D.defineProperty(ek,{vK:"snapAngleMultiple"},function(){return this.qE},function(a){D.h(a,"number",ek,"snapAngleMultiple");this.qE=a}); -D.defineProperty(ek,{uK:"snapAngleEpsilon"},function(){return this.pE},function(a){D.h(a,"number",ek,"snapAngleEpsilon");this.pE=a});D.w(ek,{pM:"originalAngle"},function(){return this.Ow});function gk(){Zg.call(this);0a&&(a+=360));var b=Math.min(Math.abs(this.vK),180),c=Math.min(Math.abs(this.uK),b/2);(null===this.g||!this.g.U.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};D.defineProperty(dk,{vK:"snapAngleMultiple"},function(){return this.qE},function(a){D.h(a,"number",dk,"snapAngleMultiple");this.qE=a}); +D.defineProperty(dk,{uK:"snapAngleEpsilon"},function(){return this.pE},function(a){D.h(a,"number",dk,"snapAngleEpsilon");this.pE=a});D.w(dk,{pM:"originalAngle"},function(){return this.Ow});function fk(){Hg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.U.Ee?!1:!0};rk.prototype.doStart=function(){this.wa||null===this.ih||this.doActivate()}; -rk.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.ih;null===b&&(b=a.Je(a.U.ha));if(null!==b&&b instanceof pa&&(this.ih=b,null!==b.Y)){this.wa=!0;this.$a=Ak;var c=this.wI;null!==b.lH&&(c=b.lH);this.Jk=this.ih.copy();var d=new C(this.ih.fb(ec),this.ih.fb(vc));a.VG(d);if(c instanceof ik)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.Hj.appendChild(c);"function"===typeof c.focus&& -c.focus();"function"===typeof c.select&&this.Ry&&(c.select(),c.setSelectionRange(0,9999))}this.Fj=c}}}};rk.prototype.doCancel=function(){null!==this.bt&&this.Fj instanceof HTMLElement&&(this.Fj.style.border=this.bt,this.bt=null);this.stopTool()};rk.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};rk.prototype.doMouseDown=function(){this.wa&&this.acceptText(wk)}; -rk.prototype.acceptText=function(a){switch(a){case wk:if(this.$a===Ek)this.Fj instanceof HTMLElement&&this.Fj.focus();else if(this.$a===Ak||this.$a===Dk||this.$a===Bk)this.$a=Ck,Hk(this);break;case vk:case yk:case xk:if(yk===a&&!0===this.vA.ky)break;if(this.$a===Ak||this.$a===Dk||this.$a===Bk)this.$a=Ck,Hk(this)}}; -function Hk(a){var b=a.ih,c=a.g,d=a.Fj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof ik?null!==d.tC&&(g=d.tC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.Nb(a.name),a.$a=Ek,a.Tf=a.name,b.text=g,null!==b.kH&&b.kH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.ll(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Dk,null!==b.ZA&&b.ZA(a,e,g),d instanceof ik?d.show(b,c,a):(null===a.bt&&(a.bt=d.style.border,d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}} -rk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.$a=tk;this.ih=null;if(null!==this.Fj){var b=this.Fj;if(b instanceof ik)b.Yn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Hj.removeChild(b)}}this.wa=!1}};rk.prototype.doFocus=function(){v&&D.Qn("TextEditingTool.doFocus","2.0");Fk(this)};rk.prototype.doBlur=function(){v&&D.Qn("TextEditingTool.doBlur","2.0");Gk(this)}; -function Fk(a){if(null!==a.Fj&&a.state!==tk){var b=a.Bz;a.$a===Ak&&(a.$a=Bk);"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}function Gk(a){if(null!==a.Fj&&a.state!==tk){var b=a.Bz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}rk.prototype.isValidText=function(a,b,c){D.l(a,pa,rk,"isValidText:textblock");var d=this.jC;if(null!==d&&!d(a,b,c))return!1;d=a.jC;return null===d||d(a,b,c)?!0:!1}; -D.defineProperty(rk,{jC:"textValidation"},function(){return this.$l},function(a){null!==a&&D.h(a,"function",rk,"textValidation");this.$l=a});D.defineProperty(rk,{xG:"minimumEditorScale"},function(){return this.TD},function(a){null!==a&&D.h(a,"number",rk,"minimumEditorScale");this.TD=a});D.defineProperty(rk,{Ry:"selectsTextOnActivate"},function(){return this.nE},function(a){null!==a&&D.h(a,"boolean",rk,"selectsTextOnActivate");this.nE=a}); -D.defineProperty(rk,{state:"state"},function(){return this.$a},function(a){this.$a!==a&&(D.Da(a,rk,rk,"starting"),this.$a=a)});rk.prototype.measureTemporaryTextBlock=rk.prototype.KJ=function(a){var b=this.Jk;b.text=a;Ik(b,this.ih.rp,Infinity);return b};function Qh(){Zg.call(this);this.name="ToolManager";this.HH=new K(Zg);this.IH=new K(Zg);this.JH=new K(Zg);this.xD=this.yD=850;this.mD=(new Ca(2,2)).Oa();this.GE=5E3;this.XD=bi;this.vD=Jk;this.Xv=this.aD=null;this.An=-1}D.Ta(Qh,Zg); -D.ka("ToolManager",Qh);var bi;Qh.WheelScroll=bi=D.s(Qh,"WheelScroll",0);var ai;Qh.WheelZoom=ai=D.s(Qh,"WheelZoom",1);Qh.WheelNone=D.s(Qh,"WheelNone",2);var Jk;Qh.GestureZoom=Jk=D.s(Qh,"GestureZoom",3);var Kk;Qh.GestureCancel=Kk=D.s(Qh,"GestureCancel",4);var Xk;Qh.GestureNone=Xk=D.s(Qh,"GestureNone",5);D.defineProperty(Qh,{$u:"mouseWheelBehavior"},function(){return this.XD},function(a){D.Da(a,Qh,Qh,"mouseWheelBehavior");this.XD=a}); -D.defineProperty(Qh,{rq:"gestureBehavior"},function(){return this.vD},function(a){D.Da(a,Qh,Qh,"gestureBehavior");this.vD=a});Qh.prototype.initializeStandardTools=function(){this.TH=new hk;this.GG=new gi;this.CJ=new yj;this.SG=new Xj;this.jK=new ek;this.tG=new ra;this.Ge=new Vh;this.AI=new pk;this.YJ=new qk;this.NA=new kk;this.iC=new rk;this.fI=new ta;this.gI=new gk}; -Qh.prototype.updateAdornments=function(a){var b=this.nm;if(b instanceof da&&this.Xv===a){var c=b.Bb;(null!==a?c.Y===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -Qh.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.U;b.Qj&&this.rq===Kk&&(b.bubbles=!1);if(b.Ou){this.cancelWaitAfter();if(this.rq===Xk){b.bubbles=!0;return}if(this.rq===Kk)return;if(a.eb.canStartMultiTouch()){a.eb.standardPinchZoomStart();return}}var c=a.na;c.IA&&0!==c.Ki&&D.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.sf.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(kh,{lL:"animationReasons"},function(){return this.Kv}); -kh.prototype.canStart=function(){return!0};kh.prototype.prepareAutomaticAnimation=kh.prototype.ro=function(a){this.tf&&(this.Ll||this.ca.ao)&&(this.Kv.add(a),this.canStart(a)&&(this.tk&&this.Yh(),this.zc=!0))};function fl(a){if(a.tf&&(a.Kv.clear(),a.zc))if(!a.Ho)a.zc=!1;else if(0===a.Om){var b=+new Date;a.Om=b;requestAnimationFrame(function(){if(!1!==a.zc&&!a.tk&&a.Om===b){var c=a.ca;c.Kj("temporaryPixelRatio")&&(c.Ik=1);gl(c);a.zc=!1;c.Ja("AnimationStarting");hl(a,b)}})}} -function il(a,b,c,d,e,g){if(a.zc&&(v&&D.l(b,O,kh,"addPropToAnimation:obj"),!("position"===c&&d.O(e)||b instanceof F&&!b.dG))){var h=a.ln;if(h.contains(b)){var h=h.oa(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=jl(d));h.Mx&&void 0!==l[c]?h.pu[c]=jl(e):(g||(h.pu[c]=jl(e)),l[c]=jl(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.pu.location=jl(b.location))}else k=new ma,l=new ma,k[c]=jl(d),l[c]=jl(e),d=l,e=k.position,e instanceof N&&!e.H()&&a.Kv.contains("Expand SubGraph")&&e.assign(d.position),k= -new el(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.pu.location=jl(b.location)),h.add(b,k);a.Ho=!0}}function jl(a){return a instanceof N?a.copy():a instanceof Ca?a.copy():a} -function hl(a,b){var c;function d(){if(!1!==g.tk&&g.Om===b){var a=+new Date,c=a>s?m:a-r;kl(g);ll(g,e,q,h,c,m);g.Uv&&g.Uv();cj(e);ml(g);a>s?nl(g):requestAnimationFrame(d)}}void 0===c&&(c=new ma);var e=a.ca;if(null!==e){var g=a,h=c.QL||a.bD,k=c.nM||null,l=c.oM||null,m=c.duration||a.Jz,n=a.KH;for(c=a.ln.j;c.next();){var p=c.value.start.position;p instanceof N&&(p.H()||p.assign(n))}a.XC=h;a.Uv=k;a.Vv=l;a.WC=m;a.Wv=a.ln;var q=a.Wv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l=c.key.findVisibleNode(), -l instanceof I&&null!==l.placeholder&&(l=l.placeholder,n=l.fb(ec),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n));a.tk=!0;kl(a);ll(a,e,q,h,0,m);cj(a.ca);ml(a);var r=+new Date,s=r+m;g.Om===b&&requestAnimationFrame(function(){d()})}}function kl(a){if(!a.np){var b=a.ca;a.JE=b.lb;a.KC=b.Xe;a.LC=b.rv;b.lb=!0;b.Xe=!0;b.rv=!0;a.np=!0}}function ml(a){var b=a.ca;b.lb=a.JE;b.Xe=a.KC;b.rv=a.LC;a.np=!1} -function ll(a,b,c,d,e,g){for(c=c.j;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==ol[m])ol[m](h,l[m],k[m],d,e,g)}d=b.qB;b.qB=!0;m=a.bD;0!==a.Rr&&0!==a.Qr&&(c=a.Rr,b.Db=m(e,c,a.Qr-c,g));null!==a.Pr&&null!==a.Nr&&(c=a.Pr,a=a.Nr,b.sb=new N(m(e,c.x,a.x-c.x,g),m(e,c.y,a.y-c.y,g)));b.qB=d} -kh.prototype.stopAnimation=kh.prototype.Yh=function(){!0===this.zc&&(this.zc=!1,this.Om=0,this.Ho&&this.ca.Le());this.tk&&this.tf&&nl(this)}; -function nl(a){a.tk=!1;a.Ho=!1;kl(a);for(var b=a.ca,c=a.XC,d=a.WC,e=a.Wv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.pu,n;for(n in l)if(void 0!==ol[n]){var p=n;!h.Mx||"position:node"!==p&&"position:placeholder"!==p||(p="position");ol[p](g,k[n],void 0!==m[n]?m[n]:h.Mx?k[n]:l[n],c,d,d)}h.Mx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.Iy&&g instanceof F&&g.Qd(!1)}for(c=a.ca.links;c.next();)d=c.value,null!==d.Hp&&(d.points=d.Hp,d.Hp=null);b.uy.clear();b.Ik=null;b.Qc(); -b.ra();b.lg();pl(b);ml(a);a.Vv&&a.Vv();a.Om=0;a.Wv=null;a.Vv=null;a.Uv=null;a.Pr=null;a.Nr=null;a.Rr=0;a.Qr=0;a.ln=new na(O,el);b.Ja("AnimationFinished");b.Le()} -function ql(a,b,c){var d=b.aa,e=c.aa,g=null;c instanceof I&&(g=c.placeholder);null!==g?(d=g.fb(ec),d.x+=g.padding.left,d.y+=g.padding.top,il(a,b,"position",d,b.position,!1)):il(a,b,"position",new N(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);il(a,b,"scale",.01,b.scale,!1);if(b instanceof I)for(b=b.uc;b.next();)g=b.value,g instanceof G&&ql(a,g,c)} -function rl(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?il(a,b,"position:placeholder",b.position,d,!0):il(a,b,"position:node",b.position,c,!0);il(a,b,"scale",b.scale,.01,!0);a.zc&&(d=a.ln,d.contains(b)&&(d.oa(b).Iy=!0));if(b instanceof I)for(b=b.uc;b.next();)d=b.value,d instanceof G&&rl(a,d,c)}}function sl(a,b,c){a.zc&&(null===a.Pr&&b.H()&&null===a.Nr&&(a.Pr=b.copy()),a.Nr=c.copy(),a.Ho=!0)} -function tl(a,b,c){a.zc&&a.ca.ao&&(0===a.Rr&&0===a.Qr&&(a.Rr=b),a.Qr=c,a.Ho=!0)}D.defineProperty(kh,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",kh,"isEnabled");this.tf=a});D.defineProperty(kh,{duration:"duration"},function(){return this.Jz},function(a){D.h(a,"number",kh,"duration");1>a&&D.ua(a,">= 1",kh,"duration");this.Jz=a});D.w(kh,{pf:"isAnimating"},function(){return this.tk});D.w(kh,{uJ:"isTicking"},function(){return this.np}); -D.defineProperty(kh,{jG:"isInitial"},function(){return this.Ll},function(a){D.h(a,"boolean",kh,"isInitial");this.Ll=a});function el(a,b,c){this.start=a;this.end=b;this.pu=new ma;this.Mx=c;this.Iy=!1} -var ol={opacity:function(a,b,c,d,e,g){a.opacity=d(e,b,c-b,g)},position:function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},"position:node":function(a,b,c,d,e,g){var h=a.aa,k=c.aa;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Vy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new N(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g))},"position:placeholder":function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): -a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},scale:function(a,b,c,d,e,g){a.scale=d(e,b,c-b,g)},visible:function(a,b,c,d,e,g){a.visible=e!==g?b:c}};function Hg(){0=a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.rb.j;k.next();){var l=k.value;l instanceof I?e++:l instanceof G?d++:l instanceof J?g++:l instanceof da?h++:c++}k="";0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.U.Ee?!1:!0};qk.prototype.doStart=function(){this.wa||null===this.ih||this.doActivate()}; +qk.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.ih;null===b&&(b=a.Je(a.U.ha));if(null!==b&&b instanceof pa&&(this.ih=b,null!==b.Y)){this.wa=!0;this.$a=zk;var c=this.wI;null!==b.lH&&(c=b.lH);this.Jk=this.ih.copy();var d=new C(this.ih.fb(ec),this.ih.fb(vc));a.VG(d);if(c instanceof hk)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.Hj.appendChild(c);"function"===typeof c.focus&& +c.focus();"function"===typeof c.select&&this.Ry&&(c.select(),c.setSelectionRange(0,9999))}this.Fj=c}}}};qk.prototype.doCancel=function(){null!==this.bt&&this.Fj instanceof HTMLElement&&(this.Fj.style.border=this.bt,this.bt=null);this.stopTool()};qk.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};qk.prototype.doMouseDown=function(){this.wa&&this.acceptText(vk)}; +qk.prototype.acceptText=function(a){switch(a){case vk:if(this.$a===Dk)this.Fj instanceof HTMLElement&&this.Fj.focus();else if(this.$a===zk||this.$a===Ck||this.$a===Ak)this.$a=Bk,Gk(this);break;case uk:case xk:case wk:if(xk===a&&!0===this.vA.ky)break;if(this.$a===zk||this.$a===Ck||this.$a===Ak)this.$a=Bk,Gk(this)}}; +function Gk(a){var b=a.ih,c=a.g,d=a.Fj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof hk?null!==d.tC&&(g=d.tC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.Nb(a.name),a.$a=Dk,a.Tf=a.name,b.text=g,null!==b.kH&&b.kH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.ll(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Ck,null!==b.ZA&&b.ZA(a,e,g),d instanceof hk?d.show(b,c,a):(null===a.bt&&(a.bt=d.style.border,d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}} +qk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.$a=sk;this.ih=null;if(null!==this.Fj){var b=this.Fj;if(b instanceof hk)b.Yn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Hj.removeChild(b)}}this.wa=!1}};qk.prototype.doFocus=function(){v&&D.Qn("TextEditingTool.doFocus","2.0");Ek(this)};qk.prototype.doBlur=function(){v&&D.Qn("TextEditingTool.doBlur","2.0");Fk(this)}; +function Ek(a){if(null!==a.Fj&&a.state!==sk){var b=a.Bz;a.$a===zk&&(a.$a=Ak);"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}function Fk(a){if(null!==a.Fj&&a.state!==sk){var b=a.Bz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}qk.prototype.isValidText=function(a,b,c){D.l(a,pa,qk,"isValidText:textblock");var d=this.jC;if(null!==d&&!d(a,b,c))return!1;d=a.jC;return null===d||d(a,b,c)?!0:!1}; +D.defineProperty(qk,{jC:"textValidation"},function(){return this.$l},function(a){null!==a&&D.h(a,"function",qk,"textValidation");this.$l=a});D.defineProperty(qk,{xG:"minimumEditorScale"},function(){return this.TD},function(a){null!==a&&D.h(a,"number",qk,"minimumEditorScale");this.TD=a});D.defineProperty(qk,{Ry:"selectsTextOnActivate"},function(){return this.nE},function(a){null!==a&&D.h(a,"boolean",qk,"selectsTextOnActivate");this.nE=a}); +D.defineProperty(qk,{state:"state"},function(){return this.$a},function(a){this.$a!==a&&(D.Da(a,qk,qk,"starting"),this.$a=a)});qk.prototype.measureTemporaryTextBlock=qk.prototype.KJ=function(a){var b=this.Jk;b.text=a;Hk(b,this.ih.rp,Infinity);return b};function Ph(){Hg.call(this);this.name="ToolManager";this.HH=new K(Hg);this.IH=new K(Hg);this.JH=new K(Hg);this.xD=this.yD=850;this.mD=(new Ca(2,2)).Oa();this.GE=5E3;this.XD=ai;this.vD=Ik;this.Xv=this.aD=null;this.An=-1}D.Ta(Ph,Hg); +D.ka("ToolManager",Ph);var ai;Ph.WheelScroll=ai=D.s(Ph,"WheelScroll",0);var $h;Ph.WheelZoom=$h=D.s(Ph,"WheelZoom",1);Ph.WheelNone=D.s(Ph,"WheelNone",2);var Ik;Ph.GestureZoom=Ik=D.s(Ph,"GestureZoom",3);var Jk;Ph.GestureCancel=Jk=D.s(Ph,"GestureCancel",4);var Kk;Ph.GestureNone=Kk=D.s(Ph,"GestureNone",5);D.defineProperty(Ph,{$u:"mouseWheelBehavior"},function(){return this.XD},function(a){D.Da(a,Ph,Ph,"mouseWheelBehavior");this.XD=a}); +D.defineProperty(Ph,{rq:"gestureBehavior"},function(){return this.vD},function(a){D.Da(a,Ph,Ph,"gestureBehavior");this.vD=a});Ph.prototype.initializeStandardTools=function(){this.TH=new gk;this.GG=new fi;this.CJ=new xj;this.SG=new Wj;this.jK=new dk;this.tG=new ra;this.Ge=new Uh;this.AI=new ok;this.YJ=new pk;this.NA=new jk;this.iC=new qk;this.fI=new ta;this.gI=new fk}; +Ph.prototype.updateAdornments=function(a){var b=this.nm;if(b instanceof da&&this.Xv===a){var c=b.Bb;(null!==a?c.Y===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +Ph.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.U;b.Qj&&this.rq===Jk&&(b.bubbles=!1);if(b.Ou){this.cancelWaitAfter();if(this.rq===Kk){b.bubbles=!0;return}if(this.rq===Jk)return;if(a.eb.canStartMultiTouch()){a.eb.standardPinchZoomStart();return}}var c=a.na;c.IA&&0!==c.Ki&&D.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.sf.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(jh,{lL:"animationReasons"},function(){return this.Kv}); +jh.prototype.canStart=function(){return!0};jh.prototype.prepareAutomaticAnimation=jh.prototype.ro=function(a){this.tf&&(this.Ll||this.ca.ao)&&(this.Kv.add(a),this.canStart(a)&&(this.tk&&this.Yh(),this.zc=!0))};function el(a){if(a.tf&&(a.Kv.clear(),a.zc))if(!a.Ho)a.zc=!1;else if(0===a.Om){var b=+new Date;a.Om=b;requestAnimationFrame(function(){if(!1!==a.zc&&!a.tk&&a.Om===b){var c=a.ca;c.Kj("temporaryPixelRatio")&&(c.Ik=1);fl(c);a.zc=!1;c.Ja("AnimationStarting");gl(a,b)}})}} +function hl(a,b,c,d,e,g){if(a.zc&&(v&&D.l(b,O,jh,"addPropToAnimation:obj"),!("position"===c&&d.O(e)||b instanceof F&&!b.dG))){var h=a.ln;if(h.contains(b)){var h=h.oa(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=il(d));h.Mx&&void 0!==l[c]?h.pu[c]=il(e):(g||(h.pu[c]=il(e)),l[c]=il(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.pu.location=il(b.location))}else k=new ma,l=new ma,k[c]=il(d),l[c]=il(e),d=l,e=k.position,e instanceof N&&!e.H()&&a.Kv.contains("Expand SubGraph")&&e.assign(d.position),k= +new $k(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.pu.location=il(b.location)),h.add(b,k);a.Ho=!0}}function il(a){return a instanceof N?a.copy():a instanceof Ca?a.copy():a} +function gl(a,b){var c;function d(){if(!1!==g.tk&&g.Om===b){var a=+new Date,c=a>s?m:a-r;jl(g);kl(g,e,q,h,c,m);g.Uv&&g.Uv();bj(e);ll(g);a>s?ml(g):requestAnimationFrame(d)}}void 0===c&&(c=new ma);var e=a.ca;if(null!==e){var g=a,h=c.QL||a.bD,k=c.nM||null,l=c.oM||null,m=c.duration||a.Jz,n=a.KH;for(c=a.ln.j;c.next();){var p=c.value.start.position;p instanceof N&&(p.H()||p.assign(n))}a.XC=h;a.Uv=k;a.Vv=l;a.WC=m;a.Wv=a.ln;var q=a.Wv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l=c.key.findVisibleNode(), +l instanceof I&&null!==l.placeholder&&(l=l.placeholder,n=l.fb(ec),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n));a.tk=!0;jl(a);kl(a,e,q,h,0,m);bj(a.ca);ll(a);var r=+new Date,s=r+m;g.Om===b&&requestAnimationFrame(function(){d()})}}function jl(a){if(!a.np){var b=a.ca;a.JE=b.lb;a.KC=b.Xe;a.LC=b.rv;b.lb=!0;b.Xe=!0;b.rv=!0;a.np=!0}}function ll(a){var b=a.ca;b.lb=a.JE;b.Xe=a.KC;b.rv=a.LC;a.np=!1} +function kl(a,b,c,d,e,g){for(c=c.j;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==nl[m])nl[m](h,l[m],k[m],d,e,g)}d=b.qB;b.qB=!0;m=a.bD;0!==a.Rr&&0!==a.Qr&&(c=a.Rr,b.Db=m(e,c,a.Qr-c,g));null!==a.Pr&&null!==a.Nr&&(c=a.Pr,a=a.Nr,b.sb=new N(m(e,c.x,a.x-c.x,g),m(e,c.y,a.y-c.y,g)));b.qB=d} +jh.prototype.stopAnimation=jh.prototype.Yh=function(){!0===this.zc&&(this.zc=!1,this.Om=0,this.Ho&&this.ca.Le());this.tk&&this.tf&&ml(this)}; +function ml(a){a.tk=!1;a.Ho=!1;jl(a);for(var b=a.ca,c=a.XC,d=a.WC,e=a.Wv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.pu,n;for(n in l)if(void 0!==nl[n]){var p=n;!h.Mx||"position:node"!==p&&"position:placeholder"!==p||(p="position");nl[p](g,k[n],void 0!==m[n]?m[n]:h.Mx?k[n]:l[n],c,d,d)}h.Mx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.Iy&&g instanceof F&&g.Qd(!1)}for(c=a.ca.links;c.next();)d=c.value,null!==d.Hp&&(d.points=d.Hp,d.Hp=null);b.uy.clear();b.Ik=null;b.Qc(); +b.ra();b.lg();ol(b);ll(a);a.Vv&&a.Vv();a.Om=0;a.Wv=null;a.Vv=null;a.Uv=null;a.Pr=null;a.Nr=null;a.Rr=0;a.Qr=0;a.ln=new na(O,$k);b.Ja("AnimationFinished");b.Le()} +function pl(a,b,c){var d=b.aa,e=c.aa,g=null;c instanceof I&&(g=c.placeholder);null!==g?(d=g.fb(ec),d.x+=g.padding.left,d.y+=g.padding.top,hl(a,b,"position",d,b.position,!1)):hl(a,b,"position",new N(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);hl(a,b,"scale",.01,b.scale,!1);if(b instanceof I)for(b=b.uc;b.next();)g=b.value,g instanceof G&&pl(a,g,c)} +function ql(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?hl(a,b,"position:placeholder",b.position,d,!0):hl(a,b,"position:node",b.position,c,!0);hl(a,b,"scale",b.scale,.01,!0);a.zc&&(d=a.ln,d.contains(b)&&(d.oa(b).Iy=!0));if(b instanceof I)for(b=b.uc;b.next();)d=b.value,d instanceof G&&ql(a,d,c)}}function rl(a,b,c){a.zc&&(null===a.Pr&&b.H()&&null===a.Nr&&(a.Pr=b.copy()),a.Nr=c.copy(),a.Ho=!0)} +function sl(a,b,c){a.zc&&a.ca.ao&&(0===a.Rr&&0===a.Qr&&(a.Rr=b),a.Qr=c,a.Ho=!0)}D.defineProperty(jh,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",jh,"isEnabled");this.tf=a});D.defineProperty(jh,{duration:"duration"},function(){return this.Jz},function(a){D.h(a,"number",jh,"duration");1>a&&D.ua(a,">= 1",jh,"duration");this.Jz=a});D.w(jh,{pf:"isAnimating"},function(){return this.tk});D.w(jh,{uJ:"isTicking"},function(){return this.np}); +D.defineProperty(jh,{jG:"isInitial"},function(){return this.Ll},function(a){D.h(a,"boolean",jh,"isInitial");this.Ll=a});function $k(a,b,c){this.start=a;this.end=b;this.pu=new ma;this.Mx=c;this.Iy=!1} +var nl={opacity:function(a,b,c,d,e,g){a.opacity=d(e,b,c-b,g)},position:function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},"position:node":function(a,b,c,d,e,g){var h=a.aa,k=c.aa;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Vy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new N(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g))},"position:placeholder":function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): +a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},scale:function(a,b,c,d,e,g){a.scale=d(e,b,c-b,g)},visible:function(a,b,c,d,e,g){a.visible=e!==g?b:c}};function Gg(){0=a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.rb.j;k.next();){var l=k.value;l instanceof I?e++:l instanceof G?d++:l instanceof J?g++:l instanceof da?h++:c++}k="";0=d.count)a=d.count;else if(d.fa(a)===b)return-1;d.ce(a,b);b.Fu(c);d=this.g;null!==d&&(c?d.ra():d.uq(b));zl(this,a,b);return a}; +Gg.prototype.findObjectsIn=Gg.prototype.Yk=function(a,b,c,d,e){void 0===b&&(b=null);void 0===c&&(c=null);void 0===d&&(d=!1);e instanceof K||e instanceof L||(e=new L(O));if(!1===this.Vl)return e;v&&!a.H()&&D.k("findObjectsIn: Rect must have a real value, not: "+a.toString());var g=!1;null!==this.g&&this.g.wb.Tk(a)&&(g=!0);for(var h=this.rb.o,k=h.length;k--;){var l=h[k];if((!0!==g||!1!==tl(l))&&l.isVisible()){var m=l;l.Yk(a,b,c,d,e)&&(null!==b&&(m=b(m)),null===m||null!==c&&!c(m)||(e instanceof L&&e.add(m), +e instanceof K&&e.add(m)))}}return e};Gg.prototype.$A=function(a,b,c,d,e,g,h){if(!1===this.Vl)return e;for(var k=this.rb.o,l=k.length;l--;){var m=k[l];if((!0!==h||!1!==tl(m))&&g(m)&&m.isVisible()){var n=m;m.Yk(a,b,c,d,e)&&(null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||(e instanceof L&&e.add(n),e instanceof K&&e.add(n)))}}return e}; +Gg.prototype.findObjectsNear=Gg.prototype.Rn=function(a,b,c,d,e,g){void 0===c&&(c=null);void 0===d&&(d=null);void 0===e&&(e=!0);if(!1!==e&&!0!==e){if(e instanceof K||e instanceof L)g=e;e=!0}g instanceof K||g instanceof L||(g=new L(O));if(!1===this.Vl)return g;v&&!a.H()&&D.k("findObjectsNear: Point must have a real value, not: "+a.toString());var h=!1;null!==this.g&&this.g.wb.Pa(a)&&(h=!0);for(var k=D.P(),l=D.P(),m=this.rb.o,n=m.length;n--;){var p=m[n];if((!0!==h||!1!==tl(p))&&p.isVisible()){k.assign(a); +kb(k,p.Hh);l.n(a.x+b,a.y);kb(l,p.Hh);var q=p;p.Rn(k,l,c,d,e,g)&&(null!==c&&(q=c(q)),null===q||null!==d&&!d(q)||(g instanceof L&&g.add(q),g instanceof K&&g.add(q)))}}D.A(k);D.A(l);return g};f=Gg.prototype; +f.Pf=function(a,b){if(this.visible){var c;c=void 0===b?a.wb:b;for(var d=this.rb.o,e=d.length,g=0;g=d.count)a=d.count;else if(d.fa(a)===b)return-1;d.ce(a,b);b.Fu(c);d=this.g;null!==d&&(c?d.ra():d.uq(b));yl(this,a,b);return a}; f.Af=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Af(a,b,c);var d=this.rb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.fa(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Gu(c);d.pd(a);d=this.g;null!==d&&(c?d.ra():d.Af(b));b.yw=null;return a}; -function zl(a,b,c){b=Al(a,b,c);if(c instanceof I&&null!==c&&isNaN(c.Do)){if(0!==c.uc.count){for(var d=-1,e=a.rb.o,g=e.length,h=0;hd&&k.Ka===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var g=b-1,h=NaN;0<=g;){h=a.fa(g).Do;if(!isNaN(h))break;g--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===g||h<=d){g++;if(g===b)break;a.pd(b);a.ce(g,c);return g}for(h=NaN;0<=--g&&(h=a.fa(g).Do,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.pd(b);a.ce(k,c);return k}for(l=NaN;++ka||1d&&k.Ka===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var g=b-1,h=NaN;0<=g;){h=a.fa(g).Do;if(!isNaN(h))break;g--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===g||h<=d){g++;if(g===b)break;a.pd(b);a.ce(g,c);return g}for(h=NaN;0<=--g&&(h=a.fa(g).Do,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.pd(b);a.ce(k,c);return k}for(l=NaN;++ka||1parseInt(e[1],10)&&(D.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+D.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),D.Rx.licenseKey=!0);this.ji=1;this.xk=0;this.xw=new N;this.yA=500;this.Lv=new N;this.Ht=null;this.vk=!1;this.preventDefault=this.Hy=this.Lq=this.Mq=this.Kq=this.Jq=this.mo=this.oo=this.no=this.ko=this.lo=this.uC=this.mC=this.nC=this.oC=this.Xl=this.ut= -this.Wl=this.tt=null;this.rw=!1;this.Il=new Nl;void 0!==a&&Ol(this,a);this.ed=!1}D.ka("Diagram",E); -E.prototype.clear=E.prototype.clear=function(){var a=null;null!==this.Ed&&(a=this.Ed.Y);this.ea.clear();for(var b=this.dc.length,c=0;c=a)return b;for(var c=this.dc.j;c.next();)b+="\n "+c.value.toString(a-1);return b};E.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.ca instanceof E?b.ca:null}; -D.defineProperty(E,{Hj:"div"},function(){return this.Ub},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Ub!==a){Cl=[];var b=this.Ub;null!==b?(b.ca=void 0,b.innerHTML="",null!==this.Ib&&(this.Ib.removeEventListener("touchstart",this.oC,!1),this.Ib.removeEventListener("touchmove",this.nC,!1),this.Ib.removeEventListener("touchend",this.mC,!1),this.Ib.ae.ca=null),b=this.ob,null!==b&&(b.sf.each(function(a){a.cancelWaitAfter()}),b.mg.each(function(a){a.cancelWaitAfter()}),b.ng.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.eb.doCancel(),this.dd=this.Ib=null,window.removeEventListener("resize",this.uC,!1),window.removeEventListener("mousemove",this.lo,!0),window.removeEventListener("mousedown",this.ko,!0),window.removeEventListener("mouseup",this.no,!0),window.removeEventListener("wheel",this.oo,!0),window.removeEventListener("mouseout",this.mo,!0)):this.sh=!1;this.Ub=null;if(null!==a){if(b=a.ca)b.Hj=null;Ol(this,a);this.to()}}}); -function Rl(a){var b=a.Ib;a.mz?(b.addEventListener("pointerdown",a.Jq,!1),b.addEventListener("pointermove",a.Kq,!1),b.addEventListener("pointerup",a.Mq,!1),b.addEventListener("pointerout",a.Lq,!1)):(b.addEventListener("touchstart",a.oC,!1),b.addEventListener("touchmove",a.nC,!1),b.addEventListener("touchend",a.mC,!1),b.addEventListener("mousemove",a.lo,!1),b.addEventListener("mousedown",a.ko,!1),b.addEventListener("mouseup",a.no,!1),b.addEventListener("mouseout",a.mo,!1));b.addEventListener("wheel", -a.oo,!1);b.addEventListener("keydown",a.wJ,!1);b.addEventListener("keyup",a.xJ,!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.ob.rq===Kk&&b.preventDefault()},!1);window.addEventListener("resize",a.uC,!1)} +D.defineProperty(E,{Hj:"div"},function(){return this.Ub},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Ub!==a){Bl=[];var b=this.Ub;null!==b?(b.ca=void 0,b.innerHTML="",null!==this.Ib&&(this.Ib.removeEventListener("touchstart",this.oC,!1),this.Ib.removeEventListener("touchmove",this.nC,!1),this.Ib.removeEventListener("touchend",this.mC,!1),this.Ib.ae.ca=null),b=this.ob,null!==b&&(b.sf.each(function(a){a.cancelWaitAfter()}),b.mg.each(function(a){a.cancelWaitAfter()}),b.ng.each(function(a){a.cancelWaitAfter()})), +b.cancelWaitAfter(),this.eb.doCancel(),this.dd=this.Ib=null,window.removeEventListener("resize",this.uC,!1),window.removeEventListener("mousemove",this.lo,!0),window.removeEventListener("mousedown",this.ko,!0),window.removeEventListener("mouseup",this.no,!0),window.removeEventListener("wheel",this.oo,!0),window.removeEventListener("mouseout",this.mo,!0)):this.sh=!1;this.Ub=null;if(null!==a){if(b=a.ca)b.Hj=null;Nl(this,a);this.to()}}}); +function Ql(a){var b=a.Ib;a.mz?(b.addEventListener("pointerdown",a.Jq,!1),b.addEventListener("pointermove",a.Kq,!1),b.addEventListener("pointerup",a.Mq,!1),b.addEventListener("pointerout",a.Lq,!1)):(b.addEventListener("touchstart",a.oC,!1),b.addEventListener("touchmove",a.nC,!1),b.addEventListener("touchend",a.mC,!1),b.addEventListener("mousemove",a.lo,!1),b.addEventListener("mousedown",a.ko,!1),b.addEventListener("mouseup",a.no,!1),b.addEventListener("mouseout",a.mo,!1));b.addEventListener("wheel", +a.oo,!1);b.addEventListener("keydown",a.wJ,!1);b.addEventListener("keyup",a.xJ,!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.ob.rq===Jk&&b.preventDefault()},!1);window.addEventListener("resize",a.uC,!1)} E.prototype.computePixelRatio=function(){if(null!==this.Ik)return this.Ik;var a=this.dd;return(window.devicePixelRatio||1)/(a.za.webkitBackingStorePixelRatio||a.za.mozBackingStorePixelRatio||a.za.msBackingStorePixelRatio||a.za.oBackingStorePixelRatio||a.za.backingStorePixelRatio||1)};E.prototype.doMouseMove=function(){this.eb.doMouseMove()};E.prototype.doMouseDown=function(){this.eb.doMouseDown()};E.prototype.doMouseUp=function(){this.eb.doMouseUp()};E.prototype.doMouseWheel=function(){this.eb.doMouseWheel()}; E.prototype.doKeyDown=function(){this.eb.doKeyDown()};E.prototype.doKeyUp=function(){this.eb.doKeyUp()};E.prototype.doFocus=function(){this.focus()};E.prototype.focus=E.prototype.focus=function(){if(this.Ib)if(this.nK)this.Ib.focus();else{var a=window.scrollX||window.pageXOffset,b=window.scrollY||window.pageYOffset;this.Ib.focus();window.scrollTo(a,b)}}; -function gl(a){if(null!==a.Ib){var b=a.Ub;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Hl?a.Kd:0,d=a.rk?a.Kd:0,e=a.ud;a.ud=a.computePixelRatio();a.ud!==e&&(a.ms=!0,a.Le());if(b.clientWidth!==a.Qb+c||b.clientHeight!==a.Pb+d)a.Ym=!0,a.Pe=!0,b=a.Zb,null!==b&&b.my&&a.jm===Wh&&(a.Sr=!0,b.L()),a.ke||a.Le()}}} -function Ll(a){var b=new Hg;b.name="Background";a.$t(b);b=new Hg;b.name="";a.$t(b);b=new Hg;b.name="Foreground";a.$t(b);b=new Hg;b.name="Adornment";b.Yc=!0;a.$t(b);b=new Hg;b.name="Tool";b.Yc=!0;b.eG=!0;a.$t(b);b=new Hg;b.name="Grid";b.Jf=!1;b.tg=!1;b.Yc=!0;a.WH(b,a.qm("Background"))} -function Sl(a){a.Ed=new x(Tl);a.Ed.name="GRID";var b=new z;b.Kb="LineH";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new F;b.add(a.Ed); -b.Nf="Grid";b.Do=0;b.iy=!1;b.dG=!1;b.tg=!1;b.vy="GRID";a.add(b);a.rb.remove(b);a.Ed.visible=!1}function Ul(){this.ca.nA?this.ca.nA=!1:this.ca.isEnabled?this.ca.zI(this):Vl(this.ca)}function Wl(a){this.ca.isEnabled?(this.ca.pA=a.target.scrollTop,this.ca.oA=a.target.scrollLeft):Vl(this.ca)} +function fl(a){if(null!==a.Ib){var b=a.Ub;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Hl?a.Kd:0,d=a.rk?a.Kd:0,e=a.ud;a.ud=a.computePixelRatio();a.ud!==e&&(a.ms=!0,a.Le());if(b.clientWidth!==a.Qb+c||b.clientHeight!==a.Pb+d)a.Ym=!0,a.Pe=!0,b=a.Zb,null!==b&&b.my&&a.jm===Vh&&(a.Sr=!0,b.L()),a.ke||a.Le()}}} +function Kl(a){var b=new Gg;b.name="Background";a.$t(b);b=new Gg;b.name="";a.$t(b);b=new Gg;b.name="Foreground";a.$t(b);b=new Gg;b.name="Adornment";b.Yc=!0;a.$t(b);b=new Gg;b.name="Tool";b.Yc=!0;b.eG=!0;a.$t(b);b=new Gg;b.name="Grid";b.Jf=!1;b.tg=!1;b.Yc=!0;a.WH(b,a.qm("Background"))} +function Rl(a){a.Ed=new x(Sl);a.Ed.name="GRID";var b=new z;b.Kb="LineH";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new F;b.add(a.Ed); +b.Nf="Grid";b.Do=0;b.iy=!1;b.dG=!1;b.tg=!1;b.vy="GRID";a.add(b);a.rb.remove(b);a.Ed.visible=!1}function Tl(){this.ca.nA?this.ca.nA=!1:this.ca.isEnabled?this.ca.zI(this):Ul(this.ca)}function Vl(a){this.ca.isEnabled?(this.ca.pA=a.target.scrollTop,this.ca.oA=a.target.scrollLeft):Ul(this.ca)} E.prototype.diagramScroll=E.prototype.zI=function(a){if(null!==this.Ib){this.Yw=!0;var b=this.kd,c=this.wb,d=this.Oy,e=b.x-d.left,g=b.y-d.top,h=b.width+d.left+d.right,k=b.height+d.top+d.bottom,l=b.right+d.right,d=b.bottom+d.bottom,m=c.x,b=c.y,n=c.width,p=c.height,q=c.right,r=c.bottom,c=this.scale,s;s=a.scrollLeft;if(this.rs)switch(this.lA){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;nq&&(this.position=s.n(-(this.bx.scrollWidth-this.Qb)+u-this.Qb/c+l,this.position.y))),a.NH&&this.Ce&&(gr&&(this.position=s.n(this.position.x,-(this.bx.scrollHeight-this.Pb)+a.scrollTop-this.Pb/c+d))),D.A(s),Xl(this), -this.Ym=this.Yw=!1,b=this.kd,c=this.wb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,g=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.yt.style.width="1px"),p>=k&&g>=b&&d<=r&&(this.yt.style.height="1px"))}};E.prototype.computeBounds=E.prototype.Kh=function(){0q&&(this.position=s.n(-(this.bx.scrollWidth-this.Qb)+u-this.Qb/c+l,this.position.y))),a.NH&&this.Ce&&(gr&&(this.position=s.n(this.position.x,-(this.bx.scrollHeight-this.Pb)+a.scrollTop-this.Pb/c+d))),D.A(s),Wl(this), +this.Ym=this.Yw=!1,b=this.kd,c=this.wb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,g=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.yt.style.width="1px"),p>=k&&g>=b&&d<=r&&(this.yt.style.height="1px"))}};E.prototype.computeBounds=E.prototype.Kh=function(){0c&&(e=c),ea.Rh&&(e=a.Rh),e):b===dm?(e=l>k?(h-a.Kd)/d:(g-a.Kd)/e,e>c&&(e=c),ea.Rh&&(e=a.Rh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=$l(this,cm)}; -E.prototype.zoomToRect=function(a,b){void 0===b&&(b=cm);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cm||b===dm)if(isNaN(c))e=this.wb.height*this.scale/d;else if(isNaN(d))e=this.wb.width*this.scale/c;else var e=this.Qb,g=this.Pb,e=b===dm?g/d>e/c?(g-(this.rk?this.Kd:0))/d:(e-(this.Hl?this.Kd:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new N(a.x,a.y)}};D.defineProperty(E,{qB:null},function(){return this.ed},function(a){this.ed=a}); -E.prototype.alignDocument=function(a,b){this.sk&&bm(this,this.Kh());var c=this.kd,d=this.wb;this.position=new N(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; -function am(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.VB===Dl)g.Xc()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),e>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*e-g.offsetY))),g=a.Oy,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lc&&(e=c),ea.Rh&&(e=a.Rh),e):b===cm?(e=l>k?(h-a.Kd)/d:(g-a.Kd)/e,e>c&&(e=c),ea.Rh&&(e=a.Rh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Zl(this,bm)}; +E.prototype.zoomToRect=function(a,b){void 0===b&&(b=bm);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===bm||b===cm)if(isNaN(c))e=this.wb.height*this.scale/d;else if(isNaN(d))e=this.wb.width*this.scale/c;else var e=this.Qb,g=this.Pb,e=b===cm?g/d>e/c?(g-(this.rk?this.Kd:0))/d:(e-(this.Hl?this.Kd:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new N(a.x,a.y)}};D.defineProperty(E,{qB:null},function(){return this.ed},function(a){this.ed=a}); +E.prototype.alignDocument=function(a,b){this.sk&&am(this,this.Kh());var c=this.kd,d=this.wb;this.position=new N(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; +function $l(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.VB===Cl)g.Xc()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),e>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*e-g.offsetY))),g=a.Oy,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Dp[0])e=a.Dp[c];else return;c=a.Ib;b=a.Qb;a=a.Pb;var g=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),g=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.n(g,h)}E.prototype.invalidateDocumentBounds=E.prototype.Qc=function(){this.sk||(this.sk=!0,this.Le(!0))};function pl(a){a.ke||Ti(a);a.sk&&bm(a,a.Kh())} -E.prototype.redraw=E.prototype.to=function(){this.ed||this.ke||(this.ra(),jm(this),Xl(this),this.Qc(),this.lg())};E.prototype.isUpdateRequested=function(){return this.cg};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Ra,c=b.isEnabled;b.Yh();b.isEnabled=!1;cj(this);this.sh=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; -E.prototype.requestUpdate=E.prototype.Le=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.ed||!1===a&&this.ke)){this.cg=!0;var b=this;requestAnimationFrame(function(){b.cg&&b.lg()})}};E.prototype.maybeUpdate=E.prototype.lg=function(){if(!this.bp||this.cg)this.bp&&(this.bp=!1),cj(this)};function km(a,b){a.Ra.pf||a.ed||!a.Ym||Vl(a)||(b&&Ti(a),Zl(a,!1))} -function cj(a){if(!a.ke&&(a.cg=!1,null!==a.Ub)){a.ke=!0;var b=a.Ra,c=a.iA;if(!b.np&&0!==c.length){for(var d=c.o,e=d.length,g=0;gb;b++){var c=a.Gg.j;if(null===c||0===a.Gg.count)break;a.Gg=new L(F);a.sC(c,a.Gg);v&&22===b&&D.trace("failure to validate parts")}a.rg.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} -E.prototype.sC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.re()||c instanceof I||(c.zm()?(Ik(c,Infinity,Infinity),c.rc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&Mm(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.zm()?(Ik(c,Infinity,Infinity),c.rc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.zm()?(Ik(c,Infinity,Infinity),c.rc()):b.add(c))}; -function Mm(a,b){for(var c=D.nb(),d=D.nb(),e=b.uc;e.next();){var g=e.value;g.isVisible()&&(g instanceof I?(Nm(g)||Om(g)||Pm(g))&&Mm(a,g):g instanceof J?g.$===b||g.ba===b?d.push(g):c.push(g):(Ik(g,Infinity,Infinity),g.rc()))}for(var e=c.length,h=0;hb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Dp[0])e=a.Dp[c];else return;c=a.Ib;b=a.Qb;a=a.Pb;var g=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),g=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.n(g,h)}E.prototype.invalidateDocumentBounds=E.prototype.Qc=function(){this.sk||(this.sk=!0,this.Le(!0))};function ol(a){a.ke||Si(a);a.sk&&am(a,a.Kh())} +E.prototype.redraw=E.prototype.to=function(){this.ed||this.ke||(this.ra(),im(this),Wl(this),this.Qc(),this.lg())};E.prototype.isUpdateRequested=function(){return this.cg};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Ra,c=b.isEnabled;b.Yh();b.isEnabled=!1;bj(this);this.sh=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; +E.prototype.requestUpdate=E.prototype.Le=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.ed||!1===a&&this.ke)){this.cg=!0;var b=this;requestAnimationFrame(function(){b.cg&&b.lg()})}};E.prototype.maybeUpdate=E.prototype.lg=function(){if(!this.bp||this.cg)this.bp&&(this.bp=!1),bj(this)};function jm(a,b){a.Ra.pf||a.ed||!a.Ym||Ul(a)||(b&&Si(a),Yl(a,!1))} +function bj(a){if(!a.ke&&(a.cg=!1,null!==a.Ub)){a.ke=!0;var b=a.Ra,c=a.iA;if(!b.np&&0!==c.length){for(var d=c.o,e=d.length,g=0;gb;b++){var c=a.Gg.j;if(null===c||0===a.Gg.count)break;a.Gg=new L(F);a.sC(c,a.Gg);v&&22===b&&D.trace("failure to validate parts")}a.rg.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} +E.prototype.sC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.re()||c instanceof I||(c.zm()?(Hk(c,Infinity,Infinity),c.rc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&ym(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.zm()?(Hk(c,Infinity,Infinity),c.rc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.zm()?(Hk(c,Infinity,Infinity),c.rc()):b.add(c))}; +function ym(a,b){for(var c=D.nb(),d=D.nb(),e=b.uc;e.next();){var g=e.value;g.isVisible()&&(g instanceof I?(Mm(g)||Nm(g)||Om(g))&&ym(a,g):g instanceof J?g.$===b||g.ba===b?d.push(g):c.push(g):(Hk(g,Infinity,Infinity),g.rc()))}for(var e=c.length,h=0;hm&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,y=p.height+s+u,q=p.x-q,w=n.x,r=p.right+r,A=n.right+ -k,s=p.y-s,B=n.y,u=p.bottom+u,n=n.bottom+l,P="1px",H="1px",p=a.scale,R=!(tA+1&&(P=Math.max((r-A)*p+a.Qb,P)),m+k+1n+1&&(H=Math.max((u-n)*p+a.Pb,H)),c+l+1m&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,y=p.height+s+u,q=p.x-q,w=n.x,r=p.right+r,A=n.right+ +k,s=p.y-s,B=n.y,u=p.bottom+u,n=n.bottom+l,P="1px",H="1px",p=a.scale,R=!(tA+1&&(P=Math.max((r-A)*p+a.Qb,P)),m+k+1n+1&&(H=Math.max((u-n)*p+a.Pb,H)),c+l+1A+1&&(P=Math.max((r-A)*p+a.Qb,P)),m+1n+1&&(H=Math.max((u-n)*p+k,H)),c+1A+1&&(k=a.position.x*p));if(a.rs)switch(a.lA){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth- k-b.clientWidth}b.scrollLeft=k;a.kB&&a.Ce&&(c+1n+1&&(b.scrollTop=a.position.y*p));m=a.Qb;c=a.Pb;b.style.width=m+(a.Hl?a.Kd:0)+"px";b.style.height=c+(a.rk?a.Kd:0)+"px";return d!==m||e!==c||a.Ra.zc?(n=a.wb,a.dv(g,n,p,a.scale,h),!1):!0} -E.prototype.add=E.prototype.add=function(a){D.l(a,F,E,"add:part");var b=a.g;if(b!==this){null!==b&&D.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.hr&&(a.Ol="Tool");var c=a.Nf,b=this.qm(c);null===b&&(b=this.qm(""));null===b&&D.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.uq(99999999,a,a.g===this),0<=c&&this.od(hg,"parts",b,null,a,null,c),b.Yc||this.Qc(),a.L(Wm),c=a.py,null!== +E.prototype.add=E.prototype.add=function(a){D.l(a,F,E,"add:part");var b=a.g;if(b!==this){null!==b&&D.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.hr&&(a.Ol="Tool");var c=a.Nf,b=this.qm(c);null===b&&(b=this.qm(""));null===b&&D.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.uq(99999999,a,a.g===this),0<=c&&this.od(gg,"parts",b,null,a,null,c),b.Yc||this.Qc(),a.L(Vm),c=a.py,null!== c&&c(a,null,b))}}; -E.prototype.uq=function(a){if(a instanceof G){if(this.Ap.add(a),a instanceof I){var b=a.Ka;null===b?this.am.add(a):b.jn.add(a);b=a.Zb;null!==b&&(b.g=this)}}else a instanceof J?this.tp.add(a):a instanceof da||this.rb.add(a);var c=this;Xm(a,function(a){Ym(c,a)});(a instanceof da||a instanceof I&&null!==a.Sb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.add(b,a):this.Vi.add(b,a)),Xm(a,function(a){Zm(c,a)}));!0!==Om(a)&&!0!==Pm(a)||this.Gg.add(a);$m(a,!0,this);an(a)?(a.aa.H()&& -this.ra(yl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(yl(a,a.aa));this.Le()}; -E.prototype.Af=function(a){a.iu();if(a instanceof G){if(this.Ap.remove(a),a instanceof I){var b=a.Ka;null===b?this.am.remove(a):b.jn.remove(a);b=a.Zb;null!==b&&(b.g=null)}}else a instanceof J?this.tp.remove(a):a instanceof da||this.rb.remove(a);var c=this;Xm(a,function(a){bn(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.remove(b):this.Vi.remove(b)),Xm(a,function(a){cn(c,a)}));this.Gg.remove(a);an(a)?(a.aa.H()&&this.ra(yl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(yl(a, -a.aa));this.Le()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");dn(this,a,!0)};function dn(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.jb=!1,b.Zg=!1,b.L(en),c&&b.Pn(),c=d.Af(-1,b,!1),0<=c&&a.od(ig,"parts",d,b,null,c,null),a=b.py,null!==a&&a(b,d,null))} +E.prototype.uq=function(a){if(a instanceof G){if(this.Ap.add(a),a instanceof I){var b=a.Ka;null===b?this.am.add(a):b.jn.add(a);b=a.Zb;null!==b&&(b.g=this)}}else a instanceof J?this.tp.add(a):a instanceof da||this.rb.add(a);var c=this;Wm(a,function(a){Xm(c,a)});(a instanceof da||a instanceof I&&null!==a.Sb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.add(b,a):this.Vi.add(b,a)),Wm(a,function(a){Ym(c,a)}));!0!==Nm(a)&&!0!==Om(a)||this.Gg.add(a);Zm(a,!0,this);$m(a)?(a.aa.H()&& +this.ra(xl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(xl(a,a.aa));this.Le()}; +E.prototype.Af=function(a){a.iu();if(a instanceof G){if(this.Ap.remove(a),a instanceof I){var b=a.Ka;null===b?this.am.remove(a):b.jn.remove(a);b=a.Zb;null!==b&&(b.g=null)}}else a instanceof J?this.tp.remove(a):a instanceof da||this.rb.remove(a);var c=this;Wm(a,function(a){an(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.remove(b):this.Vi.remove(b)),Wm(a,function(a){bn(c,a)}));this.Gg.remove(a);$m(a)?(a.aa.H()&&this.ra(xl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(xl(a, +a.aa));this.Le()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");cn(this,a,!0)};function cn(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.jb=!1,b.Zg=!1,b.L(dn),c&&b.Pn(),c=d.Af(-1,b,!1),0<=c&&a.od(hg,"parts",d,b,null,c,null),a=b.py,null!==a&&a(b,d,null))} E.prototype.removeParts=E.prototype.RB=function(a,b){if(D.isArray(a))for(var c=D.cb(a),d=0;dd&&this.Qc()}; -E.prototype.addLayerAfter=function(a,b){fn(this,a,b);a.ad(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ye&&this.od(ig,"layers",this,a,null,d,null));for(var e=c.count,g=0;gd&&this.Qc()}; -E.prototype.removeLayer=function(a){D.l(a,Hg,E,"removeLayer:layer");a.g!==this&&D.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.rb.copy().j;b.next();){var d=b.value,e=d.Nf;d.Nf=e!==a.name?e:""}null!==this.ye&&this.od(ig,"layers",this,a,null,c,null);this.ra();this.Qc()}}};E.prototype.findLayer=E.prototype.qm=function(a){for(var b=this.co;b.next();){var c=b.value;if(c.name===a)return c}return null}; +E.prototype.moveParts=E.prototype.moveParts=function(a,b,c){D.l(b,N,E,"moveParts:offset");var d=this.ob;if(null!==d){d=d.Ge;null===d&&(d=new Uh,d.ad(this));var e=new na(F);if(null!==a)a=a.j;else{for(a=this.Hi;a.next();)gi(d,e,a.value,c);for(a=this.rg;a.next();)gi(d,e,a.value,c);a=this.links}for(;a.next();)gi(d,e,a.value,c);d.moveParts(e,b,c)}}; +function en(a,b,c){D.l(b,Gg,E,"addLayer:layer");null!==b.g&&b.g!==a&&D.k("Cannot share a Layer with another Diagram: "+b+" of "+b.g);null===c?null!==b.g&&D.k("Cannot add an existing Layer to this Diagram again: "+b):(D.l(c,Gg,E,"addLayer:existingLayer"),c.g!==a&&D.k("Existing Layer must be in this Diagram: "+c+" not in "+c.g),b===c&&D.k("Cannot move a Layer before or after itself: "+b));if(b.g!==a){b=b.name;a=a.dc;c=a.count;for(var d=0;dd&&this.Qc()}; +E.prototype.addLayerAfter=function(a,b){en(this,a,b);a.ad(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ye&&this.od(hg,"layers",this,a,null,d,null));for(var e=c.count,g=0;gd&&this.Qc()}; +E.prototype.removeLayer=function(a){D.l(a,Gg,E,"removeLayer:layer");a.g!==this&&D.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.rb.copy().j;b.next();){var d=b.value,e=d.Nf;d.Nf=e!==a.name?e:""}null!==this.ye&&this.od(hg,"layers",this,a,null,c,null);this.ra();this.Qc()}}};E.prototype.findLayer=E.prototype.qm=function(a){for(var b=this.co;b.next();){var c=b.value;if(c.name===a)return c}return null}; E.prototype.addModelChangedListener=E.prototype.YH=function(a){D.h(a,"function",E,"addModelChangedListener:listener");null===this.xh&&(this.xh=new K("function"));this.xh.add(a);this.ea.Dn(a)};E.prototype.removeModelChangedListener=function(a){D.h(a,"function",E,"removeModelChangedListener:listener");null!==this.xh&&(this.xh.remove(a),0===this.xh.count&&(this.xh=null));this.ea.gv(a)}; -E.prototype.addChangedListener=E.prototype.Dn=function(a){D.h(a,"function",E,"addChangedListener:listener");null===this.Qi&&(this.Qi=new K("function"));this.Qi.add(a)};E.prototype.removeChangedListener=E.prototype.gv=function(a){D.h(a,"function",E,"removeChangedListener:listener");null!==this.Qi&&(this.Qi.remove(a),0===this.Qi.count&&(this.Qi=null))};E.prototype.Hx=function(a){this.lb||this.na.YF(a);a.Oc!==gg&&(this.Gi=!0);if(null!==this.Qi)for(var b=this.Qi,c=b.length,d=0;da.Rh&&(c=a.Rh);e=D.Fb(a.sb.x+h/b-h/c,a.sb.y+k/b-k/c);a.position=e;D.A(e);a.Db=c;a.dv(d,a.wb,b,c,!1);a.ed=!1;Zl(a, -!1);c=a.Ra;c.zc&&tl(c,b,a.Db);a.ra();jm(a)}} -E.prototype.dv=function(a,b,c,d,e){a.O(b)||(void 0===e&&(e=!1),e||jm(this),Xl(this),d=this.Zb,null===d||!d.my||this.jm!==Wh||e||a.width===b.width&&a.height===b.height||d.L(),d=this.eb,!0===this.th&&d instanceof Qh&&(this.U.ha=this.pC(this.U.Sd),Yk(d,this)),this.ed||this.cG(a,b),mm(this),this.Fh.scale=c,this.Fh.position.x=a.x,this.Fh.position.y=a.y,this.Fh.bounds.set(a),this.Fh.isScroll=e,this.Ja("ViewportBoundsChanged",this.Fh,a),this.vB&&this.links.each(function(a){a.Nj&&a.aa.jg(b)&&a.ec()}))}; -function mm(a,b){void 0===b&&(b=null);var c=a.Ed;if(null!==c&&c.visible){for(var d=D.Im(),e=1,g=1,h=c.xa.o,k=h.length,l=0;ln||(hn(m.Kb)?g=g*n/Te(g,n):e=e*n/Te(e,n))}h=c.by;d.n(g*h.width,e*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{e=D.Sf();g=a.wb;e.n(g.x,g.y,g.width,g.height);for(h=a.Rw.j;h.next();)g=h.value.wb,g.H()&&Ub(e,g.x,g.y,g.width,g.height);if(!e.H()){D.Lb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Lb(e)}c.width=k+2*d.width;c.height= -l+2*d.height;e=D.P();gb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.$k(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.Jx=function(){var a=0a.Rh&&(c=a.Rh);e=D.Fb(a.sb.x+h/b-h/c,a.sb.y+k/b-k/c);a.position=e;D.A(e);a.Db=c;a.dv(d,a.wb,b,c,!1);a.ed=!1;Yl(a, +!1);c=a.Ra;c.zc&&sl(c,b,a.Db);a.ra();im(a)}} +E.prototype.dv=function(a,b,c,d,e){a.O(b)||(void 0===e&&(e=!1),e||im(this),Wl(this),d=this.Zb,null===d||!d.my||this.jm!==Vh||e||a.width===b.width&&a.height===b.height||d.L(),d=this.eb,!0===this.th&&d instanceof Ph&&(this.U.ha=this.pC(this.U.Sd),Xk(d,this)),this.ed||this.cG(a,b),lm(this),this.Fh.scale=c,this.Fh.position.x=a.x,this.Fh.position.y=a.y,this.Fh.bounds.set(a),this.Fh.isScroll=e,this.Ja("ViewportBoundsChanged",this.Fh,a),this.vB&&this.links.each(function(a){a.Nj&&a.aa.jg(b)&&a.ec()}))}; +function lm(a,b){void 0===b&&(b=null);var c=a.Ed;if(null!==c&&c.visible){for(var d=D.Im(),e=1,g=1,h=c.xa.o,k=h.length,l=0;ln||(gn(m.Kb)?g=g*n/Se(g,n):e=e*n/Se(e,n))}h=c.by;d.n(g*h.width,e*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{e=D.Sf();g=a.wb;e.n(g.x,g.y,g.width,g.height);for(h=a.Rw.j;h.next();)g=h.value.wb,g.H()&&Ub(e,g.x,g.y,g.width,g.height);if(!e.H()){D.Lb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Lb(e)}c.width=k+2*d.width;c.height= +l+2*d.height;e=D.P();gb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.$k(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.Jx=function(){var a=0a&&D.ua(a,">= 0",E,"scrollHorizontalLineChange"),this.Zw=a,this.i("scrollHorizontalLineChange",b,a))}); -D.defineProperty(E,{mv:"scrollVerticalLineChange"},function(){return this.ex},function(a){var b=this.ex;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.ex=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Vb},function(a){v&&D.l(a,bg,E,"lastInput");this.Vb=a});D.defineProperty(E,{Pc:"firstInput"},function(){return this.aj},function(a){v&&D.l(a,bg,E,"firstInput");this.aj=a}); +D.defineProperty(E,{mv:"scrollVerticalLineChange"},function(){return this.ex},function(a){var b=this.ex;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.ex=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Vb},function(a){v&&D.l(a,ag,E,"lastInput");this.Vb=a});D.defineProperty(E,{Pc:"firstInput"},function(){return this.aj},function(a){v&&D.l(a,ag,E,"firstInput");this.aj=a}); D.defineProperty(E,{sc:"currentCursor"},function(){return this.Tv},function(a){""===a&&(a=this.Mr);var b=this.Tv;if(b!==a){D.h(a,"string",E,"currentCursor");var c=this.Ib,d=this.Ub;null!==c&&(this.Tv=a,c.style.cursor=a,d.style.cursor=a,c.style.cursor===b&&(c.style.cursor="-webkit-"+a,d.style.cursor="-webkit-"+a,c.style.cursor===b&&(c.style.cursor="-moz-"+a,d.style.cursor="-moz-"+a,c.style.cursor===b&&(c.style.cursor=a,d.style.cursor=a))))}}); D.defineProperty(E,{zL:"defaultCursor"},function(){return this.Mr},function(a){""===a&&(a="auto");var b=this.Mr;b!==a&&(D.h(a,"string",E,"defaultCursor"),this.Mr=a,this.i("defaultCursor",b,a))});D.defineProperty(E,{click:"click"},function(){return this.Ri},function(a){var b=this.Ri;b!==a&&(null!==a&&D.h(a,"function",E,"click"),this.Ri=a,this.i("click",b,a))}); D.defineProperty(E,{nu:"doubleClick"},function(){return this.Yi},function(a){var b=this.Yi;b!==a&&(null!==a&&D.h(a,"function",E,"doubleClick"),this.Yi=a,this.i("doubleClick",b,a))});D.defineProperty(E,{MA:"contextClick"},function(){return this.Ti},function(a){var b=this.Ti;b!==a&&(null!==a&&D.h(a,"function",E,"contextClick"),this.Ti=a,this.i("contextClick",b,a))}); D.defineProperty(E,{FB:"mouseOver"},function(){return this.nj},function(a){var b=this.nj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseOver"),this.nj=a,this.i("mouseOver",b,a))});D.defineProperty(E,{EB:"mouseHover"},function(){return this.mj},function(a){var b=this.mj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHover"),this.mj=a,this.i("mouseHover",b,a))}); D.defineProperty(E,{DB:"mouseHold"},function(){return this.lj},function(a){var b=this.lj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHold"),this.lj=a,this.i("mouseHold",b,a))});D.defineProperty(E,{SJ:"mouseDragOver"},function(){return this.Kw},function(a){var b=this.Kw;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDragOver"),this.Kw=a,this.i("mouseDragOver",b,a))}); -D.defineProperty(E,{CB:"mouseDrop"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{lC:"toolTip"},function(){return this.wj},function(a){var b=this.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof ik||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.wj=a,this.i("toolTip",b,a))}); -D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(!v||a instanceof da||a instanceof ik||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ui=a,this.i("contextMenu",b,a))});D.defineProperty(E,{yb:"commandHandler"},function(){return this.wz},function(a){var b=this.wz;b!==a&&(D.l(a,qa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wz=a,a.ad(this))}); -D.defineProperty(E,{ob:"toolManager"},function(){return this.wA},function(a){var b=this.wA;b!==a&&(D.l(a,Qh,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wA=a,a.ad(this))});D.defineProperty(E,{mu:"defaultTool"},function(){return this.Cz},function(a){var b=this.Cz;b!==a&&(D.l(a,Zg,E,"defaultTool"),this.Cz=a,this.eb===b&&(this.eb=a))}); -D.defineProperty(E,{eb:"currentTool"},function(){return this.zz},function(a){var b=this.zz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.mu);null!==a&&(D.l(a,Zg,E,"currentTool"),this.zz=a,a.ad(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.jx}); +D.defineProperty(E,{CB:"mouseDrop"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{lC:"toolTip"},function(){return this.wj},function(a){var b=this.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof hk||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.wj=a,this.i("toolTip",b,a))}); +D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(!v||a instanceof da||a instanceof hk||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ui=a,this.i("contextMenu",b,a))});D.defineProperty(E,{yb:"commandHandler"},function(){return this.wz},function(a){var b=this.wz;b!==a&&(D.l(a,qa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wz=a,a.ad(this))}); +D.defineProperty(E,{ob:"toolManager"},function(){return this.wA},function(a){var b=this.wA;b!==a&&(D.l(a,Ph,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wA=a,a.ad(this))});D.defineProperty(E,{mu:"defaultTool"},function(){return this.Cz},function(a){var b=this.Cz;b!==a&&(D.l(a,Hg,E,"defaultTool"),this.Cz=a,this.eb===b&&(this.eb=a))}); +D.defineProperty(E,{eb:"currentTool"},function(){return this.zz},function(a){var b=this.zz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.mu);null!==a&&(D.l(a,Hg,E,"currentTool"),this.zz=a,a.ad(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.jx}); D.defineProperty(E,{JJ:"maxSelectionCount"},function(){return this.Fw},function(a){var b=this.Fw;if(b!==a)if(D.h(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Fw=a,this.i("maxSelectionCount",b,a),!this.na.ub&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); D.defineProperty(E,{VJ:"nodeSelectionAdornmentTemplate"},function(){return this.Lw},function(a){var b=this.Lw;b!==a&&(D.l(a,da,E,"nodeSelectionAdornmentTemplate"),this.Lw=a,this.i("nodeSelectionAdornmentTemplate",b,a))});D.defineProperty(E,{aJ:"groupSelectionAdornmentTemplate"},function(){return this.hw},function(a){var b=this.hw;b!==a&&(D.l(a,da,E,"groupSelectionAdornmentTemplate"),this.hw=a,this.i("groupSelectionAdornmentTemplate",b,a))}); D.defineProperty(E,{DJ:"linkSelectionAdornmentTemplate"},function(){return this.Aw},function(a){var b=this.Aw;b!==a&&(D.l(a,da,E,"linkSelectionAdornmentTemplate"),this.Aw=a,this.i("linkSelectionAdornmentTemplate",b,a))});D.w(E,{wm:"highlighteds"},function(){return this.lw}); -D.defineProperty(E,{Gi:"isModified"},function(){var a=this.na;return a.isEnabled?null!==a.Gj?!0:this.rw&&this.rh!==a.Lj:this.rw},function(a){if(this.rw!==a){D.h(a,"boolean",E,"isModified");this.rw=a;var b=this.na;!a&&b.isEnabled&&(this.rh=b.Lj);a||ln(this)}});function ln(a){var b=a.Gi;a.ME!==b&&(a.ME=b,a.Ja("Modified"))} -D.defineProperty(E,{ea:"model"},function(){return this.ye},function(a){var b=this.ye;if(b!==a){D.l(a,M,E,"model");this.eb.doCancel();null!==b&&b.na!==a.na&&b.na.iG&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Ra.Yh();this.Jx();this.sh=!1;this.bp=!0;this.rh=-2;this.cg=!1;var c=this.ke;this.ke=!0;this.Ra.ro("Model");null!==b&&(null!==this.xh&&this.xh.each(function(a){b.gv(a)}),b.gv(this.VD),b instanceof Y&&mn(this,b.$g),mn(this,b.qg));this.ye=a;a.Dn(this.UD);nn(this, -a.qg);a instanceof Y&&on(this,a.$g);a.gv(this.UD);a.Dn(this.VD);null!==this.xh&&this.xh.each(function(b){a.Dn(b)});this.ke=c;this.ed||this.ra();null!==b&&(a.na.isEnabled=b.na.isEnabled)}});D.defineProperty(E,{ab:null},function(){return this.ND},function(a){this.ND=a});D.w(E,{uy:null},function(){return this.GH}); -function Hl(a,b){if(b.ea===a.ea){var c=b.Oc,d=b.propertyName;if(c===gg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ob,c.sf.each(function(b){b.ad(a)}),c.mg.each(function(b){b.ad(a)}),c.ng.each(function(b){b.ad(a)}),a.ke||a.sh||(a.Sr=!0,a.bp&&(a.cg=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Ra;e.pf&&!a.lb&&e.Yh();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Ra,e.pf&&!a.lb&&e.Yh());else if(a.ab){a.ab=!1;try{var g=b.Ef;if(""!==g)if(c===fg){if("linkFromKey"===g){var h= +D.defineProperty(E,{Gi:"isModified"},function(){var a=this.na;return a.isEnabled?null!==a.Gj?!0:this.rw&&this.rh!==a.Lj:this.rw},function(a){if(this.rw!==a){D.h(a,"boolean",E,"isModified");this.rw=a;var b=this.na;!a&&b.isEnabled&&(this.rh=b.Lj);a||kn(this)}});function kn(a){var b=a.Gi;a.ME!==b&&(a.ME=b,a.Ja("Modified"))} +D.defineProperty(E,{ea:"model"},function(){return this.ye},function(a){var b=this.ye;if(b!==a){D.l(a,M,E,"model");this.eb.doCancel();null!==b&&b.na!==a.na&&b.na.iG&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Ra.Yh();this.Jx();this.sh=!1;this.bp=!0;this.rh=-2;this.cg=!1;var c=this.ke;this.ke=!0;this.Ra.ro("Model");null!==b&&(null!==this.xh&&this.xh.each(function(a){b.gv(a)}),b.gv(this.VD),b instanceof Y&&ln(this,b.$g),ln(this,b.qg));this.ye=a;a.Dn(this.UD);mn(this, +a.qg);a instanceof Y&&nn(this,a.$g);a.gv(this.UD);a.Dn(this.VD);null!==this.xh&&this.xh.each(function(b){a.Dn(b)});this.ke=c;this.ed||this.ra();null!==b&&(a.na.isEnabled=b.na.isEnabled)}});D.defineProperty(E,{ab:null},function(){return this.ND},function(a){this.ND=a});D.w(E,{uy:null},function(){return this.GH}); +function Gl(a,b){if(b.ea===a.ea){var c=b.Oc,d=b.propertyName;if(c===fg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ob,c.sf.each(function(b){b.ad(a)}),c.mg.each(function(b){b.ad(a)}),c.ng.each(function(b){b.ad(a)}),a.ke||a.sh||(a.Sr=!0,a.bp&&(a.cg=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Ra;e.pf&&!a.lb&&e.Yh();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Ra,e.pf&&!a.lb&&e.Yh());else if(a.ab){a.ab=!1;try{var g=b.Ef;if(""!==g)if(c===eg){if("linkFromKey"===g){var h= b.object,k=a.gg(h);if(null!==k){var l=b.newValue,m=a.Te(l);k.$=m}}else if("linkToKey"===g)h=b.object,k=a.gg(h),null!==k&&(l=b.newValue,m=a.Te(l),k.ba=m);else if("linkFromPortId"===g){if(h=b.object,k=a.gg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.hg=n)}}else if("linkToPortId"===g)h=b.object,k=a.gg(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.jh=n));else if("nodeGroupKey"===g){var h=b.object,p=a.Nh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Te(q);p.Ka=r instanceof I?r: -null}else p.Ka=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.gg(h),null!==k){var s=b.oldValue,u=b.newValue;if(D.isArray(s))for(var t=D.cb(s),y=0;yl)){var m=l;vn(k)&&m++;k.Af(m,!0);wn(k,m,l)}}}}function Zm(a,b){var c=b.ej;if(D.isArray(c)){var d=a.an.oa(c);if(null===d)d=[],d.push(b),a.an.add(c,d);else{for(c=0;cl)){var m=l;un(k)&&m++;k.Af(m,!0);vn(k,m,l)}}}}function Ym(a,b){var c=b.ej;if(D.isArray(c)){var d=a.an.oa(c);if(null===d)d=[],d.push(b),a.an.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):D.ua(a,"> 0",E,"minScale"))}); D.defineProperty(E,{Rh:"maxScale"},function(){return this.Ew},function(a){D.p(a,E,"maxScale");var b=this.Ew;b!==a&&(0 0",E,"maxScale"))});D.defineProperty(E,{Lm:"zoomPoint"},function(){return this.xx},function(a){this.xx.O(a)||(D.l(a,N,E,"zoomPoint"),this.xx=a=a.V())}); -D.defineProperty(E,{LA:"contentAlignment"},function(){return this.No},function(a){var b=this.No;b.O(a)||(D.l(a,S,E,"contentAlignment"),this.No=a=a.V(),this.i("contentAlignment",b,a),Zl(this,!1))});D.defineProperty(E,{WL:"initialContentAlignment"},function(){return this.hp},function(a){var b=this.hp;b.O(a)||(D.l(a,S,E,"initialContentAlignment"),this.hp=a=a.V(),this.i("initialContentAlignment",b,a))}); +D.defineProperty(E,{LA:"contentAlignment"},function(){return this.No},function(a){var b=this.No;b.O(a)||(D.l(a,S,E,"contentAlignment"),this.No=a=a.V(),this.i("contentAlignment",b,a),Yl(this,!1))});D.defineProperty(E,{WL:"initialContentAlignment"},function(){return this.hp},function(a){var b=this.hp;b.O(a)||(D.l(a,S,E,"initialContentAlignment"),this.hp=a=a.V(),this.i("initialContentAlignment",b,a))}); D.defineProperty(E,{padding:"padding"},function(){return this.vf},function(a){"number"===typeof a?a=new Lb(a):D.l(a,Lb,E,"padding");var b=this.vf;b.O(a)||(this.vf=a=a.V(),this.Qc(),this.i("padding",b,a))});D.w(E,{rg:"nodes"},function(){return this.Ap.j});D.w(E,{links:"links"},function(){return this.tp.j});D.w(E,{Hi:"parts"},function(){return this.rb.j}); -E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.Ap.j;b.next();){var c=b.value;c.Bq&&a.add(c)}for(b=this.tp.j;b.next();)c=b.value,c.Bq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.am.j};D.defineProperty(E,{Zb:"layout"},function(){return this.we},function(a){var b=this.we;b!==a&&(D.l(a,$g,E,"layout"),null!==b&&(b.g=null,b.group=null),this.we=a,a.g=this,a.group=null,this.ek=!0,this.i("layout",b,a),this.Le())}); -E.prototype.layoutDiagram=function(a){Ti(this);a&&Bn(this,!0);nm(this,!1)};function Bn(a,b){for(var c=a.am.j;c.next();)In(a,c.value,b);null!==a.Zb&&(b?a.Zb.Bf=!1:a.Zb.L())}function In(a,b,c){if(null!==b){for(var d=b.jn.j;d.next();)In(a,d.value,c);null!==b.Zb&&(c?b.Zb.Bf=!1:b.Zb.L())}} -function nm(a,b){if(a.ek&&!a.Dz){var c=a.ab;a.ab=!0;try{var d=a.na.Ki;0===d&&a.Nb("Layout");var e=a.Ra;1>=d&&!e.pf&&!e.zc&&(b||e.ro("Layout"));a.ek=!1;for(var g=a.am.j;g.next();)Jn(a,g.value,b,d);var h=a.Zb;h.Bf||(!b||h.lG||0===d?(h.doLayout(a),Ti(a),h.Bf=!0):a.ek=!0)}finally{0===d&&a.jd("Layout"),a.ek=!h.Bf,a.ab=c}}} -function Jn(a,b,c,d){if(null!==b){for(var e=b.jn.j;e.next();)Jn(a,e.value,c,d);e=b.Zb;null===e||e.Bf||(!c||e.lG||0===d?(b.po=!b.location.H(),e.doLayout(b),b.L(Kn),Mm(a,b),e.Bf=!0):a.ek=!0)}}D.defineProperty(E,{fe:"isTreePathToChildren"},function(){return this.uw},function(a){var b=this.uw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.uw=a,this.i("isTreePathToChildren",b,a),!this.na.ub))for(a=this.rg;a.next();)Ln(a.value)}); -E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.rg;b.next();){var c=b.value;c.Bq&&null===c.Sn()&&a.add(c)}return a.j};D.defineProperty(E,{qC:"treeCollapsePolicy"},function(){return this.sx},function(a){var b=this.sx;b!==a&&(a!==Fl&&a!==jn&&a!==kn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.sx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Ph:null},function(){return this.BD},function(a){this.BD=a}); -function El(a){function b(a){var b=a.toLowerCase(),h=new K("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new na("string",K),d=new na("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); +E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.Ap.j;b.next();){var c=b.value;c.Bq&&a.add(c)}for(b=this.tp.j;b.next();)c=b.value,c.Bq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.am.j};D.defineProperty(E,{Zb:"layout"},function(){return this.we},function(a){var b=this.we;b!==a&&(D.l(a,Zg,E,"layout"),null!==b&&(b.g=null,b.group=null),this.we=a,a.g=this,a.group=null,this.ek=!0,this.i("layout",b,a),this.Le())}); +E.prototype.layoutDiagram=function(a){Si(this);a&&An(this,!0);mm(this,!1)};function An(a,b){for(var c=a.am.j;c.next();)Hn(a,c.value,b);null!==a.Zb&&(b?a.Zb.Bf=!1:a.Zb.L())}function Hn(a,b,c){if(null!==b){for(var d=b.jn.j;d.next();)Hn(a,d.value,c);null!==b.Zb&&(c?b.Zb.Bf=!1:b.Zb.L())}} +function mm(a,b){if(a.ek&&!a.Dz){var c=a.ab;a.ab=!0;try{var d=a.na.Ki;0===d&&a.Nb("Layout");var e=a.Ra;1>=d&&!e.pf&&!e.zc&&(b||e.ro("Layout"));a.ek=!1;for(var g=a.am.j;g.next();)In(a,g.value,b,d);var h=a.Zb;h.Bf||(!b||h.lG||0===d?(h.doLayout(a),Si(a),h.Bf=!0):a.ek=!0)}finally{0===d&&a.jd("Layout"),a.ek=!h.Bf,a.ab=c}}} +function In(a,b,c,d){if(null!==b){for(var e=b.jn.j;e.next();)In(a,e.value,c,d);e=b.Zb;null===e||e.Bf||(!c||e.lG||0===d?(b.po=!b.location.H(),e.doLayout(b),b.L(Jn),ym(a,b),e.Bf=!0):a.ek=!0)}}D.defineProperty(E,{fe:"isTreePathToChildren"},function(){return this.uw},function(a){var b=this.uw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.uw=a,this.i("isTreePathToChildren",b,a),!this.na.ub))for(a=this.rg;a.next();)Kn(a.value)}); +E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.rg;b.next();){var c=b.value;c.Bq&&null===c.Sn()&&a.add(c)}return a.j};D.defineProperty(E,{qC:"treeCollapsePolicy"},function(){return this.sx},function(a){var b=this.sx;b!==a&&(a!==El&&a!==hn&&a!==jn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.sx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Ph:null},function(){return this.BD},function(a){this.BD=a}); +function Dl(a){function b(a){var b=a.toLowerCase(),h=new K("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new na("string",K),d=new na("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.Fz=c;a.Ez=d} -function Ga(a,b){var c=a.Ez.oa(b);return null!==c?c:a.Ez.oa(b.toLowerCase())}function Mn(a,b){var c=a.Fz.oa(b);if(null!==c)return c;c=a.Fz.oa(b.toLowerCase());if(null!==c)return c;D.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.yx=function(a,b){D.h(a,"string",E,"addDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Mn(this,a);null!==c&&c.add(b)}; -E.prototype.removeDiagramListener=E.prototype.QB=function(a,b){D.h(a,"string",E,"removeDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Mn(this,a);null!==c&&c.remove(b)}; -E.prototype.raiseDiagramEvent=E.prototype.Ja=function(a,b,c){v&&D.h(a,"string",E,"raiseDiagramEvent:name");var d=Mn(this,a),e=new dg;e.g=this;a=Ga(this,a);null!==a&&(e.name=a);void 0!==b&&(e.hC=b);void 0!==c&&(e.LB=c);b=d.length;if(1===b)d=d.fa(0),d(e);else if(0!==b)for(c=d.Fc(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.wb,g=a.scale,e=D.vg(0,0,e.width*g,e.height*g),h=D.Fb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.lv,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.mv,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Wc(Kd)||(c=new N(c.x+h.x/g,c.y+h.y/g));D.Lb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new ma);a.context="svg";a=Tn(this,a);return null!==a?a.Gm:null}; +E.prototype.doAutoScroll=E.prototype.UA=function(a){this.Lv.assign(a);Qn(this,this.Lv).Wc(this.position)?ri(this):Rn(this)};function Rn(a){-1===a.Io&&(a.Io=D.setTimeout(function(){if(-1!==a.Io){ri(a);var b=a.U.event;if(null!==b){var c=Qn(a,a.Lv);c.Wc(a.position)||(a.position=c,a.U.ha=a.pC(a.Lv),c=fm(b),a.simulatedMouseMove(b,null,c)||a.doMouseMove(),a.sk=!0,am(a,a.Kh()),a.Pe=!0,a.lg(),Rn(a))}}},a.pr))}function ri(a){-1!==a.Io&&(D.clearTimeout(a.Io),a.Io=-1)} +function Qn(a,b){var c=a.position,d=a.cF;if(0>=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.wb,g=a.scale,e=D.vg(0,0,e.width*g,e.height*g),h=D.Fb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.lv,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.mv,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Wc(Jd)||(c=new N(c.x+h.x/g,c.y+h.y/g));D.Lb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new ma);a.context="svg";a=Sn(this,a);return null!==a?a.Gm:null}; E.prototype.makeImage=function(a){void 0===a&&(a=new ma);var b=(a.document||document).createElement("img");b.src=this.EJ(a);return b}; -E.prototype.makeImageData=E.prototype.EJ=function(a){void 0===a&&(a=new ma);var b=Tn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Uk.getImageData(0,0,b.width,b.height);case "blob":b=b.ae;c=a.callback;if("function"!==typeof c){D.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== -typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Un=!1; -function Tn(a,b){a.Ra.Yh();a.lg();if(null===a.Ib)return null;"object"!==typeof b&&D.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new Ca(Infinity,Infinity):new Ca(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= +E.prototype.makeImageData=E.prototype.EJ=function(a){void 0===a&&(a=new ma);var b=Sn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Uk.getImageData(0,0,b.width,b.height);case "blob":b=b.ae;c=a.callback;if("function"!==typeof c){D.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== +typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Tn=!1; +function Sn(a,b){a.Ra.Yh();a.lg();if(null===a.Ib)return null;"object"!==typeof b&&D.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new Ca(Infinity,Infinity):new Ca(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new Lb(l):l instanceof Lb||D.k("MakeImage padding must be a Margin or a number.");l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.dd.De(!0);var s=new ja(null,p),u=s.Uk;if(!(d||e||k||h)){s.width=a.Qb+Math.ceil(l.left+l.right);s.height=a.Pb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new qd(s.ae, -p,q),Tm(a,u,l,new Ca(s.width,s.height),a.Db,a.sb,k,m,r,n),u;a.Ur=!1;Tm(a,u,l,new Ca(s.width,s.height),a.Db,a.sb,k,m,r,n);a.Ur=!0;return s}var t=a.yb.Px,y=new N(0,0),w=a.kd.copy();w.zK(a.padding);if(r)for(var A=!0,A=a.dc.o,B=A.length,P=0;Pt?(e=t,h=w.width,ea=w.height):(h=g.width,ea=g.height)):(h=w.width*e,ea=w.height*e):(e=t,h=w.width,ea=w.height);null!==l?(h+=V,ea+=A):l=new Lb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Un&&(h>d||ea>g)&&(D.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ea)+ -" vs 2000x2000) Consider increasing the max size."),Un=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ea=Math.min(ea,g)));s.width=Math.ceil(h);s.height=Math.ceil(ea);if("svg"===b.context)return u=new qd(s.ae,p,q),Tm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n),u;a.Ur=!1;Tm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n);a.Ur=!0;return s} -E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.OH&&D.k("Cannot inherit from "+D.yf(b));D.Ta(a,b)};function Nl(){this.vE=null;this.QH="63ad05bbe23a1786468a4c741b6d2";this.Zi=this.QH===this._tk?!0:null} -Nl.prototype.Km=function(a){a.dd.setTransform(a.ud,0,0,a.ud,0,0);if(null===this.Zi){var b="f",c=window[D.Wg("76a715b2f73f148a")][D.Wg("72ba13b5")];a=D.Wg;this.Zi=!0;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9"));if(!(6>d.length)){var e=a(d[1]).split(".");if("7da71ca0"===d[4]){var g=a(D[a("6cae19")]).split(".");if(e[0]>g[0]||e[0]===g[0]&&e[1]>=g[1]){g=c[a("76ad18b4f73e")];for(e=c[a("73a612b6fb191d")](a("35e7"))+ +h=B,ea=P):isNaN(P)?(e=B/w.width,h=B,ea=w.height*e):(e=P/w.height,h=w.width*e,ea=P):null!==e?"NaN"===e&&g.H()?(e=Math.min((g.width-V)/w.width,(g.height-A)/w.height),e>t?(e=t,h=w.width,ea=w.height):(h=g.width,ea=g.height)):(h=w.width*e,ea=w.height*e):(e=t,h=w.width,ea=w.height);null!==l?(h+=V,ea+=A):l=new Lb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Tn&&(h>d||ea>g)&&(D.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ea)+ +" vs 2000x2000) Consider increasing the max size."),Tn=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ea=Math.min(ea,g)));s.width=Math.ceil(h);s.height=Math.ceil(ea);if("svg"===b.context)return u=new qd(s.ae,p,q),Sm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n),u;a.Ur=!1;Sm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n);a.Ur=!0;return s} +E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.OH&&D.k("Cannot inherit from "+D.yf(b));D.Ta(a,b)};function Ml(){this.vE=null;this.QH="63ad05bbe23a1786468a4c741b6d2";this.Zi=this.QH===this._tk?!0:null} +Ml.prototype.Km=function(a){a.dd.setTransform(a.ud,0,0,a.ud,0,0);if(null===this.Zi){var b="f",c=window[D.Wg("76a715b2f73f148a")][D.Wg("72ba13b5")];a=D.Wg;this.Zi=!0;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9"));if(!(6>d.length)){var e=a(d[1]).split(".");if("7da71ca0"===d[4]){var g=a(D[a("6cae19")]).split(".");if(e[0]>g[0]||e[0]===g[0]&&e[1]>=g[1]){g=c[a("76ad18b4f73e")];for(e=c[a("73a612b6fb191d")](a("35e7"))+ 2;ec&&a(d[2])!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));0>c&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));if(this.Zi=!(0<=c&&ce.length;)e+="9";e=e.substr(e.length-4);d=""+["gsh","gsf"][parseInt(e.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(e.substr(0, 1),10)%4];c[a("79a417a0f0181a8946")]=d;if(window.document[a("78a712aa")]){if(window.document[a("78a712aa")][a("7bb806b6ed32388c4a875b")](c),e=window[a("7dad0290ec3b0b91578e5b40007031bf")](c)[a("7dad0283f1390b81519f4645156528bf")](a("78a704b7e62456904c9b12701b6532a8")),window.document[a("78a712aa")][a("68ad1bbcf533388c4a875b")](c),e)if(-1!==e.indexOf(parseInt(b[1]+b[2],16))&&-1!==e.indexOf(parseInt(b[3]+b[4],16)))this.Zi=!1;else if(D.Mu||D.zq||D.Aq||D.rB)for(d="."+d,e=0;eb.timeStamp-a.xk)b.preventDefault();else if(a.vk)b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;em(a,a,b,c,!0);c.Wk=!0;c.Ee=b.detail;if(D.zq||D.Aq)b.timeStamp-a.xkb.timeStamp-a.xk){b.preventDefault();return}a.xk=b.timeStamp}if(D.Zn&&null!==a.Ht)a.Ht=null,b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;em(a,a,b,c,!0);c.up=!0;c.Ee=b.detail;if(D.zq||D.Aq)c.Ee=a.ji;c.bubbles=b.bubbles;c.Qf=gm(b);a.simulatedMouseUp(b,null,new N,c.Qf)||(a.doMouseUp(),Ei(a),ga(a,c,b))}}};a.oo=function(b){if(a.isEnabled){var c= -a.Hd;a.Hd=a.Vb;a.Vb=c;em(a,a,b,c,!0);c.bubbles=!0;var d=0,e=0;void 0!==b.wheelDelta&&(e=0b.timeStamp-a.xk)b.preventDefault();else if(a.vk)b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;dm(a,a,b,c,!0);c.Wk=!0;c.Ee=b.detail;if(D.zq||D.Aq)b.timeStamp-a.xkb.timeStamp-a.xk){b.preventDefault();return}a.xk=b.timeStamp}if(D.Zn&&null!==a.Ht)a.Ht=null,b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;dm(a,a,b,c,!0);c.up=!0;c.Ee=b.detail;if(D.zq||D.Aq)c.Ee=a.ji;c.bubbles=b.bubbles;c.Qf=fm(b);a.simulatedMouseUp(b,null,new N,c.Qf)||(a.doMouseUp(),ri(a),ga(a,c,b))}}};a.oo=function(b){if(a.isEnabled){var c= +a.Hd;a.Hd=a.Vb;a.Vb=c;dm(a,a,b,c,!0);c.bubbles=!0;var d=0,e=0;void 0!==b.wheelDelta&&(e=0n||Math.abs(m.y-b.screenY)>n)?a.ji++:a.ji=1;d.Ee=a.ji;a.xk=b.timeStamp;a.xw.n(b.screenX,b.screenY);m=0;b.ctrlKey&&(m+=1);b.altKey&&(m+=2);b.shiftKey&&(m+=4);b.metaKey&&(m+=8);d.xd=m;d.button=b.button;void 0===b.buttons||D.Mu||(d.buttons=b.buttons);D.Qh&&0===b.button&&b.ctrlKey&&(d.button=2);d.Wk=!1;d.up=!0;d.Vk=0;d.Cc=!1;d.bubbles=!0;d.event=b;d.timestamp=Date.now();d.Qf=null===e?gm(b):e.ca? -e.ca:null;d.Oe=null;a.simulatedMouseUp(b,null,new N,d.Qf)||(a.doMouseUp(),Ei(a),ga(a,d,b),c&&(a.vk=!1))}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Lq=function(b){if(a.isEnabled){a.th=!1;var c=a.jA;c[b.pointerId]&&delete c[b.pointerId];c=a.Dp;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.eb,b.cancelWaitAfter(),b.standardMouseOver())}};d.De(!0);Rl(a)} -function Vn(a){1n||Math.abs(m.y-b.screenY)>n)?a.ji++:a.ji=1;d.Ee=a.ji;a.xk=b.timeStamp;a.xw.n(b.screenX,b.screenY);m=0;b.ctrlKey&&(m+=1);b.altKey&&(m+=2);b.shiftKey&&(m+=4);b.metaKey&&(m+=8);d.xd=m;d.button=b.button;void 0===b.buttons||D.Mu||(d.buttons=b.buttons);D.Qh&&0===b.button&&b.ctrlKey&&(d.button=2);d.Wk=!1;d.up=!0;d.Vk=0;d.Cc=!1;d.bubbles=!0;d.event=b;d.timestamp=Date.now();d.Qf=null===e?fm(b):e.ca? +e.ca:null;d.Oe=null;a.simulatedMouseUp(b,null,new N,d.Qf)||(a.doMouseUp(),ri(a),ga(a,d,b),c&&(a.vk=!1))}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Lq=function(b){if(a.isEnabled){a.th=!1;var c=a.jA;c[b.pointerId]&&delete c[b.pointerId];c=a.Dp;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.eb,b.cancelWaitAfter(),b.standardMouseOver())}};d.De(!0);Ql(a)} +function Un(a){1a)&&D.ua(a,"0 <= loc <= 1",Ba,"addColorStop:loc");D.h(b,"string",Ba,"addColorStop:color");v&&!za(b)&&D.k('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.ph&&(this.ph=new na("number","string"));this.ph.add(a,b);this.da===Fg&&(this.type=Gg);this.qh=null}; -D.defineProperty(Ba,{type:"type"},function(){return this.da},function(a){this.J&&D.qa(this,a);D.Da(a,Ba,Ba,"type");this.da=a;this.start.ee()&&(a===Gg?this.start=jc:a===Id&&(this.start=mc));this.end.ee()&&(a===Gg?this.end=uc:a===Id&&(this.end=mc));this.qh=null});D.defineProperty(Ba,{color:"color"},function(){return this.Lo},function(a){this.J&&D.qa(this,a);v&&!za(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.Lo=a;this.qh=null}); +f.toString=function(){var a="Brush(";if(this.type===Eg)a+=this.color;else if(a=this.type===Fg?a+"Linear ":this.type===Hd?a+"Radial ":this.type===ao?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.Rk)for(var b=this.Rk.j;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; +Ba.prototype.addColorStop=Ba.prototype.addColorStop=function(a,b){this.J&&D.qa(this);("number"!==typeof a||!isFinite(a)||1a)&&D.ua(a,"0 <= loc <= 1",Ba,"addColorStop:loc");D.h(b,"string",Ba,"addColorStop:color");v&&!za(b)&&D.k('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.ph&&(this.ph=new na("number","string"));this.ph.add(a,b);this.da===Eg&&(this.type=Fg);this.qh=null}; +D.defineProperty(Ba,{type:"type"},function(){return this.da},function(a){this.J&&D.qa(this,a);D.Da(a,Ba,Ba,"type");this.da=a;this.start.ee()&&(a===Fg?this.start=jc:a===Hd&&(this.start=mc));this.end.ee()&&(a===Fg?this.end=uc:a===Hd&&(this.end=mc));this.qh=null});D.defineProperty(Ba,{color:"color"},function(){return this.Lo},function(a){this.J&&D.qa(this,a);v&&!za(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.Lo=a;this.qh=null}); D.defineProperty(Ba,{start:"start"},function(){return this.Mp},function(a){this.J&&D.qa(this,a);D.l(a,S,Ba,"start");this.Mp=a.V();this.qh=null});D.defineProperty(Ba,{end:"end"},function(){return this.Zo},function(a){this.J&&D.qa(this,a);D.l(a,S,Ba,"end");this.Zo=a.V();this.qh=null});D.defineProperty(Ba,{sv:"startRadius"},function(){return this.mx},function(a){this.J&&D.qa(this,a);D.p(a,Ba,"startRadius");0>a&&D.ua(a,">= zero",Ba,"startRadius");this.mx=a;this.qh=null}); D.defineProperty(Ba,{ou:"endRadius"},function(){return this.dw},function(a){this.J&&D.qa(this,a);D.p(a,Ba,"endRadius");0>a&&D.ua(a,">= zero",Ba,"endRadius");this.dw=a;this.qh=null});D.defineProperty(Ba,{Rk:"colorStops"},function(){return this.ph},function(a){this.J&&D.qa(this,a);v&&D.l(a,na,Ba,"colorStops");this.ph=a;this.qh=null});D.defineProperty(Ba,{pattern:"pattern"},function(){return this.Uw},function(a){this.J&&D.qa(this,a);this.Uw=a;this.qh=null}); Ba.randomColor=function(a,b){void 0===a&&(a=128);v&&(D.p(a,Ba,"randomColor:min"),(0>a||255d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+ -d+e+c};var fo=(new ja(null)).Uk,za;Ba.isValidColor=za=function(a){if("black"===a)return!0;if(""===a)return!1;v&&D.h(a,"string",Ba,"isValidColor");fo.fillStyle="#000000";var b=fo.fillStyle;fo.fillStyle=a;if(fo.fillStyle!==b)return!0;fo.fillStyle="#FFFFFF";b=fo.fillStyle;fo.fillStyle=a;return fo.fillStyle!==b};var ho=new ao,io=new ao,jo=new ao,ko=new ao;Ba.lighten=function(a){return lo(a)}; -Ba.prototype.lightenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?co:b;if(this.type===Fg)mo(this.color),this.color=no(c,d);else if((this.type===Gg||this.type===Id)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)mo(e.value),this.addColorStop(e.key,no(c,d));return this};var lo;Ba.lightenBy=lo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?co:c;mo(a);return no(b,c)};Ba.darken=function(a){return oo(a)}; -Ba.prototype.darkenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?co:b;if(this.type===Fg)mo(this.color),this.color=no(-c,d);else if((this.type===Gg||this.type===Id)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)mo(e.value),this.addColorStop(e.key,no(-c,d));return this};var oo;Ba.darkenBy=oo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?co:c;mo(a);return no(-b,c)}; -function no(a,b){switch(b){case co:var c=100*po(ho.Rc),d=100*po(ho.Rd),e=100*po(ho.nd);jo.Rc=.4124564*c+.3575761*d+.1804375*e;jo.Rd=.2126729*c+.7151522*d+.072175*e;jo.nd=.0193339*c+.119192*d+.9503041*e;jo.pg=ho.pg;c=qo(jo.Rc/ro[0]);d=qo(jo.Rd/ro[1]);e=qo(jo.nd/ro[2]);ko.Rc=116*d-16;ko.Rd=500*(c-d);ko.nd=200*(d-e);ko.pg=jo.pg;ko.Rc=Math.min(100,Math.max(0,ko.Rc+100*a));c=(ko.Rc+16)/116;d=c-ko.nd/200;jo.Rc=ro[0]*so(ko.Rd/500+c);jo.Rd=ro[1]*(ko.Rc>to*uo?Math.pow(c,3):ko.Rc/to);jo.nd=ro[2]*so(d);jo.pg= -ko.pg;c=-.969266*jo.Rc+1.8760108*jo.Rd+.041556*jo.nd;d=.0556434*jo.Rc+-.2040259*jo.Rd+1.0572252*jo.nd;ho.Rc=255*vo((3.2404542*jo.Rc+-1.5371385*jo.Rd+-.4985314*jo.nd)/100);ho.Rd=255*vo(c/100);ho.nd=255*vo(d/100);ho.pg=jo.pg;ho.Rc=Math.round(ho.Rc);255ho.Rc&&(ho.Rc=0);ho.Rd=Math.round(ho.Rd);255ho.Rd&&(ho.Rd=0);ho.nd=Math.round(ho.nd);255ho.nd&&(ho.nd=0);return"rgba("+ho.Rc+", "+ho.Rd+", "+ho.nd+", "+ho.pg+")";case eo:var e=ho.Rc/255,g=ho.Rd/ -255,h=ho.nd/255,k=Math.max(e,g,h),d=Math.min(e,g,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(g-h)/l%6;break;case g:c=(h-e)/l+2;break;case h:c=(e-g)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}io.Rc=Math.round(c);io.Rd=Math.round(100*e);io.nd=Math.round(100*d);io.pg=ho.pg;io.nd=Math.min(100,Math.max(0,io.nd+100*a));return"hsla("+io.Rc+", "+io.Rd+"%, "+io.nd+"%, "+io.pg+")";default:return D.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} -function mo(a){fo.clearRect(0,0,1,1);fo.fillStyle="#000000";var b=fo.fillStyle;fo.fillStyle=a;fo.fillStyle!==b?(fo.fillRect(0,0,1,1),a=fo.getImageData(0,0,1,1).data,ho.Rc=a[0],ho.Rd=a[1],ho.nd=a[2],ho.pg=a[3]/255):(fo.fillStyle="#FFFFFF",b=fo.fillStyle,fo.fillStyle=a,fo.fillStyle===b&&v&&D.k('Color "'+a+'" is not a valid color string for RGBA color conversion'),ho.Rc=0,ho.Rd=0,ho.nd=0,ho.pg=1)}function po(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)} -function vo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var uo=216/24389,to=24389/27,ro=[95.047,100,108.883];function qo(a){return a>uo?Math.pow(a,1/3):(to*a+16)/116}function so(a){var b=a*a*a;return b>uo?b:(116*a-16)/to} -function O(){D.xc(this);this.S=4225027;this.Lc=1;this.rj=null;this.ac="";this.lc=this.Mb=null;this.sb=(new N(NaN,NaN)).freeze();this.$e=ie;this.oi=Xd;this.ni=ge;this.Nc=new Ea;this.Ni=new Ea;this.ij=new Ea;this.Db=this.Xo=1;this.wg=0;this.Qg=wo;this.gn=Sd;this.Fd=(new C(NaN,NaN,NaN,NaN)).freeze();this.cc=(new C(NaN,NaN,NaN,NaN)).freeze();this.fd=(new C(0,0,NaN,NaN)).freeze();this.Z=this.it=this.jt=null;this.Nm=this.ue=Vc;this.vt=0;this.tj=1;this.wr=0;this.Si=1;this.Lt=null;this.zt=-Infinity;this.sn= -0;this.tn=Kd;this.un=wj;this.Fr="";this.Hc=this.ma=null;this.Jo=-1;this.yn=this.yg=this.Cl=this.Lp=null;this.kA=Rj;this.on=null}D.Di(O);D.ka("GraphObject",O); +d+e+c};var eo=(new ja(null)).Uk,za;Ba.isValidColor=za=function(a){if("black"===a)return!0;if(""===a)return!1;v&&D.h(a,"string",Ba,"isValidColor");eo.fillStyle="#000000";var b=eo.fillStyle;eo.fillStyle=a;if(eo.fillStyle!==b)return!0;eo.fillStyle="#FFFFFF";b=eo.fillStyle;eo.fillStyle=a;return eo.fillStyle!==b};var fo=new $n,ho=new $n,io=new $n,jo=new $n;Ba.lighten=function(a){return ko(a)}; +Ba.prototype.lightenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?bo:b;if(this.type===Eg)lo(this.color),this.color=mo(c,d);else if((this.type===Fg||this.type===Hd)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)lo(e.value),this.addColorStop(e.key,mo(c,d));return this};var ko;Ba.lightenBy=ko=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bo:c;lo(a);return mo(b,c)};Ba.darken=function(a){return no(a)}; +Ba.prototype.darkenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?bo:b;if(this.type===Eg)lo(this.color),this.color=mo(-c,d);else if((this.type===Fg||this.type===Hd)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)lo(e.value),this.addColorStop(e.key,mo(-c,d));return this};var no;Ba.darkenBy=no=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bo:c;lo(a);return mo(-b,c)}; +function mo(a,b){switch(b){case bo:var c=100*oo(fo.Rc),d=100*oo(fo.Rd),e=100*oo(fo.nd);io.Rc=.4124564*c+.3575761*d+.1804375*e;io.Rd=.2126729*c+.7151522*d+.072175*e;io.nd=.0193339*c+.119192*d+.9503041*e;io.pg=fo.pg;c=po(io.Rc/qo[0]);d=po(io.Rd/qo[1]);e=po(io.nd/qo[2]);jo.Rc=116*d-16;jo.Rd=500*(c-d);jo.nd=200*(d-e);jo.pg=io.pg;jo.Rc=Math.min(100,Math.max(0,jo.Rc+100*a));c=(jo.Rc+16)/116;d=c-jo.nd/200;io.Rc=qo[0]*ro(jo.Rd/500+c);io.Rd=qo[1]*(jo.Rc>so*to?Math.pow(c,3):jo.Rc/so);io.nd=qo[2]*ro(d);io.pg= +jo.pg;c=-.969266*io.Rc+1.8760108*io.Rd+.041556*io.nd;d=.0556434*io.Rc+-.2040259*io.Rd+1.0572252*io.nd;fo.Rc=255*uo((3.2404542*io.Rc+-1.5371385*io.Rd+-.4985314*io.nd)/100);fo.Rd=255*uo(c/100);fo.nd=255*uo(d/100);fo.pg=io.pg;fo.Rc=Math.round(fo.Rc);255fo.Rc&&(fo.Rc=0);fo.Rd=Math.round(fo.Rd);255fo.Rd&&(fo.Rd=0);fo.nd=Math.round(fo.nd);255fo.nd&&(fo.nd=0);return"rgba("+fo.Rc+", "+fo.Rd+", "+fo.nd+", "+fo.pg+")";case co:var e=fo.Rc/255,g=fo.Rd/ +255,h=fo.nd/255,k=Math.max(e,g,h),d=Math.min(e,g,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(g-h)/l%6;break;case g:c=(h-e)/l+2;break;case h:c=(e-g)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}ho.Rc=Math.round(c);ho.Rd=Math.round(100*e);ho.nd=Math.round(100*d);ho.pg=fo.pg;ho.nd=Math.min(100,Math.max(0,ho.nd+100*a));return"hsla("+ho.Rc+", "+ho.Rd+"%, "+ho.nd+"%, "+ho.pg+")";default:return D.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} +function lo(a){eo.clearRect(0,0,1,1);eo.fillStyle="#000000";var b=eo.fillStyle;eo.fillStyle=a;eo.fillStyle!==b?(eo.fillRect(0,0,1,1),a=eo.getImageData(0,0,1,1).data,fo.Rc=a[0],fo.Rd=a[1],fo.nd=a[2],fo.pg=a[3]/255):(eo.fillStyle="#FFFFFF",b=eo.fillStyle,eo.fillStyle=a,eo.fillStyle===b&&v&&D.k('Color "'+a+'" is not a valid color string for RGBA color conversion'),fo.Rc=0,fo.Rd=0,fo.nd=0,fo.pg=1)}function oo(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)} +function uo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var to=216/24389,so=24389/27,qo=[95.047,100,108.883];function po(a){return a>to?Math.pow(a,1/3):(so*a+16)/116}function ro(a){var b=a*a*a;return b>to?b:(116*a-16)/so} +function O(){D.xc(this);this.S=4225027;this.Lc=1;this.rj=null;this.ac="";this.lc=this.Mb=null;this.sb=(new N(NaN,NaN)).freeze();this.$e=he;this.oi=Wd;this.ni=ae;this.Nc=new Ea;this.Ni=new Ea;this.ij=new Ea;this.Db=this.Xo=1;this.wg=0;this.Qg=vo;this.gn=Ld;this.Fd=(new C(NaN,NaN,NaN,NaN)).freeze();this.cc=(new C(NaN,NaN,NaN,NaN)).freeze();this.fd=(new C(0,0,NaN,NaN)).freeze();this.Z=this.it=this.jt=null;this.Nm=this.ue=Vc;this.vt=0;this.tj=1;this.wr=0;this.Si=1;this.Lt=null;this.zt=-Infinity;this.sn= +0;this.tn=Jd;this.un=vj;this.Fr="";this.Hc=this.ma=null;this.Jo=-1;this.yn=this.yg=this.Cl=this.Lp=null;this.kA=yj;this.on=null}D.Di(O);D.ka("GraphObject",O); O.prototype.cloneProtected=function(a){a.S=this.S|6144;a.Lc=this.Lc;a.ac=this.ac;a.Mb=this.Mb;a.lc=this.lc;a.sb.assign(this.sb);a.$e=this.$e.V();a.oi=this.oi.V();a.ni=this.ni.V();a.ij=this.ij.copy();a.Db=this.Db;a.wg=this.wg;a.Qg=this.Qg;a.gn=this.gn.V();a.Fd.assign(this.Fd);a.cc.assign(this.cc);a.fd.assign(this.fd);a.it=this.it;null!==this.Z&&(a.Z=this.Z.copy());a.ue=this.ue.V();a.Nm=this.Nm.V();a.vt=this.vt;a.tj=this.tj;a.wr=this.wr;a.Si=this.Si;a.Lt=this.Lt;a.zt=this.zt;a.sn=this.sn;a.tn=this.tn.V(); a.un=this.un;a.Fr=this.Fr;null!==this.ma&&(a.ma=this.ma.copy());a.Hc=this.Hc;a.Jo=this.Jo;null!==this.Cl&&(a.Cl=D.lm(this.Cl));null!==this.yg&&(a.yg=this.yg.copy());a.yn=this.yn};O.prototype.addCopyProperty=O.prototype.VH=function(a){var b=this.Cl;if(D.isArray(b))for(var c=0;ck;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} -O.prototype.raiseChangedEvent=O.prototype.od=function(a,b,c,d,e,g,h){var k=this.Y;if(null!==k&&(k.so(a,b,c,d,e,g,h),Ho(this)&&c===this&&a===fg&&Io(this,k,b),c===k&&0!==(k.S&16777216)&&null!==k.data))for(a=this.xa.o,c=a.length,d=0;dk;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} +O.prototype.raiseChangedEvent=O.prototype.od=function(a,b,c,d,e,g,h){var k=this.Y;if(null!==k&&(k.so(a,b,c,d,e,g,h),Go(this)&&c===this&&a===eg&&Ho(this,k,b),c===k&&0!==(k.S&16777216)&&null!==k.data))for(a=this.xa.o,c=a.length,d=0;da&&(a+=360));return a};O.prototype.getDocumentScale=O.prototype.Jj=function(){if(0!==(this.S&4096)===!1)return this.Xo;var a=this.Db;return null!==this.R?a*this.R.Jj():a};O.prototype.getLocalPoint=O.prototype.OF=function(a,b){void 0===b&&(b=new N);b.assign(a);this.Hh.Oh(b);return b}; -O.prototype.getNearestIntersectionPoint=O.prototype.PF=function(a,b,c){return this.Vn(a.x,a.y,b.x,b.y,c)};f=O.prototype;f.Vn=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.hm)return g=this.aa,Je(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Fa;c=Je(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; -function Ik(a,b,c,d,e){if(!1!==Nm(a)){var g=a.margin,h=g.right+g.left,g=g.top+g.bottom;b=Math.max(b-h,0);c=Math.max(c-g,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-g,0);var h=a.angle,g=0,g=a.Ea,k=0;a instanceof z&&(k=a.mb);90===h||270===h?(b=isFinite(g.height)?g.height+k:b,c=isFinite(g.width)?g.width+k:c):(b=isFinite(g.width)?g.width+k:b,c=isFinite(g.height)?g.height+k:c);var g=d||0,k=e||0,l=a instanceof x;switch(Mo(a,!0)){case ak:k=g=0;l&&(c=b=Infinity);break;case Ye:isFinite(b)&&b>d&&(g=b);isFinite(c)&& -c>e&&(k=c);break;case yo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case xo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.rf,m=a.ah;g>l.width&&m.widthl.height&&m.heighta.height||this.uf.Qe>a.width))&&(c=!0);this.S=c?this.S|256:this.S&-257;this.cc.H()|| -D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.cc.toString());this.Ay(g,this.cc);No(this,!1);D.Lb(g)};f.Cj=function(){}; -function Oo(a,b,c,d,e){var g=a.aa;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ea.H()){g=a.Fd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;e+=h;b=Mo(a,!0);c===d&&g===e&&(b=ak);switch(b){case ak:if(c>d||g>e)lm(a,!0),Ik(a,c>d?d:c,g>e?e:g);break;case Ye:lm(a,!0);Ik(a,d,e,0,0);break;case yo:lm(a,!0);Ik(a,d,g,0,0);break;case xo:lm(a,!0),Ik(a,c,e,0,0)}}} -f.Ay=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.Cm!==this&&c.QG!==this&&c.TB!==this||Po(c,!0),this.ra(),Db(a,b)||(c.dl(),this.$s(c)))};f.$s=function(a){null!==this.yd&&(Po(a,!0),a instanceof G&&Qo(a,this))};D.defineProperty(O,{wo:"shadowVisible"},function(){return this.yn},function(a){var b=this.yn;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"shadowVisible"),this.yn=a,this.ra(),this.i("shadowVisible",b,a))}); -O.prototype.He=function(a,b){if(this.visible){var c=this.cc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof qd)a:{if(this.visible){var g=null,h=a.ny;if(this instanceof x&&(this.type===Ro||this.type===So))To(this,a,b);else{var k=this.cc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.R;0!==(this.S&4096)===!0&&Uo(this);var c=0!==(this.S&256),n=!1;this instanceof +O.prototype.getNearestIntersectionPoint=O.prototype.PF=function(a,b,c){return this.Vn(a.x,a.y,b.x,b.y,c)};f=O.prototype;f.Vn=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.hm)return g=this.aa,Ie(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Fa;c=Ie(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; +function Hk(a,b,c,d,e){if(!1!==Mm(a)){var g=a.margin,h=g.right+g.left,g=g.top+g.bottom;b=Math.max(b-h,0);c=Math.max(c-g,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-g,0);var h=a.angle,g=0,g=a.Ea,k=0;a instanceof z&&(k=a.mb);90===h||270===h?(b=isFinite(g.height)?g.height+k:b,c=isFinite(g.width)?g.width+k:c):(b=isFinite(g.width)?g.width+k:b,c=isFinite(g.height)?g.height+k:c);var g=d||0,k=e||0,l=a instanceof x;switch(Lo(a,!0)){case Zj:k=g=0;l&&(c=b=Infinity);break;case Xe:isFinite(b)&&b>d&&(g=b);isFinite(c)&& +c>e&&(k=c);break;case xo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case wo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.rf,m=a.ah;g>l.width&&m.widthl.height&&m.heighta.height||this.uf.Qe>a.width))&&(c=!0);this.S=c?this.S|256:this.S&-257;this.cc.H()|| +D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.cc.toString());this.Ay(g,this.cc);Mo(this,!1);D.Lb(g)};f.Cj=function(){}; +function No(a,b,c,d,e){var g=a.aa;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ea.H()){g=a.Fd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;e+=h;b=Lo(a,!0);c===d&&g===e&&(b=Zj);switch(b){case Zj:if(c>d||g>e)km(a,!0),Hk(a,c>d?d:c,g>e?e:g);break;case Xe:km(a,!0);Hk(a,d,e,0,0);break;case xo:km(a,!0);Hk(a,d,g,0,0);break;case wo:km(a,!0),Hk(a,c,e,0,0)}}} +f.Ay=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.Cm!==this&&c.QG!==this&&c.TB!==this||Oo(c,!0),this.ra(),Db(a,b)||(c.dl(),this.$s(c)))};f.$s=function(a){null!==this.yd&&(Oo(a,!0),a instanceof G&&Po(a,this))};D.defineProperty(O,{wo:"shadowVisible"},function(){return this.yn},function(a){var b=this.yn;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"shadowVisible"),this.yn=a,this.ra(),this.i("shadowVisible",b,a))}); +O.prototype.He=function(a,b){if(this.visible){var c=this.cc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof qd)a:{if(this.visible){var g=null,h=a.ny;if(this instanceof x&&(this.type===Qo||this.type===Ro))So(this,a,b);else{var k=this.cc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.R;0!==(this.S&4096)===!0&&To(this);var c=0!==(this.S&256),n=!1;this instanceof pa&&(a.font=this.font);if(c){n=m.kh()?m.Fa:m.aa;if(null!==this.yg)var p=this.yg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;sd(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.Oj()){var u=this;if(!u.isVisible())break a}a.Mh.bc=[1,0,0,1,0,0];this instanceof pa&&1c.width+c.x||c.x>n.width+n.x){1!==d&&(a.globalAlpha=e);return}v&&v.zF&&v.GI(a,k,l,u,q);a.save();a.beginPath();a.rect(k,l,u, -q);a.clip()}if(this.Oj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.el&&b.Kj("drawShadows")&&(n=this.xn,a.fC(n.x*b.scale*b.ud,n.y*b.scale*b.ud,this.Pg),a.xo(),a.shadowColor=this.wn)}n=!1;this.Y&&b.Kj("drawShadows")&&(n=this.Y.el);!0===this.wo?a.xo():!1===this.wo&&a.Em();null!==this.lc&&(Vo(this,a,this.lc,!0,!0),this.lc instanceof Ba&&this.lc.type===Id?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Xg(this.lc)):a.fillRect(c.x,c.y,c.width,c.height));g.Nu()||a.transform(g.m11,g.m12, -g.m21,g.m22,g.dx,g.dy);n&&(null!==h&&0!==(h.S&512)||null!==h&&(h.type===Ql||h.type===Yj)&&h.Md()!==this)&&null===this.wo&&a.Em();null!==this.Mb&&(u=this.Fa,k=c=0,l=u.width,u=u.height,q=0,this instanceof z&&(u=this.Za.ib,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Rg),Vo(this,a,this.Mb,!0,!1),this.Mb instanceof Ba&&this.Mb.type===Id?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Xg(this.Mb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.Dj&&v.FI(a,this);n&&(null!==this.Mb||null!==this.lc||null!==h&&0!==(h.S&512)|| -null!==h&&(h.type===Ql||h.type===Yj)&&h.Md()!==this)?(Wo(this,!0),null===this.wo&&a.Em()):Wo(this,!1);this.Xk(a,b);n&&0!==(this.S&512)===!0&&a.xo();this.Oj()&&n&&a.Em();m?(a.restore(),this instanceof x?a.De(!0):a.De(!1)):g.Nu()||(h=1/(g.m11*g.m22-g.m12*g.m21),a.transform(g.m22*h,-g.m12*h,-g.m21*h,g.m11*h,h*(g.m21*g.dy-g.m22*g.dx),h*(g.m12*g.dx-g.m11*g.dy)))}1!==d&&(a.globalAlpha=e)}}}; -function To(a,b,c){var d=a.cc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.lc&&(Vo(a,b,a.lc,!0,!0),a.lc instanceof Ba&&a.lc.type===Id?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.lc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Mb&&(Vo(a,b,a.Mb,!0,!1),a.Mb instanceof Ba&&a.Mb.type===Id?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.Mb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xk(b,c))}O.prototype.Xk=function(){}; -function Vo(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Fg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Fa,g=h.width,h=h.height;if(e)var l=a.aa,g=l.width,h=l.height;var m=b instanceof Hd;if(m&&c.qh&&(c.type===bo||c.Mo===g&&c.xz===h))k=c.qh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.aa,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY; -l+=r;p+=r;n+=s;q+=s;if(c.type===Gg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Id)s=isNaN(c.ou)?Math.max(g,h)/2:c.ou,isNaN(c.sv)?(r=0,s=Math.max(g,h)/2):r=c.sv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===bo)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.kc(c.type,"Brush type");if(c.type!==bo&&(e=c.Rk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.qh=k,null!==k&&(c.Mo=g,c.xz=h),null===k&&c.type===bo&&-1!==c.Mo)){c.Mo=-1;var t=a.g;null!==t&& +this.el&&b.Kj("drawShadows")&&(r=this.xn,a.fC(r.x*b.scale*b.ud,r.y*b.scale*b.ud,u.Pg),a.xo(),a.shadowColor=u.wn);u=!1;this.Y&&b.Kj("drawShadows")&&(u=this.Y.el);!0===this.wo?(a.xo(),!1===q&&u&&(sd(a,1,0,0,1,0,0),a.kb(),q=!0)):!1===this.wo&&a.Em();null!==this.lc&&(Uo(this,a,this.lc,!0,!0),!1===q&&u&&(sd(a,1,0,0,1,0,0),a.kb(),q=!0),this.lc instanceof Ba&&this.lc.type===Hd?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Xg(this.lc)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof x?sd(a,l.m11, +l.m12,l.m21,l.m22,l.dx,l.dy):a.Mh.bc=[l.m11,l.m12,l.m21,l.m22,l.dx,l.dy];null!==this.Mb&&(!1===q&&u&&(sd(a,1,0,0,1,0,0),a.kb(),q=!0),s=this.Fa,l=k=0,r=s.width,s=s.height,p=0,this instanceof z&&(s=this.Za.ib,k=s.x,l=s.y,r=s.width,s=s.height,p=this.Rg),Uo(this,a,this.Mb,!0,!1),this.Mb instanceof Ba&&this.Mb.type===Hd?(a.beginPath(),a.rect(k-p/2,l-p/2,r+p,s+p),a.Xg(this.Mb)):a.fillRect(k-p/2,l-p/2,r+p,s+p));u&&(null!==this.Mb||null!==this.lc||null!==m&&0!==(m.S&512)||null!==m&&(m.type===Pl||m.type=== +Xj)&&m.Md()!==this)?(Vo(this,!0),null===this.wo&&a.Em()):Vo(this,!1);this.Xk(a,b);u&&0!==(this.S&512)===!0&&a.xo();this.Oj()&&u&&a.Em();c&&(a.restore(),n&&a.zf.pop());this instanceof x&&(g=a.zf.pop());!0===q&&a.zf.pop();this instanceof pa&&1c.width+c.x||c.x>n.width+n.x){1!==d&&(a.globalAlpha=e);return}v&&v.zF&&v.GI(a,k,l,u,q);a.save();a.beginPath();a.rect(k,l,u, +q);a.clip()}if(this.Oj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.el&&b.Kj("drawShadows")&&(n=this.xn,a.fC(n.x*b.scale*b.ud,n.y*b.scale*b.ud,this.Pg),a.xo(),a.shadowColor=this.wn)}n=!1;this.Y&&b.Kj("drawShadows")&&(n=this.Y.el);!0===this.wo?a.xo():!1===this.wo&&a.Em();null!==this.lc&&(Uo(this,a,this.lc,!0,!0),this.lc instanceof Ba&&this.lc.type===Hd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Xg(this.lc)):a.fillRect(c.x,c.y,c.width,c.height));g.Nu()||a.transform(g.m11,g.m12, +g.m21,g.m22,g.dx,g.dy);n&&(null!==h&&0!==(h.S&512)||null!==h&&(h.type===Pl||h.type===Xj)&&h.Md()!==this)&&null===this.wo&&a.Em();null!==this.Mb&&(u=this.Fa,k=c=0,l=u.width,u=u.height,q=0,this instanceof z&&(u=this.Za.ib,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Rg),Uo(this,a,this.Mb,!0,!1),this.Mb instanceof Ba&&this.Mb.type===Hd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Xg(this.Mb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.Dj&&v.FI(a,this);n&&(null!==this.Mb||null!==this.lc||null!==h&&0!==(h.S&512)|| +null!==h&&(h.type===Pl||h.type===Xj)&&h.Md()!==this)?(Vo(this,!0),null===this.wo&&a.Em()):Vo(this,!1);this.Xk(a,b);n&&0!==(this.S&512)===!0&&a.xo();this.Oj()&&n&&a.Em();m?(a.restore(),this instanceof x?a.De(!0):a.De(!1)):g.Nu()||(h=1/(g.m11*g.m22-g.m12*g.m21),a.transform(g.m22*h,-g.m12*h,-g.m21*h,g.m11*h,h*(g.m21*g.dy-g.m22*g.dx),h*(g.m12*g.dx-g.m11*g.dy)))}1!==d&&(a.globalAlpha=e)}}}; +function So(a,b,c){var d=a.cc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.lc&&(Uo(a,b,a.lc,!0,!0),a.lc instanceof Ba&&a.lc.type===Hd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.lc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Mb&&(Uo(a,b,a.Mb,!0,!1),a.Mb instanceof Ba&&a.Mb.type===Hd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.Mb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xk(b,c))}O.prototype.Xk=function(){}; +function Uo(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Eg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Fa,g=h.width,h=h.height;if(e)var l=a.aa,g=l.width,h=l.height;var m=b instanceof Gd;if(m&&c.qh&&(c.type===ao||c.Mo===g&&c.xz===h))k=c.qh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.aa,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY; +l+=r;p+=r;n+=s;q+=s;if(c.type===Fg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Hd)s=isNaN(c.ou)?Math.max(g,h)/2:c.ou,isNaN(c.sv)?(r=0,s=Math.max(g,h)/2):r=c.sv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===ao)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.kc(c.type,"Brush type");if(c.type!==ao&&(e=c.Rk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.qh=k,null!==k&&(c.Mo=g,c.xz=h),null===k&&c.type===ao&&-1!==c.Mo)){c.Mo=-1;var t=a.g;null!==t&& -1===c.Mo&&D.setTimeout(function(){t.to()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}O.prototype.isContainedBy=O.prototype.ym=function(a){if(a instanceof x)a:{if(this!==a&&null!==a)for(var b=this.R;null!==b;){if(b===a){a=!0;break a}b=b.R}a=!1}else a=!1;return a};O.prototype.isVisibleObject=O.prototype.Sj=function(){if(!this.visible)return!1;var a=this.R;return null!==a?a.Sj():!0}; -O.prototype.isEnabledObject=O.prototype.Ju=function(){for(var a=this instanceof x?this:this.R;null!==a&&a.isEnabled;)a=a.R;return null===a};D.defineProperty(O,{BF:"enabledChanged"},function(){return null!==this.ma?this.ma.Yr:null},function(a){Co(this);var b=this.ma.Yr;b!==a&&(null!==a&&D.h(a,"function",O,"enabledChanged"),this.ma.Yr=a,this.i("enabledChanged",b,a))}); -function Uo(a){if(0!==(a.S&2048)===!0){var b=a.Nc;b.reset();if(!a.cc.H()||!a.Fd.H()){Xo(a,!1);return}b.translate(a.cc.x,a.cc.y);b.translate(-a.Ia.x,-a.Ia.y);var c=a.Fa;Ko(a,b,c.x,c.y,c.width,c.height);Xo(a,!1);Yo(a,!0)}0!==(a.S&4096)===!0&&(b=a.R,null===b?(a.Ni.set(a.Nc),a.Xo=a.scale,Yo(a,!1)):null!==b.Hh&&(c=a.Ni,c.reset(),b.kh()?c.multiply(b.Ni):null!==b.R&&c.multiply(b.R.Ni),c.multiply(a.Nc),a.Xo=a.scale*b.Xo,Yo(a,!1)))} -function Ko(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=mc;a.Oj()&&a.Of.Xc()&&(h=a.Of);var k=D.P();if(a instanceof F&&a.Df!==a)for(c=a.Df,d=c.Fa,k.pv(d.x,d.y,d.width,d.height,h),c.ij.vb(k),k.offset(-c.Ia.x,-c.Ia.y),h=c.R;null!==h&&h!==a;)h.ij.vb(k),k.offset(-h.Ia.x,-h.Ia.y),h=h.R;else k.pv(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=O.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Nm(this)){lm(this,!0);No(this,!0);var b=this.R;null===b||a||b.K()}}; -f.xq=function(){!0!==Nm(this)&&(lm(this,!0),No(this,!0))};function Zo(a){if(!1===Om(a)){var b=a.R;null!==b?b.K():a.Oj()&&(b=a.g,null!==b&&(b.Gg.add(a),a instanceof G&&a.kg(),b.Le()));No(a,!0)}}f.cj=function(){0!==(this.S&2048)===!1&&(Xo(this,!0),Yo(this,!0))};f.nB=function(){Yo(this,!0)};f.ra=function(){var a=this.Y;null!==a&&a.ra()}; -function Mo(a,b){var c=a.stretch,d=a.R;if(null!==d&&d.da===fa)return $o(a,d.pe(a.Tb),d.oe(a.column),b);if(null!==d&&d.da===Ql&&d.Md()===a)return ap(a,Ye,b);if(c===wo){if(null!==d){if(d.da===Yj&&d.Md()===a)return ap(a,Ye,b);c=d.me;return c===wo?ap(a,ak,b):ap(a,c,b)}return ap(a,ak,b)}return ap(a,c,b)} -function $o(a,b,c,d){var e=a.stretch;if(e!==wo)return ap(a,e,d);var g=e=null;switch(b.stretch){case xo:g=!0;break;case Ye:g=!0}switch(c.stretch){case yo:e=!0;break;case Ye:e=!0}b=a.R.me;null===e&&(e=b===yo||b===Ye);null===g&&(g=b===xo||b===Ye);return!0===e&&!0===g?ap(a,Ye,d):!0===e?ap(a,yo,d):!0===g?ap(a,xo,d):ap(a,ak,d)} -function ap(a,b,c){if(c)return b;if(b===ak)return ak;c=a.Ea;if(c.H())return ak;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===yo)return ak;if(b===Ye)return xo}else{if(b===xo)return ak;if(b===Ye)return yo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===xo)return ak;if(b===Ye)return yo}else{if(b===yo)return ak;if(b===Ye)return xo}return b} -D.defineProperty(O,{Uq:"segmentOrientation"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&D.Da(a,J,O,"segmentOrientation"),this.un=a,this.K(),this.i("segmentOrientation",b,a),a===wj&&(this.angle=0))});D.defineProperty(O,{We:"segmentIndex"},function(){return this.zt},function(a){v&&D.h(a,"number",O,"segmentIndex");a=Math.round(a);var b=this.zt;b!==a&&(this.zt=a,this.K(),this.i("segmentIndex",b,a))}); +O.prototype.isEnabledObject=O.prototype.Ju=function(){for(var a=this instanceof x?this:this.R;null!==a&&a.isEnabled;)a=a.R;return null===a};D.defineProperty(O,{BF:"enabledChanged"},function(){return null!==this.ma?this.ma.Yr:null},function(a){Bo(this);var b=this.ma.Yr;b!==a&&(null!==a&&D.h(a,"function",O,"enabledChanged"),this.ma.Yr=a,this.i("enabledChanged",b,a))}); +function To(a){if(0!==(a.S&2048)===!0){var b=a.Nc;b.reset();if(!a.cc.H()||!a.Fd.H()){Wo(a,!1);return}b.translate(a.cc.x,a.cc.y);b.translate(-a.Ia.x,-a.Ia.y);var c=a.Fa;Jo(a,b,c.x,c.y,c.width,c.height);Wo(a,!1);Xo(a,!0)}0!==(a.S&4096)===!0&&(b=a.R,null===b?(a.Ni.set(a.Nc),a.Xo=a.scale,Xo(a,!1)):null!==b.Hh&&(c=a.Ni,c.reset(),b.kh()?c.multiply(b.Ni):null!==b.R&&c.multiply(b.R.Ni),c.multiply(a.Nc),a.Xo=a.scale*b.Xo,Xo(a,!1)))} +function Jo(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=mc;a.Oj()&&a.Of.Xc()&&(h=a.Of);var k=D.P();if(a instanceof F&&a.Df!==a)for(c=a.Df,d=c.Fa,k.pv(d.x,d.y,d.width,d.height,h),c.ij.vb(k),k.offset(-c.Ia.x,-c.Ia.y),h=c.R;null!==h&&h!==a;)h.ij.vb(k),k.offset(-h.Ia.x,-h.Ia.y),h=h.R;else k.pv(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=O.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Mm(this)){km(this,!0);Mo(this,!0);var b=this.R;null===b||a||b.K()}}; +f.xq=function(){!0!==Mm(this)&&(km(this,!0),Mo(this,!0))};function Yo(a){if(!1===Nm(a)){var b=a.R;null!==b?b.K():a.Oj()&&(b=a.g,null!==b&&(b.Gg.add(a),a instanceof G&&a.kg(),b.Le()));Mo(a,!0)}}f.cj=function(){0!==(this.S&2048)===!1&&(Wo(this,!0),Xo(this,!0))};f.nB=function(){Xo(this,!0)};f.ra=function(){var a=this.Y;null!==a&&a.ra()}; +function Lo(a,b){var c=a.stretch,d=a.R;if(null!==d&&d.da===fa)return Zo(a,d.pe(a.Tb),d.oe(a.column),b);if(null!==d&&d.da===Pl&&d.Md()===a)return $o(a,Xe,b);if(c===vo){if(null!==d){if(d.da===Xj&&d.Md()===a)return $o(a,Xe,b);c=d.me;return c===vo?$o(a,Zj,b):$o(a,c,b)}return $o(a,Zj,b)}return $o(a,c,b)} +function Zo(a,b,c,d){var e=a.stretch;if(e!==vo)return $o(a,e,d);var g=e=null;switch(b.stretch){case wo:g=!0;break;case Xe:g=!0}switch(c.stretch){case xo:e=!0;break;case Xe:e=!0}b=a.R.me;null===e&&(e=b===xo||b===Xe);null===g&&(g=b===wo||b===Xe);return!0===e&&!0===g?$o(a,Xe,d):!0===e?$o(a,xo,d):!0===g?$o(a,wo,d):$o(a,Zj,d)} +function $o(a,b,c){if(c)return b;if(b===Zj)return Zj;c=a.Ea;if(c.H())return Zj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===xo)return Zj;if(b===Xe)return wo}else{if(b===wo)return Zj;if(b===Xe)return xo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===wo)return Zj;if(b===Xe)return xo}else{if(b===xo)return Zj;if(b===Xe)return wo}return b} +D.defineProperty(O,{Uq:"segmentOrientation"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&D.Da(a,J,O,"segmentOrientation"),this.un=a,this.K(),this.i("segmentOrientation",b,a),a===vj&&(this.angle=0))});D.defineProperty(O,{We:"segmentIndex"},function(){return this.zt},function(a){v&&D.h(a,"number",O,"segmentIndex");a=Math.round(a);var b=this.zt;b!==a&&(this.zt=a,this.K(),this.i("segmentIndex",b,a))}); D.defineProperty(O,{WB:"segmentFraction"},function(){return this.sn},function(a){v&&D.h(a,"number",O,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1a||1=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Db=a,this.cj(),this.K(),this.i("scale",b,a))});D.defineProperty(O,{angle:"angle"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(v&&D.p(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.wg=a,bp(this),this.K(),this.cj(),this.i("angle",b,a)))}); -D.defineProperty(O,{Ea:"desiredSize"},function(){return this.$e},function(a){v&&D.l(a,Ca,O,"desiredSize");var b=a.width,c=a.height,d=this.$e,e=d.width,g=d.height;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))||(this.$e=a=a.V(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",d,a),Ho(this)&&(a=this.Y,null!==a&&(Io(this,a,"width"),Io(this,a,"height"))))}); -D.defineProperty(O,{width:"width"},function(){return this.$e.width},function(a){var b=this.$e.width;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"width"),b=this.$e,this.$e=a=(new Ca(a,this.$e.height)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Ho(this)&&(a=this.Y,null!==a&&Io(this,a,"width")))}); -D.defineProperty(O,{height:"height"},function(){return this.$e.height},function(a){var b=this.$e.height;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"height"),b=this.$e,this.$e=a=(new Ca(this.$e.width,a)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Ho(this)&&(a=this.Y,null!==a&&Io(this,a,"height")))}); +D.defineProperty(O,{position:"position"},function(){return this.sb},function(a){v&&D.l(a,N,O,"position");var b=a.x,c=a.y,d=this.sb,e=d.x,g=d.y;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))?this.cC():(a=a.V(),this.bC(a,d)&&this.i("position",d,a))});O.prototype.cC=function(){};O.prototype.bC=function(a){this.sb=a;Yo(this);this.cj();return!0};O.prototype.Vy=function(a,b){this.sb.n(a,b);this.cj()};D.w(O,{aa:"actualBounds"},function(){return this.cc}); +D.defineProperty(O,{scale:"scale"},function(){return this.Db},function(a){var b=this.Db;b!==a&&(v&&D.p(a,O,"scale"),0>=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Db=a,this.cj(),this.K(),this.i("scale",b,a))});D.defineProperty(O,{angle:"angle"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(v&&D.p(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.wg=a,ap(this),this.K(),this.cj(),this.i("angle",b,a)))}); +D.defineProperty(O,{Ea:"desiredSize"},function(){return this.$e},function(a){v&&D.l(a,Ca,O,"desiredSize");var b=a.width,c=a.height,d=this.$e,e=d.width,g=d.height;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))||(this.$e=a=a.V(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",d,a),Go(this)&&(a=this.Y,null!==a&&(Ho(this,a,"width"),Ho(this,a,"height"))))}); +D.defineProperty(O,{width:"width"},function(){return this.$e.width},function(a){var b=this.$e.width;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"width"),b=this.$e,this.$e=a=(new Ca(a,this.$e.height)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Go(this)&&(a=this.Y,null!==a&&Ho(this,a,"width")))}); +D.defineProperty(O,{height:"height"},function(){return this.$e.height},function(a){var b=this.$e.height;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"height"),b=this.$e,this.$e=a=(new Ca(this.$e.width,a)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Go(this)&&(a=this.Y,null!==a&&Ho(this,a,"height")))}); D.defineProperty(O,{ah:"minSize"},function(){return this.oi},function(a){var b=this.oi;b.O(a)||(v&&D.l(a,Ca,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.oi=a,this.K(),this.i("minSize",b,a))});D.defineProperty(O,{rf:"maxSize"},function(){return this.ni},function(a){var b=this.ni;b.O(a)||(v&&D.l(a,Ca,O,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.ni=a,this.K(),this.i("maxSize",b,a))}); -D.w(O,{Ia:"measuredBounds"},function(){return this.Fd});D.w(O,{Fa:"naturalBounds"},function(){return this.fd},{configurable:!0});D.defineProperty(O,{margin:"margin"},function(){return this.gn},function(a){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,O,"margin");var b=this.gn;b.O(a)||(this.gn=a=a.V(),this.K(),this.i("margin",b,a))});D.w(O,{transform:null},function(){0!==(this.S&2048)===!0&&Uo(this);return this.Nc});D.w(O,{Hh:null},function(){0!==(this.S&4096)===!0&&Uo(this);return this.Ni}); -D.defineProperty(O,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.O(a)||(v&&D.l(a,S,O,"alignment"),a.ee()&&!a.ld()&&D.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.ue=a=a.V(),Zo(this),this.i("alignment",b,a))});D.defineProperty(O,{column:"column"},function(){return this.wr},function(a){v&&D.p(a,O,"column");a=Math.round(a);var b=this.wr;b!==a&&(0>a&&D.ua(a,">= 0",O,"column"),this.wr=a,this.K(),this.i("column",b,a))}); +D.w(O,{Ia:"measuredBounds"},function(){return this.Fd});D.w(O,{Fa:"naturalBounds"},function(){return this.fd},{configurable:!0});D.defineProperty(O,{margin:"margin"},function(){return this.gn},function(a){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,O,"margin");var b=this.gn;b.O(a)||(this.gn=a=a.V(),this.K(),this.i("margin",b,a))});D.w(O,{transform:null},function(){0!==(this.S&2048)===!0&&To(this);return this.Nc});D.w(O,{Hh:null},function(){0!==(this.S&4096)===!0&&To(this);return this.Ni}); +D.defineProperty(O,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.O(a)||(v&&D.l(a,S,O,"alignment"),a.ee()&&!a.ld()&&D.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.ue=a=a.V(),Yo(this),this.i("alignment",b,a))});D.defineProperty(O,{column:"column"},function(){return this.wr},function(a){v&&D.p(a,O,"column");a=Math.round(a);var b=this.wr;b!==a&&(0>a&&D.ua(a,">= 0",O,"column"),this.wr=a,this.K(),this.i("column",b,a))}); D.defineProperty(O,{jI:"columnSpan"},function(){return this.Si},function(a){v&&D.h(a,"number",O,"columnSpan");a=Math.round(a);var b=this.Si;b!==a&&(1>a&&D.ua(a,">= 1",O,"columnSpan"),this.Si=a,this.K(),this.i("columnSpan",b,a))});D.defineProperty(O,{Tb:"row"},function(){return this.vt},function(a){v&&D.p(a,O,"row");a=Math.round(a);var b=this.vt;b!==a&&(0>a&&D.ua(a,">= 0",O,"row"),this.vt=a,this.K(),this.i("row",b,a))}); D.defineProperty(O,{rowSpan:"rowSpan"},function(){return this.tj},function(a){v&&D.h(a,"number",O,"rowSpan");a=Math.round(a);var b=this.tj;b!==a&&(1>a&&D.ua(a,">= 1",O,"rowSpan"),this.tj=a,this.K(),this.i("rowSpan",b,a))});D.defineProperty(O,{Wy:"spanAllocation"},function(){return this.Lt},function(a){var b=this.Lt;b!==a&&(null!==a&&D.h(a,"function",O,"spanAllocation"),this.Lt=a,this.K(),this.i("spanAllocation",b,a))}); D.defineProperty(O,{Gh:"alignmentFocus"},function(){return this.Nm},function(a){var b=this.Nm;b.O(a)||(v&&D.l(a,S,O,"alignmentFocus"),!a.ee()||a.ld()||a.O(dc)&&this instanceof G||D.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Nm=a=a.V(),this.K(),this.i("alignmentFocus",b,a))}); -D.defineProperty(O,{yd:"portId"},function(){return this.it},function(a){var b=this.it;if(b!==a){v&&null!==a&&D.h(a,"string",O,"portId");var c=this.Y;null===c||c instanceof G||(D.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&dp(c,this);this.it=a;if(null!==a&&c){c.cl=!0;null===c.Ae&&ep(c);var d=this.yd;null!==d&&c.Ae.add(d,this)}this.i("portId",b,a)}});function fp(a){var b=a.Y;if(b instanceof G&&(null!==a.yd||a===b.port)){var c=b.g;null===c||c.na.ub||Qo(b,a)}} -function bp(a){var b=a.g;null===b||b.na.ub||(a instanceof x?a instanceof G?a.kg():gp(a,a,function(a){fp(a)}):fp(a))}D.defineProperty(O,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Nk:dc},function(a){this.be();var b=this.Z.Nk;b.O(a)||(v&&D.l(a,S,O,"toSpot"),a=a.V(),this.Z.Nk=a,this.i("toSpot",b,a),fp(this))}); -D.defineProperty(O,{Jm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Lk:10},function(a){this.be();var b=this.Z.Lk;b!==a&&(v&&D.h(a,"number",O,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"toEndSegmentLength"),this.Z.Lk=a,this.i("toEndSegmentLength",b,a),fp(this))}); -D.defineProperty(O,{uv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Kk:Fo},function(a){this.be();var b=this.Z.Kk;b!==a&&(D.Qn("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"toEndSegmentDirection"),this.Z.Kk=a,this.i("toEndSegmentDirection",b,a),fp(this))});D.defineProperty(O,{vv:"toShortLength"},function(){return null!==this.Z?this.Z.Mk:0},function(a){this.be();var b=this.Z.Mk;b!==a&&(v&&D.h(a,"number",O,"toShortLength"),this.Z.Mk=a,this.i("toShortLength",b,a),fp(this))}); +D.defineProperty(O,{yd:"portId"},function(){return this.it},function(a){var b=this.it;if(b!==a){v&&null!==a&&D.h(a,"string",O,"portId");var c=this.Y;null===c||c instanceof G||(D.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&cp(c,this);this.it=a;if(null!==a&&c){c.cl=!0;null===c.Ae&&dp(c);var d=this.yd;null!==d&&c.Ae.add(d,this)}this.i("portId",b,a)}});function ep(a){var b=a.Y;if(b instanceof G&&(null!==a.yd||a===b.port)){var c=b.g;null===c||c.na.ub||Po(b,a)}} +function ap(a){var b=a.g;null===b||b.na.ub||(a instanceof x?a instanceof G?a.kg():fp(a,a,function(a){ep(a)}):ep(a))}D.defineProperty(O,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Nk:dc},function(a){this.be();var b=this.Z.Nk;b.O(a)||(v&&D.l(a,S,O,"toSpot"),a=a.V(),this.Z.Nk=a,this.i("toSpot",b,a),ep(this))}); +D.defineProperty(O,{Jm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Lk:10},function(a){this.be();var b=this.Z.Lk;b!==a&&(v&&D.h(a,"number",O,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"toEndSegmentLength"),this.Z.Lk=a,this.i("toEndSegmentLength",b,a),ep(this))}); +D.defineProperty(O,{uv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Kk:Eo},function(a){this.be();var b=this.Z.Kk;b!==a&&(D.Qn("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"toEndSegmentDirection"),this.Z.Kk=a,this.i("toEndSegmentDirection",b,a),ep(this))});D.defineProperty(O,{vv:"toShortLength"},function(){return null!==this.Z?this.Z.Mk:0},function(a){this.be();var b=this.Z.Mk;b!==a&&(v&&D.h(a,"number",O,"toShortLength"),this.Z.Mk=a,this.i("toShortLength",b,a),ep(this))}); D.defineProperty(O,{mH:"toLinkable"},function(){return null!==this.Z?this.Z.St:null},function(a){this.be();var b=this.Z.St;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"toLinkable"),this.Z.St=a,this.i("toLinkable",b,a))});D.defineProperty(O,{EK:"toMaxLinks"},function(){return null!==this.Z?this.Z.Tt:Infinity},function(a){this.be();var b=this.Z.Tt;b!==a&&(v&&D.h(a,"number",O,"toMaxLinks"),0>a&&D.ua(a,">= 0",O,"toMaxLinks"),this.Z.Tt=a,this.i("toMaxLinks",b,a))}); -D.defineProperty(O,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.pk:dc},function(a){this.be();var b=this.Z.pk;b.O(a)||(v&&D.l(a,S,O,"fromSpot"),a=a.V(),this.Z.pk=a,this.i("fromSpot",b,a),fp(this))});D.defineProperty(O,{sm:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.nk:10},function(a){this.be();var b=this.Z.nk;b!==a&&(v&&D.h(a,"number",O,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"fromEndSegmentLength"),this.Z.nk=a,this.i("fromEndSegmentLength",b,a),fp(this))}); -D.defineProperty(O,{zu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.mk:Fo},function(a){this.be();var b=this.Z.mk;b!==a&&(D.Qn("GraphObject.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"fromEndSegmentDirection"),this.Z.mk=a,this.i("fromEndSegmentDirection",b,a),fp(this))}); -D.defineProperty(O,{Au:"fromShortLength"},function(){return null!==this.Z?this.Z.ok:0},function(a){this.be();var b=this.Z.ok;b!==a&&(v&&D.h(a,"number",O,"fromShortLength"),this.Z.ok=a,this.i("fromShortLength",b,a),fp(this))});D.defineProperty(O,{LF:"fromLinkable"},function(){return null!==this.Z?this.Z.as:null},function(a){this.be();var b=this.Z.as;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"fromLinkable"),this.Z.as=a,this.i("fromLinkable",b,a))}); +D.defineProperty(O,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.pk:dc},function(a){this.be();var b=this.Z.pk;b.O(a)||(v&&D.l(a,S,O,"fromSpot"),a=a.V(),this.Z.pk=a,this.i("fromSpot",b,a),ep(this))});D.defineProperty(O,{sm:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.nk:10},function(a){this.be();var b=this.Z.nk;b!==a&&(v&&D.h(a,"number",O,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"fromEndSegmentLength"),this.Z.nk=a,this.i("fromEndSegmentLength",b,a),ep(this))}); +D.defineProperty(O,{zu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.mk:Eo},function(a){this.be();var b=this.Z.mk;b!==a&&(D.Qn("GraphObject.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"fromEndSegmentDirection"),this.Z.mk=a,this.i("fromEndSegmentDirection",b,a),ep(this))}); +D.defineProperty(O,{Au:"fromShortLength"},function(){return null!==this.Z?this.Z.ok:0},function(a){this.be();var b=this.Z.ok;b!==a&&(v&&D.h(a,"number",O,"fromShortLength"),this.Z.ok=a,this.i("fromShortLength",b,a),ep(this))});D.defineProperty(O,{LF:"fromLinkable"},function(){return null!==this.Z?this.Z.as:null},function(a){this.be();var b=this.Z.as;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"fromLinkable"),this.Z.as=a,this.i("fromLinkable",b,a))}); D.defineProperty(O,{cB:"fromMaxLinks"},function(){return null!==this.Z?this.Z.bs:Infinity},function(a){this.be();var b=this.Z.bs;b!==a&&(v&&D.h(a,"number",O,"fromMaxLinks"),0>a&&D.ua(a,">= 0",O,"fromMaxLinks"),this.Z.bs=a,this.i("fromMaxLinks",b,a))});D.defineProperty(O,{cursor:"cursor"},function(){return this.Fr},function(a){var b=this.Fr;b!==a&&(D.h(a,"string",O,"cursor"),this.Fr=a,this.i("cursor",b,a))}); -D.defineProperty(O,{click:"click"},function(){return null!==this.ma?this.ma.Ri:null},function(a){Co(this);var b=this.ma.Ri;b!==a&&(null!==a&&D.h(a,"function",O,"click"),this.ma.Ri=a,this.i("click",b,a))});D.defineProperty(O,{nu:"doubleClick"},function(){return null!==this.ma?this.ma.Yi:null},function(a){Co(this);var b=this.ma.Yi;b!==a&&(null!==a&&D.h(a,"function",O,"doubleClick"),this.ma.Yi=a,this.i("doubleClick",b,a))}); -D.defineProperty(O,{MA:"contextClick"},function(){return null!==this.ma?this.ma.Ti:null},function(a){Co(this);var b=this.ma.Ti;b!==a&&(null!==a&&D.h(a,"function",O,"contextClick"),this.ma.Ti=a,this.i("contextClick",b,a))});D.defineProperty(O,{Yu:"mouseEnter"},function(){return null!==this.ma?this.ma.Rs:null},function(a){Co(this);var b=this.ma.Rs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseEnter"),this.ma.Rs=a,this.i("mouseEnter",b,a))}); -D.defineProperty(O,{Zu:"mouseLeave"},function(){return null!==this.ma?this.ma.Ss:null},function(a){Co(this);var b=this.ma.Ss;b!==a&&(null!==a&&D.h(a,"function",O,"mouseLeave"),this.ma.Ss=a,this.i("mouseLeave",b,a))});D.defineProperty(O,{FB:"mouseOver"},function(){return null!==this.ma?this.ma.nj:null},function(a){Co(this);var b=this.ma.nj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseOver"),this.ma.nj=a,this.i("mouseOver",b,a))}); -D.defineProperty(O,{EB:"mouseHover"},function(){return null!==this.ma?this.ma.mj:null},function(a){Co(this);var b=this.ma.mj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHover"),this.ma.mj=a,this.i("mouseHover",b,a))});D.defineProperty(O,{DB:"mouseHold"},function(){return null!==this.ma?this.ma.lj:null},function(a){Co(this);var b=this.ma.lj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHold"),this.ma.lj=a,this.i("mouseHold",b,a))}); -D.defineProperty(O,{QJ:"mouseDragEnter"},function(){return null!==this.ma?this.ma.Ps:null},function(a){Co(this);var b=this.ma.Ps;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragEnter"),this.ma.Ps=a,this.i("mouseDragEnter",b,a))});D.defineProperty(O,{RJ:"mouseDragLeave"},function(){return null!==this.ma?this.ma.Qs:null},function(a){Co(this);var b=this.ma.Qs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragLeave"),this.ma.Qs=a,this.i("mouseDragLeave",b,a))}); -D.defineProperty(O,{CB:"mouseDrop"},function(){return null!==this.ma?this.ma.kj:null},function(a){Co(this);var b=this.ma.kj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDrop"),this.ma.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(O,{QE:"actionDown"},function(){return null!==this.ma?this.ma.er:null},function(a){Co(this);var b=this.ma.er;b!==a&&(null!==a&&D.h(a,"function",O,"actionDown"),this.ma.er=a,this.i("actionDown",b,a))}); -D.defineProperty(O,{RE:"actionMove"},function(){return null!==this.ma?this.ma.fr:null},function(a){Co(this);var b=this.ma.fr;b!==a&&(null!==a&&D.h(a,"function",O,"actionMove"),this.ma.fr=a,this.i("actionMove",b,a))});D.defineProperty(O,{SE:"actionUp"},function(){return null!==this.ma?this.ma.gr:null},function(a){Co(this);var b=this.ma.gr;b!==a&&(null!==a&&D.h(a,"function",O,"actionUp"),this.ma.gr=a,this.i("actionUp",b,a))}); -D.defineProperty(O,{PE:"actionCancel"},function(){return null!==this.ma?this.ma.dr:null},function(a){Co(this);var b=this.ma.dr;b!==a&&(null!==a&&D.h(a,"function",O,"actionCancel"),this.ma.dr=a,this.i("actionCancel",b,a))});D.defineProperty(O,{lC:"toolTip"},function(){return null!==this.ma?this.ma.wj:null},function(a){Co(this);var b=this.ma.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof ik||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.ma.wj=a,this.i("toolTip",b,a))}); -D.defineProperty(O,{contextMenu:"contextMenu"},function(){return null!==this.ma?this.ma.Ui:null},function(a){Co(this);var b=this.ma.Ui;b!==a&&(!v||a instanceof da||a instanceof ik||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.ma.Ui=a,this.i("contextMenu",b,a))});O.prototype.bind=O.prototype.bind=function(a){a.Sg=this;var b=this.rm();null!==b&&hp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Hc&&(this.Hc=new K(ph));this.Hc.add(a)}; -O.prototype.findTemplateBinder=O.prototype.rm=function(){for(var a=this instanceof x?this:this.R;null!==a;){if(null!==a.Al)return a;a=a.R}return null};O.prototype.setProperties=function(a){D.nv(this,a)};var ip; -O.make=ip=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=jp.oa(a);"function"===typeof g?(c=D.lm(arguments),d=g(c),D.Qa(d)||D.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ca[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||D.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);g=1;if(d instanceof E&&1e)&&D.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.Ke=!0, -a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&D.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.Ke=!1,a.index=e);e=new ma;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.nv(a,e)}else D.nv(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var jp=new na("string","function"); -O.getBuilders=function(){var a=new na("string","function"),b;for(b in jp)if(b!==b.toLowerCase()){var c=jp.oa(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var lp;O.defineBuilder=lp=function(a,b){D.h(a,"string",O,"defineBuilder:name");D.h(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||D.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);jp.add(a,b)};var mp; -O.takeBuilderArgument=mp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; -lp("Button",function(){var a=new Ba(Gg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ba(Gg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=ip(x,Ql,{Hu:!0,BF:function(a,b){var e=a.Nd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},ip(z,{name:"ButtonBorder",Kb:"Rectangle",C:new S(0,0,2.761423749153968,2.761423749153968), +D.defineProperty(O,{click:"click"},function(){return null!==this.ma?this.ma.Ri:null},function(a){Bo(this);var b=this.ma.Ri;b!==a&&(null!==a&&D.h(a,"function",O,"click"),this.ma.Ri=a,this.i("click",b,a))});D.defineProperty(O,{nu:"doubleClick"},function(){return null!==this.ma?this.ma.Yi:null},function(a){Bo(this);var b=this.ma.Yi;b!==a&&(null!==a&&D.h(a,"function",O,"doubleClick"),this.ma.Yi=a,this.i("doubleClick",b,a))}); +D.defineProperty(O,{MA:"contextClick"},function(){return null!==this.ma?this.ma.Ti:null},function(a){Bo(this);var b=this.ma.Ti;b!==a&&(null!==a&&D.h(a,"function",O,"contextClick"),this.ma.Ti=a,this.i("contextClick",b,a))});D.defineProperty(O,{Yu:"mouseEnter"},function(){return null!==this.ma?this.ma.Rs:null},function(a){Bo(this);var b=this.ma.Rs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseEnter"),this.ma.Rs=a,this.i("mouseEnter",b,a))}); +D.defineProperty(O,{Zu:"mouseLeave"},function(){return null!==this.ma?this.ma.Ss:null},function(a){Bo(this);var b=this.ma.Ss;b!==a&&(null!==a&&D.h(a,"function",O,"mouseLeave"),this.ma.Ss=a,this.i("mouseLeave",b,a))});D.defineProperty(O,{FB:"mouseOver"},function(){return null!==this.ma?this.ma.nj:null},function(a){Bo(this);var b=this.ma.nj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseOver"),this.ma.nj=a,this.i("mouseOver",b,a))}); +D.defineProperty(O,{EB:"mouseHover"},function(){return null!==this.ma?this.ma.mj:null},function(a){Bo(this);var b=this.ma.mj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHover"),this.ma.mj=a,this.i("mouseHover",b,a))});D.defineProperty(O,{DB:"mouseHold"},function(){return null!==this.ma?this.ma.lj:null},function(a){Bo(this);var b=this.ma.lj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHold"),this.ma.lj=a,this.i("mouseHold",b,a))}); +D.defineProperty(O,{QJ:"mouseDragEnter"},function(){return null!==this.ma?this.ma.Ps:null},function(a){Bo(this);var b=this.ma.Ps;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragEnter"),this.ma.Ps=a,this.i("mouseDragEnter",b,a))});D.defineProperty(O,{RJ:"mouseDragLeave"},function(){return null!==this.ma?this.ma.Qs:null},function(a){Bo(this);var b=this.ma.Qs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragLeave"),this.ma.Qs=a,this.i("mouseDragLeave",b,a))}); +D.defineProperty(O,{CB:"mouseDrop"},function(){return null!==this.ma?this.ma.kj:null},function(a){Bo(this);var b=this.ma.kj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDrop"),this.ma.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(O,{QE:"actionDown"},function(){return null!==this.ma?this.ma.er:null},function(a){Bo(this);var b=this.ma.er;b!==a&&(null!==a&&D.h(a,"function",O,"actionDown"),this.ma.er=a,this.i("actionDown",b,a))}); +D.defineProperty(O,{RE:"actionMove"},function(){return null!==this.ma?this.ma.fr:null},function(a){Bo(this);var b=this.ma.fr;b!==a&&(null!==a&&D.h(a,"function",O,"actionMove"),this.ma.fr=a,this.i("actionMove",b,a))});D.defineProperty(O,{SE:"actionUp"},function(){return null!==this.ma?this.ma.gr:null},function(a){Bo(this);var b=this.ma.gr;b!==a&&(null!==a&&D.h(a,"function",O,"actionUp"),this.ma.gr=a,this.i("actionUp",b,a))}); +D.defineProperty(O,{PE:"actionCancel"},function(){return null!==this.ma?this.ma.dr:null},function(a){Bo(this);var b=this.ma.dr;b!==a&&(null!==a&&D.h(a,"function",O,"actionCancel"),this.ma.dr=a,this.i("actionCancel",b,a))});D.defineProperty(O,{lC:"toolTip"},function(){return null!==this.ma?this.ma.wj:null},function(a){Bo(this);var b=this.ma.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof hk||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.ma.wj=a,this.i("toolTip",b,a))}); +D.defineProperty(O,{contextMenu:"contextMenu"},function(){return null!==this.ma?this.ma.Ui:null},function(a){Bo(this);var b=this.ma.Ui;b!==a&&(!v||a instanceof da||a instanceof hk||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.ma.Ui=a,this.i("contextMenu",b,a))});O.prototype.bind=O.prototype.bind=function(a){a.Sg=this;var b=this.rm();null!==b&&gp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Hc&&(this.Hc=new K(oh));this.Hc.add(a)}; +O.prototype.findTemplateBinder=O.prototype.rm=function(){for(var a=this instanceof x?this:this.R;null!==a;){if(null!==a.Al)return a;a=a.R}return null};O.prototype.setProperties=function(a){D.nv(this,a)};var hp; +O.make=hp=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=ip.oa(a);"function"===typeof g?(c=D.lm(arguments),d=g(c),D.Qa(d)||D.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ca[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||D.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);g=1;if(d instanceof E&&1e)&&D.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.Ke=!0, +a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&D.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.Ke=!1,a.index=e);e=new ma;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.nv(a,e)}else D.nv(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var ip=new na("string","function"); +O.getBuilders=function(){var a=new na("string","function"),b;for(b in ip)if(b!==b.toLowerCase()){var c=ip.oa(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var kp;O.defineBuilder=kp=function(a,b){D.h(a,"string",O,"defineBuilder:name");D.h(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||D.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);ip.add(a,b)};var lp; +O.takeBuilderArgument=lp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; +kp("Button",function(){var a=new Ba(Fg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ba(Fg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=hp(x,Pl,{Hu:!0,BF:function(a,b){var e=a.Nd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},hp(z,{name:"ButtonBorder",Kb:"Rectangle",C:new S(0,0,2.761423749153968,2.761423749153968), D:new S(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Yu=function(a,b){if(b.Ju()){var e=b.Nd("ButtonBorder");if(e instanceof z){var g=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=g;g=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=g}}};a.Zu=function(a,b){if(b.Ju()){var e=b.Nd("ButtonBorder");e instanceof z&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); -lp("TreeExpanderButton",function(){var a=ip("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},ip(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Zd},(new ph("figure","isTreeExpanded",function(a,c){var d=c.R;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).zy()),{visible:!1},(new ph("visible","isTreeLeaf",function(a){return!a})).zy());a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof G){var e=d.g;if(null!==e){e=e.yb;if(d.Dc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +kp("TreeExpanderButton",function(){var a=hp("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},hp(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Yd},(new oh("figure","isTreeExpanded",function(a,c){var d=c.R;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).zy()),{visible:!1},(new oh("visible","isTreeLeaf",function(a){return!a})).zy());a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof G){var e=d.g;if(null!==e){e=e.yb;if(d.Dc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; a.Cc=!0;d.Dc?e.collapseTree(d):e.expandTree(d)}}};return a}); -lp("SubGraphExpanderButton",function(){var a=ip("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},ip(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Zd},(new ph("figure","isSubGraphExpanded",function(a,c){var d=c.R;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).zy()));a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof I){var e=d.g;if(null!==e){e=e.yb;if(d.md){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Cc= -!0;d.md?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});lp("ToolTip",function(){var a=new da(Ql),b=new z;b.name="Border";b.fill="#FFFFE0";b.stroke="#CCCCCC";a.add(b);return a});lp("ContextMenu",function(){return new da(Pl)});lp("ContextMenuButton",function(){var a=ip("Button");a.stretch=yo;var b=a.Nd("ButtonBorder");b instanceof z&&(b.Kb="Rectangle",b.C=new S(0,0,2,3),b.D=new S(1,1,-2,-2));return a}); -lp("PanelExpanderButton",function(a){var b=mp(a,"COLLAPSIBLE"),c=ip("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},ip(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new ph("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).zy(b)));a=c.Nd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.qb){var h=c.rm();null===h&&(h=c.Y);null!==h&&(h=h.Nd(b),null!==h&& +kp("SubGraphExpanderButton",function(){var a=hp("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},hp(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Yd},(new oh("figure","isSubGraphExpanded",function(a,c){var d=c.R;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).zy()));a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof I){var e=d.g;if(null!==e){e=e.yb;if(d.md){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Cc= +!0;d.md?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});kp("ToolTip",function(){var a=new da(Pl),b=new z;b.name="Border";b.fill="#FFFFE0";b.stroke="#CCCCCC";a.add(b);return a});kp("ContextMenu",function(){return new da(Ol)});kp("ContextMenuButton",function(){var a=hp("Button");a.stretch=xo;var b=a.Nd("ButtonBorder");b instanceof z&&(b.Kb="Rectangle",b.C=new S(0,0,2,3),b.D=new S(1,1,-2,-2));return a}); +kp("PanelExpanderButton",function(a){var b=lp(a,"COLLAPSIBLE"),c=hp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},hp(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new oh("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).zy(b)));a=c.Nd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.qb){var h=c.rm();null===h&&(h=c.Y);null!==h&&(h=h.Nd(b),null!==h&& (g.Nb("Collapse/Expand Panel"),h.visible=!h.visible,g.jd("Collapse/Expand Panel")))}};return c}); -lp("CheckBoxButton",function(a){var b=mp(a);a=ip("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},ip(z,{name:"ButtonIcon",RI:"M0 4 L3 9 9 0",mb:2,stretch:Ye,dB:ck,visible:!1},""!==b?(new ph("visible",b)).FJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.qb||""!==b&&e.ea.qb)){a.Cc=!0;var g=d.Nd("ButtonIcon");e.Nb("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.jd("checkbox")}};return a}); -lp("CheckBox",function(a){a=mp(a);a=ip("CheckBoxButton",a,{name:"Button",margin:new Lb(0,1,0,0)});var b=ip(x,"Horizontal",a,{Hu:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Yu:a.Yu,Zu:a.Zu,click:a.click,_buttonClick:a.click});a.Yu=null;a.Zu=null;a.click=null;return b}); -function Do(){this.Yr=this.Ui=this.wj=this.dr=this.gr=this.fr=this.er=this.kj=this.Qs=this.Ps=this.lj=this.mj=this.nj=this.Ss=this.Rs=this.Ti=this.Yi=this.Ri=null}Do.prototype.copy=function(){var a=new Do;a.Ri=this.Ri;a.Yi=this.Yi;a.Ti=this.Ti;a.Rs=this.Rs;a.Ss=this.Ss;a.nj=this.nj;a.mj=this.mj;a.lj=this.lj;a.Ps=this.Ps;a.Qs=this.Qs;a.kj=this.kj;a.er=this.er;a.fr=this.fr;a.gr=this.gr;a.dr=this.dr;a.wj=this.wj;a.Ui=this.Ui;a.Yr=this.Yr;return a}; -function x(a){O.call(this);void 0===a?this.da=fk:(D.Da(a,x,x,"type"),this.da=a);this.xa=new K(O);this.vf=Sd;this.da===Tl&&(this.$n=!0);this.Jr=Vc;this.Xi=wo;this.da===fa&&np(this);this.Wp=ck;this.js=ae;this.ks=Kd;this.fs=0;this.es=100;this.hs=10;this.gs=0;this.Al=this.Ud=this.qk=this.Vm=this.Xm=null;this.xs=NaN;this.Ig=this.ej=null;this.op="category";this.Hg=null;this.yj=new C(NaN,NaN,NaN,NaN);this.Jk=this.wt=this.Yl=null;this.dk=""}D.Ta(x,O);D.Di(x);D.ka("Panel",x); -function np(a){a.ik=Sd;a.fi=1;a.Wi=null;a.Tm=null;a.ei=1;a.di=null;a.Sm=null;a.hd=[];a.cd=[];a.rn=op;a.Rm=op;a.xj=0;a.hj=0} +kp("CheckBoxButton",function(a){var b=lp(a);a=hp("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},hp(z,{name:"ButtonIcon",RI:"M0 4 L3 9 9 0",mb:2,stretch:Xe,dB:bk,visible:!1},""!==b?(new oh("visible",b)).FJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.qb||""!==b&&e.ea.qb)){a.Cc=!0;var g=d.Nd("ButtonIcon");e.Nb("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.jd("checkbox")}};return a}); +kp("CheckBox",function(a){a=lp(a);a=hp("CheckBoxButton",a,{name:"Button",margin:new Lb(0,1,0,0)});var b=hp(x,"Horizontal",a,{Hu:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Yu:a.Yu,Zu:a.Zu,click:a.click,_buttonClick:a.click});a.Yu=null;a.Zu=null;a.click=null;return b}); +function Co(){this.Yr=this.Ui=this.wj=this.dr=this.gr=this.fr=this.er=this.kj=this.Qs=this.Ps=this.lj=this.mj=this.nj=this.Ss=this.Rs=this.Ti=this.Yi=this.Ri=null}Co.prototype.copy=function(){var a=new Co;a.Ri=this.Ri;a.Yi=this.Yi;a.Ti=this.Ti;a.Rs=this.Rs;a.Ss=this.Ss;a.nj=this.nj;a.mj=this.mj;a.lj=this.lj;a.Ps=this.Ps;a.Qs=this.Qs;a.kj=this.kj;a.er=this.er;a.fr=this.fr;a.gr=this.gr;a.dr=this.dr;a.wj=this.wj;a.Ui=this.Ui;a.Yr=this.Yr;return a}; +function x(a){O.call(this);void 0===a?this.da=ek:(D.Da(a,x,x,"type"),this.da=a);this.xa=new K(O);this.vf=Ld;this.da===Sl&&(this.$n=!0);this.Jr=Vc;this.Xi=vo;this.da===fa&&mp(this);this.Wp=bk;this.js=$d;this.ks=Jd;this.fs=0;this.es=100;this.hs=10;this.gs=0;this.Al=this.Ud=this.qk=this.Vm=this.Xm=null;this.xs=NaN;this.Ig=this.ej=null;this.op="category";this.Hg=null;this.yj=new C(NaN,NaN,NaN,NaN);this.Jk=this.wt=this.Yl=null;this.dk=""}D.Ta(x,O);D.Di(x);D.ka("Panel",x); +function mp(a){a.ik=Ld;a.fi=1;a.Wi=null;a.Tm=null;a.ei=1;a.di=null;a.Sm=null;a.hd=[];a.cd=[];a.rn=np;a.Rm=np;a.xj=0;a.hj=0} x.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.da=this.da;a.vf=this.vf.V();a.Jr=this.Jr.V();a.Xi=this.Xi;if(a.da===fa){a.ik=this.ik.V();a.fi=this.fi;a.Wi=this.Wi;a.Tm=this.Tm;a.ei=this.ei;a.di=this.di;a.Sm=this.Sm;var b=[];if(0a&&D.ua(a,">= 0",x,"padding"),a=new Lb(a)):(D.l(a,Lb,x,"padding"),0>a.left&&D.ua(a.left,">= 0",x,"padding:value.left"),0>a.right&&D.ua(a.right,">= 0",x,"padding:value.right"),0>a.top&&D.ua(a.top,">= 0",x,"padding:value.top"),0>a.bottom&&D.ua(a.bottom,">= 0",x,"padding:value.bottom"));var b=this.vf;b.O(a)||(this.vf=a=a.V(),this.K(),this.i("padding",b,a))}); D.defineProperty(x,{pm:"defaultAlignment"},function(){return this.Jr},function(a){var b=this.Jr;b.O(a)||(v&&D.l(a,S,x,"defaultAlignment"),this.Jr=a=a.V(),this.K(),this.i("defaultAlignment",b,a))});D.defineProperty(x,{me:"defaultStretch"},function(){return this.Xi},function(a){var b=this.Xi;b!==a&&(D.Da(a,O,x,"defaultStretch"),this.Xi=a,this.K(),this.i("defaultStretch",b,a))}); -D.defineProperty(x,{FL:"defaultSeparatorPadding"},function(){return void 0===this.ik?Sd:this.ik},function(a){if(void 0!==this.ik){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,x,"defaultSeparatorPadding");var b=this.ik;b.O(a)||(this.ik=a=a.V(),this.K(),this.i("defaultSeparatorPadding",b,a))}}); +D.defineProperty(x,{FL:"defaultSeparatorPadding"},function(){return void 0===this.ik?Ld:this.ik},function(a){if(void 0!==this.ik){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,x,"defaultSeparatorPadding");var b=this.ik;b.O(a)||(this.ik=a=a.V(),this.K(),this.i("defaultSeparatorPadding",b,a))}}); D.defineProperty(x,{DL:"defaultRowSeparatorStroke"},function(){return void 0===this.Wi?null:this.Wi},function(a){var b=this.Wi;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.Wi=a,this.ra(),this.i("defaultRowSeparatorStroke",b,a))}); D.defineProperty(x,{EL:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.fi?1:this.fi},function(a){if(void 0!==this.fi){var b=this.fi;b!==a&&isFinite(a)&&0<=a&&(this.fi=a,this.K(),this.i("defaultRowSeparatorStrokeWidth",b,a))}}); D.defineProperty(x,{CL:"defaultRowSeparatorDashArray"},function(){return void 0===this.Tm?null:this.Tm},function(a){if(void 0!==this.Tm){var b=this.Tm;if(b!==a){null===a||Array.isArray(a)||D.kc(a,"Array",x,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.by,e=d.width,d=d.height,g=this.Fa,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.VF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.xa.o,q=p.length,r=0;r -e*u*c))){s=w.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var y=n[r],A=!1,B=!0,P=w.iH;null!==P&&(A=!0,B=a.YA(P,w.gf));if("LineV"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Vo(this,a,w.stroke,!1,!1);a.beginPath();for(var H=Math.floor(-m.x/e),R=H;R<=H+k;R++){var aa=R*e+m.x;0<=aa&&aa<=h&&qp(R,u,y)&&(A&&!B?Go(a,aa,0,aa,g,P,w.gf):(a.moveTo(aa,0),a.lineTo(aa,g)))}a.stroke()}else if("LineH"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Vo(this,a,w.stroke,!1,!1);a.beginPath();for(R= -H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&qp(R,u,y)&&(A&&!B?Go(a,0,aa,h,aa,P,w.gf):(a.moveTo(0,aa),a.lineTo(h,aa)));a.stroke()}else if("BarV"===w.Kb&&null!==w.fill)for(Vo(this,a,w.fill,!0,!1),w=w.width,isNaN(w)&&(w=e),R=H=Math.floor(-m.x/e);R<=H+k;R++)aa=R*e+m.x,0<=aa&&aa<=h&&qp(R,u,y)&&a.fillRect(aa,0,w,g);else if("BarH"===w.Kb&&null!==w.fill)for(Vo(this,a,w.fill,!0,!1),w=w.height,isNaN(w)&&(w=d),R=H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&qp(R,u,y)&&a.fillRect(0,aa, -h,w);A&&a.TA();1!==s&&(a.globalAlpha=t)}}a.restore();a.De(!1)}else if(this.da===pp){e=this.Fa;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Md();c.He(a,b);e=this.Jj()*b.scale;0>=e&&(e=1);d=c.aa;h=this.xa.o;g=this.Xm;k=h.length;for(l=0;lthis.hB*q.interval*c.xf.vu/this.Du*e))for(r=q.Ia,u=q.mb*q.scale,s=q.Gh,s.ee()&&(s=jc),p=0;p=c&&(c=1);var d=this.by,e=d.width,d=d.height,g=this.Fa,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.VF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.xa.o,q=p.length,r=0;r +e*u*c))){s=w.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var y=n[r],A=!1,B=!0,P=w.iH;null!==P&&(A=!0,B=a.YA(P,w.gf));if("LineV"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Uo(this,a,w.stroke,!1,!1);a.beginPath();for(var H=Math.floor(-m.x/e),R=H;R<=H+k;R++){var aa=R*e+m.x;0<=aa&&aa<=h&&pp(R,u,y)&&(A&&!B?Fo(a,aa,0,aa,g,P,w.gf):(a.moveTo(aa,0),a.lineTo(aa,g)))}a.stroke()}else if("LineH"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Uo(this,a,w.stroke,!1,!1);a.beginPath();for(R= +H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&pp(R,u,y)&&(A&&!B?Fo(a,0,aa,h,aa,P,w.gf):(a.moveTo(0,aa),a.lineTo(h,aa)));a.stroke()}else if("BarV"===w.Kb&&null!==w.fill)for(Uo(this,a,w.fill,!0,!1),w=w.width,isNaN(w)&&(w=e),R=H=Math.floor(-m.x/e);R<=H+k;R++)aa=R*e+m.x,0<=aa&&aa<=h&&pp(R,u,y)&&a.fillRect(aa,0,w,g);else if("BarH"===w.Kb&&null!==w.fill)for(Uo(this,a,w.fill,!0,!1),w=w.height,isNaN(w)&&(w=d),R=H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&pp(R,u,y)&&a.fillRect(0,aa, +h,w);A&&a.TA();1!==s&&(a.globalAlpha=t)}}a.restore();a.De(!1)}else if(this.da===op){e=this.Fa;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Md();c.He(a,b);e=this.Jj()*b.scale;0>=e&&(e=1);d=c.aa;h=this.xa.o;g=this.Xm;k=h.length;for(l=0;lthis.hB*q.interval*c.xf.vu/this.Du*e))for(r=q.Ia,u=q.mb*q.scale,s=q.Gh,s.ee()&&(s=jc),p=0;pg.height)continue}else if(l.position>g.width)continue;var m=l.Wq;isNaN(m)&&(m=c?a.fi:a.ei);var n=l.Vq;null===n&&(n=c?a.Wi:a.di);if(0!==m&&null!==n){Vo(a,b,n,!1,!1);var n=!1,p=!0,q=l.qK;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.gf):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.gf):p=!1);b.beginPath();var r= -l.position+m;c?r>g.height&&(m-=r-g.height):r>g.width&&(m-=r-g.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=g.width-r.right,n&&!p?Go(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=g.height-r.bottom,n&&!p?Go(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(D.ml),b.lineDashOffset=0):void 0!==b.webkitLineDash&&(b.webkitLineDash=D.ml,b.webkitLineDashOffset=0))}}}} -function sp(a,b,c,d,e){for(var g=d.length,h=a.aa,k=0;km)){var n=l.kf(),p=l.Wq;isNaN(p)&&(p=c?a.fi:a.ei);var q=l.Vq;null===q&&(q=c?a.Wi:a.di);null===q&&(p=0);n-=p;p=l.position+p;n+=l.hb;p+n>m&&(n=m-p);0>=n||(m=a.padding,Vo(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} -function qp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dg.height)continue}else if(l.position>g.width)continue;var m=l.Wq;isNaN(m)&&(m=c?a.fi:a.ei);var n=l.Vq;null===n&&(n=c?a.Wi:a.di);if(0!==m&&null!==n){Uo(a,b,n,!1,!1);var n=!1,p=!0,q=l.qK;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.gf):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.gf):p=!1);b.beginPath();var r= +l.position+m;c?r>g.height&&(m-=r-g.height):r>g.width&&(m-=r-g.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=g.width-r.right,n&&!p?Fo(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=g.height-r.bottom,n&&!p?Fo(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(D.ml),b.lineDashOffset=0):void 0!==b.webkitLineDash&&(b.webkitLineDash=D.ml,b.webkitLineDashOffset=0))}}}} +function rp(a,b,c,d,e){for(var g=d.length,h=a.aa,k=0;km)){var n=l.kf(),p=l.Wq;isNaN(p)&&(p=c?a.fi:a.ei);var q=l.Vq;null===q&&(q=c?a.Wi:a.di);null===q&&(p=0);n-=p;p=l.position+p;n+=l.hb;p+n>m&&(n=m-p);0>=n||(m=a.padding,Uo(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} +function pp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dm&&e.set(s),D.A(s));D.A(n);g&&e.transform(h)}return c}; -f.K=function(a){O.prototype.K.call(this,a);a=null;if(this.da===Ql||this.da===tj)a=this.Md();for(var b=this.xa.o,c=b.length,d=0;dOd&&(rc=Math.max(Od-sc,0));var pg=0===Z.hb;Z.hb+=rc;Od=Math.max(Od-(rc+(pg?sc:0)),0)}1!==ba.Si||Tb!==ak&&Tb!==xo||(Z=this.oe(Kb),sc=Z.kf(),rc=Math.max(hf-Z.hb,0),rc+sc>cd&&(rc=Math.max(cd-sc,0)),pg=0===Z.hb,Z.hb+=rc,cd=Math.max(cd-(rc+(pg?sc:0)),0));pi&&ba.xq()}}}D.ya(df);for(var Gc=0,Fb=0,Jb=this.fq,ka=0;ka=this.Tq);fb++)Z=this.pe(ba.Tb+fb),rc=Tb===Ye||Tb===xo?Math.max(Z.Th,0===Ad[ba.Tb+fb]?Z.te:Math.min(Ad[ba.Tb+fb],Z.te)):Math.max(Z.Th,isNaN(Z.wf)?Z.te:Math.min(Z.wf,Z.te)),Pd.height+=rc;for(fb=1;fb=this.fq);fb++)Z= -this.oe(ba.column+fb),rc=Tb===Ye||Tb===yo?Math.max(Z.Th,0===lf[ba.column+fb]?Z.te:Math.min(lf[ba.column+fb],Z.te)):Math.max(Z.Th,isNaN(Z.wf)?Z.te:Math.min(Z.wf,Z.te)),Pd.width+=rc;tb.width+=Pd.width;tb.height+=Pd.height;Cc=ba.margin;Of=Cc.right+Cc.left;og=Cc.top+Cc.bottom;Ik(ba,tb.width,tb.height,Aj,Bj);for(var Pf=ba.Ia,hf=Math.max(Pf.width+Of,0),jf=Math.max(Pf.height+og,0),mf=0,fb=0;fb=this.Tq);fb++)Z=this.pe(ba.Tb+fb),mf+=Z.total||0;if(mfOd&&(rc=Math.max(Od-sc,0));var pg=0===Z.hb;Z.hb+=rc;Od=Math.max(Od-(rc+(pg?sc:0)),0)}1!==ba.Si||Tb!==Zj&&Tb!==wo||(Z=this.oe(Kb),sc=Z.kf(),rc=Math.max(hf-Z.hb,0),rc+sc>cd&&(rc=Math.max(cd-sc,0)),pg=0===Z.hb,Z.hb+=rc,cd=Math.max(cd-(rc+(pg?sc:0)),0));pi&&ba.xq()}}}D.ya(df);for(var Gc=0,Fb=0,Jb=this.fq,ka=0;ka=this.Tq);fb++)Z=this.pe(ba.Tb+fb),rc=Tb===Xe||Tb===wo?Math.max(Z.Th,0===Ad[ba.Tb+fb]?Z.te:Math.min(Ad[ba.Tb+fb],Z.te)):Math.max(Z.Th,isNaN(Z.wf)?Z.te:Math.min(Z.wf,Z.te)),Pd.height+=rc;for(fb=1;fb=this.fq);fb++)Z= +this.oe(ba.column+fb),rc=Tb===Xe||Tb===xo?Math.max(Z.Th,0===lf[ba.column+fb]?Z.te:Math.min(lf[ba.column+fb],Z.te)):Math.max(Z.Th,isNaN(Z.wf)?Z.te:Math.min(Z.wf,Z.te)),Pd.width+=rc;tb.width+=Pd.width;tb.height+=Pd.height;Cc=ba.margin;Of=Cc.right+Cc.left;og=Cc.top+Cc.bottom;Hk(ba,tb.width,tb.height,Aj,Bj);for(var Pf=ba.Ia,hf=Math.max(Pf.width+Of,0),jf=Math.max(Pf.height+og,0),mf=0,fb=0;fb=this.Tq);fb++)Z=this.pe(ba.Tb+fb),mf+=Z.total||0;if(mf=od)&&!(ba.Tb+fb>=this.Tq);fb++){var Z=this.pe(ba.Tb+fb),Ic=Z.Ya||0,Rf=nf(ba,Z,Pg);v&&"number"!==typeof Rf&&D.k(ba+" spanAllocation does not return a number: "+Rf);Z.hb=Math.min(Z.te,Ic+Rf);Z.Ya!==Ic&&(od-=Z.Ya-Ic)}for(;0Ic&&(Z.hb=Math.min(Z.te,Ic+od),Z.Ya!==Ic&&(od-=Z.Ya-Ic));if(0===Z.index)break;Z=this.pe(Z.index-1)}}for(var Oe=0,fb=0;fb=this.fq);fb++)Z=this.oe(ba.column+fb),Oe+=Z.total||0;if(Oe=od)&&!(ba.column+fb>=this.fq);fb++)Z=this.oe(ba.column+fb),Ic=Z.Ya||0,Rf=nf(ba,Z,Pg),v&&"number"!==typeof Rf&&D.k(ba+" spanAllocation does not return a number: "+Rf),Z.hb=Math.min(Z.te,Ic+Rf),Z.Ya!==Ic&&(od-=Z.Ya-Ic);for(;0Ic&&(Z.hb=Math.min(Z.te,Ic+od),Z.Ya!==Ic&&(od-=Z.Ya-Ic));if(0===Z.index)break;Z=this.oe(Z.index-1)}}}D.ya(Ne);D.$k(Pd);D.$k(tb);void 0!==Ad&&D.ya(Ad);void 0!==lf&&D.ya(lf);for(var Qg= -0,Rg=0,Tb=Mo(this,!0),Dj=this.Ea,Ok=this.rf,ye=Fb=Gc=0,dd=0,Jb=this.fq,ka=0;kati)Ik(Yb,Infinity,Infinity),ze=Yb.Ia,pf.Zh(ze),this.oh.add(ze);else{var Bd=Yb.We,Bt=Yb.WB,wp=Yb.Gh;wp.ee()&&(wp=mc);var qg=Yb.Uq,kw=Yb.XB,Uk=0,Vk=0,xm=0;if(Bd<-ti||Bd>=ti){var Ct=Sk.wG,Sf=Sk.vG;qg!==wj&&(xm=Sk.computeAngle(Yb,qg,Sf),Yb.wg=xm);Uk=Ct.x-Sg.x;Vk=Ct.y-Sg.y}else{var Qd, -qf;if(0<=Bd)Qd=Hh.fa(Bd),qf=BdEt+10?0<=Bd?vi.Xb(Qd):Qd.Xb(vi):Et>Dt+10?0<=Bd?qf.Xb(wi):wi.Xb(qf):0<=Bd?vi.Xb(wi):wi.Xb(vi)}else Sf=0<=Bd?Qd.Xb(qf):qf.Xb(Qd);qg!==wj&&(xm=Sk.computeAngle(Yb,qg,Sf),Yb.wg=xm);Uk=Qd.x+(qf.x-Qd.x)*Bt-Sg.x;Vk=Qd.y+(qf.y-Qd.y)*Bt-Sg.y}Ik(Yb, -Infinity,Infinity);var ze=Yb.Ia,vm=Yb.Fa,Wk=0;Yb instanceof z&&(Wk=Yb.mb);var xi=vm.width+Wk,Fj=vm.height+Wk;Tg.reset();Tg.translate(-ze.x,-ze.y);Tg.scale(Yb.scale,Yb.scale);Tg.rotate(qg===wj?Yb.angle:Sf,xi/2,Fj/2);qg!==Xp&&qg!==Yp||Tg.rotate(90,xi/2,Fj/2);qg!==Zp&&qg!==$p||Tg.rotate(-90,xi/2,Fj/2);qg===aq&&(45Sf||225Sf)&&Tg.rotate(-Sf,xi/2,Fj/2);var Gj=new C(0,0,xi,Fj);Tk.vo(Gj,wp);Tg.vb(Tk);var lw=-Tk.x+Wk/2*Yb.scale,mw=-Tk.y+Wk/2*Yb.scale;Ug.assign(kw);isNaN(Ug.x)&&(Ug.x=0<=Bd? -xi/2+3:-(xi/2+3));isNaN(Ug.y)&&(Ug.y=-(Fj/2+3));Ug.rotate(Sf);Uk+=Ug.x;Vk+=Ug.y;Gj.set(ze);Gj.x=Uk+lw;Gj.y=Vk+mw;this.oh.add(Gj);pf.Zh(Gj)}}if(this instanceof J)for(var Ft=this.Cf;Ft.next();)Ik(Ft.value,Infinity,Infinity);this.yj=pf;var xp=this.jj;xp.n(xp.x+pf.x,xp.y+pf.y);Cb(e,pf.width||0,pf.height||0);D.nf(Tg);D.A(Tk);D.A(Ug)}}}break;case "Grid":break;case "Graduated":var nw=a,ow=b,pw=c,qw=d,Vg=this.Md();this.Vm=[];var Hj=Vg.margin,rw=Hj.right+Hj.left,sw=Hj.top+Hj.bottom;Ik(Vg,nw,ow,pw,qw);var Gt= -Vg.Ia,tw=Gt.height,uw=Math.max(Gt.width+rw,0),vw=Math.max(tw+sw,0),Ht=new C(-Hj.left,-Hj.top,uw,vw);this.Vm.push(Ht);e.assign(Ht);for(var al=Vg.xf,It=Vg.mb,yp=al.$x,Ij=al.uu,yi=al.vu,ww=yp.length,zp=0,Ap=0,Jj=D.nb(),Bp=0;BpCd&&(Cd+=360);Jt.push(Cd)}zp=Kt;Ap=Lt}Jj.push(Jt)}var Mt;if(null===this.qk){for(var Nt=[],Dp=this.xa.o,Ot=Dp.length,Ep=0;Ep< -Ot;Ep++){var bl=Dp[Ep],Pt=[];Nt.push(Pt);if(bl.visible)for(var yw=bl.interval,Fp=0;Fpyw&&Pt.push(Qt)}}}this.qk=Nt}Mt=this.qk;var Rt=this.xa.o,zw=Rt.length,Ih=0,St=0,Tt=yi;this.Xm=[];for(var zm=[],Am=0;AmVt*Ut*yi/this.Du)){var ee=this.UF,Wt=Mt[Am],zi=Ij[0][0],Tf= -0,Dd=0,St=yi*Jh.TF-1E-4,Tt=yi*Jh.RF+1E-4,Lj=Vt*Ut;if(eethis.bl+Lj&&(Ai=Math.floor((ee-this.bl)/Lj),ee-=Ai*Lj);for(;ee<=this.gB;){var Gp;a:{for(var Aw=Wt.length,Hp=0;Hpyi&&(Ih=yi),St<=Ih&&Ih<=Tt)){for(var Cd=Jj[Tf][Dd],Mj=Ij[Tf][Dd];Tfzi&&DdBm?0Gm;Gm++){switch(Gm){case 0:fe.n(Dm,Em);break;case 1:fe.n(Dm+Lp,Em);break;case 2:fe.n(Dm,Em+Mp);break;case 3:fe.n(Dm+Lp,Em+Mp)}fe.rotate(du+Lh.angle);fe.offset(bu,cu);0===Fm&&0===Gm?Ci.n(fe.x,fe.y,0,0):Ci.Mi(fe);fe.offset(-bu,-cu);fe.rotate(-du-Lh.angle)}D.A(fe);this.Vm.push(Ci);Ub(Dw,Ci.x,Ci.y,Ci.width,Ci.height)}else if(Bi instanceof -pa){var Hm=Bi,eu=Jp,Gw=e;null===this.Jk&&(this.Jk=new pa);var Uf=this.Jk;rp(Hm,Uf);var Op=Hm.Gh;Op.ee()&&(Op=jc);for(var Mh=Hm.Uq,Hw=Hm.XB,Di=null,Im=0,Jm=0,Wg=0,Pp=0,Iw=eu.length,Km=0;KmWg||225Wg)&&Xg.rotate(-Wg,Pj/2,Qj/2);var fu=D.vg(0,0,Pj,Qj),dl=D.P();dl.vo(fu,Op);Xg.vb(dl);var Jw=-dl.x,Kw=-dl.y,Yg=D.P();Yg.assign(Hw);isNaN(Yg.x)&&(Yg.x=Pj/2+3);isNaN(Yg.y)&&(Yg.y=-(Qj/2+3));Yg.rotate(Wg);var Im=Im+(Yg.x+Jw),Jm=Jm+(Yg.y+Kw),Qp=new C(Im,Jm,Nh.width,Nh.height),Lw=new C(Nh.x,Nh.y,Nh.width,Nh.height),Mw=new C(Oj.x,Oj.y,Oj.width,Oj.height),gu=new bq;gu.gq(Uf.uf);sg.push(Pp);sg.push(Uf.xe); -sg.push(gu);sg.push(Qp);sg.push(Lw);sg.push(Mw);0===Km?Di=Qp.copy():Di.Zh(Qp);D.A(Yg);D.A(dl);D.Lb(fu);D.nf(Xg)}this.Vm.push(Di);Ub(Gw,Di.x,Di.y,Di.width,Di.height)}lm(Bi,!1)}}break;case "TableRow":case "TableColumn":D.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:D.k("Unknown panel type: "+n)}}var rf=e.width,sf=e.height,Lm=this.padding,Nw=Lm.top+Lm.bottom,rf=rf+(Lm.left+Lm.right),sf=sf+Nw;isFinite(g.width)&& -(rf=g.width);isFinite(g.height)&&(sf=g.height);rf=Math.min(k.width,rf);sf=Math.min(k.height,sf);rf=Math.max(h.width,rf);sf=Math.max(h.height,sf);rf=Math.max(c,rf);sf=Math.max(d,sf);e.width=rf;e.height=sf;Cb(this.fd,rf,sf);Jo(this,0,0,rf,sf)};x.prototype.findMainElement=x.prototype.Md=function(){if(null===this.Yl){var a=this.xa.o,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.K(),Ik(this,n>c?c:n,p>d?d:p);break;case Ye:this.K(!0);Ik(this,c+r,d+s,0,0);break;case yo:this.K(!0);Ik(this,c+r,p+s,0,0);break;case xo:this.K(!0),Ik(this,n+r,d+s,0,0)}}k=this.aa;k.x=a;k.y= +0,Rg=0,Tb=Lo(this,!0),Dj=this.Ea,Ok=this.rf,ye=Fb=Gc=0,dd=0,Jb=this.fq,ka=0;kati)Hk(Yb,Infinity,Infinity),ze=Yb.Ia,pf.Zh(ze),this.oh.add(ze);else{var Bd=Yb.We,At=Yb.WB,vp=Yb.Gh;vp.ee()&&(vp=mc);var qg=Yb.Uq,jw=Yb.XB,Uk=0,Vk=0,xm=0;if(Bd<-ti||Bd>=ti){var Bt=Sk.wG,Sf=Sk.vG;qg!==vj&&(xm=Sk.computeAngle(Yb,qg,Sf),Yb.wg=xm);Uk=Bt.x-Sg.x;Vk=Bt.y-Sg.y}else{var Qd, +qf;if(0<=Bd)Qd=Hh.fa(Bd),qf=BdDt+10?0<=Bd?vi.Xb(Qd):Qd.Xb(vi):Dt>Ct+10?0<=Bd?qf.Xb(wi):wi.Xb(qf):0<=Bd?vi.Xb(wi):wi.Xb(vi)}else Sf=0<=Bd?Qd.Xb(qf):qf.Xb(Qd);qg!==vj&&(xm=Sk.computeAngle(Yb,qg,Sf),Yb.wg=xm);Uk=Qd.x+(qf.x-Qd.x)*At-Sg.x;Vk=Qd.y+(qf.y-Qd.y)*At-Sg.y}Hk(Yb, +Infinity,Infinity);var ze=Yb.Ia,vm=Yb.Fa,Wk=0;Yb instanceof z&&(Wk=Yb.mb);var xi=vm.width+Wk,Fj=vm.height+Wk;Tg.reset();Tg.translate(-ze.x,-ze.y);Tg.scale(Yb.scale,Yb.scale);Tg.rotate(qg===vj?Yb.angle:Sf,xi/2,Fj/2);qg!==Wp&&qg!==Xp||Tg.rotate(90,xi/2,Fj/2);qg!==Yp&&qg!==Zp||Tg.rotate(-90,xi/2,Fj/2);qg===$p&&(45Sf||225Sf)&&Tg.rotate(-Sf,xi/2,Fj/2);var Gj=new C(0,0,xi,Fj);Tk.vo(Gj,vp);Tg.vb(Tk);var kw=-Tk.x+Wk/2*Yb.scale,lw=-Tk.y+Wk/2*Yb.scale;Ug.assign(jw);isNaN(Ug.x)&&(Ug.x=0<=Bd? +xi/2+3:-(xi/2+3));isNaN(Ug.y)&&(Ug.y=-(Fj/2+3));Ug.rotate(Sf);Uk+=Ug.x;Vk+=Ug.y;Gj.set(ze);Gj.x=Uk+kw;Gj.y=Vk+lw;this.oh.add(Gj);pf.Zh(Gj)}}if(this instanceof J)for(var Et=this.Cf;Et.next();)Hk(Et.value,Infinity,Infinity);this.yj=pf;var wp=this.jj;wp.n(wp.x+pf.x,wp.y+pf.y);Cb(e,pf.width||0,pf.height||0);D.nf(Tg);D.A(Tk);D.A(Ug)}}}break;case "Grid":break;case "Graduated":var mw=a,nw=b,ow=c,pw=d,Vg=this.Md();this.Vm=[];var Hj=Vg.margin,qw=Hj.right+Hj.left,rw=Hj.top+Hj.bottom;Hk(Vg,mw,nw,ow,pw);var Ft= +Vg.Ia,sw=Ft.height,tw=Math.max(Ft.width+qw,0),uw=Math.max(sw+rw,0),Gt=new C(-Hj.left,-Hj.top,tw,uw);this.Vm.push(Gt);e.assign(Gt);for(var al=Vg.xf,Ht=Vg.mb,xp=al.$x,Ij=al.uu,yi=al.vu,vw=xp.length,yp=0,zp=0,Jj=D.nb(),Ap=0;ApCd&&(Cd+=360);It.push(Cd)}yp=Jt;zp=Kt}Jj.push(It)}var Lt;if(null===this.qk){for(var Mt=[],Cp=this.xa.o,Nt=Cp.length,Dp=0;Dp< +Nt;Dp++){var bl=Cp[Dp],Ot=[];Mt.push(Ot);if(bl.visible)for(var xw=bl.interval,Ep=0;Epxw&&Ot.push(Pt)}}}this.qk=Mt}Lt=this.qk;var Qt=this.xa.o,yw=Qt.length,Ih=0,Rt=0,St=yi;this.Xm=[];for(var zm=[],Am=0;AmUt*Tt*yi/this.Du)){var ee=this.UF,Vt=Lt[Am],zi=Ij[0][0],Tf= +0,Dd=0,Rt=yi*Jh.TF-1E-4,St=yi*Jh.RF+1E-4,Lj=Ut*Tt;if(eethis.bl+Lj&&(Ai=Math.floor((ee-this.bl)/Lj),ee-=Ai*Lj);for(;ee<=this.gB;){var Fp;a:{for(var zw=Vt.length,Gp=0;Gpyi&&(Ih=yi),Rt<=Ih&&Ih<=St)){for(var Cd=Jj[Tf][Dd],Mj=Ij[Tf][Dd];Tfzi&&DdBm?0Gm;Gm++){switch(Gm){case 0:fe.n(Dm,Em);break;case 1:fe.n(Dm+Kp,Em);break;case 2:fe.n(Dm,Em+Lp);break;case 3:fe.n(Dm+Kp,Em+Lp)}fe.rotate(cu+Lh.angle);fe.offset(au,bu);0===Fm&&0===Gm?Ci.n(fe.x,fe.y,0,0):Ci.Mi(fe);fe.offset(-au,-bu);fe.rotate(-cu-Lh.angle)}D.A(fe);this.Vm.push(Ci);Ub(Cw,Ci.x,Ci.y,Ci.width,Ci.height)}else if(Bi instanceof +pa){var Hm=Bi,du=Ip,Fw=e;null===this.Jk&&(this.Jk=new pa);var Uf=this.Jk;qp(Hm,Uf);var Np=Hm.Gh;Np.ee()&&(Np=jc);for(var Mh=Hm.Uq,Gw=Hm.XB,Di=null,Im=0,Jm=0,Wg=0,Op=0,Hw=du.length,Km=0;KmWg||225Wg)&&Xg.rotate(-Wg,Pj/2,Qj/2);var eu=D.vg(0,0,Pj,Qj),dl=D.P();dl.vo(eu,Np);Xg.vb(dl);var Iw=-dl.x,Jw=-dl.y,Yg=D.P();Yg.assign(Gw);isNaN(Yg.x)&&(Yg.x=Pj/2+3);isNaN(Yg.y)&&(Yg.y=-(Qj/2+3));Yg.rotate(Wg);var Im=Im+(Yg.x+Iw),Jm=Jm+(Yg.y+Jw),Pp=new C(Im,Jm,Nh.width,Nh.height),Kw=new C(Nh.x,Nh.y,Nh.width,Nh.height),Lw=new C(Oj.x,Oj.y,Oj.width,Oj.height),fu=new aq;fu.gq(Uf.uf);sg.push(Op);sg.push(Uf.xe); +sg.push(fu);sg.push(Pp);sg.push(Kw);sg.push(Lw);0===Km?Di=Pp.copy():Di.Zh(Pp);D.A(Yg);D.A(dl);D.Lb(eu);D.nf(Xg)}this.Vm.push(Di);Ub(Fw,Di.x,Di.y,Di.width,Di.height)}km(Bi,!1)}}break;case "TableRow":case "TableColumn":D.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:D.k("Unknown panel type: "+n)}}var rf=e.width,sf=e.height,Lm=this.padding,Mw=Lm.top+Lm.bottom,rf=rf+(Lm.left+Lm.right),sf=sf+Mw;isFinite(g.width)&& +(rf=g.width);isFinite(g.height)&&(sf=g.height);rf=Math.min(k.width,rf);sf=Math.min(k.height,sf);rf=Math.max(h.width,rf);sf=Math.max(h.height,sf);rf=Math.max(c,rf);sf=Math.max(d,sf);e.width=rf;e.height=sf;Cb(this.fd,rf,sf);Io(this,0,0,rf,sf)};x.prototype.findMainElement=x.prototype.Md=function(){if(null===this.Yl){var a=this.xa.o,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.K(),Hk(this,n>c?c:n,p>d?d:p);break;case Xe:this.K(!0);Hk(this,c+r,d+s,0,0);break;case xo:this.K(!0);Hk(this,c+r,p+s,0,0);break;case wo:this.K(!0),Hk(this,n+r,d+s,0,0)}}k=this.aa;k.x=a;k.y= b;k.width=c;k.height=d;var u=this.da.ac;switch(u){case "Position":for(var t=g.length,y=e.x-this.padding.left,w=e.y-this.padding.top,A=0;A=this.Tq);Me++){var ki=this.pe(ob+Me);ve.height+=ki.total}for(Me=1;Me=this.fq);Me++){var li=this.oe(bd+Me);ve.width+=li.total}var Aj=Mf.Ya+ve.width,Bj=cf.Ya+ve.height;h.x=Nd;h.y=gc;h.width=Aj;h.height=Bj;var Jb=Nd,Bh=gc,Ch=Aj,ka=Bj;Nd+Aj>e.width&&(Ch=Math.max(e.width-Nd,0));gc+Bj>e.height&&(ka=Math.max(e.height-gc,0));var ba=Bb.alignment,ic=0,mg=0,mi=0,Kb=0;if(ba.ld()){ba=this.pm;ba.Xc()||(ba=mc);var ic=ba.x,mg=ba.y,mi= -ba.offsetX,Kb=ba.offsetY,ni=Mf.alignment,Xb=cf.alignment;ni.Xc()&&(ic=ni.x,mi=ni.offsetX);Xb.Xc()&&(mg=Xb.y,Kb=Xb.offsetY)}else ic=ba.x,mg=ba.y,mi=ba.offsetX,Kb=ba.offsetY;if(isNaN(ic)||isNaN(mg))mg=ic=.5,Kb=mi=0;var df=de.width,Ne=de.height,ef=Bb.margin,we=ef.left+ef.right,xe=ef.top+ef.bottom,cd=$o(Bb,cf,Mf,!1);!isNaN(Bb.Ea.width)||cd!==Ye&&cd!==yo||(df=Math.max(Aj-we,0));!isNaN(Bb.Ea.height)||cd!==Ye&&cd!==xo||(Ne=Math.max(Bj-xe,0));var Od=Bb.rf,Dh=Bb.ah,df=Math.min(Od.width,df),Ne=Math.min(Od.height, -Ne),df=Math.max(Dh.width,df),Ne=Math.max(Dh.height,Ne),Z=Ne+xe;h.x+=h.width*ic-(df+we)*ic+mi+ef.left;h.y+=h.height*mg-Z*mg+Kb+ef.top;Bb.visible&&(Vb(Jb,Bh,Ch,ka,h.x,h.y,de.width,de.height)?Bb.rc(h.x,h.y,df,Ne):Bb.rc(h.x,h.y,df,Ne,new C(Jb,Bh,Ch,ka)))}else{Bb.cj();Bb.cc.Xa();var nd=Bb.cc,ng=D.vg(nd.x,nd.y,nd.width,nd.height);nd.x=md.type===Ro?zh:Nd;nd.y=md.type===So?Kg:gc;nd.width=de.width;nd.height=de.height;Bb.cc.freeze();No(Bb,!1);if(!Db(ng,nd)){var oi=Bb.Y;null!==oi&&(oi.dl(),Bb.$s(oi))}D.Lb(ng)}}}}D.$k(ve); -for(ob=0;ob=this.Tq);Me++){var ki=this.pe(ob+Me);ve.height+=ki.total}for(Me=1;Me=this.fq);Me++){var li=this.oe(bd+Me);ve.width+=li.total}var Aj=Mf.Ya+ve.width,Bj=cf.Ya+ve.height;h.x=Nd;h.y=gc;h.width=Aj;h.height=Bj;var Jb=Nd,Bh=gc,Ch=Aj,ka=Bj;Nd+Aj>e.width&&(Ch=Math.max(e.width-Nd,0));gc+Bj>e.height&&(ka=Math.max(e.height-gc,0));var ba=Bb.alignment,ic=0,mg=0,mi=0,Kb=0;if(ba.ld()){ba=this.pm;ba.Xc()||(ba=mc);var ic=ba.x,mg=ba.y,mi= +ba.offsetX,Kb=ba.offsetY,ni=Mf.alignment,Xb=cf.alignment;ni.Xc()&&(ic=ni.x,mi=ni.offsetX);Xb.Xc()&&(mg=Xb.y,Kb=Xb.offsetY)}else ic=ba.x,mg=ba.y,mi=ba.offsetX,Kb=ba.offsetY;if(isNaN(ic)||isNaN(mg))mg=ic=.5,Kb=mi=0;var df=de.width,Ne=de.height,ef=Bb.margin,we=ef.left+ef.right,xe=ef.top+ef.bottom,cd=Zo(Bb,cf,Mf,!1);!isNaN(Bb.Ea.width)||cd!==Xe&&cd!==xo||(df=Math.max(Aj-we,0));!isNaN(Bb.Ea.height)||cd!==Xe&&cd!==wo||(Ne=Math.max(Bj-xe,0));var Od=Bb.rf,Dh=Bb.ah,df=Math.min(Od.width,df),Ne=Math.min(Od.height, +Ne),df=Math.max(Dh.width,df),Ne=Math.max(Dh.height,Ne),Z=Ne+xe;h.x+=h.width*ic-(df+we)*ic+mi+ef.left;h.y+=h.height*mg-Z*mg+Kb+ef.top;Bb.visible&&(Vb(Jb,Bh,Ch,ka,h.x,h.y,de.width,de.height)?Bb.rc(h.x,h.y,df,Ne):Bb.rc(h.x,h.y,df,Ne,new C(Jb,Bh,Ch,ka)))}else{Bb.cj();Bb.cc.Xa();var nd=Bb.cc,ng=D.vg(nd.x,nd.y,nd.width,nd.height);nd.x=md.type===Qo?zh:Nd;nd.y=md.type===Ro?Kg:gc;nd.width=de.width;nd.height=de.height;Bb.cc.freeze();Mo(Bb,!1);if(!Db(ng,nd)){var oi=Bb.Y;null!==oi&&(oi.dl(),Bb.$s(oi))}D.Lb(ng)}}}}D.$k(ve); +for(ob=0;ob=pg){var Og=this.wG,tb=this.vG;Cj!==wj&&(Ng=this.computeAngle(sc,Cj,tb),sc.angle=Ng);Mg=Og.x;Qf=Og.y}else{var ac=void 0,Hc=void 0;if(0<=Fb)ac=Gc.o[Fb],Hc=Fbfb+10?0<=Fb?Pd.Xb(ac):ac.Xb(Pd):fb>lf+10?0<=Fb?Hc.Xb(Ad):Ad.Xb(Hc):0<=Fb?Pd.Xb(Ad):Ad.Xb(Pd)}else tb=0<=Fb?ac.Xb(Hc):Hc.Xb(ac);Cj!==wj&&(Ng=this.computeAngle(sc,Cj,tb),sc.angle=Ng);Mg=ac.x+(Hc.x-ac.x)*qi;Qf=ac.y+(Hc.y-ac.y)*qi}if(Lg.O(dc))sc.location=new N(Mg,Qf);else{Lg.ee()&&(Lg=mc);var mf=D.hh();mf.reset();mf.scale(sc.scale,sc.scale);mf.rotate(sc.angle,0,0);var od=sc.Fa,Pg=D.vg(0,0,od.width,od.height),nf=D.P();nf.vo(Pg, -Lg);mf.vb(nf);var Ic=-nf.x,Rf=-nf.y,Oe=up.copy();isNaN(Oe.x)&&(Oe.x=0<=Fb?nf.x+3:-(nf.x+3));isNaN(Oe.y)&&(Oe.y=-(nf.y+3));Oe.rotate(tb);Mg+=Oe.x;Qf+=Oe.y;mf.sH(Pg);var Ic=Ic+Pg.x,Rf=Rf+Pg.y,Qg=D.Fb(Mg+Ic,Qf+Rf);sc.move(Qg);D.A(Qg);D.A(nf);D.Lb(Pg);D.nf(mf)}}this.Wu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Vm){var Rg=this.Md(),Dj=this.Xm,Ok=this.Vm,ye=0,dd=Ok[ye];ye++;Rg.rc(dd.x-e.x,dd.y-e.y,dd.width,dd.height);for(var Pk=g.length,Gh=0;Gh=pg){var Og=this.wG,tb=this.vG;Cj!==vj&&(Ng=this.computeAngle(sc,Cj,tb),sc.angle=Ng);Mg=Og.x;Qf=Og.y}else{var ac=void 0,Hc=void 0;if(0<=Fb)ac=Gc.o[Fb],Hc=Fbfb+10?0<=Fb?Pd.Xb(ac):ac.Xb(Pd):fb>lf+10?0<=Fb?Hc.Xb(Ad):Ad.Xb(Hc):0<=Fb?Pd.Xb(Ad):Ad.Xb(Pd)}else tb=0<=Fb?ac.Xb(Hc):Hc.Xb(ac);Cj!==vj&&(Ng=this.computeAngle(sc,Cj,tb),sc.angle=Ng);Mg=ac.x+(Hc.x-ac.x)*qi;Qf=ac.y+(Hc.y-ac.y)*qi}if(Lg.O(dc))sc.location=new N(Mg,Qf);else{Lg.ee()&&(Lg=mc);var mf=D.hh();mf.reset();mf.scale(sc.scale,sc.scale);mf.rotate(sc.angle,0,0);var od=sc.Fa,Pg=D.vg(0,0,od.width,od.height),nf=D.P();nf.vo(Pg, +Lg);mf.vb(nf);var Ic=-nf.x,Rf=-nf.y,Oe=tp.copy();isNaN(Oe.x)&&(Oe.x=0<=Fb?nf.x+3:-(nf.x+3));isNaN(Oe.y)&&(Oe.y=-(nf.y+3));Oe.rotate(tb);Mg+=Oe.x;Qf+=Oe.y;mf.sH(Pg);var Ic=Ic+Pg.x,Rf=Rf+Pg.y,Qg=D.Fb(Mg+Ic,Qf+Rf);sc.move(Qg);D.A(Qg);D.A(nf);D.Lb(Pg);D.nf(mf)}}this.Wu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Vm){var Rg=this.Md(),Dj=this.Xm,Ok=this.Vm,ye=0,dd=Ok[ye];ye++;Rg.rc(dd.x-e.x,dd.y-e.y,dd.width,dd.height);for(var Pk=g.length,Gh=0;Ghq.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof x?n:null;q=D.hh();q.set(h);if(null!==n?n.Yk(a,b,c,d,e,q):Lo(p,a,d, -q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);D.nf(q)}}}void 0===g&&D.nf(h);return d}void 0===g&&D.nf(h);return!1};function gq(a,b,c,d){for(var e=a.xa.o,g=e.length;g--;){var h=e[g];if(h.visible){var k=h.aa,l=a.Fa;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof x&&gq(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} +f.Yk=function(a,b,c,d,e,g){if(!1===this.tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.hh(),h.reset());h.multiply(this.transform);if(this.Kn(a,h))return fq(this,b,c,e),void 0===g&&D.nf(h),!0;if(this.jg(a,h)){if(!this.$n)for(var k=Qp(this),l=this.xa.o,m=l.length;m--;){var n=l[m];if(n.visible||n===k){var p=n.aa,q=this.Fa;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof x?n:null;q=D.hh();q.set(h);if(null!==n?n.Yk(a,b,c,d,e,q):Ko(p,a,d, +q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);D.nf(q)}}}void 0===g&&D.nf(h);return d}void 0===g&&D.nf(h);return!1};function fq(a,b,c,d){for(var e=a.xa.o,g=e.length;g--;){var h=e[g];if(h.visible){var k=h.aa,l=a.Fa;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof x&&fq(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} f.Rn=function(a,b,c,d,e,g){if(!1===this.tg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Fa,k=this.kh(),l=k?a:kb(D.Fb(a.x,a.y),this.transform),m=k?b:kb(D.Fb(b.x,b.y),this.transform),n=l.Kf(m),p=0t.width||u.y>t.height||0>u.x+u.width||0>u.y+u.height))if(s.kh()?(u=s.transform,kb(l.set(a),u),kb(m.set(b),u)):(l.set(a),m.set(b)),u=s,s=s instanceof x?s:null,null!==s?s.Rn(l,m,c,d,e,g):u.IF(l,m,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||g.add(u)}}D.A(l); -D.A(m)}return e?p:h}return!1};function Sp(a){var b=null;a instanceof z&&(b=a.C,b===Vc&&(b=null),a=a.xf,null!==a&&null===b&&(b=a.C));null===b&&(b=ec);return b}function Tp(a){var b=null;a instanceof z&&(b=a.D,b===Vc&&(b=null),a=a.xf,null!==a&&null===b&&(b=a.D));null===b&&(b=vc);return b}x.prototype.add=x.prototype.add=function(a){D.l(a,O,x,"add:element");this.ce(this.xa.count,a)};x.prototype.elt=x.prototype.fa=function(a){return this.xa.fa(a)}; +n&&lb(l.x,l.y,h.width,h.height,h.width,0)t.width||u.y>t.height||0>u.x+u.width||0>u.y+u.height))if(s.kh()?(u=s.transform,kb(l.set(a),u),kb(m.set(b),u)):(l.set(a),m.set(b)),u=s,s=s instanceof x?s:null,null!==s?s.Rn(l,m,c,d,e,g):u.IF(l,m,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||g.add(u)}}D.A(l); +D.A(m)}return e?p:h}return!1};function Rp(a){var b=null;a instanceof z&&(b=a.C,b===Vc&&(b=null),a=a.xf,null!==a&&null===b&&(b=a.C));null===b&&(b=ec);return b}function Sp(a){var b=null;a instanceof z&&(b=a.D,b===Vc&&(b=null),a=a.xf,null!==a&&null===b&&(b=a.D));null===b&&(b=vc);return b}x.prototype.add=x.prototype.add=function(a){D.l(a,O,x,"add:element");this.ce(this.xa.count,a)};x.prototype.elt=x.prototype.fa=function(a){return this.xa.fa(a)}; x.prototype.insertAt=x.prototype.ce=function(a,b){b instanceof F&&D.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.ym(b))this===b&&D.k("Cannot make a Panel contain itself: "+this.toString()),D.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.R;null!==c&&c!==this&&D.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ -this.toString());this.da!==Tl||b instanceof z||D.k("Can only add Shapes to a Grid Panel, not: "+b);this.da!==pp||b instanceof z||b instanceof pa||D.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.Dm(this);b.on=null;if(null!==this.fl){var d=b.data;null!==d&&"object"===typeof d&&(null===this.Hg&&(this.Hg=new na(Object,x)),this.Hg.add(d,b))}var e=this.xa,d=-1;if(c===this){for(var g=-1,h=this.xa.o,k=h.length,l=0;l=e.count&& -a>=e.count)return;e.pd(g);d=g}else D.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.ce(a,b);if(0===a||b.Ve)this.Yl=null;this.K();b.K();null!==b.yd?this.cl=!0:b instanceof x&&!0===b.cl&&(this.cl=!0);this.qk=null;c=this.Y;null!==c&&(c.Tl=null,c.Ak=NaN,this.cl&&c instanceof G&&(c.cl=!0),c.cl&&c instanceof G&&(c.Ae=null),e=this.g,null!==e&&e.na.ub||(-1!==d&&c.od(ig,"elements",this,b,null,d,null),c.od(hg,"elements",this,null,b,null,a), -this.Ju()||hq(this,b,!1)))};D.defineProperty(x,{cl:null},function(){return 0!==(this.S&8388608)},function(a){0!==(this.S&8388608)!==a&&(this.S^=8388608)});function iq(a,b){a.S=b?a.S|16777216:a.S&-16777217}x.prototype.remove=x.prototype.remove=function(a){D.l(a,O,x,"remove:element");for(var b=this.xa.o,c=b.length,d=-1,e=0;ea&&D.ua(a,">= 0",x,"getRowDefinition:idx");a=Math.round(a);var b=this.hd;if(void 0===b[a]){var c=new jh;c.Dm(this);c.Ke=!0;c.index=a;b[a]=c}return b[a]};x.prototype.removeRowDefinition=x.prototype.KG=function(a){v&&D.p(a,x,"removeRowDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeRowDefinition:idx");a=Math.round(a);var b=this.hd;this.od(ig,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; -D.w(x,{fq:"columnCount"},function(){return void 0===this.cd?0:this.cd.length});x.prototype.getColumnDefinition=x.prototype.oe=function(a){v&&D.p(a,x,"getColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"getColumnDefinition:idx");a=Math.round(a);var b=this.cd;if(void 0===b[a]){var c=new jh;c.Dm(this);c.Ke=!1;c.index=a;b[a]=c}return b[a]}; -x.prototype.removeColumnDefinition=x.prototype.IG=function(a){v&&D.p(a,x,"removeColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeColumnDefinition:idx");a=Math.round(a);var b=this.cd;this.od(ig,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; -D.defineProperty(x,{lK:"rowSizing"},function(){return void 0===this.rn?op:this.rn},function(a){if(void 0!==this.rn){var b=this.rn;b!==a&&(a!==op&&a!==Vp&&D.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.rn=a,this.K(),this.i("rowSizing",b,a))}}); -D.defineProperty(x,{iI:"columnSizing"},function(){return void 0===this.Rm?op:this.Rm},function(a){if(void 0!==this.Rm){var b=this.Rm;b!==a&&(a!==op&&a!==Vp&&D.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Rm=a,this.K(),this.i("columnSizing",b,a))}}); +this.toString());this.da!==Sl||b instanceof z||D.k("Can only add Shapes to a Grid Panel, not: "+b);this.da!==op||b instanceof z||b instanceof pa||D.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.Dm(this);b.on=null;if(null!==this.fl){var d=b.data;null!==d&&"object"===typeof d&&(null===this.Hg&&(this.Hg=new na(Object,x)),this.Hg.add(d,b))}var e=this.xa,d=-1;if(c===this){for(var g=-1,h=this.xa.o,k=h.length,l=0;l=e.count&& +a>=e.count)return;e.pd(g);d=g}else D.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.ce(a,b);if(0===a||b.Ve)this.Yl=null;this.K();b.K();null!==b.yd?this.cl=!0:b instanceof x&&!0===b.cl&&(this.cl=!0);this.qk=null;c=this.Y;null!==c&&(c.Tl=null,c.Ak=NaN,this.cl&&c instanceof G&&(c.cl=!0),c.cl&&c instanceof G&&(c.Ae=null),e=this.g,null!==e&&e.na.ub||(-1!==d&&c.od(hg,"elements",this,b,null,d,null),c.od(gg,"elements",this,null,b,null,a), +this.Ju()||gq(this,b,!1)))};D.defineProperty(x,{cl:null},function(){return 0!==(this.S&8388608)},function(a){0!==(this.S&8388608)!==a&&(this.S^=8388608)});function hq(a,b){a.S=b?a.S|16777216:a.S&-16777217}x.prototype.remove=x.prototype.remove=function(a){D.l(a,O,x,"remove:element");for(var b=this.xa.o,c=b.length,d=-1,e=0;ea&&D.ua(a,">= 0",x,"getRowDefinition:idx");a=Math.round(a);var b=this.hd;if(void 0===b[a]){var c=new ih;c.Dm(this);c.Ke=!0;c.index=a;b[a]=c}return b[a]};x.prototype.removeRowDefinition=x.prototype.KG=function(a){v&&D.p(a,x,"removeRowDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeRowDefinition:idx");a=Math.round(a);var b=this.hd;this.od(hg,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; +D.w(x,{fq:"columnCount"},function(){return void 0===this.cd?0:this.cd.length});x.prototype.getColumnDefinition=x.prototype.oe=function(a){v&&D.p(a,x,"getColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"getColumnDefinition:idx");a=Math.round(a);var b=this.cd;if(void 0===b[a]){var c=new ih;c.Dm(this);c.Ke=!1;c.index=a;b[a]=c}return b[a]}; +x.prototype.removeColumnDefinition=x.prototype.IG=function(a){v&&D.p(a,x,"removeColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeColumnDefinition:idx");a=Math.round(a);var b=this.cd;this.od(hg,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; +D.defineProperty(x,{lK:"rowSizing"},function(){return void 0===this.rn?np:this.rn},function(a){if(void 0!==this.rn){var b=this.rn;b!==a&&(a!==np&&a!==Up&&D.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.rn=a,this.K(),this.i("rowSizing",b,a))}}); +D.defineProperty(x,{iI:"columnSizing"},function(){return void 0===this.Rm?np:this.Rm},function(a){if(void 0!==this.Rm){var b=this.Rm;b!==a&&(a!==np&&a!==Up&&D.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Rm=a,this.K(),this.i("columnSizing",b,a))}}); D.defineProperty(x,{pH:"topIndex"},function(){return void 0===this.xj?0:this.xj},function(a){if(void 0!==this.xj){var b=this.xj;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.xj=a,this.K(),this.i("topIndex",b,a))}}); D.defineProperty(x,{rG:"leftIndex"},function(){return void 0===this.hj?0:this.hj},function(a){if(void 0!==this.hj){var b=this.hj;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.hj=a,this.K(),this.i("leftIndex",b,a))}});x.prototype.findRowForLocalY=function(a){if(0>a||this.type!==fa)return-1;for(var b=0,c=this.hd,d=c.length,e=this.xj;ea||this.type!==fa)return-1;for(var b=0,c=this.cd,d=c.length,e=this.hj;e=c.elements.count&&!(c instanceof F)){if(1===c.elements.count){var d=null!==c.fl;if(!d)for(var e=b.j;e.next();)if("itemArray"=== -e.value.tv){d=!0;break}}d||(D.trace("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),jq=!0)}}))}var jq=!1;x.prototype.copyTemplate=function(){var a=this.copy();a.LK(function(a){a instanceof x&&(a.Al=null,a.Ud=null);var c=a.Hc;null!==c&&(a.Hc=null,c.each(function(c){a.bind(c.copy())}))});return a}; +x.prototype.findColumnForLocalX=function(a){if(0>a||this.type!==fa)return-1;for(var b=0,c=this.cd,d=c.length,e=this.hj;e=c.elements.count&&!(c instanceof F)){if(1===c.elements.count){var d=null!==c.fl;if(!d)for(var e=b.j;e.next();)if("itemArray"=== +e.value.tv){d=!0;break}}d||(D.trace("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),iq=!0)}}))}var iq=!1;x.prototype.copyTemplate=function(){var a=this.copy();a.LK(function(a){a instanceof x&&(a.Al=null,a.Ud=null);var c=a.Hc;null!==c&&(a.Hc=null,c.each(function(c){a.bind(c.copy())}))});return a}; x.prototype.updateTargetBindings=x.prototype.Ob=function(a){var b=this.Al;if(null!==b)for(void 0===a&&(a=""),b=b.j;b.next();){var c=b.value,d=c.fH;if(""===a||""===d||d===a)if(d=c.tv,null!==c.oI||""!==d){var d=this.data,e=c.$q;if(null!==e)d=""===e?this:"/"===e?this:"."===e?this:".."===e?this:this.Nd(e);else{var g=this.g;null!==g&&c.ly&&(d=g.ea.gl)}if(null===d)v&&D.trace("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var g=this,h=c.Hm;if(-1!==h){if(g=this.Wx(h),null===g)continue}else null!== c.Sg&&(g=c.Sg);"/"===e?d=g.Y:"."===e?d=g:".."===e&&(d=g.R);e=c.Pt;if(0!==e){if(!(g instanceof x))continue;h=g;1===e?g=h.oe(c.Tp):2===e&&(g=h.pe(c.Tp))}void 0!==g&&c.vH(g,d)}}}}; -D.defineProperty(x,{fl:"itemArray"},function(){return this.ej},function(a){var b=this.ej;if(b!==a){v&&null!==a&&!D.isArray(a)&&D.k("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.g;null!==c&&null!==b&&cn(c,this);this.ej=a;null!==c&&null!==a&&Zm(c,this);this.i("itemArray",b,a);null!==c&&c.na.ub||this.PB()}});function vn(a){return a.type===Yj||a.type===Ql||a.type===tj||a.type===fa&&0a;)this.Af(this.xa.length-1,!1);a=this.fl;if(null!==a)for(var b=D.cb(a),c=0;cc)){var d;d=kq(a,b);var e=a.vJ,g=null;null!==e&&(g=e.oa(d));null===g&&(lq||(lq=!0,D.trace('No item template Panel found for category "'+d+'" on '+a),D.trace(" Using default item template."),d=new x,e=new pa,e.bind(new ph("text","",ia)),d.add(e),mq=d),g=mq);d=g;null!==d&&(Th(d),d=d.copy(),0!==(d.S&16777216)&&(e=a.rm(),null!==e&&iq(e,!0)),"object"===typeof b&&(null===a.Hg&&(a.Hg=new na(Object,x)),a.Hg.add(b,d)),e=c,vn(a)&&e++,a.ce(e,d),d.Ud=b,wn(a,e, -c),d.Ud=null,d.data=b)}}function wn(a,b,c){for(a=a.xa;ba;)this.Af(this.xa.length-1,!1);a=this.fl;if(null!==a)for(var b=D.cb(a),c=0;cc)){var d;d=jq(a,b);var e=a.vJ,g=null;null!==e&&(g=e.oa(d));null===g&&(kq||(kq=!0,D.trace('No item template Panel found for category "'+d+'" on '+a),D.trace(" Using default item template."),d=new x,e=new pa,e.bind(new oh("text","",ia)),d.add(e),lq=d),g=lq);d=g;null!==d&&(Sh(d),d=d.copy(),0!==(d.S&16777216)&&(e=a.rm(),null!==e&&hq(e,!0)),"object"===typeof b&&(null===a.Hg&&(a.Hg=new na(Object,x)),a.Hg.add(b,d)),e=c,un(a)&&e++,a.ce(e,d),d.Ud=b,vn(a,e, +c),d.Ud=null,d.data=b)}}function vn(a,b,c){for(a=a.xa;ba&&D.ua(a,">= 0",jh,"height"),this.wf=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("height",b,a))});D.defineProperty(jh,{width:"width"},function(){return this.wf},function(a){var b=this.wf;b!==a&&(v&&D.h(a,"number",jh,"width"),0>a&&D.ua(a,">= 0",jh,"width"),this.wf=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("width",b,a))}); -D.defineProperty(jh,{Th:"minimum"},function(){return this.Ck},function(a){var b=this.Ck;b!==a&&(v&&D.h(a,"number",jh,"minimum"),(0>a||!isFinite(a))&&D.ua(a,">= 0",jh,"minimum"),this.Ck=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("minimum",b,a))});D.defineProperty(jh,{te:"maximum"},function(){return this.Bk},function(a){var b=this.Bk;b!==a&&(v&&D.h(a,"number",jh,"maximum"),0>a&&D.ua(a,">= 0",jh,"maximum"),this.Bk=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("maximum",b,a))}); -D.defineProperty(jh,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.O(a)||(v&&D.l(a,S,jh,"alignment"),this.ue=a.V(),null!==this.R&&this.R.K(),this.vd("alignment",b,a))});D.defineProperty(jh,{stretch:"stretch"},function(){return this.Qg},function(a){var b=this.Qg;b!==a&&(v&&D.Da(a,O,jh,"stretch"),this.Qg=a,null!==this.R&&this.R.K(),this.vd("stretch",b,a))}); -D.defineProperty(jh,{$G:"separatorPadding"},function(){return this.Gk},function(a){"number"===typeof a?a=new Lb(a):null!==a&&v&&D.l(a,Lb,jh,"separatorPadding");var b=this.Gk;null!==a&&null!==b&&b.O(a)||(null!==a&&(a=a.V()),this.Gk=a,null!==this.R&&this.R.K(),this.vd("separatorPadding",b,a))}); -D.defineProperty(jh,{Vq:"separatorStroke"},function(){return this.Dt},function(a){var b=this.Dt;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.Dt=a,null!==this.R&&this.R.K(),this.vd("separatorStroke",b,a))});D.defineProperty(jh,{Wq:"separatorStrokeWidth"},function(){return this.Et},function(a){var b=this.Et;b!==a&&(this.Et=a,null!==this.R&&this.R.K(),this.vd("separatorStrokeWidth",b,a))}); -D.defineProperty(jh,{qK:"separatorDashArray"},function(){return this.qi},function(a){var b=this.qi;if(b!==a){null===a||Array.isArray(a)||D.kc(a,"Array",jh,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea&&D.ua(a,">= 0",ih,"height"),this.wf=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("height",b,a))});D.defineProperty(ih,{width:"width"},function(){return this.wf},function(a){var b=this.wf;b!==a&&(v&&D.h(a,"number",ih,"width"),0>a&&D.ua(a,">= 0",ih,"width"),this.wf=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("width",b,a))}); +D.defineProperty(ih,{Th:"minimum"},function(){return this.Ck},function(a){var b=this.Ck;b!==a&&(v&&D.h(a,"number",ih,"minimum"),(0>a||!isFinite(a))&&D.ua(a,">= 0",ih,"minimum"),this.Ck=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("minimum",b,a))});D.defineProperty(ih,{te:"maximum"},function(){return this.Bk},function(a){var b=this.Bk;b!==a&&(v&&D.h(a,"number",ih,"maximum"),0>a&&D.ua(a,">= 0",ih,"maximum"),this.Bk=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.vd("maximum",b,a))}); +D.defineProperty(ih,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.O(a)||(v&&D.l(a,S,ih,"alignment"),this.ue=a.V(),null!==this.R&&this.R.K(),this.vd("alignment",b,a))});D.defineProperty(ih,{stretch:"stretch"},function(){return this.Qg},function(a){var b=this.Qg;b!==a&&(v&&D.Da(a,O,ih,"stretch"),this.Qg=a,null!==this.R&&this.R.K(),this.vd("stretch",b,a))}); +D.defineProperty(ih,{$G:"separatorPadding"},function(){return this.Gk},function(a){"number"===typeof a?a=new Lb(a):null!==a&&v&&D.l(a,Lb,ih,"separatorPadding");var b=this.Gk;null!==a&&null!==b&&b.O(a)||(null!==a&&(a=a.V()),this.Gk=a,null!==this.R&&this.R.K(),this.vd("separatorPadding",b,a))}); +D.defineProperty(ih,{Vq:"separatorStroke"},function(){return this.Dt},function(a){var b=this.Dt;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.Dt=a,null!==this.R&&this.R.K(),this.vd("separatorStroke",b,a))});D.defineProperty(ih,{Wq:"separatorStrokeWidth"},function(){return this.Et},function(a){var b=this.Et;b!==a&&(this.Et=a,null!==this.R&&this.R.K(),this.vd("separatorStrokeWidth",b,a))}); +D.defineProperty(ih,{qK:"separatorDashArray"},function(){return this.qi},function(a){var b=this.qi;if(b!==a){null===a||Array.isArray(a)||D.kc(a,"Array",ih,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var g=d.Ia,h=Math.max(1,g.width),g=g.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=D.nb(),y=2;yp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,y=0,q=t[y],p=q[0],s=q[1],r=q[2],q=q[3],w=0;.1<=u;){0===w&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){D.ya(t);return}e> +z.prototype.qc=function(a){a===Zj||a===bk||a===ck||a===vo?this.dB=a:O.prototype.qc.call(this,a)};z.prototype.toString=function(){return"Shape("+("None"!==this.Kb?this.Kb:"None"!==this.ar?this.ar:this.bB)+")#"+D.Od(this)}; +function nq(a,b,c,d){var e=c.length;if(!(4>e)){for(var g=d.Ia,h=Math.max(1,g.width),g=g.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=D.nb(),y=2;yp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,y=0,q=t[y],p=q[0],s=q[1],r=q[2],q=q[3],w=0;.1<=u;){0===w&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){D.ya(t);return}e> q?(w=e-q,e=q):w=0;var A=Math.sqrt(e*e/(1+r*r));0>p&&(A=-A);k+=A;l+=r*A;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(g/2));0===w&&d.Xk(a,b);a.translate(h/2,g/2);a.rotate(-s);a.translate(-k,-l);u-=e;q-=e;if(0!==w){y++;if(y===t.length){D.ya(t);return}q=t[y];p=q[0];s=q[1];r=q[2];q=q[3];e=w}}D.ya(t)}} -z.prototype.Xk=function(a,b){if(null!==this.Bc||null!==this.Wd){null!==this.Wd&&Vo(this,a,this.Wd,!0,!1);null!==this.Bc&&Vo(this,a,this.Bc,!1,!1);var c=this.Rg;if(0===c){var d=this.Y;d instanceof da&&d.type===tj&&"Selection"===d.Ld&&d.Bb instanceof z&&d.hf.Md()===d.Bb&&(c=d.Bb.mb)}a.lineWidth=c;a.lineJoin=this.Qp;a.lineCap=this.Op;a.miterLimit=this.zn;var e=!1;this.Y&&b.Kj("drawShadows")&&(e=this.Y.el);var g=!0;null!==this.Bc&&null===this.Wd&&(g=!1);var d=!1,h=!0,k=this.iH;null!==k&&(d=!0,h=a.YA(k, -this.gf));var l=this.Za;if(null!==l){if(l.da===Ze)a.beginPath(),d&&!h?Go(a,l.Ac,l.Mc,l.Cb,l.Jb,k,this.gf):(a.moveTo(l.Ac,l.Mc),a.lineTo(l.Cb,l.Jb)),null!==this.Wd&&a.Xg(this.Wd),0!==c&&null!==this.Bc&&a.Zj();else if(l.da===tf){var m=l.Ac,n=l.Mc,p=l.Cb,q=l.Jb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.Wd&&(a.beginPath(),a.rect(l,r,m,n),a.Xg(this.Wd));if(null!==this.Bc){var s=p=0,u=0;g&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0);d&&!h?(h=D.nb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),pq(a,h,k,this.gf),a.Zj(),D.ya(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Zj());g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.da===uf)m=l.Ac,n=l.Mc,p=l.Cb,q=l.Jb,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+Jd*l,n-r,m+l,n-Jd*r,m+l,n),a.bezierCurveTo(m+ -l,n+Jd*r,m+Jd*l,n+r,m,n+r),a.bezierCurveTo(m-Jd*l,n+r,m-l,n+Jd*r,m-l,n),a.bezierCurveTo(m-l,n-Jd*r,m-Jd*l,n-r,m,n-r),a.closePath(),null!==this.Wd&&a.Xg(this.Wd),d&&!h&&(h=D.nb(),Be(m,n-r,m+Jd*l,n-r,m+l,n-Jd*r,m+l,n,.5,h),Be(m+l,n,m+l,n+Jd*r,m+Jd*l,n+r,m,n+r,.5,h),Be(m,n+r,m-Jd*l,n+r,m-l,n+Jd*r,m-l,n,.5,h),Be(m-l,n,m-l,n-Jd*r,m-Jd*l,n-r,m,n-r,.5,h),a.beginPath(),pq(a,h,k,this.gf),D.ya(h)),0!==c&&null!==this.Bc&&(g&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0,a.Zj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Zj());else if(l.da===We){r=l.kk;n=r.length;for(q=0;qy.Ff);else{var t=Vf(y,m),w=t.length;if(0===w){a.lineTo(y.pa,y.va);break}for(var A=0;Ay.Ff);else{var t=If(y,m),w=t.length;if(0===w){a.lineTo(y.pa,y.va);break}for(var A=0;Ae)){var g=.001,h=c.length,k=b[0],l=b[1];if(4===e)Go(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=g=0,n=0,p=0,q=0,r=p=0,s=D.nb(),u=2;ur&&(g=r);g>p?(t=g-p,g=p):t=0;var y=Math.sqrt(g*g/(1+q*q));0>n&&(y=-y);k+=y;l+= +a.Xg(this.Wd),0!==c&&null!==this.Bc&&(d&&!h||a.Zj()),g&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u))):(!0===m.Zm&&null!==this.Wd&&a.Xg(this.Wd),0===c||null===this.Bc||d&&!h||a.Zj())}if(d&&!h)for(c=g,g=l.kk,h=g.length,l=0;le)){var g=.001,h=c.length,k=b[0],l=b[1];if(4===e)Fo(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=g=0,n=0,p=0,q=0,r=p=0,s=D.nb(),u=2;ur&&(g=r);g>p?(t=g-p,g=p):t=0;var y=Math.sqrt(g*g/(1+q*q));0>n&&(y=-y);k+=y;l+= q*y;e?a.lineTo(k,l):a.moveTo(k,l);r-=g;p-=g;if(0!==t){u++;if(u===s.length){D.ya(s);return}p=s[u];n=p[0];q=p[1];p=p[2];g=t}else e=!e}D.ya(s)}}}z.prototype.getDocumentPoint=z.prototype.fb=function(a,b){void 0===b&&(b=new N);if(a instanceof S){a.ee()&&D.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Fa,d=this.mb;b.n(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY)}else b.set(a);this.Hh.vb(b);return b}; -z.prototype.Sk=function(a,b){var c=this.xf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.ib,e=this.mb/2;c.type!==Ze||b||(e+=2);var g=D.Sf();g.assign(d);g.ig(e+2,e+2);if(!g.Pa(a))return D.Lb(g),!1;d=e+1E-4;if(c.type===Ze){if(null===this.stroke)return!1;d=(c.F-c.la)*(a.x-c.la)+(c.G-c.ja)*(a.y-c.ja);if(0>(c.la-c.F)*(a.x-c.F)+(c.ja-c.G)*(a.y-c.G)||0>d)return!1;D.Lb(g);return qe(c.la,c.ja,c.F,c.G,e,a.x,a.y)}if(c.type===tf){var h=c.la,k=c.ja,l=c.F,c=c.G;g.x=Math.min(h,l);g.y=Math.min(k, -c);g.width=Math.abs(l-h);g.height=Math.abs(c-k);if(null===this.fill){g.ig(-d,-d);if(g.Pa(a))return D.Lb(g),!1;g.ig(d,d)}null!==this.stroke&&g.ig(e,e);d=g.Pa(a);D.Lb(g);return d}if(c.type===uf){var h=c.la,k=c.ja,l=c.F,c=c.G,e=Math.min(h,l),m=Math.min(k,c),h=Math.abs(l-h)/2,k=Math.abs(c-k)/2,e=a.x-(e+h),m=a.y-(m+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=e*e/(h*h)+m*m/(k*k))return D.Lb(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=d,k+=d);D.Lb(g);return 0>=h||0>=k?!1:1>=e*e/(h*h)+m*m/(k*k)}if(c.type=== -We)return D.Lb(g),null===this.fill?Yf(c,a.x,a.y,e):c.Pa(a,e,1=this.mb)n=Ie(p.Ac,p.Mc,p.Cb,p.Jb,g,h,k,l,e);else{var r=0,s=0;p.Ac===p.Cb?(r=m,s=0):(b=(p.Jb-p.Mc)/(p.Cb-p.Ac),s=m/Math.sqrt(1+b*b),r=s*b);d=D.nb();b=new N;Ie(p.Ac+ -r,p.Mc+s,p.Cb+r,p.Jb+s,g,h,k,l,b)&&d.push(b);b=new N;Ie(p.Ac-r,p.Mc-s,p.Cb-r,p.Jb-s,g,h,k,l,b)&&d.push(b);b=new N;Ie(p.Ac+r,p.Mc+s,p.Ac-r,p.Mc-s,g,h,k,l,b)&&d.push(b);b=new N;Ie(p.Cb+r,p.Jb+s,p.Cb-r,p.Jb-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return D.ya(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((g-k)*(g-k))+Math.abs((h-l)*(h-l));h=Math.abs((g-a)*(g-a))+Math.abs((h-b)*(h- -b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Eb(l.y,e))&&(l.ye||Eb(l.x,e))&&(l.x(c.la-c.F)*(a.x-c.F)+(c.ja-c.G)*(a.y-c.G)||0>d)return!1;D.Lb(g);return pe(c.la,c.ja,c.F,c.G,e,a.x,a.y)}if(c.type===Ze){var h=c.la,k=c.ja,l=c.F,c=c.G;g.x=Math.min(h,l);g.y=Math.min(k, +c);g.width=Math.abs(l-h);g.height=Math.abs(c-k);if(null===this.fill){g.ig(-d,-d);if(g.Pa(a))return D.Lb(g),!1;g.ig(d,d)}null!==this.stroke&&g.ig(e,e);d=g.Pa(a);D.Lb(g);return d}if(c.type===tf){var h=c.la,k=c.ja,l=c.F,c=c.G,e=Math.min(h,l),m=Math.min(k,c),h=Math.abs(l-h)/2,k=Math.abs(c-k)/2,e=a.x-(e+h),m=a.y-(m+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=e*e/(h*h)+m*m/(k*k))return D.Lb(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=d,k+=d);D.Lb(g);return 0>=h||0>=k?!1:1>=e*e/(h*h)+m*m/(k*k)}if(c.type=== +Ve)return D.Lb(g),null===this.fill?Xf(c,a.x,a.y,e):c.Pa(a,e,1=this.mb)n=He(p.Ac,p.Mc,p.Cb,p.Jb,g,h,k,l,e);else{var r=0,s=0;p.Ac===p.Cb?(r=m,s=0):(b=(p.Jb-p.Mc)/(p.Cb-p.Ac),s=m/Math.sqrt(1+b*b),r=s*b);d=D.nb();b=new N;He(p.Ac+ +r,p.Mc+s,p.Cb+r,p.Jb+s,g,h,k,l,b)&&d.push(b);b=new N;He(p.Ac-r,p.Mc-s,p.Cb-r,p.Jb-s,g,h,k,l,b)&&d.push(b);b=new N;He(p.Ac+r,p.Mc+s,p.Ac-r,p.Mc-s,g,h,k,l,b)&&d.push(b);b=new N;He(p.Cb+r,p.Jb+s,p.Cb-r,p.Jb-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return D.ya(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((g-k)*(g-k))+Math.abs((h-l)*(h-l));h=Math.abs((g-a)*(g-a))+Math.abs((h-b)*(h- +b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Eb(l.y,e))&&(l.ye||Eb(l.x,e))&&(l.x=h&&d<=a}a=h&&g<=a} -z.prototype.IF=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Sk(a,!0))return!0;var e=a.Kf(b);b=e;1.5=e||mb(b,g,0,-p)>=e||mb(b,g,0,p)>=e||mb(b,g,n,0)>= -e?!1:!0}else if(g.type===We){h=g.ib;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&lb(a.x,a.y,k,l,m,l)>e&&lb(a.x,a.y,m,h,k,h)>e&&lb(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Yf(g,a.x,a.y,b):g.Pa(a,b,!0))return!0}else{c=g.nc;for(b=0;be)return!1;l=k.Eb.o;m=l.length;for(h=0;he)return!1;break;case Ff:g=D.nb(); -Be(n,p,q.Ec,q.$c,q.Uh,q.Vh,q.F,q.G,.8,g);n=d(g,a);D.ya(g);if(n)return!1;n=q.F;p=q.G;if(a.mq(n,p)>e)return!1;break;case Gf:g=D.nb();Fe(n,p,q.Ec,q.$c,q.F,q.G,.8,g);n=d(g,a);D.ya(g);if(n)return!1;n=q.F;p=q.G;if(a.mq(n,p)>e)return!1;break;case Hf:case If:var r=q.type===Hf?Vf(q,k):Wf(q,k,n,p),s=r.length;if(0===s){n=q.pa;p=q.va;if(a.mq(n,p)>e)return!1;break}q=null;g=D.nb();for(b=0;b=h&&d<=a}a=h&&g<=a} +z.prototype.IF=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Sk(a,!0))return!0;var e=a.Kf(b);b=e;1.5=e||mb(b,g,0,-p)>=e||mb(b,g,0,p)>=e||mb(b,g,n,0)>= +e?!1:!0}else if(g.type===Ve){h=g.ib;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&lb(a.x,a.y,k,l,m,l)>e&&lb(a.x,a.y,m,h,k,h)>e&&lb(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Xf(g,a.x,a.y,b):g.Pa(a,b,!0))return!0}else{c=g.nc;for(b=0;be)return!1;l=k.Eb.o;m=l.length;for(h=0;he)return!1;break;case Ef:g=D.nb(); +Ae(n,p,q.Ec,q.$c,q.Uh,q.Vh,q.F,q.G,.8,g);n=d(g,a);D.ya(g);if(n)return!1;n=q.F;p=q.G;if(a.mq(n,p)>e)return!1;break;case Ff:g=D.nb();Ee(n,p,q.Ec,q.$c,q.F,q.G,.8,g);n=d(g,a);D.ya(g);if(n)return!1;n=q.F;p=q.G;if(a.mq(n,p)>e)return!1;break;case Gf:case Hf:var r=q.type===Gf?If(q,k):Vf(q,k,n,p),s=r.length;if(0===s){n=q.pa;p=q.va;if(a.mq(n,p)>e)return!1;break}q=null;g=D.nb();for(b=0;b= 0",z,"strokeWidth:value")}); D.defineProperty(z,{IM:"strokeCap"},function(){return this.Op},function(a){var b=this.Op;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?D.ua(a,'"butt", "round", or "square"',z,"strokeCap"):(this.Op=a,this.ra(),this.i("strokeCap",b,a)))}); @@ -1381,174 +1381,174 @@ D.defineProperty(z,{KM:"strokeJoin"},function(){return this.Qp},function(a){var D.defineProperty(z,{LM:"strokeMiterLimit"},function(){return this.zn},function(a){var b=this.zn;if(b!==a)if(v&&D.p(a,z,"strokeMiterLimit"),1<=a){this.zn=a;this.ra();var c=this.Y;null!==c&&(c.Ak=NaN);this.i("strokeMiterLimit",b,a)}else D.ua(a,"value >= 1",z,"strokeWidth:value")}); D.defineProperty(z,{iH:"strokeDashArray"},function(){return this.Pp},function(a){var b=this.Pp;if(b!==a){null===a||Array.isArray(a)||D.kc(a,"Array",z,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1a?a=0:1a?a=0:1n*l*l&&(h=!0);b.dd!==a&&(h=!1);!1===b.Kj("textGreeking")&&(h=!1);n=this.vi;l=this.wi;switch(this.wu){case Ao:a.translate(c, -0);a.scale(-1,1);break;case zo:a.translate(0,d);a.scale(1,-1);break;case Bo:a.translate(c,d),a.scale(-1,-1)}var m=this.xe,p=(n+e+l)*m;d>p&&(k=this.cm,k=k.y*d-k.y*p+k.offsetY);for(var p=this.uf,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,y=c,w=e,A=g,B=0;h?("left"===A?B=0:"right"===A?B=y-r:"center"===A&&(B=(y-r)/2),s.fillRect(0+B,t+.25*w,r,1)):("left"===A?B=0:"right"===A?B=y:"center"===A&&(B=y/2),s.fillText(u,0+B,t+w-.25*w),u=w/20|0,0===u&&(u=1),"right"===A?B-=r:"center"=== -A&&(B-=r/2),this.wk&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+B,t+w-.2*w),s.lineTo(0+B+r,t+w-.2*w),s.stroke()),this.uk&&(s.beginPath(),s.lineWidth=u,t=t+w-w/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+B,t),s.lineTo(0+B+r,t),s.stroke()));k+=e+l}switch(this.wu){case Ao:a.scale(-1,1);a.translate(-c,0);break;case zo:a.scale(1,-1);a.translate(0,-d);break;case Bo:a.scale(-1,-1),a.translate(-c,-d)}}}; -pa.prototype.jo=function(a,b,c,d){this.rp=a;var e=this.uf;e.reset();var g=0,h=0;if(isNaN(this.Ea.width)){g=this.Zd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.ky){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=Qq(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.Bg);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=Qq(g,this.Bg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ea.width;null!==this.R&&(g=Math.min(g, -this.R.rf.width));h=Oq(this,g,e);m=h=isNaN(this.Ea.height)?Math.min(h,b/this.scale):this.Ea.height;if(0!==e.Qe&&1!==e.Ze.length&&this.pj===Lq&&(b=this.Bg,l=this.pj===Lq?Rq(b):0,k=this.vi+this.wi,k=Math.max(0,Pq(this)+k),m=Math.min(this.HJ-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Ze.length))){k=e.Ze[m];for(l=Math.max(1,a-l);Qq(k,b)>l&&1=a.wh)return new Ca(0,l);if(a.Aj===Iq){c.zj=1;g=Qq(b,k);if(0===h||g<=d)return c.Qe=Math.max(c.Qe,g),c.Hf.push(c.Qe),c.Ze.push(b),new Ca(g,l);var m=Sq(a,b);b=b.substr(m.length);for(var n=Sq(a,b),g=Qq(m+n,k);0d&&1d;){n=1;g=Qq(m.substr(0,n),k);for(h=0;g<=d;)n++,h=g,g=Qq(m.substr(0,n),k);1===n?(c.Hf[a.xe+p]=g,e=Math.max(e,g)):(c.Hf[a.xe+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Ze[a.xe+p]=m.substr(0,n);p++;m=m.substr(n);if(a.xe+p>a.wh)break}n=Sq(a,b);for(g=Qq(m+n,k);0a.wh))break}c.zj=Math.min(a.wh,p);c.Qe=Math.max(c.Qe,e);return new Ca(c.Qe,l*c.zj)} -function Sq(a,b){if(a.Aj===Kq)return b.substr(0,1);for(var c=b.length,d=0;d=c?b:b.substr(0,d)}function Qq(a,b){Gq!==b&&(Gq=Hq.font=b);return Hq.measureText(a).width}function Pq(a){if(null!==a.uf.lk)return a.uf.lk;var b=a.Bg;Gq!==b&&(Gq=Hq.font=b);var c=0;void 0!==Bq[b]&&5E3>Cq?c=Bq[b]:(c=1.3*Hq.measureText("M").width,Bq[b]=c,Cq++);return a.uf.lk=c} -function Rq(a){Gq!==a&&(Gq=Hq.font=a);var b=0;void 0!==Dq[a]&&5E3>Eq?b=Dq[a]:(b=Hq.measureText(Fq).width,Dq[a]=b,Eq++);return b} -function Oq(a,b,c){var d=a.Zd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.vi+a.wi,e=Math.max(0,Pq(a)+e);if(0===d.length)return c.Qe=0,a.xe=1,e;if(!a.ky){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.xe=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.Aj!==Iq?(c.zj=0,h=Nq(a,h,c,b),g+=h.height,a.xe+=c.zj):(Nq(a,h,c,b),g+=e,a.xe++),a.xe===a.wh&&(l=!0)),h=k+1;return a.Dw=g} +pa.prototype.Xk=function(a,b){if(null!==this.Bc&&0!==this.Zd.length&&null!==this.Bg){var c=this.Fa.width,d=this.Fa.height,e=Oq(this),g=a.textAlign=this.Zl,h=b.rs;"start"===g&&(g=h?"right":"left");"end"===g&&(g=h?"left":"right");Uo(this,a,this.Bc,!0,!1);(this.wk||this.uk)&&Uo(this,a,this.Bc,!1,!1);var k=0,h=!1,l=D.Fb(0,0);this.Hh.vb(l);var m=D.Fb(0,e);this.Hh.vb(m);var n=l.Kf(m);D.A(l);D.A(m);l=b.scale;8>n*l*l&&(h=!0);b.dd!==a&&(h=!1);!1===b.Kj("textGreeking")&&(h=!1);n=this.vi;l=this.wi;switch(this.wu){case zo:a.translate(c, +0);a.scale(-1,1);break;case yo:a.translate(0,d);a.scale(1,-1);break;case Ao:a.translate(c,d),a.scale(-1,-1)}var m=this.xe,p=(n+e+l)*m;d>p&&(k=this.cm,k=k.y*d-k.y*p+k.offsetY);for(var p=this.uf,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,y=c,w=e,A=g,B=0;h?("left"===A?B=0:"right"===A?B=y-r:"center"===A&&(B=(y-r)/2),s.fillRect(0+B,t+.25*w,r,1)):("left"===A?B=0:"right"===A?B=y:"center"===A&&(B=y/2),s.fillText(u,0+B,t+w-.25*w),u=w/20|0,0===u&&(u=1),"right"===A?B-=r:"center"=== +A&&(B-=r/2),this.wk&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+B,t+w-.2*w),s.lineTo(0+B+r,t+w-.2*w),s.stroke()),this.uk&&(s.beginPath(),s.lineWidth=u,t=t+w-w/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+B,t),s.lineTo(0+B+r,t),s.stroke()));k+=e+l}switch(this.wu){case zo:a.scale(-1,1);a.translate(-c,0);break;case yo:a.scale(1,-1);a.translate(0,-d);break;case Ao:a.scale(-1,-1),a.translate(-c,-d)}}}; +pa.prototype.jo=function(a,b,c,d){this.rp=a;var e=this.uf;e.reset();var g=0,h=0;if(isNaN(this.Ea.width)){g=this.Zd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.ky){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=Pq(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.Bg);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=Pq(g,this.Bg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ea.width;null!==this.R&&(g=Math.min(g, +this.R.rf.width));h=Nq(this,g,e);m=h=isNaN(this.Ea.height)?Math.min(h,b/this.scale):this.Ea.height;if(0!==e.Qe&&1!==e.Ze.length&&this.pj===Kq&&(b=this.Bg,l=this.pj===Kq?Qq(b):0,k=this.vi+this.wi,k=Math.max(0,Oq(this)+k),m=Math.min(this.HJ-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Ze.length))){k=e.Ze[m];for(l=Math.max(1,a-l);Pq(k,b)>l&&1=a.wh)return new Ca(0,l);if(a.Aj===Hq){c.zj=1;g=Pq(b,k);if(0===h||g<=d)return c.Qe=Math.max(c.Qe,g),c.Hf.push(c.Qe),c.Ze.push(b),new Ca(g,l);var m=Rq(a,b);b=b.substr(m.length);for(var n=Rq(a,b),g=Pq(m+n,k);0d&&1d;){n=1;g=Pq(m.substr(0,n),k);for(h=0;g<=d;)n++,h=g,g=Pq(m.substr(0,n),k);1===n?(c.Hf[a.xe+p]=g,e=Math.max(e,g)):(c.Hf[a.xe+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Ze[a.xe+p]=m.substr(0,n);p++;m=m.substr(n);if(a.xe+p>a.wh)break}n=Rq(a,b);for(g=Pq(m+n,k);0a.wh))break}c.zj=Math.min(a.wh,p);c.Qe=Math.max(c.Qe,e);return new Ca(c.Qe,l*c.zj)} +function Rq(a,b){if(a.Aj===Jq)return b.substr(0,1);for(var c=b.length,d=0;d=c?b:b.substr(0,d)}function Pq(a,b){Fq!==b&&(Fq=Gq.font=b);return Gq.measureText(a).width}function Oq(a){if(null!==a.uf.lk)return a.uf.lk;var b=a.Bg;Fq!==b&&(Fq=Gq.font=b);var c=0;void 0!==Aq[b]&&5E3>Bq?c=Aq[b]:(c=1.3*Gq.measureText("M").width,Aq[b]=c,Bq++);return a.uf.lk=c} +function Qq(a){Fq!==a&&(Fq=Gq.font=a);var b=0;void 0!==Cq[a]&&5E3>Dq?b=Cq[a]:(b=Gq.measureText(Eq).width,Cq[a]=b,Dq++);return b} +function Nq(a,b,c){var d=a.Zd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.vi+a.wi,e=Math.max(0,Oq(a)+e);if(0===d.length)return c.Qe=0,a.xe=1,e;if(!a.ky){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.xe=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.Aj!==Hq?(c.zj=0,h=Mq(a,h,c,b),g+=h.height,a.xe+=c.zj):(Mq(a,h,c,b),g+=e,a.xe++),a.xe===a.wh&&(l=!0)),h=k+1;return a.Dw=g} D.defineProperty(pa,{jC:"textValidation"},function(){return this.$l},function(a){var b=this.$l;b!==a&&(null!==a&&D.h(a,"function",pa,"textValidation"),this.$l=a,this.i("textValidation",b,a))});D.defineProperty(pa,{kH:"textEdited"},function(){return this.Qt},function(a){var b=this.Qt;b!==a&&(null!==a&&D.h(a,"function",pa,"textEdited"),this.Qt=a,this.i("textEdited",b,a))}); D.defineProperty(pa,{FM:"spacingAbove"},function(){return this.vi},function(a){var b=this.vi;b!==a&&(v&&D.h(a,"number",pa,"spacingAbove"),this.vi=a,this.i("spacingAbove",b,a))});D.defineProperty(pa,{GM:"spacingBelow"},function(){return this.wi},function(a){var b=this.wi;b!==a&&(v&&D.h(a,"number",pa,"spacingBelow"),this.wi=a,this.i("spacingBelow",b,a))}); D.defineProperty(pa,{HJ:"maxLines"},function(){return this.wh},function(a){var b=this.wh;b!==a&&(v&&D.h(a,"number",pa,"maxLines"),a=Math.floor(a),0>=a&&D.ua(a,"> 0",pa,"maxLines"),this.wh=a,this.i("maxLines",b,a),this.K())});D.w(pa,{hM:"metrics"},function(){return this.uf});D.defineProperty(pa,{pL:"choices"},function(){return this.ur},function(a){var b=this.ur;b!==a&&(null===a||Array.isArray(a)||D.kc(a,"Array",pa,"choices:value"),this.ur=a,this.i("choices",b,a))}); -function bq(){this.Qe=this.zj=0;this.Hf=[];this.Ze=[];this.lk=null}bq.prototype.reset=function(){this.Qe=this.zj=0;this.lk=null;this.Hf=[];this.Ze=[]};bq.prototype.gq=function(a){this.zj=a.zj;this.lk=a.lk;this.Qe=a.Qe;this.Hf=D.lm(a.Hf);this.Ze=D.lm(a.Ze)};D.w(bq,{mL:"arrSize"},function(){return this.Hf});D.w(bq,{nL:"arrText"},function(){return this.Ze});D.w(bq,{gM:"maxLineWidth"},function(){return this.Qe});D.w(bq,{RL:"fontHeight"},function(){return this.lk}); -function Il(){O.call(this);this.af=null;this.Kt="";this.Hk=je;this.gp=Ye;this.zi=this.bf=null;this.fp=mc;this.Ag=ak;this.Rp=null;this.Xz=!1;this.ap=!0;this.Bw=!1;this.Jp=null}D.Ta(Il,O);D.ka("Picture",Il);Il.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.af;a.Kt=this.Kt;a.Hk=this.Hk.V();a.gp=this.gp;a.Ag=this.Ag;a.bf=this.bf;a.zi=this.zi;a.fp=this.fp.V();a.ap=this.ap;a.Jp=this.Jp}; -Il.prototype.qc=function(a){a===ak||a===ck||a===dk?this.fJ=a:O.prototype.qc.call(this,a)};Il.prototype.toString=function(){return"Picture("+this.source+")#"+D.Od(this)};var Tq=new ma,Uq=0,Cl=[];function Vq(){var a=Cl;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ye:n=d.width;p=d.height;break;case ck:case dk:var s=0;q===ck?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===dk&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), -n=d.width,p=d.height)}var q=this.Jj()*b.scale,u=k*h/(n*q*p*q),s=Tq[this.source],q=null;if(c.ps&&void 0!==s&&16s.$p.length&&($q(s,4,l,m),$q(s,16,l,m));for(var l=s.$p,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.2,.22);b.D=new S(.8, -.9);D.u(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=dr(6);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.07,.25);b.D=new S(.93,.75);D.u(a);return b},Heptagon:function(a,b,c){var d=dr(7);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.2,.15);b.D=new S(.8,.85);D.u(a);return b},Octagon:function(a,b,c){var d=dr(8);a=D.v();T(a,d[0].x*b,d[0].y*c,!0); -for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.15,.15);b.D=new S(.85,.85);D.u(a);return b},Nonagon:function(a,b,c){var d=dr(9);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.17,.13);b.D=new S(.82,.82);D.u(a);return b},Decagon:function(a,b,c){var d=dr(10);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.16,.16);b.D=new S(.84,.84);D.u(a);return b}, -Dodecagon:function(a,b,c){var d=dr(12);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.16,.16);b.D=new S(.84,.84);D.u(a);return b},FivePointedStar:function(a,b,c){var d=cr(5);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.312,.383);b.D=new S(.693,.765);D.u(a);return b},SixPointedStar:function(a,b,c){var d=cr(6);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x* -b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.17,.251);b.D=new S(.833,.755);D.u(a);return b},SevenPointedStar:function(a,b,c){var d=cr(7);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.363,.361);b.D=new S(.641,.709);D.u(a);return b},EightPointedStar:function(a,b,c){var d=cr(8);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.252,.255);b.D=new S(.75,.75);D.u(a);return b},NinePointedStar:function(a, -b,c){var d=cr(9);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.355,.361);b.D=new S(.645,.651);D.u(a);return b},TenPointedStar:function(a,b,c){var d=cr(10);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.281,.261);b.D=new S(.723,.748);D.u(a);return b},FivePointedBurst:function(a,b,c){var d=br(5);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Xe:n=d.width;p=d.height;break;case bk:case ck:var s=0;q===bk?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===ck&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), +n=d.width,p=d.height)}var q=this.Jj()*b.scale,u=k*h/(n*q*p*q),s=Sq[this.source],q=null;if(c.ps&&void 0!==s&&16s.$p.length&&(Zq(s,4,l,m),Zq(s,16,l,m));for(var l=s.$p,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.2,.22);b.D=new S(.8, +.9);D.u(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=cr(6);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.07,.25);b.D=new S(.93,.75);D.u(a);return b},Heptagon:function(a,b,c){var d=cr(7);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.2,.15);b.D=new S(.8,.85);D.u(a);return b},Octagon:function(a,b,c){var d=cr(8);a=D.v();T(a,d[0].x*b,d[0].y*c,!0); +for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.15,.15);b.D=new S(.85,.85);D.u(a);return b},Nonagon:function(a,b,c){var d=cr(9);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.17,.13);b.D=new S(.82,.82);D.u(a);return b},Decagon:function(a,b,c){var d=cr(10);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.16,.16);b.D=new S(.84,.84);D.u(a);return b}, +Dodecagon:function(a,b,c){var d=cr(12);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.16,.16);b.D=new S(.84,.84);D.u(a);return b},FivePointedStar:function(a,b,c){var d=br(5);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.312,.383);b.D=new S(.693,.765);D.u(a);return b},SixPointedStar:function(a,b,c){var d=br(6);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x* +b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.17,.251);b.D=new S(.833,.755);D.u(a);return b},SevenPointedStar:function(a,b,c){var d=br(7);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.363,.361);b.D=new S(.641,.709);D.u(a);return b},EightPointedStar:function(a,b,c){var d=br(8);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.252,.255);b.D=new S(.75,.75);D.u(a);return b},NinePointedStar:function(a, +b,c){var d=br(9);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.355,.361);b.D=new S(.645,.651);D.u(a);return b},TenPointedStar:function(a,b,c){var d=br(10);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.281,.261);b.D=new S(.723,.748);D.u(a);return b},FivePointedBurst:function(a,b,c){var d=ar(5);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=D.v(),e=.2*Jd;T(d,0,.2*c,!0);U(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);U(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);U(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);U(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c); +D.v();var d=.5*Id,e=.1*Id;T(a,1*b,.1*c,!0);a.lineTo(1*b,.9*c);U(a,1*b,(.9+e)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.9+e)*c,0,.9*c);a.lineTo(0,.1*c);U(a,0,(.1-e)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.1-e)*c,1*b,.1*c);T(a,1*b,.1*c,!1);U(a,1*b,(.1+e)*c,(.5+d)*b,.2*c,.5*b,.2*c);U(a,(.5-d)*b,.2*c,0,(.1+e)*c,0,.1*c);a.moveTo(1*b,.2*c);U(a,1*b,(.2+e)*c,(.5+d)*b,.3*c,.5*b,.3*c);U(a,(.5-d)*b,.3*c,0,(.2+e)*c,0,.2*c);a.kb(!1);b=a.q;b.C=new S(0,.3);b.D=new S(1,.9);D.u(a);return b},Display:function(a, +b,c){a=D.v();T(a,.25*b,0,!0);a.lineTo(.75*b,0);U(a,1*b,0,1*b,1*c,.75*b,1*c);a.lineTo(.25*b,1*c);a.lineTo(0,.5*c);X(a);b=a.q;b.C=new S(.25,0);b.D=new S(.75,1);D.u(a);return b},DividedEvent:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)?a=.2:.15>a&&(a=.15);var d=D.v(),e=.2*Id;T(d,0,.2*c,!0);U(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);U(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);U(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);U(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c); T(d,0,a*c,!1);d.lineTo(1*b,a*c);d.kb(!1);b=d.q;b.C=new S(0,a);b.D=new S(1,1-a);D.u(d);return b},DividedProcess:function(a,b,c){a=a?a.Sc:NaN;if(isNaN(a)||.1>a)a=.1;var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);T(d,0,a*c,!1);d.lineTo(1*b,a*c);d.kb(!1);b=d.q;b.C=new S(0,a);b.D=vc;D.u(d);return b},Document:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=ec;b.D=new S(1,.6);D.u(a); return b},ExternalOrganization:function(a,b,c){a=a?a.Sc:NaN;if(isNaN(a)||.2>a)a=.2;var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);T(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.kb(!1);b=d.q;b.C=new S(a/2,a/2);b.D=new S(1-a/2,1-a/2);D.u(d);return b},ExternalProcess:function(a,b,c){a=D.v();T(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);X(a); T(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.kb(!1);b=a.q;b.C=new S(.25,.25);b.D=new S(.75,.75);D.u(a);return b},File:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);X(a);T(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.kb(!1);b=a.q;b.C=new S(0,.25);b.D=vc;D.u(a);return b},Interrupt:function(a,b,c){a=D.v();T(a,1*b, .5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);T(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},InternalStorage:function(a,b,c){var d=a?a.Sc:NaN;a=a?a.ev:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=D.v();T(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);X(e);T(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.kb(!1);b=e.q;b.C=new S(d,a);b.D=vc;D.u(e);return b},Junction:function(a,b, -c){a=D.v();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,g=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+g)*c,(.5+g)*b,1*c,.5*b,1*c);U(a,(.5-g)*b,1*c,0,(.5+g)*c,0,.5*c);U(a,0,(.5-g)*c,(.5-g)*b,0,.5*b,0);U(a,(.5+g)*b,0,1*b,(.5-g)*c,1*b,.5*c);T(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.kb(!1);b=a.q;b.me=ck;D.u(a);return b},LinedDocument:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);T(a,.1* -b,0,!1);a.lineTo(.1*b,.75*c);a.kb(!1);b=a.q;b.C=new S(.1,0);b.D=new S(1,.6);D.u(a);return b},LoopLimit:function(a,b,c){a=D.v();T(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=vc;D.u(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=D.v();var d=.5*Jd;T(a,.5*b,1*c,!0);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+ +c){a=D.v();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,g=.5*Id;T(a,1*b,.5*c,!0);U(a,1*b,(.5+g)*c,(.5+g)*b,1*c,.5*b,1*c);U(a,(.5-g)*b,1*c,0,(.5+g)*c,0,.5*c);U(a,0,(.5-g)*c,(.5-g)*b,0,.5*b,0);U(a,(.5+g)*b,0,1*b,(.5-g)*c,1*b,.5*c);T(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.kb(!1);b=a.q;b.me=bk;D.u(a);return b},LinedDocument:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);T(a,.1* +b,0,!1);a.lineTo(.1*b,.75*c);a.kb(!1);b=a.q;b.C=new S(.1,0);b.D=new S(1,.6);D.u(a);return b},LoopLimit:function(a,b,c){a=D.v();T(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=vc;D.u(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=D.v();var d=.5*Id;T(a,.5*b,1*c,!0);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+ d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.q;b.C=new S(.15,.15);b.D=new S(.85,.8);D.u(a);return b},ManualInput:function(a,b,c){a=D.v();T(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);X(a);b=a.q;b.C=new S(0,.25);b.D=vc;D.u(a);return b},MessageFromUser:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)&&(a=.7);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);b=d.q;b.C=ec;b.D=new S(a,1);D.u(d);return b}, MicroformProcessing:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)&&(a=.25);var d=D.v();T(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);X(d);b=d.q;b.C=new S(0,a);b.D=new S(1,1-a);D.u(d);return b},MicroformRecording:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=new S(1,.75);D.u(a);return b},MultiDocument:function(a,b,c){c/=.8;a=D.v(); T(a,b,0,!0);a.lineTo(b,.5*c);U(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);U(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);U(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);X(a);T(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.kb(!1);b=a.q;b.C=new S(0,.25);b.D=new S(.8,.77);D.u(a);return b},MultiProcess:function(a,b,c){a=D.v(); T(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);X(a);T(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.kb(!1);b=a.q;b.C=new S(0,.2);b.D=new S(.8,1);D.u(a);return b},OfflineStorage:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)&&(a=.1);var d=1-a,e=D.v();T(e,0,0,!0);e.lineTo(1* -b,0);e.lineTo(.5*b,1*c);X(e);T(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.kb(!1);b=e.q;b.C=new S(d/4+.5*a,a);b.D=new S(3*d/4+.5*a,a+.5*d);D.u(e);return b},OffPageConnector:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=ec;b.D=new S(.75,1);D.u(a);return b},Or:function(a,b,c){a=D.v();var d=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a, -(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.kb(!1);b=a.q;b.me=ck;D.u(a);return b},PaperTape:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,.3*c);U(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=new S(0,.49);b.D=new S(1,.75);D.u(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Sc:NaN;a=a?a.ev:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=D.v();T(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1- +b,0);e.lineTo(.5*b,1*c);X(e);T(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.kb(!1);b=e.q;b.C=new S(d/4+.5*a,a);b.D=new S(3*d/4+.5*a,a+.5*d);D.u(e);return b},OffPageConnector:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=ec;b.D=new S(.75,1);D.u(a);return b},Or:function(a,b,c){a=D.v();var d=.5*Id;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a, +(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.kb(!1);b=a.q;b.me=bk;D.u(a);return b},PaperTape:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,.3*c);U(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=new S(0,.49);b.D=new S(1,.75);D.u(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Sc:NaN;a=a?a.ev:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=D.v();T(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1- a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);X(e);b=e.q;b.C=new S(d,0);b.D=new S(1-a,1);D.u(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Sc:NaN;a=a?a.ev:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=D.v();T(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);X(e);b=e.q;b.C=new S(d,0);b.D=new S(1-a,1);D.u(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)&&(a=.1);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0, 1*c);X(d);T(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.kb(!1);b=d.q;b.C=new S(a,0);b.D=new S(1-a,1);D.u(d);return b},Process:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)&&(a=.1);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);T(d,a*b,0,!1);d.lineTo(a*b,1*c);d.kb(!1);b=d.q;b.C=new S(a,0);b.D=vc;D.u(d);return b},Sort:function(a,b,c){a=D.v();T(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);X(a);T(a,0,.5*c,!1);a.lineTo(1*b,.5* c);a.kb(!1);b=a.q;b.C=new S(.25,.25);b.D=new S(.75,.5);D.u(a);return b},Start:function(a,b,c){a=D.v();T(a,.25*b,0,!0);T(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);T(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.kb(!1);b=a.q;b.C=new S(.25,0);b.D=new S(.75,1);D.u(a);return b},Terminator:function(a,b,c){a=D.v();T(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.q;b.C=new S(.23,0); -b.D=new S(.77,1);D.u(a);return b},TransmittalTape:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)&&(a=.1);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);X(d);b=d.q;b.C=ec;b.D=new S(1,1-a);D.u(d);return b},AndGate:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0,0,!0);a.lineTo(.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=ec;b.D=new S(.55,1);D.u(a);return b},Buffer:function(a,b,c){a=D.v();T(a, -0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},Clock:function(a,b,c){a=D.v();var d=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);T(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2* -b,.75*c);a.kb(!1);b=a.q;b.me=ck;D.u(a);return b},Ground:function(a,b,c){a=D.v();T(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.q;D.u(a);return b},Inverter:function(a,b,c){a=D.v();var d=.1*Jd;T(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);U(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);U(a,.8*b,(.5-d)*c,(.9-d)*b,.4* -c,.9*b,.4*c);U(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.q;b.C=new S(0,.25);b.D=new S(.4,.75);D.u(a);return b},NandGate:function(a,b,c){a=D.v();var d=.5*Jd,e=.4*Jd,g=.1*Jd;T(a,.8*b,.5*c,!0);U(a,.8*b,(.5+e)*c,(.4+d)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);U(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);T(a,1*b,.5*c,!0);U(a,1*b,(.5+g)*c,(.9+g)*b,.6*c,.9*b,.6*c);U(a,(.9-g)*b,.6*c,.8*b,(.5+g)*c,.8*b,.5*c);U(a,.8*b,(.5-g)*c,(.9-g)*b,.4*c,.9*b,.4*c);U(a,(.9+g)*b,.4*c,1*b,(.5-g)*c,1*b,.5* -c);b=a.q;b.C=new S(0,.05);b.D=new S(.55,.95);D.u(a);return b},NorGate:function(a,b,c){a=D.v();var d=.5,e=Jd*d,g=0,h=.5;T(a,.8*b,.5*c,!0);U(a,.7*b,(h+e)*c,(g+e)*b,(h+d)*c,0,1*c);U(a,.25*b,.75*c,.25*b,.25*c,0,0);U(a,(g+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*Jd;g=.9;h=.5;T(a,(g-d)*b,h*c,!0);U(a,(g-d)*b,(h-e)*c,(g-e)*b,(h-d)*c,g*b,(h-d)*c);U(a,(g+e)*b,(h-d)*c,(g+d)*b,(h-e)*c,(g+d)*b,h*c);U(a,(g+d)*b,(h+e)*c,(g+e)*b,(h+d)*c,g*b,(h+d)*c);U(a,(g-e)*b,(h+d)*c,(g-d)*b,(h+e)*c,(g-d)*b,h*c);b=a.q;b.C= -new S(.2,.25);b.D=new S(.6,.75);D.u(a);return b},OrGate:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0,0,!0);U(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);U(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);U(a,.25*b,.75*c,.25*b,.25*c,0,0);X(a);b=a.q;b.C=new S(.2,.25);b.D=new S(.75,.75);D.u(a);return b},XnorGate:function(a,b,c){a=D.v();var d=.5,e=Jd*d,g=.2,h=.5;T(a,.1*b,0,!1);U(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);T(a,.8*b,.5*c,!0);U(a,.7*b,(h+e)*c,(g+e)*b,(h+d)*c,.2*b,1*c);U(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);U(a,(g+e)* -b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*Jd;g=.9;h=.5;T(a,(g-d)*b,h*c,!0);U(a,(g-d)*b,(h-e)*c,(g-e)*b,(h-d)*c,g*b,(h-d)*c);U(a,(g+e)*b,(h-d)*c,(g+d)*b,(h-e)*c,(g+d)*b,h*c);U(a,(g+d)*b,(h+e)*c,(g+e)*b,(h+d)*c,g*b,(h+d)*c);U(a,(g-e)*b,(h+d)*c,(g-d)*b,(h+e)*c,(g-d)*b,h*c);b=a.q;b.C=new S(.4,.25);b.D=new S(.65,.75);D.u(a);return b},XorGate:function(a,b,c){a=D.v();var d=.5*Jd;T(a,.1*b,0,!1);U(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);T(a,.2*b,0,!0);U(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);U(a,.9*b,(.5+d)* -c,(.2+d)*b,1*c,.2*b,1*c);U(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);X(a);b=a.q;b.C=new S(.4,.25);b.D=new S(.8,.75);D.u(a);return b},Capacitor:function(a,b,c){a=D.v();T(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},Resistor:function(a,b,c){a=D.v();T(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.q;D.u(a);return b},Inductor:function(a,b,c){a=D.v();var d=.1*Jd,e=.1;T(a,(e-.5* -d)*b,c,!1);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;U(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.q;D.u(a);return b},ACvoltageSource:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0*b,.5*c,!1);U(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);U(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)* -c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);U(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.q;b.me=ck;D.u(a);return b},DCvoltageSource:function(a,b,c){a=D.v();T(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},Diode:function(a,b,c){a=D.v();T(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},Wifi:function(a,b,c){var d=b,e=c; -b*=.38;c*=.6;a=D.v();var g=.8*Jd,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;T(a,k*b+d,(l+h)*c+e,!0);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);U(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);U(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a);g=.4*Jd;h=.4;k=.2;l=.5;T(a,k*b+d,(l+h)*c+e,!0);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k* -b+d,(l-h)*c+e);U(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);U(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a);g=.2*Jd;h=.2;l=k=.5;T(a,(k-h)*b+d,l*c+e,!0);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);U(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);g=.4*Jd;h=.4;k=.8;l=.5;T(a,k*b+d,(l-h)*c+e,!0);U(a,(k+g)*b+d,(l- -h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);U(a,(k+h-.5*g)*b+d,(l-g)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a);g=.8*Jd;h=.8;k=1;l=.5;T(a,k*b+d,(l-h)*c+e,!0);U(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);U(a,(k+h-.5*g)*b+d,(l-g)*c+ +b.D=new S(.77,1);D.u(a);return b},TransmittalTape:function(a,b,c){a=a?a.Sc:NaN;isNaN(a)&&(a=.1);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);X(d);b=d.q;b.C=ec;b.D=new S(1,1-a);D.u(d);return b},AndGate:function(a,b,c){a=D.v();var d=.5*Id;T(a,0,0,!0);a.lineTo(.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=ec;b.D=new S(.55,1);D.u(a);return b},Buffer:function(a,b,c){a=D.v();T(a, +0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},Clock:function(a,b,c){a=D.v();var d=.5*Id;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);T(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2* +b,.75*c);a.kb(!1);b=a.q;b.me=bk;D.u(a);return b},Ground:function(a,b,c){a=D.v();T(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.q;D.u(a);return b},Inverter:function(a,b,c){a=D.v();var d=.1*Id;T(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);U(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);U(a,.8*b,(.5-d)*c,(.9-d)*b,.4* +c,.9*b,.4*c);U(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.q;b.C=new S(0,.25);b.D=new S(.4,.75);D.u(a);return b},NandGate:function(a,b,c){a=D.v();var d=.5*Id,e=.4*Id,g=.1*Id;T(a,.8*b,.5*c,!0);U(a,.8*b,(.5+e)*c,(.4+d)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);U(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);T(a,1*b,.5*c,!0);U(a,1*b,(.5+g)*c,(.9+g)*b,.6*c,.9*b,.6*c);U(a,(.9-g)*b,.6*c,.8*b,(.5+g)*c,.8*b,.5*c);U(a,.8*b,(.5-g)*c,(.9-g)*b,.4*c,.9*b,.4*c);U(a,(.9+g)*b,.4*c,1*b,(.5-g)*c,1*b,.5* +c);b=a.q;b.C=new S(0,.05);b.D=new S(.55,.95);D.u(a);return b},NorGate:function(a,b,c){a=D.v();var d=.5,e=Id*d,g=0,h=.5;T(a,.8*b,.5*c,!0);U(a,.7*b,(h+e)*c,(g+e)*b,(h+d)*c,0,1*c);U(a,.25*b,.75*c,.25*b,.25*c,0,0);U(a,(g+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*Id;g=.9;h=.5;T(a,(g-d)*b,h*c,!0);U(a,(g-d)*b,(h-e)*c,(g-e)*b,(h-d)*c,g*b,(h-d)*c);U(a,(g+e)*b,(h-d)*c,(g+d)*b,(h-e)*c,(g+d)*b,h*c);U(a,(g+d)*b,(h+e)*c,(g+e)*b,(h+d)*c,g*b,(h+d)*c);U(a,(g-e)*b,(h+d)*c,(g-d)*b,(h+e)*c,(g-d)*b,h*c);b=a.q;b.C= +new S(.2,.25);b.D=new S(.6,.75);D.u(a);return b},OrGate:function(a,b,c){a=D.v();var d=.5*Id;T(a,0,0,!0);U(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);U(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);U(a,.25*b,.75*c,.25*b,.25*c,0,0);X(a);b=a.q;b.C=new S(.2,.25);b.D=new S(.75,.75);D.u(a);return b},XnorGate:function(a,b,c){a=D.v();var d=.5,e=Id*d,g=.2,h=.5;T(a,.1*b,0,!1);U(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);T(a,.8*b,.5*c,!0);U(a,.7*b,(h+e)*c,(g+e)*b,(h+d)*c,.2*b,1*c);U(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);U(a,(g+e)* +b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*Id;g=.9;h=.5;T(a,(g-d)*b,h*c,!0);U(a,(g-d)*b,(h-e)*c,(g-e)*b,(h-d)*c,g*b,(h-d)*c);U(a,(g+e)*b,(h-d)*c,(g+d)*b,(h-e)*c,(g+d)*b,h*c);U(a,(g+d)*b,(h+e)*c,(g+e)*b,(h+d)*c,g*b,(h+d)*c);U(a,(g-e)*b,(h+d)*c,(g-d)*b,(h+e)*c,(g-d)*b,h*c);b=a.q;b.C=new S(.4,.25);b.D=new S(.65,.75);D.u(a);return b},XorGate:function(a,b,c){a=D.v();var d=.5*Id;T(a,.1*b,0,!1);U(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);T(a,.2*b,0,!0);U(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);U(a,.9*b,(.5+d)* +c,(.2+d)*b,1*c,.2*b,1*c);U(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);X(a);b=a.q;b.C=new S(.4,.25);b.D=new S(.8,.75);D.u(a);return b},Capacitor:function(a,b,c){a=D.v();T(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},Resistor:function(a,b,c){a=D.v();T(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.q;D.u(a);return b},Inductor:function(a,b,c){a=D.v();var d=.1*Id,e=.1;T(a,(e-.5* +d)*b,c,!1);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;U(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.q;D.u(a);return b},ACvoltageSource:function(a,b,c){a=D.v();var d=.5*Id;T(a,0*b,.5*c,!1);U(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);U(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)* +c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);U(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.q;b.me=bk;D.u(a);return b},DCvoltageSource:function(a,b,c){a=D.v();T(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},Diode:function(a,b,c){a=D.v();T(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},Wifi:function(a,b,c){var d=b,e=c; +b*=.38;c*=.6;a=D.v();var g=.8*Id,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;T(a,k*b+d,(l+h)*c+e,!0);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);U(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);U(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a);g=.4*Id;h=.4;k=.2;l=.5;T(a,k*b+d,(l+h)*c+e,!0);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k* +b+d,(l-h)*c+e);U(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);U(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a);g=.2*Id;h=.2;l=k=.5;T(a,(k-h)*b+d,l*c+e,!0);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);U(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);g=.4*Id;h=.4;k=.8;l=.5;T(a,k*b+d,(l-h)*c+e,!0);U(a,(k+g)*b+d,(l- +h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);U(a,(k+h-.5*g)*b+d,(l-g)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a);g=.8*Id;h=.8;k=1;l=.5;T(a,k*b+d,(l-h)*c+e,!0);U(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);U(a,(k+h-.5*g)*b+d,(l-g)*c+ e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a);b=a.q;D.u(a);return b},Email:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);X(a);T(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.kb(!1);b=a.q;D.u(a);return b},Ethernet:function(a,b,c){a=D.v();T(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);X(a);T(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c); -a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);X(a);T(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);X(a);T(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.kb(!1);b=a.q;D.u(a);return b},Power:function(a,b,c){a=D.v();var d=.4*Jd,e=.4,g=D.P(),h=D.P(),k=D.P(),l=D.P();Ce(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,g,g,h,k,l);var m=D.Fb(h.x, -h.y);T(a,h.x*b,h.y*c,!0);U(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);U(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);U(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);Ce(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,g,g);U(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*Jd;e=.3;Ce(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,g,g);a.lineTo(h.x*b,h.y*c);U(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);U(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);U(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+ -e)*b,.5*c);Ce(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,g,g,h,k,l);U(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);X(a);T(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);X(a);D.A(g);D.A(h);D.A(k);D.A(l);D.A(m);b=a.q;b.C=new S(.25,.55);b.D=new S(.75,.8);D.u(a);return b},Fallout:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0*b,.5*c,!0);U(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);U(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b, -.5*c);var e=d=0;T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;X(a);T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;X(a);T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);X(a);b=a.q;b.me=ck;D.u(a);return b},IrritationHazard:function(a,b,c){a=D.v();T(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8* +a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);X(a);T(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);X(a);T(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.kb(!1);b=a.q;D.u(a);return b},Power:function(a,b,c){a=D.v();var d=.4*Id,e=.4,g=D.P(),h=D.P(),k=D.P(),l=D.P();Be(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,g,g,h,k,l);var m=D.Fb(h.x, +h.y);T(a,h.x*b,h.y*c,!0);U(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);U(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);U(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);Be(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,g,g);U(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*Id;e=.3;Be(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,g,g);a.lineTo(h.x*b,h.y*c);U(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);U(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);U(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+ +e)*b,.5*c);Be(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,g,g,h,k,l);U(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);X(a);T(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);X(a);D.A(g);D.A(h);D.A(k);D.A(l);D.A(m);b=a.q;b.C=new S(.25,.55);b.D=new S(.75,.8);D.u(a);return b},Fallout:function(a,b,c){a=D.v();var d=.5*Id;T(a,0*b,.5*c,!0);U(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);U(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b, +.5*c);var e=d=0;T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;X(a);T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;X(a);T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);X(a);b=a.q;b.me=bk;D.u(a);return b},IrritationHazard:function(a,b,c){a=D.v();T(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8* b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);X(a);b=a.q;b.C=new S(.3,.3);b.D=new S(.7,.7);D.u(a);return b},ElectricalHazard:function(a,b,c){a=D.v();T(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65* b,.56*c);a.lineTo(0*b,.68*c);X(a);b=a.q;D.u(a);return b},FireHazard:function(a,b,c){a=D.v();T(a,.1*b,1*c,!0);U(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);U(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);U(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);U(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);U(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);U(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);X(a);b=a.q;b.C=new S(.05,.645);b.D=new S(.884,.908);D.u(a);return b},BpmnActivityLoop:function(a,b,c){a=D.v();var d=4*(Math.SQRT2-1)/3*.5;T(a,.65*b,1*c, !1);U(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);U(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);U(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);U(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.q;D.u(a);return b},BpmnActivityParallel:function(a,b,c){a=D.v();T(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},BpmnActivitySequential:function(a,b,c){a=D.v();T(a,0,0,!1);a.lineTo(1* @@ -1557,8 +1557,8 @@ b,c){a=D.v();T(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8* BpmnTaskUser:function(a,b,c){a=D.v();T(a,0,0,!1);T(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);U(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);U(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,g=4*(1-Math.cos(e))/(3*Math.sin(e)),e=g*d,g=g*d;U(a,(.5-(e+d)/2)*b,(d+(d+g)/2)*c,(.5-d)*b,(d+g)*c,(.5-d)*b,d*c);U(a,(.5-d)*b,(d-g)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c); U(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-g)*c,(.5+d)*b,d*c);U(a,(.5+d)*b,(d+g)*c,(.5+(e+d)/2)*b,(d+(d+g)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);T(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);T(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.q;D.u(a);return b},BpmnEventConditional:function(a,b,c){a=D.v();T(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);X(a);T(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8* b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.kb(!1);b=a.q;D.u(a);return b},BpmnEventError:function(a,b,c){a=D.v();T(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);X(a);b=a.q;D.u(a);return b},BpmnEventEscalation:function(a,b,c){a=D.v();T(a,0,0,!1);T(a,1*b,1*c,!1);T(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);X(a);b=a.q;D.u(a);return b},BpmnEventTimer:function(a,b,c){a= -D.v();var d=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.kb(!1);b=a.q;b.me=ck;D.u(a);return b}},er;for(er in qq)qq[er.toLowerCase()]=er; -var xq={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", +D.v();var d=.5*Id;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.kb(!1);b=a.q;b.me=bk;D.u(a);return b}},dr;for(dr in pq)pq[dr.toLowerCase()]=dr; +var wq={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4", BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8", TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", @@ -1567,39 +1567,39 @@ DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z", OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8", OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"}; -function uq(a){var b=ne[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=ne[c];if(void 0===b){var d=null,e;for(e in xq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=yf(xq[d],!1),ne[d]=a,c!==d&&(ne[c]=d),d}}return"string"===typeof b?b:b instanceof Ve?a:null} -function F(a){x.call(this,a);this.T=2408959;this.Ol=this.Pi="";this.rt=this.ot=this.At=this.zs=null;this.Ct="";this.lh=this.ls=this.Bt=this.vn=null;this.qt="";this.Fp=null;this.pt=ie;this.st="";this.Gp=null;this.Zd="";this.yw=this.xr=this.Bl=null;this.jj=(new N(NaN,NaN)).freeze();this.Es="";this.Rl=null;this.Fs=ec;this.Ns=Vd;this.Gs=Wd;this.Tr=null;this.As=fr;this.xn=Ud;this.wn="gray";this.Pg=4;this.PD=-1;this.Zt=NaN;this.DH=new C;this.Tl=null;this.Ak=NaN}D.Ta(F,x);D.ka("Part",F); +function tq(a){var b=me[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=me[c];if(void 0===b){var d=null,e;for(e in wq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=xf(wq[d],!1),me[d]=a,c!==d&&(me[c]=d),d}}return"string"===typeof b?b:b instanceof Ue?a:null} +function F(a){x.call(this,a);this.T=2408959;this.Ol=this.Pi="";this.rt=this.ot=this.At=this.zs=null;this.Ct="";this.lh=this.ls=this.Bt=this.vn=null;this.qt="";this.Fp=null;this.pt=he;this.st="";this.Gp=null;this.Zd="";this.yw=this.xr=this.Bl=null;this.jj=(new N(NaN,NaN)).freeze();this.Es="";this.Rl=null;this.Fs=ec;this.Ns=Ud;this.Gs=Vd;this.Tr=null;this.As=er;this.xn=Td;this.wn="gray";this.Pg=4;this.PD=-1;this.Zt=NaN;this.DH=new C;this.Tl=null;this.Ak=NaN}D.Ta(F,x);D.ka("Part",F); F.prototype.cloneProtected=function(a){x.prototype.cloneProtected.call(this,a);a.T=this.T&-4097|49152;a.Pi=this.Pi;a.Ol=this.Ol;a.zs=this.zs;a.At=this.At;a.ot=this.ot;a.rt=this.rt;a.Ct=this.Ct;a.Bt=this.Bt;a.ls=this.ls;a.lh=null;a.qt=this.qt;a.pt=this.pt.V();a.st=this.st;a.Zd=this.Zd;a.xr=this.xr;a.jj.assign(this.jj);a.Es=this.Es;a.Fs=this.Fs.V();a.Ns=this.Ns.V();a.Gs=this.Gs.V();a.Tr=this.Tr;a.As=this.As;a.xn=this.xn.V();a.wn=this.wn;a.Pg=this.Pg;a.Zt=this.Zt}; -F.prototype.Ei=function(a){x.prototype.Ei.call(this,a);a.dl();a.vn=null;a.Fp=null;a.Gp=null;a.Rl=null;a.Tl=null};F.prototype.toString=function(){var a=D.yf(Object.getPrototypeOf(this))+"#"+D.Od(this);null!==this.data&&(a+="("+ia(this.data)+")");return a};F.LayoutNone=0;var Wm;F.LayoutAdded=Wm=1;var en;F.LayoutRemoved=en=2;F.LayoutShown=4;F.LayoutHidden=8;F.LayoutNodeSized=16;var Kn;F.LayoutGroupLayout=Kn=32;F.LayoutNodeReplaced=64;var fr;F.LayoutStandard=fr=Wm|en|28|Kn|64;F.LayoutAll=16777215; -F.prototype.so=function(a,b,c,d,e,g,h){var k=this.g;null!==k&&(a===hg&&"elements"===b?e instanceof x?Xm(e,function(a){Zm(k,a);Ym(k,a)}):e instanceof Il&&xn(k,e):a===ig&&"elements"===b&&(e instanceof x?Xm(e,function(a){cn(k,a);bn(k,a)}):e instanceof Il&&yn(k,e)),k.od(a,b,c,d,e,g,h))};F.prototype.updateTargetBindings=F.prototype.Ob=function(a){x.prototype.Ob.call(this,a);if(null!==this.data){a=this.xa.o;for(var b=a.length,c=0;ch&&a.y>k&&a.righth&&b.y>k&&b.righth&&a.y>k&&a.righth&&b.y>k&&b.right=c.JJ)){this.T^=4096;var d=!1;if(null!==c){d=c.lb;c.lb=!0;var e=c.selection;e.Xa();a?e.add(this):e.remove(this);e.freeze()}this.i("isSelected",b,a);this.qe();a=this.pK;null!==a&&a(this);null!==c&&(c.Le(),c.lb=d)}}}); D.defineProperty(F,{Zg:"isHighlighted"},function(){return 0!==(this.T&524288)},function(a){var b=0!==(this.T&524288);if(b!==a){v&&D.h(a,"boolean",F,"isHighlighted");this.T^=524288;var c=this.g;null!==c&&(c=c.wm,c.Xa(),a?c.add(this):c.remove(this),c.freeze());this.i("isHighlighted",b,a);this.ra();a=this.dJ;null!==a&&a(this)}}); -D.defineProperty(F,{el:"isShadowed"},function(){return 0!==(this.T&8192)},function(a){var b=0!==(this.T&8192);b!==a&&(v&&D.h(a,"boolean",F,"isShadowed"),this.T^=8192,this.i("isShadowed",b,a),this.ra())});function Pm(a){return 0!==(a.T&32768)}function ir(a,b){a.T=b?a.T|32768:a.T&-32769}function Po(a,b){a.T=b?a.T|65536:a.T&-65537}function ul(a){return 0!==(a.T&131072)}F.prototype.Pf=function(a){this.T=a?this.T|131072:this.T&-131073};function rr(a,b){a.T=b?a.T|1048576:a.T&-1048577} +D.defineProperty(F,{el:"isShadowed"},function(){return 0!==(this.T&8192)},function(a){var b=0!==(this.T&8192);b!==a&&(v&&D.h(a,"boolean",F,"isShadowed"),this.T^=8192,this.i("isShadowed",b,a),this.ra())});function Om(a){return 0!==(a.T&32768)}function hr(a,b){a.T=b?a.T|32768:a.T&-32769}function Oo(a,b){a.T=b?a.T|65536:a.T&-65537}function tl(a){return 0!==(a.T&131072)}F.prototype.Pf=function(a){this.T=a?this.T|131072:this.T&-131073};function qr(a,b){a.T=b?a.T|1048576:a.T&-1048577} D.defineProperty(F,{dG:"isAnimated"},function(){return 0!==(this.T&262144)},function(a){var b=0!==(this.T&262144);b!==a&&(v&&D.h(a,"boolean",F,"isAnimated"),this.T^=262144,this.i("isAnimated",b,a))});D.defineProperty(F,{dJ:"highlightedChanged"},function(){return this.ls},function(a){var b=this.ls;b!==a&&(null!==a&&D.h(a,"function",F,"highlightedChanged"),this.ls=a,this.i("highlightedChanged",b,a))}); D.defineProperty(F,{Qy:"selectionObjectName"},function(){return this.Ct},function(a){var b=this.Ct;b!==a&&(v&&D.h(a,"string",F,"selectionObjectName"),this.Ct=a,this.vn=null,this.i("selectionObjectName",b,a))});D.defineProperty(F,{oK:"selectionAdornmentTemplate"},function(){return this.At},function(a){var b=this.At;b!==a&&(v&&D.l(a,da,F,"selectionAdornmentTemplate"),this.At=a,this.i("selectionAdornmentTemplate",b,a))}); D.w(F,{Cm:"selectionObject"},function(){if(null===this.vn){var a=this.Qy;null!==a&&""!==a?(a=this.Nd(a),this.vn=null!==a?a:this):this instanceof J?(a=this.path,this.vn=null!==a?a:this):this.vn=this}return this.vn});D.defineProperty(F,{pK:"selectionChanged"},function(){return this.Bt},function(a){var b=this.Bt;b!==a&&(null!==a&&D.h(a,"function",F,"selectionChanged"),this.Bt=a,this.i("selectionChanged",b,a))}); @@ -1620,29 +1620,29 @@ D.defineProperty(F,{PG:"resizeAdornmentTemplate"},function(){return this.ot},fun D.w(F,{QG:"resizeObject"},function(){if(null===this.Fp){var a=this.RG;null!==a&&""!==a?(a=this.Nd(a),this.Fp=null!==a?a:this):this.Fp=this}return this.Fp});D.defineProperty(F,{fK:"resizeCellSize"},function(){return this.pt},function(a){var b=this.pt;b.O(a)||(v&&D.l(a,Ca,F,"resizeCellSize"),this.pt=a=a.V(),this.i("resizeCellSize",b,a))}); D.defineProperty(F,{hK:"rotateAdornmentTemplate"},function(){return this.rt},function(a){var b=this.rt;b!==a&&(v&&D.l(a,da,F,"rotateAdornmentTemplate"),this.rt=a,this.i("rotateAdornmentTemplate",b,a))});D.defineProperty(F,{iK:"rotateObjectName"},function(){return this.st},function(a){var b=this.st;b!==a&&(v&&D.h(a,"string",F,"rotateObjectName"),this.st=a,this.Gp=null,this.i("rotateObjectName",b,a))}); D.w(F,{TB:"rotateObject"},function(){if(null===this.Gp){var a=this.iK;null!==a&&""!==a?(a=this.Nd(a),this.Gp=null!==a?a:this):this.Gp=this}return this.Gp});D.defineProperty(F,{text:"text"},function(){return this.Zd},function(a){var b=this.Zd;b!==a&&(v&&D.h(a,"string",F,"text"),this.Zd=a,this.i("text",b,a))}); -D.defineProperty(F,{Ka:"containingGroup"},function(){return this.Bl},function(a){if(this.re()){var b=this.Bl;if(b!==a){v&&null!==a&&D.l(a,I,F,"containingGroup");null===a||this!==a&&!a.Fi(this)||(this===a&&D.k("Cannot make a Group a member of itself: "+this.toString()),D.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.L(en);var c=this.g;null!==b?sr(b,this):this instanceof I&&null!==c&&c.am.remove(this);this.Bl=a;null!==a?tr(a,this):this instanceof -I&&null!==c&&c.am.add(this);this.L(Wm);if(null!==c){var d=this.data,e=c.ea;null!==d&&e instanceof Y&&e.$B(d,e.zb(null!==a?a.data:null))}d=this.jF;null!==d&&(e=!0,null!==c&&(e=c.ab,c.ab=!0),d(this,b,a),null!==c&&(c.ab=e));if(this instanceof I)for(c=new L(F),Rh(c,this,!0,0,!0),c=c.j;c.next();)if(d=c.value,d instanceof G)for(d=d.Pd;d.next();)An(d.value);if(this instanceof G){for(d=this.Pd;d.next();)An(d.value);c=this.Yb;null!==c&&An(c)}this.i("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&zl(b, --1,a))}}else D.k("cannot set the Part.containingGroup of a Link or Adornment")});f=F.prototype;f.dl=function(){var a=this.Ka;null!==a&&(a.K(),null!==a.Sb&&a.Sb.K(),a.kg())};f.ra=function(){var a=this.g;null!==a&&!Om(this)&&!Pm(this)&&this.isVisible()&&this.cc.H()&&a.ra(yl(this,this.cc))};f.K=function(){x.prototype.K.call(this);var a=this.g;null!==a&&(a.Gg.add(this),this instanceof G&&null!==this.Yb&&Zo(this.Yb),a.Le(!0))};f.Fu=function(a){a||(a=this.Bl,null!==a&&tr(a,this))}; -f.Gu=function(a){a||(a=this.Bl,null!==a&&sr(a,this))};f.Pn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ea,null!==b&&b.Ly(a))}};D.defineProperty(F,{jF:"containingGroupChanged"},function(){return this.xr},function(a){var b=this.xr;b!==a&&(null!==a&&D.h(a,"function",F,"containingGroupChanged"),this.xr=a,this.i("containingGroupChanged",b,a))});F.prototype.findSubGraphLevel=function(){return ur(this,this)}; -function ur(a,b){var c=b.Ka;return null!==c?1+ur(a,c):b instanceof G&&(c=b.Yb,null!==c)?ur(a,c):0}F.prototype.findTopLevelPart=function(){return vr(this,this)};function vr(a,b){var c=b.Ka;return null!==c?vr(a,c):b instanceof G&&(c=b.Yb,null!==c)?vr(a,c):b}D.w(F,{Bq:"isTopLevel"},function(){return null!==this.Ka||this instanceof G&&null!==this.Yb?!1:!0});F.prototype.isMemberOf=F.prototype.Fi=function(a){return a instanceof I?wr(this,this,a):!1}; -function wr(a,b,c){if(b===c||null===c)return!1;var d=b.Ka;return null===d||d!==c&&!wr(a,d,c)?b instanceof G&&(b=b.Yb,null!==b)?wr(a,b,c):!1:!0} -F.prototype.findCommonContainingGroup=F.prototype.KI=function(a){if(null===a)return null;v&&D.l(a,F,F,"findCommonContainingGroup:other");if(this===a)return this.Ka;for(var b=this;null!==b;){b instanceof I&&rr(b,!0);if(b instanceof G){var c=b.Yb;null!==c&&(b=c)}b=b.Ka}for(var d=null,b=a;null!==b;){if(0!==(b.T&1048576)){d=b;break}b instanceof G&&(c=b.Yb,null!==c&&(b=c));b=b.Ka}for(b=this;null!==b;)b instanceof I&&rr(b,!1),b instanceof G&&(c=b.Yb,null!==c&&(b=c)),b=b.Ka;return d}; +D.defineProperty(F,{Ka:"containingGroup"},function(){return this.Bl},function(a){if(this.re()){var b=this.Bl;if(b!==a){v&&null!==a&&D.l(a,I,F,"containingGroup");null===a||this!==a&&!a.Fi(this)||(this===a&&D.k("Cannot make a Group a member of itself: "+this.toString()),D.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.L(dn);var c=this.g;null!==b?rr(b,this):this instanceof I&&null!==c&&c.am.remove(this);this.Bl=a;null!==a?sr(a,this):this instanceof +I&&null!==c&&c.am.add(this);this.L(Vm);if(null!==c){var d=this.data,e=c.ea;null!==d&&e instanceof Y&&e.$B(d,e.zb(null!==a?a.data:null))}d=this.jF;null!==d&&(e=!0,null!==c&&(e=c.ab,c.ab=!0),d(this,b,a),null!==c&&(c.ab=e));if(this instanceof I)for(c=new L(F),Qh(c,this,!0,0,!0),c=c.j;c.next();)if(d=c.value,d instanceof G)for(d=d.Pd;d.next();)zn(d.value);if(this instanceof G){for(d=this.Pd;d.next();)zn(d.value);c=this.Yb;null!==c&&zn(c)}this.i("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&yl(b, +-1,a))}}else D.k("cannot set the Part.containingGroup of a Link or Adornment")});f=F.prototype;f.dl=function(){var a=this.Ka;null!==a&&(a.K(),null!==a.Sb&&a.Sb.K(),a.kg())};f.ra=function(){var a=this.g;null!==a&&!Nm(this)&&!Om(this)&&this.isVisible()&&this.cc.H()&&a.ra(xl(this,this.cc))};f.K=function(){x.prototype.K.call(this);var a=this.g;null!==a&&(a.Gg.add(this),this instanceof G&&null!==this.Yb&&Yo(this.Yb),a.Le(!0))};f.Fu=function(a){a||(a=this.Bl,null!==a&&sr(a,this))}; +f.Gu=function(a){a||(a=this.Bl,null!==a&&rr(a,this))};f.Pn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ea,null!==b&&b.Ly(a))}};D.defineProperty(F,{jF:"containingGroupChanged"},function(){return this.xr},function(a){var b=this.xr;b!==a&&(null!==a&&D.h(a,"function",F,"containingGroupChanged"),this.xr=a,this.i("containingGroupChanged",b,a))});F.prototype.findSubGraphLevel=function(){return tr(this,this)}; +function tr(a,b){var c=b.Ka;return null!==c?1+tr(a,c):b instanceof G&&(c=b.Yb,null!==c)?tr(a,c):0}F.prototype.findTopLevelPart=function(){return ur(this,this)};function ur(a,b){var c=b.Ka;return null!==c?ur(a,c):b instanceof G&&(c=b.Yb,null!==c)?ur(a,c):b}D.w(F,{Bq:"isTopLevel"},function(){return null!==this.Ka||this instanceof G&&null!==this.Yb?!1:!0});F.prototype.isMemberOf=F.prototype.Fi=function(a){return a instanceof I?vr(this,this,a):!1}; +function vr(a,b,c){if(b===c||null===c)return!1;var d=b.Ka;return null===d||d!==c&&!vr(a,d,c)?b instanceof G&&(b=b.Yb,null!==b)?vr(a,b,c):!1:!0} +F.prototype.findCommonContainingGroup=F.prototype.KI=function(a){if(null===a)return null;v&&D.l(a,F,F,"findCommonContainingGroup:other");if(this===a)return this.Ka;for(var b=this;null!==b;){b instanceof I&&qr(b,!0);if(b instanceof G){var c=b.Yb;null!==c&&(b=c)}b=b.Ka}for(var d=null,b=a;null!==b;){if(0!==(b.T&1048576)){d=b;break}b instanceof G&&(c=b.Yb,null!==c&&(b=c));b=b.Ka}for(b=this;null!==b;)b instanceof I&&qr(b,!1),b instanceof G&&(c=b.Yb,null!==c&&(b=c)),b=b.Ka;return d}; D.defineProperty(F,{zJ:"layoutConditions"},function(){return this.As},function(a){var b=this.As;b!==a&&(v&&D.h(a,"number",F,"layoutConditions"),this.As=a,this.i("layoutConditions",b,a))});F.prototype.canLayout=function(){if(!this.uB||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Yc||this instanceof G&&this.Lf?!1:!0}; -F.prototype.invalidateLayout=F.prototype.L=function(a){void 0===a&&(a=16777215);var b;this.uB&&0!==(a&this.zJ)?(b=this.layer,null!==b&&b.Yc||this instanceof G&&this.Lf?b=!1:(b=this.g,b=null!==b&&b.na.ub?!1:!0)):b=!1;if(b)if(b=this.Bl,null!==b){var c=b.Zb;null!==c?c.L():b.L(a)}else a=this.g,null!==a&&(c=a.Zb,null!==c&&c.L())};function an(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Yc?!1:!0} +F.prototype.invalidateLayout=F.prototype.L=function(a){void 0===a&&(a=16777215);var b;this.uB&&0!==(a&this.zJ)?(b=this.layer,null!==b&&b.Yc||this instanceof G&&this.Lf?b=!1:(b=this.g,b=null!==b&&b.na.ub?!1:!0)):b=!1;if(b)if(b=this.Bl,null!==b){var c=b.Zb;null!==c?c.L():b.L(a)}else a=this.g,null!==a&&(c=a.Zb,null!==c&&c.L())};function $m(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Yc?!1:!0} D.defineProperty(F,{vF:"dragComputation"},function(){return this.Tr},function(a){var b=this.Tr;b!==a&&(null!==a&&D.h(a,"function",F,"dragComputation"),this.Tr=a,this.i("dragComputation",b,a))});D.defineProperty(F,{tK:"shadowOffset"},function(){return this.xn},function(a){var b=this.xn;b.O(a)||(v&&D.l(a,N,F,"shadowOffset"),this.xn=a=a.V(),this.ra(),this.i("shadowOffset",b,a))}); D.defineProperty(F,{shadowColor:"shadowColor"},function(){return this.wn},function(a){var b=this.wn;b!==a&&(v&&D.h(a,"string",F,"shadowColor"),this.wn=a,this.ra(),this.i("shadowColor",b,a))});D.defineProperty(F,{shadowBlur:"shadowBlur"},function(){return this.Pg},function(a){var b=this.Pg;b!==a&&(v&&D.h(a,"number",F,"shadowBlur"),this.Pg=a,this.ra(),this.i("shadowBlur",b,a))}); -function da(a){0===arguments.length?F.call(this,fk):F.call(this,a);this.T&=-257;this.Ol="Adornment";this.Tc=null;this.ZD=0;this.NE=!1;this.Sb=this.oh=null}D.Ta(da,F);D.ka("Adornment",da);da.prototype.toString=function(){var a=this.hf;return"Adornment("+this.Ld+")"+(null!==a?a.toString():"")};da.prototype.updateRelationshipsFromData=function(){}; +function da(a){0===arguments.length?F.call(this,ek):F.call(this,a);this.T&=-257;this.Ol="Adornment";this.Tc=null;this.ZD=0;this.NE=!1;this.Sb=this.oh=null}D.Ta(da,F);D.ka("Adornment",da);da.prototype.toString=function(){var a=this.hf;return"Adornment("+this.Ld+")"+(null!==a?a.toString():"")};da.prototype.updateRelationshipsFromData=function(){}; da.prototype.Wu=function(a){var b=this.Bb.Y,c=this.Bb;if(b instanceof J&&c instanceof z){var d=b.path,c=d.xf;b.Wu(a);c=d.xf;a=this.xa.o;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.Ph){b.Ph=!0;var c=new L(G);c.add(this);Ir(this,c,b.fe,a,b.Ra,this,b.qC===Fl);b.Ph=!1}}; -function Ir(a,b,c,d,e,g,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.Ph){b.Ph=!0;var c=new L(G);c.add(this);Kr(this,c,b.fe,a,b.Ra,this,b.qC===Fl);b.Ph=!1}};function Kr(a,b,c,d,e,g,h){for(var k=g===a?!1:a.Dc,l=c?a.Xx():a.Yg();l.next();){var m=l.value;m.jc&&(k||m.Uf||m.ec(),m=m.fB(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Qd(!0),m.dl(),h&&ql(e,m,g)),2a&&(a=1);var b=this.g;if(null!==b&&!b.Ph){b.Ph=!0;var c=new L(G);c.add(this);Hr(this,c,b.fe,a,b.Ra,this,b.qC===El);b.Ph=!1}}; +function Hr(a,b,c,d,e,g,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.Ph){b.Ph=!0;var c=new L(G);c.add(this);Jr(this,c,b.fe,a,b.Ra,this,b.qC===El);b.Ph=!1}};function Jr(a,b,c,d,e,g,h){for(var k=g===a?!1:a.Dc,l=c?a.Xx():a.Yg();l.next();){var m=l.value;m.jc&&(k||m.Uf||m.ec(),m=m.fB(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Qd(!0),m.dl(),h&&pl(e,m,g)),2c&&(c-=180);break;case Yp:c=Re(b+90);90c&&(c-=180);break;case $p:c=Re(b-90);90c&&(c-=180);break;case aq:c=Re(b);if(45c||225c)return 0;90c&&(c-=180)}return Re(c)}; -D.defineProperty(J,{$:"fromNode"},function(){return this.Cg},function(a){var b=this.Cg;if(b!==a){v&&null!==a&&D.l(a,G,J,"fromNode");var c=this.oc;null!==b&&(this.Tg!==b&&Fr(b,this,c),Sr(this),this.L(en));this.Cg=a;null!==a&&this.Qd(a.isVisible());this.$i=null;this.ec();var d=this.g;if(null!==d){var e=this.data,g=d.ea;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.YB(e,g.zb(h))}else g instanceof Bg&&(h=null!==a?a.data:null,d.fe?g.Ii(e,g.zb(h)):(null!==b&&g.Ii(b.data,void 0),g.Ii(h,g.zb(null!== -this.Tg?this.Tg.data:null))))}e=this.oc;g=this.MF;null!==g&&(h=!0,null!==d&&(h=d.ab,d.ab=!0),g(this,c,e),null!==d&&(d.ab=h));null!==a&&(this.Tg!==a&&Er(a,this,e),Tr(this),this.L(Wm));this.i("fromNode",b,a);An(this)}}); -D.defineProperty(J,{hg:"fromPortId"},function(){return this.gi},function(a){var b=this.gi;if(b!==a){v&&D.h(a,"string",J,"fromPortId");var c=this.$,d=this.oc;null!==d&&Dr(c,d);Sr(this);this.gi=a;var e=this.oc;null!==e&&Dr(c,e);c=this.g;if(null!==c){var g=this.data,h=c.ea;null!==g&&h instanceof Y&&h.ZB(g,a)}d!==e&&(this.$i=null,this.ec(),g=this.MF,null!==g&&(h=!0,null!==c&&(h=c.ab,c.ab=!0),g(this,d,e),null!==c&&(c.ab=h)));Tr(this);this.i("fromPortId",b,a)}}); +J.prototype.qc=function(a){a.Re===J?2===(a.value&2)?this.Ny=a:a===Uj||a===uj||a===tj?this.lf=a:a===Lr||a===Mr||a===Nr?this.Yp=a:a!==Kr&&a!==vj&&D.k("Unknown Link enum value for a Link property: "+a):F.prototype.qc.call(this,a)};var Kr;J.Normal=Kr=D.s(J,"Normal",1);J.Orthogonal=D.s(J,"Orthogonal",2);J.AvoidsNodes=D.s(J,"AvoidsNodes",6);var Or;J.AvoidsNodesStraight=Or=D.s(J,"AvoidsNodesStraight",7);var vj;J.None=vj=D.s(J,"None",0);var Uj;J.Bezier=Uj=D.s(J,"Bezier",9);var uj; +J.JumpGap=uj=D.s(J,"JumpGap",10);var tj;J.JumpOver=tj=D.s(J,"JumpOver",11);var Lr;J.End=Lr=D.s(J,"End",17);var Mr;J.Scale=Mr=D.s(J,"Scale",18);var Nr;J.Stretch=Nr=D.s(J,"Stretch",19);var vq;J.OrientAlong=vq=D.s(J,"OrientAlong",21);var Wp;J.OrientPlus90=Wp=D.s(J,"OrientPlus90",22);var Yp;J.OrientMinus90=Yp=D.s(J,"OrientMinus90",23);var Pr;J.OrientOpposite=Pr=D.s(J,"OrientOpposite",24);var Qr;J.OrientUpright=Qr=D.s(J,"OrientUpright",25);var Xp;J.OrientPlus90Upright=Xp=D.s(J,"OrientPlus90Upright",26); +var Zp;J.OrientMinus90Upright=Zp=D.s(J,"OrientMinus90Upright",27);var $p;J.OrientUpright45=$p=D.s(J,"OrientUpright45",28);f=J.prototype;f.be=function(){null===this.Z&&(this.Z=new Do)};f.zm=function(){var a=this.$;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Nm(a)||Om(a))return!1}a=this.ba;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Nm(a)||Om(a))?!1:!0};f.bC=function(){return!1};f.cC=function(){};f.re=function(){return!1}; +J.prototype.computeAngle=function(a,b,c){return J.computeAngle(b,c)};J.computeAngle=function(a,b){var c=0;switch(a){default:case vj:c=0;break;case vq:c=b;break;case Wp:c=b+90;break;case Yp:c=b-90;break;case Pr:c=b+180;break;case Qr:c=Qe(b);90c&&(c-=180);break;case Xp:c=Qe(b+90);90c&&(c-=180);break;case Zp:c=Qe(b-90);90c&&(c-=180);break;case $p:c=Qe(b);if(45c||225c)return 0;90c&&(c-=180)}return Qe(c)}; +D.defineProperty(J,{$:"fromNode"},function(){return this.Cg},function(a){var b=this.Cg;if(b!==a){v&&null!==a&&D.l(a,G,J,"fromNode");var c=this.oc;null!==b&&(this.Tg!==b&&Er(b,this,c),Rr(this),this.L(dn));this.Cg=a;null!==a&&this.Qd(a.isVisible());this.$i=null;this.ec();var d=this.g;if(null!==d){var e=this.data,g=d.ea;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.YB(e,g.zb(h))}else g instanceof Ag&&(h=null!==a?a.data:null,d.fe?g.Ii(e,g.zb(h)):(null!==b&&g.Ii(b.data,void 0),g.Ii(h,g.zb(null!== +this.Tg?this.Tg.data:null))))}e=this.oc;g=this.MF;null!==g&&(h=!0,null!==d&&(h=d.ab,d.ab=!0),g(this,c,e),null!==d&&(d.ab=h));null!==a&&(this.Tg!==a&&Dr(a,this,e),Sr(this),this.L(Vm));this.i("fromNode",b,a);zn(this)}}); +D.defineProperty(J,{hg:"fromPortId"},function(){return this.gi},function(a){var b=this.gi;if(b!==a){v&&D.h(a,"string",J,"fromPortId");var c=this.$,d=this.oc;null!==d&&Cr(c,d);Rr(this);this.gi=a;var e=this.oc;null!==e&&Cr(c,e);c=this.g;if(null!==c){var g=this.data,h=c.ea;null!==g&&h instanceof Y&&h.ZB(g,a)}d!==e&&(this.$i=null,this.ec(),g=this.MF,null!==g&&(h=!0,null!==c&&(h=c.ab,c.ab=!0),g(this,d,e),null!==c&&(c.ab=h)));Sr(this);this.i("fromPortId",b,a)}}); D.w(J,{oc:"fromPort"},function(){var a=this.Cg;return null===a?null:a.aB(this.gi)});D.defineProperty(J,{MF:"fromPortChanged"},function(){return this.cs},function(a){var b=this.cs;b!==a&&(null!==a&&D.h(a,"function",J,"fromPortChanged"),this.cs=a,this.i("fromPortChanged",b,a))}); -D.defineProperty(J,{ba:"toNode"},function(){return this.Tg},function(a){var b=this.Tg;if(b!==a){v&&null!==a&&D.l(a,G,J,"toNode");var c=this.Gc;null!==b&&(this.Cg!==b&&Fr(b,this,c),Sr(this),this.L(en));this.Tg=a;null!==a&&this.Qd(a.isVisible());this.$i=null;this.ec();var d=this.g;if(null!==d){var e=this.data,g=d.ea;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.dC(e,g.zb(h))}else g instanceof Bg&&(h=null!==a?a.data:null,d.fe?(null!==b&&g.Ii(b.data,void 0),g.Ii(h,g.zb(null!==this.Cg?this.Cg.data: -null))):g.Ii(e,g.zb(h)))}e=this.Gc;g=this.nH;null!==g&&(h=!0,null!==d&&(h=d.ab,d.ab=!0),g(this,c,e),null!==d&&(d.ab=h));null!==a&&(this.Cg!==a&&Er(a,this,e),Tr(this),this.L(Wm));this.i("toNode",b,a);An(this)}}); -D.defineProperty(J,{jh:"toPortId"},function(){return this.Ai},function(a){var b=this.Ai;if(b!==a){v&&D.h(a,"string",J,"toPortId");var c=this.ba,d=this.Gc;null!==d&&Dr(c,d);Sr(this);this.Ai=a;var e=this.Gc;null!==e&&Dr(c,e);c=this.g;if(null!==c){var g=this.data,h=c.ea;null!==g&&h instanceof Y&&h.eC(g,a)}d!==e&&(this.$i=null,this.ec(),g=this.nH,null!==g&&(h=!0,null!==c&&(h=c.ab,c.ab=!0),g(this,d,e),null!==c&&(c.ab=h)));Tr(this);this.i("toPortId",b,a)}}); +D.defineProperty(J,{ba:"toNode"},function(){return this.Tg},function(a){var b=this.Tg;if(b!==a){v&&null!==a&&D.l(a,G,J,"toNode");var c=this.Gc;null!==b&&(this.Cg!==b&&Er(b,this,c),Rr(this),this.L(dn));this.Tg=a;null!==a&&this.Qd(a.isVisible());this.$i=null;this.ec();var d=this.g;if(null!==d){var e=this.data,g=d.ea;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.dC(e,g.zb(h))}else g instanceof Ag&&(h=null!==a?a.data:null,d.fe?(null!==b&&g.Ii(b.data,void 0),g.Ii(h,g.zb(null!==this.Cg?this.Cg.data: +null))):g.Ii(e,g.zb(h)))}e=this.Gc;g=this.nH;null!==g&&(h=!0,null!==d&&(h=d.ab,d.ab=!0),g(this,c,e),null!==d&&(d.ab=h));null!==a&&(this.Cg!==a&&Dr(a,this,e),Sr(this),this.L(Vm));this.i("toNode",b,a);zn(this)}}); +D.defineProperty(J,{jh:"toPortId"},function(){return this.Ai},function(a){var b=this.Ai;if(b!==a){v&&D.h(a,"string",J,"toPortId");var c=this.ba,d=this.Gc;null!==d&&Cr(c,d);Rr(this);this.Ai=a;var e=this.Gc;null!==e&&Cr(c,e);c=this.g;if(null!==c){var g=this.data,h=c.ea;null!==g&&h instanceof Y&&h.eC(g,a)}d!==e&&(this.$i=null,this.ec(),g=this.nH,null!==g&&(h=!0,null!==c&&(h=c.ab,c.ab=!0),g(this,d,e),null!==c&&(c.ab=h)));Sr(this);this.i("toPortId",b,a)}}); D.w(J,{Gc:"toPort"},function(){var a=this.Tg;return null===a?null:a.aB(this.Ai)});D.defineProperty(J,{nH:"toPortChanged"},function(){return this.Ut},function(a){var b=this.Ut;b!==a&&(null!==a&&D.h(a,"function",J,"toPortChanged"),this.Ut=a,this.i("toPortChanged",b,a))});D.defineProperty(J,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.pk:Vc},function(a){this.be();var b=this.Z.pk;b.O(a)||(v&&D.l(a,S,J,"fromSpot"),a=a.V(),this.Z.pk=a,this.i("fromSpot",b,a),this.ec())}); D.defineProperty(J,{sm:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.nk:NaN},function(a){this.be();var b=this.Z.nk;b!==a&&(v&&D.h(a,"number",J,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",J,"fromEndSegmentLength"),this.Z.nk=a,this.i("fromEndSegmentLength",b,a),this.ec())}); -D.defineProperty(J,{zu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.mk:yr},function(a){this.be();var b=this.Z.mk;b!==a&&(D.Qn("Link.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"fromEndSegmentDirection"),this.Z.mk=a,this.i("fromEndSegmentDirection",b,a),this.ec())}); +D.defineProperty(J,{zu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.mk:xr},function(a){this.be();var b=this.Z.mk;b!==a&&(D.Qn("Link.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"fromEndSegmentDirection"),this.Z.mk=a,this.i("fromEndSegmentDirection",b,a),this.ec())}); D.defineProperty(J,{Au:"fromShortLength"},function(){return null!==this.Z?this.Z.ok:NaN},function(a){this.be();var b=this.Z.ok;b!==a&&(v&&D.h(a,"number",J,"fromShortLength"),this.Z.ok=a,this.i("fromShortLength",b,a),this.ec())});D.defineProperty(J,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Nk:Vc},function(a){this.be();var b=this.Z.Nk;b.O(a)||(v&&D.l(a,S,J,"toSpot"),a=a.V(),this.Z.Nk=a,this.i("toSpot",b,a),this.ec())}); D.defineProperty(J,{Jm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Lk:NaN},function(a){this.be();var b=this.Z.Lk;b!==a&&(v&&D.h(a,"number",J,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",J,"toEndSegmentLength"),this.Z.Lk=a,this.i("toEndSegmentLength",b,a),this.ec())}); -D.defineProperty(J,{uv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Kk:yr},function(a){this.be();var b=this.Z.Kk;b!==a&&(D.Qn("Link.toEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"toEndSegmentDirection"),this.Z.Kk=a,this.i("toEndSegmentDirection",b,a),this.ec())});D.defineProperty(J,{vv:"toShortLength"},function(){return null!==this.Z?this.Z.Mk:NaN},function(a){this.be();var b=this.Z.Mk;b!==a&&(v&&D.h(a,"number",J,"toShortLength"),this.Z.Mk=a,this.i("toShortLength",b,a),this.ec())}); -function An(a){var b=a.$,c=a.ba,d=null,b=d=null!==b?null!==c?b.KI(c):b.Ka:null!==c?c.Ka:null,c=a.Bl;if(c!==b){null!==c&&sr(c,a);a.Bl=b;null!==b&&tr(b,a);var e=a.jF;if(null!==e){var g=!0,h=a.g;null!==h&&(g=h.ab,h.ab=!0);e(a,c,b);null!==h&&(h.ab=g)}!a.Uf||a.yE!==c&&a.zE!==c||a.ec()}if(a.oJ)for(a=a.Cf;a.next();)a.value.Ka=d}J.prototype.dl=function(){var a=this.Ka;null!==a&&this.$!==a&&this.ba!==a&&a.Kx&&F.prototype.dl.call(this)}; -J.prototype.getOtherNode=J.prototype.fB=function(a){v&&D.l(a,G,J,"getOtherNode:node");var b=this.$;return a===b?this.ba:b};J.prototype.getOtherPort=function(a){v&&D.l(a,O,J,"getOtherPort:port");var b=this.oc;return a===b?this.Gc:b};D.w(J,{oJ:"isLabeledLink"},function(){return null===this.If?!1:0=d&&(h=d-1);var l=this.m(h-1),g=this.m(h);Ae(e.x,e.y,k.x,k.y,l.x,l.y,g.x,g.y,.5,a);b=Math.min(g.x,b);c=Math.min(g.y,c);e=g}else for(e=this.m(0),g=this.m(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y),a.n(e.x,e.y,0,0),a.Mi(g),h=2;h=d&&(h=d-1);var l=this.m(h-1),g=this.m(h);re(e.x,e.y,k.x,k.y,l.x,l.y,g.x,g.y,.5,a);b=Math.min(g.x,b);c=Math.min(g.y,c);e=g}else for(e=this.m(0),g=this.m(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y),a.n(e.x,e.y,0,0),a.Mi(g),h=2;hc&&(c=-c)):Eb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Kf(d)),g.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}D.ya(g);b=this.m(h);g=this.m(h+1);b.x===g.x?b.y>g.y?a.n(b.x,b.y-(e/2-c)):a.n(b.x,b.y+(e/2-c)):b.y===g.y?b.x>g.x?a.n(b.x-(e/2-c),b.y):a.n(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.n(b.x+c*(g.x-b.x),b.y+c*(g.y-b.y)));return a};D.w(J,{vG:"midAngle"},function(){this.Ao();return this.computeMidAngle()}); -J.prototype.computeMidAngle=function(){var a=this.ta;if(2>a)return NaN;if(this.computeCurve()===Vj&&4<=a&&!this.ic){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.m(c),d=this.m(c+1),a=this.m(c+2),c=this.m(c+3),e=d.x,d=d.y,g=a.x,a=a.y,h=(e+g)/2,k=(d+a)/2;return wb(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(g+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0a)return NaN;if(this.computeCurve()===Uj&&4<=a&&!this.ic){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.m(c),d=this.m(c+1),a=this.m(c+2),c=this.m(c+3),e=d.x,d=d.y,g=a.x,a=a.y,h=(e+g)/2,k=(d+a)/2;return wb(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(g+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0e+10?b.Xb(d):e>c+10?d.Xb(a):b.Xb(a)):null===this.Za||this.ic?b.Xb(d):this.Za.NF(.5);if(null!==this.Za&&!this.ic)return this.Za.NF(.5);b=this.m(c-1);d=this.m(c);a=this.m(c+1);c=b.Kf(d);e=d.Kf(a);return c>e+10?b.Xb(d):e>c+10?d.Xb(a):b.Xb(a)}; D.defineProperty(J,{points:"points"},function(){return this.gd},function(a){var b=this.gd;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;em&&(p=-p),u=(0> +J.prototype.computePoints=function(){var a=this.g;if(null===a)return!1;var b=this.$,c=null;null===b?(a.Wl||(a.tt=new z,a.tt.Ea=Wd,a.tt.mb=0,a.Wl=new G,a.Wl.add(a.tt),a.Wl.mf()),this.iq&&(a.Wl.position=a.Wl.location=this.iq,a.Wl.mf(),b=a.Wl,c=a.tt)):c=this.oc;if(null!==c&&!b.isVisible()){var d=b.findVisibleNode();null!==d&&d!==b?(b=d,c=d.port):b=d}this.yE=b;if(null===b||!b.location.H())return!1;for(;!(null===c||c.aa.H()&&c.Sj());)c=c.R;if(null===c)return!1;var e=this.ba,g=null;null===e?(a.Xl||(a.ut= +new z,a.ut.Ea=Wd,a.ut.mb=0,a.Xl=new G,a.Xl.add(a.ut),a.Xl.mf()),this.jq&&(a.Xl.position=a.Xl.location=this.jq,a.Xl.mf(),e=a.Xl,g=a.ut)):g=this.Gc;null===g||e.isVisible()||(a=e.findVisibleNode(),null!==a&&a!==e?(e=a,g=a.port):e=a);this.zE=e;if(null===e||!e.location.H())return!1;for(;!(null===g||g.aa.H()&&g.Sj());)g=g.R;if(null===g)return!1;var h=this.ta,d=this.computeSpot(!0,c),a=this.computeSpot(!1,g),k=d===dc,l=a===dc,m=c===g&&null!==c,n=this.ic,p=this.lf===Uj;this.$i=m&&!n?p=!0:!1;var q=this.Yp=== +vj||m;if(!n&&!m&&k&&l){if(k=!1,!q&&3<=h&&(q=this.getLinkPoint(b,c,d,!0,!1,e,g),l=this.getLinkPoint(e,g,a,!1,!1,b,c),k=this.adjustPoints(0,q,h-1,l))&&(q=this.getLinkPoint(b,c,d,!0,!1,e,g),l=this.getLinkPoint(e,g,a,!1,!1,b,c),this.adjustPoints(0,q,h-1,l)),!k)if(this.dq(),p){var h=this.getLinkPoint(b,c,d,!0,!1,e,g),q=this.getLinkPoint(e,g,a,!1,!1,b,c),k=q.x-h.x,l=q.y-h.y,m=this.computeCurviness(),p=n=0,r=h.x+k/3,s=h.y+l/3,u=r,t=s;Q(l,0)?t=0m&&(p=-p),u=(0> l?-1:1)*p+r,t=n*(u-r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,y=r,w=s;Q(l,0)?w=0l?-1:1)*p+r,w=n*(y-r)+s);this.dq();this.Ci(h);this.Bj(u,t);this.Bj(y,w);this.Ci(q);this.gh(0,this.getLinkPoint(b,c,d,!0,!1,e,g));this.gh(3,this.getLinkPoint(e,g,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,g),a=this.getLinkPoint(e,g,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,g=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,Q(e,0)?k=0g&&(h=-h), h=(0>e?-1:1)*h+b,k=q*(h-b)+c),this.Ci(d),this.Bj(h,k)):this.Ci(d),this.Ci(a)}else{p=this.Nj;q&&(n&&p||m)&&this.dq();var A=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,g),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,g),m&&(k||d.O(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>A&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(A)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t* Math.sin(r*Math.PI/180)),d.ee()&&m){var B=c.fb(mc,D.P()),P=D.Fb(B.x+1E3*s,B.y+1E3*u);this.getLinkPointFromPoint(b,c,B,P,!0,p);D.A(B);D.A(P)}var t=this.getLinkPoint(e,g,a,!1,n,b,c),H=w=y=0;if(n||!l||m)B=this.computeEndSegmentLength(e,g,a,!1),H=this.getLinkDirection(e,g,t,a,!1,n,b,c),m&&(l||d.O(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(H+=n?0:30,0>A&&(H+=180)),0>H?H+=360:360<=H&&(H-=360),m&&(B+=Math.abs(A)*(n?1:2)),0===H?y=B:90===H?w=B:180===H?y=-B:270===H?w=-B:(y=B*Math.cos(H*Math.PI/180),w=B*Math.sin(H* Math.PI/180)),a.ee()&&m&&(B=g.fb(mc,D.P()),P=D.Fb(B.x+1E3*y,B.y+1E3*w),this.getLinkPointFromPoint(e,g,B,P,!1,t),D.A(B),D.A(P));a=p;if(n||!k||m)a=new N(p.x+s,p.y+u);d=t;if(n||!l||m)d=new N(t.x+y,t.y+w);!q&&!n&&k&&3Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} +function Wr(a,b){Math.abs(b.x-a.x)>Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} J.prototype.getLinkPointFromPoint=function(a,b,c,d,e,g){void 0===g&&(g=new N);if(null===a||null===b)return g.assign(c),g;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.R;null===e||e.kh()||(e=e.R);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Hh;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.Vn(e,h,k,l, -g);null!==a&&g.transform(a);return g};function Yr(a,b){var c=b.jt;null===c&&(c=new Zr,c.port=b,c.Zc=b.Y,b.jt=c);return $r(c,a)} -J.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new N);if(c.Xc())return b.fb(c,k),k;if(c.Pj()){var l=Yr(this,b);if(null!==l){k.assign(l.Eq);if(e&&this.Ny===Pr){var m=Yr(this,h);if(null!==m&&l.Nn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.Mj(wc)||c.Mj(Dc))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);D.A(l);D.A(m)}}return k}}c=b.fb(mc,D.P());l=g=null; -this.ta>(e?6:2)?(l=d?this.m(1):this.m(this.ta-2),e&&(l=Xr(c,l.copy()))):(g=D.P(),l=h.fb(mc,g),e&&(l=Xr(c,l)),D.A(g));this.getLinkPointFromPoint(a,b,c,l,d,k);D.A(c);return k}; -J.prototype.getLinkDirection=function(a,b,c,d,e,g,h,k){a:if(d.Xc())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(g?6:2)?(n=e?this.m(1):this.m(this.ta-2),n=g?Xr(l,n.copy()):c):(m=D.P(),n=k.fb(mc,m),D.A(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- -l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;D.A(l)}d.ee()&&h.Fi(a)&&(c+=180,360<=c&&(c-=360));a=yr;a=e?this.zu:this.uv;a===yr&&(a=e?b.zu:b.uv);switch(a){case zr:b=b.tm();c+=b;360<=c&&(c-=360);break;case yr:case Fo:if(d.rJ())break;b=b.tm();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; -J.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Pj()&&(a=Yr(this,b),null!==a))return a.Tx;a=NaN;a=d?this.sm:this.Jm;null!==b&&isNaN(a)&&(a=d?b.sm:b.Jm);isNaN(a)&&(a=10);return a};J.prototype.computeSpot=function(a,b){var c;if(a)if(c=b?b:this.oc,null===c)c=mc;else{var d=this.Gb;d.ld()&&null!==c&&(d=c.Gb);c=d===Vc?dc:d}else c=b?b:this.Gc,null===c?c=mc:(d=this.Hb,d.ld()&&null!==c&&(d=c.Hb),c=d===Vc?dc:d);return c}; -J.prototype.computeOtherPoint=function(a,b){var c=b.fb(mc),d;d=b.jt;d=null!==d?$r(d,this):null;null!==d&&(c=d.Eq);return c};J.prototype.computeShortLength=function(a){if(a){if(a=this.Au,isNaN(a)){var b=this.oc;null!==b&&(a=b.Au)}}else a=this.vv,isNaN(a)&&(b=this.Gc,null!==b&&(a=b.vv));return isNaN(a)?0:a}; -J.prototype.Yk=function(a,b,c,d,e,g){if(!1===this.tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.hh(),h.reset());h.multiply(this.transform);if(this.Kn(a,h))return gq(this,b,c,e),void 0===g&&D.nf(h),!0;if(this.jg(a,h)){var k=!1;if(!this.$n)for(var l=this.xa.o,m=l.length;m--;){var n=l[m];if(n.visible||n===this.Df){var p=n.aa,q=this.Fa;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=D.hh();p.set(h);if(n instanceof x)k=n.Yk(a,b,c,d,e,p);else if(this.path=== -n){if(n instanceof z){var k=n,r=a,s=d,q=p;if(!1===k.tg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.Kn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Tk(k.aa))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,y=D.P(),w=D.P(),A=D.P(),B=D.hh();B.set(t);B.GB(k.transform);B.pB();w.x=r;w.y=s;w.transform(B);y.x=q;y.y=s;y.transform(B);t=!1;tq(k,y,w,A)?t=!0:(y.x=r,y.y=u,y.transform(B),tq(k,y,w,A)?t=!0:(w.x=q,w.y=u,w.transform(B),tq(k,y,w,A)?t=!0:(y.x=q,y.y=s,y.transform(B),tq(k,y,w,A)&& -(t=!0))));D.nf(B);D.A(y);D.A(w);D.A(A);k=t}}else k=k.Kn(r,q)}}else k=Lo(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof L&&e.add(n),e instanceof K&&e.add(n)));D.nf(p)}}}void 0===g&&D.nf(h);return k||null!==this.background||null!==this.hm}void 0===g&&D.nf(h);return!1};D.w(J,{ic:"isOrthogonal"},function(){return 2===(this.qn.value&2)});D.w(J,{Nj:"isAvoiding"},function(){return 4===(this.qn.value&4)}); -J.prototype.computeCurve=function(){if(null===this.$i){var a=this.oc,b=this.ic;this.$i=null!==a&&a===this.Gc&&!b}return this.$i?Vj:this.lf};J.prototype.computeCorner=function(){if(this.lf===Vj)return 0;var a=this.QA;if(isNaN(a)||0>a)a=10;return a};J.prototype.findMidLabel=function(){for(var a=this.path,b=this.xa.o,c=b.length,d=0;d=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.Mj(wc)||c.Mj(Dc))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);D.A(l);D.A(m)}}return k}}c=b.fb(mc,D.P());l=g=null; +this.ta>(e?6:2)?(l=d?this.m(1):this.m(this.ta-2),e&&(l=Wr(c,l.copy()))):(g=D.P(),l=h.fb(mc,g),e&&(l=Wr(c,l)),D.A(g));this.getLinkPointFromPoint(a,b,c,l,d,k);D.A(c);return k}; +J.prototype.getLinkDirection=function(a,b,c,d,e,g,h,k){a:if(d.Xc())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(g?6:2)?(n=e?this.m(1):this.m(this.ta-2),n=g?Wr(l,n.copy()):c):(m=D.P(),n=k.fb(mc,m),D.A(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- +l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;D.A(l)}d.ee()&&h.Fi(a)&&(c+=180,360<=c&&(c-=360));a=xr;a=e?this.zu:this.uv;a===xr&&(a=e?b.zu:b.uv);switch(a){case yr:b=b.tm();c+=b;360<=c&&(c-=360);break;case xr:case Eo:if(d.rJ())break;b=b.tm();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; +J.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Pj()&&(a=Xr(this,b),null!==a))return a.Tx;a=NaN;a=d?this.sm:this.Jm;null!==b&&isNaN(a)&&(a=d?b.sm:b.Jm);isNaN(a)&&(a=10);return a};J.prototype.computeSpot=function(a,b){var c;if(a)if(c=b?b:this.oc,null===c)c=mc;else{var d=this.Gb;d.ld()&&null!==c&&(d=c.Gb);c=d===Vc?dc:d}else c=b?b:this.Gc,null===c?c=mc:(d=this.Hb,d.ld()&&null!==c&&(d=c.Hb),c=d===Vc?dc:d);return c}; +J.prototype.computeOtherPoint=function(a,b){var c=b.fb(mc),d;d=b.jt;d=null!==d?Zr(d,this):null;null!==d&&(c=d.Eq);return c};J.prototype.computeShortLength=function(a){if(a){if(a=this.Au,isNaN(a)){var b=this.oc;null!==b&&(a=b.Au)}}else a=this.vv,isNaN(a)&&(b=this.Gc,null!==b&&(a=b.vv));return isNaN(a)?0:a}; +J.prototype.Yk=function(a,b,c,d,e,g){if(!1===this.tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.hh(),h.reset());h.multiply(this.transform);if(this.Kn(a,h))return fq(this,b,c,e),void 0===g&&D.nf(h),!0;if(this.jg(a,h)){var k=!1;if(!this.$n)for(var l=this.xa.o,m=l.length;m--;){var n=l[m];if(n.visible||n===this.Df){var p=n.aa,q=this.Fa;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=D.hh();p.set(h);if(n instanceof x)k=n.Yk(a,b,c,d,e,p);else if(this.path=== +n){if(n instanceof z){var k=n,r=a,s=d,q=p;if(!1===k.tg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.Kn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Tk(k.aa))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,y=D.P(),w=D.P(),A=D.P(),B=D.hh();B.set(t);B.GB(k.transform);B.pB();w.x=r;w.y=s;w.transform(B);y.x=q;y.y=s;y.transform(B);t=!1;sq(k,y,w,A)?t=!0:(y.x=r,y.y=u,y.transform(B),sq(k,y,w,A)?t=!0:(w.x=q,w.y=u,w.transform(B),sq(k,y,w,A)?t=!0:(y.x=q,y.y=s,y.transform(B),sq(k,y,w,A)&& +(t=!0))));D.nf(B);D.A(y);D.A(w);D.A(A);k=t}}else k=k.Kn(r,q)}}else k=Ko(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof L&&e.add(n),e instanceof K&&e.add(n)));D.nf(p)}}}void 0===g&&D.nf(h);return k||null!==this.background||null!==this.hm}void 0===g&&D.nf(h);return!1};D.w(J,{ic:"isOrthogonal"},function(){return 2===(this.qn.value&2)});D.w(J,{Nj:"isAvoiding"},function(){return 4===(this.qn.value&4)}); +J.prototype.computeCurve=function(){if(null===this.$i){var a=this.oc,b=this.ic;this.$i=null!==a&&a===this.Gc&&!b}return this.$i?Uj:this.lf};J.prototype.computeCorner=function(){if(this.lf===Uj)return 0;var a=this.QA;if(isNaN(a)||0>a)a=10;return a};J.prototype.findMidLabel=function(){for(var a=this.path,b=this.xa.o,c=b.length,d=0;dl?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Eb(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.gh(a,b);for(a+= -1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ia(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.gh(c,d)}}return!0;case Or:g=this.m(a);p=this.m(c);if(!g.Wc(b)||!p.Wc(d)){var e=g.x,g=g.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-g)*(p-g),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.gh(a,b);for(a+=1;al?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Eb(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.gh(a,b);for(a+= +1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ia(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.gh(c,d)}}return!0;case Nr:g=this.m(a);p=this.m(c);if(!g.Wc(b)||!p.Wc(d)){var e=g.x,g=g.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-g)*(p-g),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.gh(a,b);for(a+=1;ab?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.aa.copy(),k=g.aa.copy();if(h.H()&&k.H()){h.ig(8,8);k.ig(8,8);h.Mi(a);k.Mi(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new N(c.x,a.y),m=new N(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.Pa(a)||h.Pa(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new N(Math.max((a.x+c.x)/2,a.x),a.y),m=new N(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.yh.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new N(a.x,Math.max((a.y+c.y)/2,a.y)),m=new N(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.Pa(a)||h.Pa(c))?l.x=this.computeMidOrthoPosition(a.x, c.x,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new N(a.x,Math.min((a.y+c.y)/2,a.y)),m=new N(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==cs(s,c.x,c.y)){ds(this,s,c.x,c.y,d,!0);h=this.m(2);if(4>this.ta)0===b||180===b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ia(2,h.x,h.y),this.B(3,h.x,h.y);else if(c= +k.right)),m.x=l.x,m.y=c.y}var n=l,p=m;if(this.Nj){var q=this.g,r;(r=null===q)||(q.Ra.pf?r=!1:(r=q.eb,r=r instanceof Uh?!r.ox||r.lJ:!0),r=!r);if(r||h.Pa(c)&&!g.Fi(e)||k.Pa(a)&&!e.Fi(g)||e===g||this.layer.Yc)b=!1;else{var s=ha(q,!0,this.Ka,null);if(s.Dq(Math.min(a.x,n.x),Math.min(a.y,n.y),Math.abs(a.x-n.x),Math.abs(a.y-n.y))&&s.Dq(Math.min(n.x,p.x),Math.min(n.y,p.y),Math.abs(n.x-p.x),Math.abs(n.y-p.y))&&s.Dq(Math.min(p.x,c.x),Math.min(p.y,c.y),Math.abs(p.x-c.x),Math.abs(p.y-c.y)))b=!1;else{e=a;g=c; +var u=r=null;if(q.vB){q=s.ib.copy();q.ig(-s.cq,-s.aq);var t=D.P();$r(s,a.x,a.y)||(Ie(q.x,q.y,q.x+q.width,q.y+q.height,a.x,a.y,n.x,n.y,t)?(r=a=t.copy(),b=t.Xb(n)):Ie(q.x,q.y,q.x+q.width,q.y+q.height,n.x,n.y,p.x,p.y,t)?(r=a=t.copy(),b=t.Xb(p)):Ie(q.x,q.y,q.x+q.width,q.y+q.height,p.x,p.y,c.x,c.y,t)&&(r=a=t.copy(),b=t.Xb(c)));$r(s,c.x,c.y)||(Ie(q.x,q.y,q.x+q.width,q.y+q.height,c.x,c.y,p.x,p.y,t)?(u=c=t.copy(),d=p.Xb(t)):Ie(q.x,q.y,q.x+q.width,q.y+q.height,p.x,p.y,n.x,n.y,t)?(u=c=t.copy(),d=n.Xb(t)):Ie(q.x, +q.y,q.x+q.width,q.y+q.height,n.x,n.y,a.x,a.y,t)&&(u=c=t.copy(),d=a.Xb(t)));D.A(t)}h=h.copy().Zh(k);k=s.eH;h.ig(s.cq*k,s.aq*k);as(s,a,b,c,d,h);k=bs(s,c.x,c.y);!s.abort&&999999<=k&&(On(s),k=s.qG,h.ig(s.cq*k,s.aq*k),as(s,a,b,c,d,h),k=bs(s,c.x,c.y));!s.abort&&999999<=k&&s.wH&&(On(s),as(s,a,b,c,d,s.ib),k=bs(s,c.x,c.y));if(!s.abort&&999999>k&&0!==bs(s,c.x,c.y)){cs(this,s,c.x,c.y,d,!0);h=this.m(2);if(4>this.ta)0===b||180===b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ia(2,h.x,h.y),this.B(3,h.x,h.y);else if(c= this.m(3),0===b||180===b)Q(h.x,c.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.ia(2,h,a.y),this.ia(3,h,c.y)):Q(h.y,c.y)?(Math.abs(a.y-h.y)<=s.aq/2&&(this.ia(2,h.x,a.y),this.ia(3,c.x,a.y)),this.B(2,h.x,a.y)):this.ia(2,a.x,h.y);else if(90===b||270===b)Q(h.y,c.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.ia(2,a.x,h),this.ia(3,c.x,h)):Q(h.x,c.x)?(Math.abs(a.x-h.x)<=s.cq/2&&(this.ia(2,a.x,h.y),this.ia(3,a.x,c.y)),this.B(2,a.x,h.y)):this.ia(2,h.x,a.y);null!==r&&(a=this.m(1),c=this.m(2), a.x!==c.x&&a.y!==c.y?0===b||180===b?this.B(2,a.x,c.y):this.B(2,c.x,a.y):0===b||180===b?this.B(2,e.x,r.y):this.B(2,r.x,e.y));null!==u&&(0===d||180===d?this.Bj(g.x,u.y):this.Bj(u.x,g.y));b=!0}else b=!1}}}else b=!1;b||(this.Ci(l),this.Ci(m))}};J.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2}; -function Ni(a){if(null===a.g||!a.Nj)return!1;var b=a.points.o,c=b.length;if(4>c)return!1;a=ha(a.g,!0,a.Ka,null);for(var d=1;dc)return!1;a=ha(a.g,!0,a.Ka,null);for(var d=1;da)return new Ve(Ze);var b=!1,c=this.g;null!==c&&Ur(this)&&c.Dl.contains(this)&&null!==this.Ww&&(b=!0);var d=c=0,e=this.m(0).copy(),g=e.copy(),c=this.gd.o,h=this.computeCurve();if(h===Vj&&3<=a&&!Eb(this.Yq,0))if(3===a)var k=this.m(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.m(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.ic)for(k=0;k=a&&(k=a-1),c=this.m(k), -g.x=Math.min(c.x,g.x),g.y=Math.min(c.y,g.y);c=g.x;d=g.y}else{for(k=0;ky?r>q?(u.x=w-B,u.y=q-B,t.x=w+s,t.y=q+s):(u.x=w-B,u.y=q+B,t.x=w+s,t.y=q-s):r>q?(u.x=w+B,u.y=q-B,t.x=w-s,t.y=q+s):(u.x=w+B,u.y=q+B,t.x=w-s,t.y=q-s));Eb(y,w)&&Eb(q,r)&&(q>p?(A>w?(u.x= -w-B,u.y=q-B,t.x=w+s):(u.x=w+B,u.y=q-B,t.x=w-s),t.y=q+s):(A>w?(u.x=w-B,u.y=q+B,t.x=w+s):(u.x=w+B,u.y=q+B,t.x=w-s),t.y=q-s));if(Eb(y,w)&&Eb(w,A)||Eb(p,q)&&Eb(q,r))y=.5*(y+A),p=.5*(p+r),u.x=y,u.y=p,t.x=y,t.y=p;1===k?(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y)):2===k&&Eb(b.x,this.m(0).x)&&Eb(b.y,this.m(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));U(l,e.x-c,e.y-d,h.x-c,h.y-d,m.x-c,m.y-d);g.set(h);e.set(a);b=m}}k=b.x;b=b.y;g=this.m(this.ta-1);0!==this.computeShortLength(!1)&&(g=es(this,g.copy(),!1,Kd));k=.5*(k+g.x); -b=.5*(b+g.y);U(l,a.x-c,a.y-d,k-c,b-d,g.x-c,g.y-d)}else for(k=3;k=a&&(k=a-1),g=this.m(k-1),e=this.m(k),k===a-1&&0!==this.computeShortLength(!1)&&(e=es(this,e.copy(),!1,Kd)),U(l,b.x-c,b.y-d,g.x-c,g.y-d,e.x-c,e.y-d);else{g=D.P();g.assign(this.m(0));k=1;for(e=0;k=a-1){if(!g.O(u))0!==this.computeShortLength(!1)&&(u=es(this,u.copy(),!1,Kd)),hs(this,l,-c,-d,g,u,b);else if(0===e)for(k=1;kn.x?u.x-s:u.x+s,B=t.y>u.y?u.y+w:u.y-w,hs(this,k,h,m,n,new N(q,A),p),zf(k,u.x+h,u.y+m,r+h,B+m),y.n(r,B))):Q(n.x,u.x)&&Q(u.y,t.y)?(s=this.computeCorner(),w=Math.min(s,Math.abs(u.y-n.y)/2),w=s=Math.min(w,Math.abs(t.x-u.x)/2),Q(s,0)?(hs(this,k,h,m,n,u, -p),y.assign(u)):(q=u.x,B=A=u.y,A=u.y>n.y?u.y-w:u.y+w,r=t.x>u.x?u.x+s:u.x-s,hs(this,k,h,m,n,new N(q,A),p),zf(k,u.x+h,u.y+m,r+h,B+m),y.n(r,B))):(hs(this,k,h,m,n,u,p),y.assign(u));k=e}D.A(g)}c=l.q;D.u(l)}else l=this.m(1).copy(),l.x-=c,l.y-=d,0!==this.computeShortLength(!0)&&(e=es(this,e,!0,g)),0!==this.computeShortLength(!1)&&(l=es(this,l,!1,g)),c=new Ve(Ze),c.la=e.x,c.ja=e.y,c.F=l.x,c.G=l.y;return c}; -function gs(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Eb(a,0)?b:Eb(b,0)?a:Math.sqrt(a*a+b*b)} -function es(a,b,c,d){var e=a.ta;if(2>e)return b;if(c){var g=a.m(1);c=g.x-d.x;d=g.y-d.y;g=gs(b.x,b.y,c,d);if(0===g)return b;e=2===e?.5*g:g;a=a.computeShortLength(!0);a>e&&(a=e);c=a*(c-b.x)/g;a=a*(d-b.y)/g;b.x+=c;b.y+=a}else{g=a.m(e-2);c=g.x-d.x;d=g.y-d.y;g=gs(b.x,b.y,c,d);if(0===g)return b;e=2===e?.5*g:g;a=a.computeShortLength(!1);a>e&&(a=e);c=a*(b.x-c)/g;a=a*(b.y-d)/g;b.x-=c;b.y-=a}return b} -function fs(a,b,c,d){for(var e=a.ta,g=b;Eb(b.x,g.x)&&Eb(b.y,g.y);){if(c>=e)return e-1;g=a.m(c++)}if(!Eb(b.x,g.x)&&!Eb(b.y,g.y))return c-1;for(var h=g;Eb(b.x,g.x)&&Eb(g.x,h.x)&&(!d||(b.y>=g.y?g.y>=h.y:g.y<=h.y))||Eb(b.y,g.y)&&Eb(g.y,h.y)&&(!d||(b.x>=g.x?g.x>=h.x:g.x<=h.x));){if(c>=e)return e-1;h=a.m(c++)}return c-2} -function hs(a,b,c,d,e,g,h){if(!h&&Ur(a)){h=[];var k=0;a.isVisible()&&(k=is(a,e,g,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,g.x);else break;q=g.y-10+d;n=p+c;p=g.y+d;a.lf===vj?T(b,n,p,!1,!1):U(b,l,q,n,q,n,p)}else if(Q(e.x,g.x))if(e.yp-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.lf===vj?T(b,n,p,!1,!1):U(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)} -function is(a,b,c,d){var e=a.g;if(null===e||b.O(c))return 0;for(e=e.co;e.next();){var g=e.value;if(null!==g&&g.visible)for(var g=g.rb.o,h=g.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,y)q&&!Q(h,y)){n.x=u;n.y=q;n=!0;break a}}else if(!Q(q,s)&&Q(h,y)&&Math.min(q,s)h&&Math.min(u,t)p&&!Q(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}D.A(k)}D.w(J,{tu:"firstPickIndex"},function(){var a;2>=this.ta?a=0:((a=this.ic)||(a=this.computeSpot(!0)!==dc),a=a?1:0);return a});D.w(J,{oy:"lastPickIndex"},function(){var a=this.ta;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.ic)||(b=this.computeSpot(!1)!==dc);a=b?a-2:a-1}return a});function Ur(a){a=a.lf;return a===uj||a===vj} -function Wr(a,b){if(b||Ur(a)){var c=a.g;null===c||c.Dl.contains(a)||null===a.Ww||c.Dl.add(a,a.Ww)}}function xj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Yc){var d=c.g;if(null!==d)for(var e=!1,d=d.co;d.next();){var g=d.value;if(g.visible)if(g===c)for(var e=!0,h=!1,g=g.rb.o,k=g.length,l=0;la)return new Ue(Ye);var b=!1,c=this.g;null!==c&&Tr(this)&&c.Dl.contains(this)&&null!==this.Ww&&(b=!0);var d=c=0,e=this.m(0).copy(),g=e.copy(),c=this.gd.o,h=this.computeCurve();if(h===Uj&&3<=a&&!Eb(this.Yq,0))if(3===a)var k=this.m(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.m(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.ic)for(k=0;k=a&&(k=a-1),c=this.m(k), +g.x=Math.min(c.x,g.x),g.y=Math.min(c.y,g.y);c=g.x;d=g.y}else{for(k=0;ky?r>q?(u.x=w-B,u.y=q-B,t.x=w+s,t.y=q+s):(u.x=w-B,u.y=q+B,t.x=w+s,t.y=q-s):r>q?(u.x=w+B,u.y=q-B,t.x=w-s,t.y=q+s):(u.x=w+B,u.y=q+B,t.x=w-s,t.y=q-s));Eb(y,w)&&Eb(q,r)&&(q>p?(A>w?(u.x= +w-B,u.y=q-B,t.x=w+s):(u.x=w+B,u.y=q-B,t.x=w-s),t.y=q+s):(A>w?(u.x=w-B,u.y=q+B,t.x=w+s):(u.x=w+B,u.y=q+B,t.x=w-s),t.y=q-s));if(Eb(y,w)&&Eb(w,A)||Eb(p,q)&&Eb(q,r))y=.5*(y+A),p=.5*(p+r),u.x=y,u.y=p,t.x=y,t.y=p;1===k?(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y)):2===k&&Eb(b.x,this.m(0).x)&&Eb(b.y,this.m(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));U(l,e.x-c,e.y-d,h.x-c,h.y-d,m.x-c,m.y-d);g.set(h);e.set(a);b=m}}k=b.x;b=b.y;g=this.m(this.ta-1);0!==this.computeShortLength(!1)&&(g=ds(this,g.copy(),!1,Jd));k=.5*(k+g.x); +b=.5*(b+g.y);U(l,a.x-c,a.y-d,k-c,b-d,g.x-c,g.y-d)}else for(k=3;k=a&&(k=a-1),g=this.m(k-1),e=this.m(k),k===a-1&&0!==this.computeShortLength(!1)&&(e=ds(this,e.copy(),!1,Jd)),U(l,b.x-c,b.y-d,g.x-c,g.y-d,e.x-c,e.y-d);else{g=D.P();g.assign(this.m(0));k=1;for(e=0;k=a-1){if(!g.O(u))0!==this.computeShortLength(!1)&&(u=ds(this,u.copy(),!1,Jd)),gs(this,l,-c,-d,g,u,b);else if(0===e)for(k=1;kn.x?u.x-s:u.x+s,B=t.y>u.y?u.y+w:u.y-w,gs(this,k,h,m,n,new N(q,A),p),yf(k,u.x+h,u.y+m,r+h,B+m),y.n(r,B))):Q(n.x,u.x)&&Q(u.y,t.y)?(s=this.computeCorner(),w=Math.min(s,Math.abs(u.y-n.y)/2),w=s=Math.min(w,Math.abs(t.x-u.x)/2),Q(s,0)?(gs(this,k,h,m,n,u, +p),y.assign(u)):(q=u.x,B=A=u.y,A=u.y>n.y?u.y-w:u.y+w,r=t.x>u.x?u.x+s:u.x-s,gs(this,k,h,m,n,new N(q,A),p),yf(k,u.x+h,u.y+m,r+h,B+m),y.n(r,B))):(gs(this,k,h,m,n,u,p),y.assign(u));k=e}D.A(g)}c=l.q;D.u(l)}else l=this.m(1).copy(),l.x-=c,l.y-=d,0!==this.computeShortLength(!0)&&(e=ds(this,e,!0,g)),0!==this.computeShortLength(!1)&&(l=ds(this,l,!1,g)),c=new Ue(Ye),c.la=e.x,c.ja=e.y,c.F=l.x,c.G=l.y;return c}; +function fs(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Eb(a,0)?b:Eb(b,0)?a:Math.sqrt(a*a+b*b)} +function ds(a,b,c,d){var e=a.ta;if(2>e)return b;if(c){var g=a.m(1);c=g.x-d.x;d=g.y-d.y;g=fs(b.x,b.y,c,d);if(0===g)return b;e=2===e?.5*g:g;a=a.computeShortLength(!0);a>e&&(a=e);c=a*(c-b.x)/g;a=a*(d-b.y)/g;b.x+=c;b.y+=a}else{g=a.m(e-2);c=g.x-d.x;d=g.y-d.y;g=fs(b.x,b.y,c,d);if(0===g)return b;e=2===e?.5*g:g;a=a.computeShortLength(!1);a>e&&(a=e);c=a*(b.x-c)/g;a=a*(b.y-d)/g;b.x-=c;b.y-=a}return b} +function es(a,b,c,d){for(var e=a.ta,g=b;Eb(b.x,g.x)&&Eb(b.y,g.y);){if(c>=e)return e-1;g=a.m(c++)}if(!Eb(b.x,g.x)&&!Eb(b.y,g.y))return c-1;for(var h=g;Eb(b.x,g.x)&&Eb(g.x,h.x)&&(!d||(b.y>=g.y?g.y>=h.y:g.y<=h.y))||Eb(b.y,g.y)&&Eb(g.y,h.y)&&(!d||(b.x>=g.x?g.x>=h.x:g.x<=h.x));){if(c>=e)return e-1;h=a.m(c++)}return c-2} +function gs(a,b,c,d,e,g,h){if(!h&&Tr(a)){h=[];var k=0;a.isVisible()&&(k=hs(a,e,g,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,g.x);else break;q=g.y-10+d;n=p+c;p=g.y+d;a.lf===uj?T(b,n,p,!1,!1):U(b,l,q,n,q,n,p)}else if(Q(e.x,g.x))if(e.yp-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.lf===uj?T(b,n,p,!1,!1):U(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)} +function hs(a,b,c,d){var e=a.g;if(null===e||b.O(c))return 0;for(e=e.co;e.next();){var g=e.value;if(null!==g&&g.visible)for(var g=g.rb.o,h=g.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,y)q&&!Q(h,y)){n.x=u;n.y=q;n=!0;break a}}else if(!Q(q,s)&&Q(h,y)&&Math.min(q,s)h&&Math.min(u,t)p&&!Q(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}D.A(k)}D.w(J,{tu:"firstPickIndex"},function(){var a;2>=this.ta?a=0:((a=this.ic)||(a=this.computeSpot(!0)!==dc),a=a?1:0);return a});D.w(J,{oy:"lastPickIndex"},function(){var a=this.ta;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.ic)||(b=this.computeSpot(!1)!==dc);a=b?a-2:a-1}return a});function Tr(a){a=a.lf;return a===tj||a===uj} +function Vr(a,b){if(b||Tr(a)){var c=a.g;null===c||c.Dl.contains(a)||null===a.Ww||c.Dl.add(a,a.Ww)}}function wj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Yc){var d=c.g;if(null!==d)for(var e=!1,d=d.co;d.next();){var g=d.value;if(g.visible)if(g===c)for(var e=!0,h=!1,g=g.rb.o,k=g.length,l=0;l=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.$f=Math.floor((a.x-this.ie)/this.ie)*this.ie;this.ag=Math.floor((b-this.Td)/this.Td)*this.Td;this.Hs=Math.ceil((c+2*this.ie)/this.ie)*this.ie;this.Is=Math.ceil((d+2*this.Td)/this.Td)*this.Td;a=1+(Math.ceil((this.Hs-this.$f)/this.ie)|0);b=1+(Math.ceil((this.Is-this.ag)/this.Td)|0);if(null===this.sd||this.Bnthis.Hs||a+cthis.Is||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Bn)|0;for(c=Math.min(b+e-1,this.Cn)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.sd[a][e])return!1;return!0}; -function ls(a,b,c,d,e,g,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.sd[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;g<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.sd[m][n]);)a.sd[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)ls(a,b,c,1,!e,g,h,k,l),ls(a,b,c,-1,!e,g,h,k,l);else if(0m;b+=d)ls(a,b,c,1,!e,g,h,k,l),ls(a,b,c,-1,!e,g,h, -k,l)}}function ms(a,b,c,d,e,g,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.sd[b][c]=n;0===m&&b>g&&bk&&cg&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=g.x,m=g.y,n=g.x+g.width,p=g.y+g.height,l=l-a.$f,l=l/a.ie,m=m-a.ag,m=m/a.Td,n=n-a.$f,n=n/a.ie,p=p-a.ag,p=p/a.Td;g=Math.max(0,Math.min(a.Bn,l|0));n=Math.min(a.Bn,Math.max(0,n|0));m=Math.max(0,Math.min(a.Cn,m|0));p=Math.min(a.Cn,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| -90===c?1:-1;c=90===c||270===c;0===a.sd[h][k]?(ms(a,h,k,l,c,g,n,m,p),ms(a,h,k,1,!c,g,n,m,p),ms(a,h,k,-1,!c,g,n,m,p)):ms(a,h,k,l,c,h,k,h,k);0===a.sd[b][d]?(ns(a,b,d,0===e||90===e?1:-1,90===e||270===e,g,n,m,p),ns(a,b,d,1,!(90===e||270===e),g,n,m,p),ns(a,b,d,-1,!(90===e||270===e),g,n,m,p)):ns(a,b,d,l,c,b,d,b,d);a.abort||(ls(a,h,k,1,!1,g,n,m,p),ls(a,h,k,-1,!1,g,n,m,p),ls(a,h,k,1,!0,g,n,m,p),ls(a,h,k,-1,!0,g,n,m,p))}}}function Zr(){D.xc(this);this.port=this.Zc=null;this.og=[];this.Gq=!1} -D.ne(Zr,{Zc:!0,port:!0,og:!0,Gq:!0});Zr.prototype.toString=function(){for(var a=this.og,b=this.Zc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case D.bd|D.Ad:return c>a&&c<=180+a?180:270;case D.Ad|D.rd:return c>180-a&&c<=360-a?270:0;case D.rd|D.qd:return c>a&&c<=180+a?90:0;case D.qd|D.bd:return c>180-a&&c<=360-a?180:90;case D.bd|D.Ad|D.rd:return 90180+a&&c<=360- -a?270:0;case D.Ad|D.rd|D.qd:return 180a&&180>=c?90:0;case D.rd|D.qd|D.bd:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case D.qd|D.bd|D.Ad:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(D.bd|D.Ad|D.rd|D.qd)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Zr.prototype.wq=function(){this.og.length=0}; -function $r(a,b){var c=a.og;if(0===c.length){a:if(!a.Gq){c=a.Gq;a.Gq=!0;var d,e=null,g=a.Zc,g=g instanceof I?g:null;if(null===g||g.md)d=a.Zc.EF(a.port.yd);else{if(!g.aa.H()){a.Gq=c;break a}e=g;d=e.DF()}var h=a.og.length=0,k=a.port.fb(ec,D.P()),l=a.port.fb(vc,D.P()),g=D.vg(k.x,k.y,0,0);g.Mi(l);D.A(k);D.A(l);k=D.Fb(g.x+g.width/2,g.y+g.height/2);l=a.port.tm();for(d=d.j;d.next();){var m=d.value;if(m.isVisible()&&m.oc!==m.Gc){var n=m.oc===a.port||m.$.Fi(e),p=m.computeSpot(n,a.port);if(p.Pj()&&(n=n?m.Gc: -m.oc,null!==n)){var q=n.Y;if(null!==q){var r=q.findVisibleNode();null!==r&&r!==q&&(q=r,n=q.port);n=m.computeOtherPoint(q,n);q=k.Xb(n);q-=l;0>q&&(q+=360);p=os(g,p,q,m.ic);r=0;0===p?(r=D.rd,180Math.abs(H)?(A=Math.abs(H)/q,q=Math.abs(H)):A=1;break;case D.bd:r>Math.abs(P)?(A=Math.abs(P)/r,r=Math.abs(P)):A=1;break;case D.Ad:p>Math.abs(H)?(A=Math.abs(H)/p,p=Math.abs(H)):A=1;break;default:case D.rd:n>Math.abs(P)?(A=Math.abs(P)/n,n=Math.abs(P)):A=1}w=0}var R=u.Eq;if(e===Ar){t=u.link.computeThickness();t*=A;R.set(B);switch(y){case D.qd:R.x=B.x+H/2+q/2-w-t/2;break;case D.bd:R.y=B.y+P/2+r/2-w-t/2;break;case D.Ad:R.x= -B.x+H/2-p/2+w+t/2;break;default:case D.rd:R.y=B.y+P/2-n/2+w+t/2}w+=t}else t=.5,e===xr&&(t=(u.tq+1)/(u.Nn+1)),R.x=B.x+H*t,R.y=B.y+P*t}D.A(k);D.A(l);D.A(d);D.A(m);B=a.og;for(H=0;Hb.Me?1:a.angleb.angle?1:0}; -Zr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Zc,this.port,dc,b.oc===this.port),d=a.tq;if(0>d)return c;var e=a.Nn;if(1>=e||!b.ic)return c;var b=a.By,g=a.Eq;if(a.Me===D.bd||a.Me===D.qd)d=e-1-d;return((a=a.Me===D.bd||a.Me===D.rd)?b.y=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.$f=Math.floor((a.x-this.ie)/this.ie)*this.ie;this.ag=Math.floor((b-this.Td)/this.Td)*this.Td;this.Hs=Math.ceil((c+2*this.ie)/this.ie)*this.ie;this.Is=Math.ceil((d+2*this.Td)/this.Td)*this.Td;a=1+(Math.ceil((this.Hs-this.$f)/this.ie)|0);b=1+(Math.ceil((this.Is-this.ag)/this.Td)|0);if(null===this.sd||this.Bnthis.Hs||a+cthis.Is||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Bn)|0;for(c=Math.min(b+e-1,this.Cn)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.sd[a][e])return!1;return!0}; +function ks(a,b,c,d,e,g,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.sd[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;g<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.sd[m][n]);)a.sd[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)ks(a,b,c,1,!e,g,h,k,l),ks(a,b,c,-1,!e,g,h,k,l);else if(0m;b+=d)ks(a,b,c,1,!e,g,h,k,l),ks(a,b,c,-1,!e,g,h, +k,l)}}function ls(a,b,c,d,e,g,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.sd[b][c]=n;0===m&&b>g&&bk&&cg&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=g.x,m=g.y,n=g.x+g.width,p=g.y+g.height,l=l-a.$f,l=l/a.ie,m=m-a.ag,m=m/a.Td,n=n-a.$f,n=n/a.ie,p=p-a.ag,p=p/a.Td;g=Math.max(0,Math.min(a.Bn,l|0));n=Math.min(a.Bn,Math.max(0,n|0));m=Math.max(0,Math.min(a.Cn,m|0));p=Math.min(a.Cn,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| +90===c?1:-1;c=90===c||270===c;0===a.sd[h][k]?(ls(a,h,k,l,c,g,n,m,p),ls(a,h,k,1,!c,g,n,m,p),ls(a,h,k,-1,!c,g,n,m,p)):ls(a,h,k,l,c,h,k,h,k);0===a.sd[b][d]?(ms(a,b,d,0===e||90===e?1:-1,90===e||270===e,g,n,m,p),ms(a,b,d,1,!(90===e||270===e),g,n,m,p),ms(a,b,d,-1,!(90===e||270===e),g,n,m,p)):ms(a,b,d,l,c,b,d,b,d);a.abort||(ks(a,h,k,1,!1,g,n,m,p),ks(a,h,k,-1,!1,g,n,m,p),ks(a,h,k,1,!0,g,n,m,p),ks(a,h,k,-1,!0,g,n,m,p))}}}function Yr(){D.xc(this);this.port=this.Zc=null;this.og=[];this.Gq=!1} +D.ne(Yr,{Zc:!0,port:!0,og:!0,Gq:!0});Yr.prototype.toString=function(){for(var a=this.og,b=this.Zc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case D.bd|D.Ad:return c>a&&c<=180+a?180:270;case D.Ad|D.rd:return c>180-a&&c<=360-a?270:0;case D.rd|D.qd:return c>a&&c<=180+a?90:0;case D.qd|D.bd:return c>180-a&&c<=360-a?180:90;case D.bd|D.Ad|D.rd:return 90180+a&&c<=360- +a?270:0;case D.Ad|D.rd|D.qd:return 180a&&180>=c?90:0;case D.rd|D.qd|D.bd:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case D.qd|D.bd|D.Ad:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(D.bd|D.Ad|D.rd|D.qd)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Yr.prototype.wq=function(){this.og.length=0}; +function Zr(a,b){var c=a.og;if(0===c.length){a:if(!a.Gq){c=a.Gq;a.Gq=!0;var d,e=null,g=a.Zc,g=g instanceof I?g:null;if(null===g||g.md)d=a.Zc.EF(a.port.yd);else{if(!g.aa.H()){a.Gq=c;break a}e=g;d=e.DF()}var h=a.og.length=0,k=a.port.fb(ec,D.P()),l=a.port.fb(vc,D.P()),g=D.vg(k.x,k.y,0,0);g.Mi(l);D.A(k);D.A(l);k=D.Fb(g.x+g.width/2,g.y+g.height/2);l=a.port.tm();for(d=d.j;d.next();){var m=d.value;if(m.isVisible()&&m.oc!==m.Gc){var n=m.oc===a.port||m.$.Fi(e),p=m.computeSpot(n,a.port);if(p.Pj()&&(n=n?m.Gc: +m.oc,null!==n)){var q=n.Y;if(null!==q){var r=q.findVisibleNode();null!==r&&r!==q&&(q=r,n=q.port);n=m.computeOtherPoint(q,n);q=k.Xb(n);q-=l;0>q&&(q+=360);p=ns(g,p,q,m.ic);r=0;0===p?(r=D.rd,180Math.abs(H)?(A=Math.abs(H)/q,q=Math.abs(H)):A=1;break;case D.bd:r>Math.abs(P)?(A=Math.abs(P)/r,r=Math.abs(P)):A=1;break;case D.Ad:p>Math.abs(H)?(A=Math.abs(H)/p,p=Math.abs(H)):A=1;break;default:case D.rd:n>Math.abs(P)?(A=Math.abs(P)/n,n=Math.abs(P)):A=1}w=0}var R=u.Eq;if(e===zr){t=u.link.computeThickness();t*=A;R.set(B);switch(y){case D.qd:R.x=B.x+H/2+q/2-w-t/2;break;case D.bd:R.y=B.y+P/2+r/2-w-t/2;break;case D.Ad:R.x= +B.x+H/2-p/2+w+t/2;break;default:case D.rd:R.y=B.y+P/2-n/2+w+t/2}w+=t}else t=.5,e===wr&&(t=(u.tq+1)/(u.Nn+1)),R.x=B.x+H*t,R.y=B.y+P*t}D.A(k);D.A(l);D.A(d);D.A(m);B=a.og;for(H=0;Hb.Me?1:a.angleb.angle?1:0}; +Yr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Zc,this.port,dc,b.oc===this.port),d=a.tq;if(0>d)return c;var e=a.Nn;if(1>=e||!b.ic)return c;var b=a.By,g=a.Eq;if(a.Me===D.bd||a.Me===D.qd)d=e-1-d;return((a=a.Me===D.bd||a.Me===D.rd)?b.ye&&(e=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.n(c,d,e-c,g-d):(b=b.location,c=this.padding,a.n(b.x+c.left,b.y+c.top,0,0));return a}; -D.defineProperty(Zj,{padding:"padding"},function(){return this.vf},function(a){"number"===typeof a?a=new Lb(a):D.l(a,Lb,Zj,"padding");var b=this.vf;b.O(a)||(this.vf=a=a.V(),this.i("padding",b,a))});function $g(){0=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.jd("Layout")}this.Bf=!0};$g.prototype.po=function(a){return!a.location.H()||a instanceof I&&a.po?!0:!1}; -function ss(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.Bq||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof G?l.Lf||(l instanceof I?null===l.Zb?ss(a,b,l.uc,!1,e,g,h,k):(ts(l),b.add(l)):(ts(l),b.add(l))):h&&l instanceof J?b.add(l):!k||!l.re()||l instanceof G||(ts(l),b.add(l)))}}function ts(a){var b=a.aa;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.mf()} -$g.prototype.collectParts=$g.prototype.hI=function(a){var b=new L(F);a instanceof E?(ss(this,b,a.rg,!0,null,!0,!0,!0),ss(this,b,a.links,!0,null,!0,!0,!0),ss(this,b,a.Hi,!0,null,!0,!0,!0)):a instanceof I?ss(this,b,a.uc,!1,null,!0,!0,!0):ss(this,b,a.j,!1,null,!0,!0,!0);return b};D.defineProperty($g,{$d:"arrangementOrigin"},function(){return this.mr},function(a){D.l(a,N,$g,"arrangementOrigin");this.mr.O(a)||(this.mr.assign(a),this.L())}); -$g.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.fb(ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; +a.contains(g),g.Uf||g.$!==this&&g.ba!==this))h=g.position,d.x=h.x+c,d.y=h.y+b,g.move(d),Mi(g)&&g.ec();D.A(d)};D.defineProperty(I,{po:null},function(){return 0!==(this.Ca&32768)},function(a){0!==(this.Ca&32768)!==a&&(this.Ca^=32768)});function Yj(){O.call(this);this.vf=Ld;this.xt=new C(NaN,NaN,NaN,NaN)}D.Ta(Yj,O);D.ka("Placeholder",Yj);Yj.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.vf=this.vf.V();a.xt=this.xt.copy()}; +Yj.prototype.Sk=function(a){if(null===this.background&&null===this.hm)return!1;var b=this.Fa;return Vb(0,0,b.width,b.height,a.x,a.y)}; +Yj.prototype.jo=function(){var a=this.Y;null!==a&&(a instanceof I||a instanceof da)||D.k("Placeholder is not inside a Group or Adornment.");if(a instanceof I){var b=this.computeBorder(this.xt),c=this.fd;Cb(c,b.width||0,b.height||0);Io(this,0,0,c.width,c.height);for(var d=a.uc,c=!1;d.next();)if(d.value.isVisible()){c=!0;break}d=a.g;!c||null===d||d.Ra.pf||isNaN(b.x)||isNaN(b.y)||(c=D.P(),c.vo(b,a.Of),a.location=new N(c.x,c.y),D.A(c))}else{var b=this.Ea,c=this.fd,d=this.padding,e=d.left+d.right,g=d.top+ +d.bottom;if(b.H())Cb(c,b.width+e||0,b.height+g||0),Io(this,-d.left,-d.top,c.width,c.height);else{var h=a.Bb,k=h.fb(ec,D.P()),b=D.vg(k.x,k.y,0,0);b.Mi(h.fb(vc,k));b.Mi(h.fb(kc,k));b.Mi(h.fb(tc,k));a.jj.n(b.x,b.y);Cb(c,b.width+e||0,b.height+g||0);Io(this,-d.left,-d.top,c.width,c.height);D.A(k);D.Lb(b)}}};Yj.prototype.Cj=function(a,b,c,d){var e=this.aa;e.x=a;e.y=b;e.width=c;e.height=d}; +Yj.prototype.computeBorder=function(a){var b=this.Y;if(b instanceof I){var c=b;if(c.mI&&this.xt.H()){var d=c.g;if(null!==d&&(d=d.eb,d instanceof Uh&&!d.Vr&&null!==d.hc&&!d.hc.contains(c)))return a.assign(this.xt),a}}var c=D.Sf(),d=this.computeMemberBounds(c),e=this.padding;a.n(d.x-e.left,d.y-e.top,Math.max(d.width+e.left+e.right,0),Math.max(d.height+e.top+e.bottom,0));D.Lb(c);b instanceof I&&(c=b,c.nI&&c.location.H()&&a.Mi(c.location));return a}; +Yj.prototype.computeMemberBounds=function(a){if(!(this.Y instanceof I))return a.n(0,0,0,0),a;for(var b=this.Y,c=Infinity,d=Infinity,e=-Infinity,g=-Infinity,h=b.uc;h.next();){var k=h.value;if(k.isVisible()){if(k instanceof J){var l=k;if(!b.Kx)continue;if(Mm(l))continue;if(l.$===b||l.ba===b)continue}k=k.aa;k.lefte&&(e=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.n(c,d,e-c,g-d):(b=b.location,c=this.padding,a.n(b.x+c.left,b.y+c.top,0,0));return a}; +D.defineProperty(Yj,{padding:"padding"},function(){return this.vf},function(a){"number"===typeof a?a=new Lb(a):D.l(a,Lb,Yj,"padding");var b=this.vf;b.O(a)||(this.vf=a=a.V(),this.i("padding",b,a))});function Zg(){0=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.jd("Layout")}this.Bf=!0};Zg.prototype.po=function(a){return!a.location.H()||a instanceof I&&a.po?!0:!1}; +function rs(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.Bq||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof G?l.Lf||(l instanceof I?null===l.Zb?rs(a,b,l.uc,!1,e,g,h,k):(ss(l),b.add(l)):(ss(l),b.add(l))):h&&l instanceof J?b.add(l):!k||!l.re()||l instanceof G||(ss(l),b.add(l)))}}function ss(a){var b=a.aa;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.mf()} +Zg.prototype.collectParts=Zg.prototype.hI=function(a){var b=new L(F);a instanceof E?(rs(this,b,a.rg,!0,null,!0,!0,!0),rs(this,b,a.links,!0,null,!0,!0,!0),rs(this,b,a.Hi,!0,null,!0,!0,!0)):a instanceof I?rs(this,b,a.uc,!1,null,!0,!0,!0):rs(this,b,a.j,!1,null,!0,!0,!0);return b};D.defineProperty(Zg,{$d:"arrangementOrigin"},function(){return this.mr},function(a){D.l(a,N,Zg,"arrangementOrigin");this.mr.O(a)||(this.mr.assign(a),this.L())}); +Zg.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.fb(ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; function ua(){D.xc(this);this.we=null;if(this.vertexes)for(var a=this.vertexes.j;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.j;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new L(va);this.edges=new L(wa);this.yy=new na(G,va);this.sy=new na(J,wa)}D.ka("LayoutNetwork",ua); ua.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.j;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.j;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new L(va);this.edges=new L(wa);this.yy=new na(G,va);this.sy=new na(J,wa)}; -ua.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Zb?"("+this.Zb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; +D.w(va,{edges:"edges"},function(){for(var a=new K(wa),b=this.wc;b.next();)a.add(b.value);for(b=this.tc;b.next();)a.add(b.value);return a.j});D.w(va,{JI:"edgesCount"},function(){return this.Ye.count+this.Se.count});var xs;va.standardComparer=xs=function(a,b){v&&D.l(a,va,va,"standardComparer:m");v&&D.l(b,va,va,"standardComparer:n");var c=a.Gd,d=b.Gd;return c?d?(c=c.text,d=d.text,cd?1:0):1:null!==d?-1:0}; va.smartComparer=function(a,b){v&&D.l(a,va,va,"smartComparer:m");v&&D.l(b,va,va,"smartComparer:n");if(null!==a){if(null!==b){var c=a.Gd,d=b.Gd;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=g&&0>=h&&(g=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Nb("Layout");d=[];switch(this.alignment){case Hs:var k=a,l=c,m=Math.max(this.bq.width,1);if(!isFinite(m))for(var n=m=0;ng-1||0h)d.push(new C(0,y,h+k,A)),w=0,t=u,y+=A,A=0;A=Math.max(A,P);P=0;switch(s){case Gs:P=-q.width;break;default:P=0}p.moveTo(t+P,y);switch(s){case Gs:t-=B;break; -default:t+=B}w++}d.push(new C(0,y,h+k,A));break;case zs:k=g;l=a;m=c;n=Math.max(this.bq.width,1);p=y=B=0;q=D.P();for(g=0;g=B&&(h-=B);for(var B=P=0,H=Math.max(this.bq.height,1),aa=p=0,V=!0,ea=D.P(),g=0;gk-1||0h){d.push(new C(0,V?w-p:w,h+l,aa+p+m));for(R=0;RB&&(e.width+=e.x-B,e.x=B)}for(k=g=h=e=0;kd?1:0}; -Wn.smartComparer=function(a,b){v&&D.l(a,F,Wn,"standardComparer:a");v&&D.l(b,F,Wn,"standardComparer:b");if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.pa=0,a.va=0);else{var b=new K($s);b.Vc(a.j);a=new K($s);var c=new K($s),d;d=this.sort(b);var e=this.Kz,g=this.sD,h=this.Vd,k=this.Yo,l=this.Lz,m=this.Wr,b=this.El,n=this.HE,p=this.dg,q=this.Rv, -e=this.eg,g=this.xy,h=this.$J;if(!isFinite(h)||0>=h)h=NaN;k=this.bI;if(!isFinite(k)||0>=k)k=1;l=this.Ne;isFinite(l)||(l=0);m=this.Ff;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Xs&&g===Ys?e=Js:e===Xs&&g!==Ys&&(g=Ys,e=this.eg);if((this.direction===Ss||this.direction===Ts)&&this.sorting!==Ms){for(var r=0;!(r>=d.length);r+=2){a.add(d.fa(r));if(r+1>=d.length)break;c.add(d.fa(r+1))}this.direction===Ss?(this.eg===Xs&&a.reverse(),d=new K($s),d.Vc(a),d.Vc(c)):(this.eg===Xs&& -c.reverse(),d=new K($s),d.Vc(c),d.Vc(a))}for(var s=d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Xs){isNaN(b)&&(b=6);if(e!==Js&&e!==Xs){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Kz=e;this.sD=g;this.Vd=h;this.Yo=k;this.Lz=l;this.Wr=m;this.El=b;this.HE=n;this.dg=p;this.Rv=q;b=d;d=this.Kz;e=this.Vd;g=this.Lz;k=this.Wr;l=this.El;m=this.dg;n=this.Rv;if(this.direction!==Ss&&this.direction!==Ts||d!==Xs)if(this.direction===Ss||this.direction===Ts){h=0;switch(d){case Ws:h=180*dt(this,e,m,g,n)/Math.PI;break;case Js:n=b=0;h=a.first();null!==h&&(b=at(h,Math.PI/2));h=c.first();null!== -h&&(n=at(h,Math.PI/2));h=180*dt(this,e,m,g,l+(b+n)/2)/Math.PI;break;case Vs:h=k/b.length}if(this.direction===Ss){switch(d){case Ws:et(this,a,g,Us);break;case Js:ft(this,a,g,Us);break;case Vs:gt(this,a,k/2,g,Us)}switch(d){case Ws:et(this,c,g+h,Ls);break;case Js:ft(this,c,g+h,Ls);break;case Vs:gt(this,c,k/2,g+h,Ls)}}else{switch(d){case Ws:et(this,c,g,Us);break;case Js:ft(this,c,g,Us);break;case Vs:gt(this,c,k/2,g,Us)}switch(d){case Ws:et(this,a,g+h,Ls);break;case Js:ft(this,a,g+h,Ls);break;case Vs:gt(this, -a,k/2,g+h,Ls)}}}else switch(d){case Ws:et(this,b,g,this.direction);break;case Js:ft(this,b,g,this.direction);break;case Vs:gt(this,b,k,g,this.direction);break;case Xs:ht(this,b,k,g,this.direction)}else ht(this,b,k,g-k/2,Ls)}this.updateParts();this.network=null;this.Bf=!0}; -function gt(a,b,c,d,e){var g=a.Wr,h=a.Vd;a=a.dg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(g=d+(e===Ls?g:-g);0>g;)g+=360;g%=360;180=n.length-1)break;kt(a,l,m,n,p,e,g)||lt(a,l,m,n,p,e,g);l=g.x;m=g.y}D.A(g);a.mn++;if(!(23Math.abs(r)?Math.abs(l-g)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(g)>Math.abs(p)?0p:0a.mn?a.Vd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;kt(a,l,m,p,q,e,n)||lt(a,l,m,p,q,e,n);l=n.x;m=n.y}D.A(n);a.mn++;if(!(23a.mn?a.Vd-g/(2*Math.PI):a.Vd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} -function lt(a,b,c,d,e,g,h){var k=a.Vd,l=a.dg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.El;d=!1;if(0<=b!==(g===Ls)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Is.prototype.commitLayout=function(){this.commitNodes();this.Pu&&this.commitLinks()}; -Is.prototype.commitNodes=function(){var a=this.UH,b=null!==this.group&&null!==this.group.placeholder&&this.group.md,c=b?this.group.location.copy():null;b?a=new N(0,0):(a.x=this.$d.x+this.Vd,a.y=this.$d.y+this.dg);for(var d=this.network.vertexes.j;d.next();){var e=d.value;e.x+=a.x;e.y+=a.y;e.commit()}b&&(this.group.mf(),a=this.group.position.copy(),b=this.group.location.copy(),c=c.$j(b.$j(a)),this.group.move(c),this.GC=c.$j(a))};Is.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()}; -function ct(a,b,c,d,e){var g=a.LH;if(.001>Math.abs(a.Yo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(g+1):Math.PI/(2*(g+1)),l=0,m=0;m<=g;m++)l=void 0!==d&&void 0!==e?d+m*e/g:m*Math.PI/(2*g),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function bt(a,b,c,d,e){var g=0,g=void 0!==d&&void 0!==e?ct(a,1,c,d,e):ct(a,1,c);return b/g} -function dt(a,b,c,d,e){if(.001>Math.abs(a.Yo-1))return e/b;var g=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-g*g*l*l)*a;if(h>=e)return k*a}} -Is.prototype.sort=function(a){switch(this.sorting){case Qs:break;case Rs:a.reverse();break;case Os:a.sort(this.comparer);break;case Ps:a.sort(this.comparer);a.reverse();break;case Ms:for(var b=[],c=0;ce&&(e=k,g=h)}else for(h=0;he&&(e=k,g=h);d.add(a.fa(g));b[g]=-1;g=a.fa(g);e=0;for(h=g.wc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& -b[e]++;for(g=g.tc;g.next();)e=a.indexOf(g.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(g=0;ga[g].indexOf(l)&&a[g].push(l);for(b=b.wc;b.next();)l=d.indexOf(b.value.fromVertex),l!==g&&0>a[g].indexOf(l)&&a[g].push(l)}h=[];for(g=0;g=g&&0>=h&&(g=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Nb("Layout");d=[];switch(this.alignment){case Gs:var k=a,l=c,m=Math.max(this.bq.width,1);if(!isFinite(m))for(var n=m=0;ng-1||0h)d.push(new C(0,y,h+k,A)),w=0,t=u,y+=A,A=0;A=Math.max(A,P);P=0;switch(s){case Fs:P=-q.width;break;default:P=0}p.moveTo(t+P,y);switch(s){case Fs:t-=B;break; +default:t+=B}w++}d.push(new C(0,y,h+k,A));break;case ys:k=g;l=a;m=c;n=Math.max(this.bq.width,1);p=y=B=0;q=D.P();for(g=0;g=B&&(h-=B);for(var B=P=0,H=Math.max(this.bq.height,1),aa=p=0,V=!0,ea=D.P(),g=0;gk-1||0h){d.push(new C(0,V?w-p:w,h+l,aa+p+m));for(R=0;RB&&(e.width+=e.x-B,e.x=B)}for(k=g=h=e=0;kd?1:0}; +Vn.smartComparer=function(a,b){v&&D.l(a,F,Vn,"standardComparer:a");v&&D.l(b,F,Vn,"standardComparer:b");if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.pa=0,a.va=0);else{var b=new K(Zs);b.Vc(a.j);a=new K(Zs);var c=new K(Zs),d;d=this.sort(b);var e=this.Kz,g=this.sD,h=this.Vd,k=this.Yo,l=this.Lz,m=this.Wr,b=this.El,n=this.HE,p=this.dg,q=this.Rv, +e=this.eg,g=this.xy,h=this.$J;if(!isFinite(h)||0>=h)h=NaN;k=this.bI;if(!isFinite(k)||0>=k)k=1;l=this.Ne;isFinite(l)||(l=0);m=this.Ff;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Ws&&g===Xs?e=Is:e===Ws&&g!==Xs&&(g=Xs,e=this.eg);if((this.direction===Rs||this.direction===Ss)&&this.sorting!==Ls){for(var r=0;!(r>=d.length);r+=2){a.add(d.fa(r));if(r+1>=d.length)break;c.add(d.fa(r+1))}this.direction===Rs?(this.eg===Ws&&a.reverse(),d=new K(Zs),d.Vc(a),d.Vc(c)):(this.eg===Ws&& +c.reverse(),d=new K(Zs),d.Vc(c),d.Vc(a))}for(var s=d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Ws){isNaN(b)&&(b=6);if(e!==Is&&e!==Ws){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Kz=e;this.sD=g;this.Vd=h;this.Yo=k;this.Lz=l;this.Wr=m;this.El=b;this.HE=n;this.dg=p;this.Rv=q;b=d;d=this.Kz;e=this.Vd;g=this.Lz;k=this.Wr;l=this.El;m=this.dg;n=this.Rv;if(this.direction!==Rs&&this.direction!==Ss||d!==Ws)if(this.direction===Rs||this.direction===Ss){h=0;switch(d){case Vs:h=180*ct(this,e,m,g,n)/Math.PI;break;case Is:n=b=0;h=a.first();null!==h&&(b=$s(h,Math.PI/2));h=c.first();null!== +h&&(n=$s(h,Math.PI/2));h=180*ct(this,e,m,g,l+(b+n)/2)/Math.PI;break;case Us:h=k/b.length}if(this.direction===Rs){switch(d){case Vs:dt(this,a,g,Ts);break;case Is:et(this,a,g,Ts);break;case Us:ft(this,a,k/2,g,Ts)}switch(d){case Vs:dt(this,c,g+h,Ks);break;case Is:et(this,c,g+h,Ks);break;case Us:ft(this,c,k/2,g+h,Ks)}}else{switch(d){case Vs:dt(this,c,g,Ts);break;case Is:et(this,c,g,Ts);break;case Us:ft(this,c,k/2,g,Ts)}switch(d){case Vs:dt(this,a,g+h,Ks);break;case Is:et(this,a,g+h,Ks);break;case Us:ft(this, +a,k/2,g+h,Ks)}}}else switch(d){case Vs:dt(this,b,g,this.direction);break;case Is:et(this,b,g,this.direction);break;case Us:ft(this,b,k,g,this.direction);break;case Ws:gt(this,b,k,g,this.direction)}else gt(this,b,k,g-k/2,Ks)}this.updateParts();this.network=null;this.Bf=!0}; +function ft(a,b,c,d,e){var g=a.Wr,h=a.Vd;a=a.dg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(g=d+(e===Ks?g:-g);0>g;)g+=360;g%=360;180=n.length-1)break;jt(a,l,m,n,p,e,g)||kt(a,l,m,n,p,e,g);l=g.x;m=g.y}D.A(g);a.mn++;if(!(23Math.abs(r)?Math.abs(l-g)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(g)>Math.abs(p)?0p:0a.mn?a.Vd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;jt(a,l,m,p,q,e,n)||kt(a,l,m,p,q,e,n);l=n.x;m=n.y}D.A(n);a.mn++;if(!(23a.mn?a.Vd-g/(2*Math.PI):a.Vd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} +function kt(a,b,c,d,e,g,h){var k=a.Vd,l=a.dg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.El;d=!1;if(0<=b!==(g===Ks)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Hs.prototype.commitLayout=function(){this.commitNodes();this.Pu&&this.commitLinks()}; +Hs.prototype.commitNodes=function(){var a=this.UH,b=null!==this.group&&null!==this.group.placeholder&&this.group.md,c=b?this.group.location.copy():null;b?a=new N(0,0):(a.x=this.$d.x+this.Vd,a.y=this.$d.y+this.dg);for(var d=this.network.vertexes.j;d.next();){var e=d.value;e.x+=a.x;e.y+=a.y;e.commit()}b&&(this.group.mf(),a=this.group.position.copy(),b=this.group.location.copy(),c=c.$j(b.$j(a)),this.group.move(c),this.GC=c.$j(a))};Hs.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()}; +function bt(a,b,c,d,e){var g=a.LH;if(.001>Math.abs(a.Yo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(g+1):Math.PI/(2*(g+1)),l=0,m=0;m<=g;m++)l=void 0!==d&&void 0!==e?d+m*e/g:m*Math.PI/(2*g),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function at(a,b,c,d,e){var g=0,g=void 0!==d&&void 0!==e?bt(a,1,c,d,e):bt(a,1,c);return b/g} +function ct(a,b,c,d,e){if(.001>Math.abs(a.Yo-1))return e/b;var g=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-g*g*l*l)*a;if(h>=e)return k*a}} +Hs.prototype.sort=function(a){switch(this.sorting){case Ps:break;case Qs:a.reverse();break;case Ns:a.sort(this.comparer);break;case Os:a.sort(this.comparer);a.reverse();break;case Ls:for(var b=[],c=0;ce&&(e=k,g=h)}else for(h=0;he&&(e=k,g=h);d.add(a.fa(g));b[g]=-1;g=a.fa(g);e=0;for(h=g.wc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& +b[e]++;for(g=g.tc;g.next();)e=a.indexOf(g.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(g=0;ga[g].indexOf(l)&&a[g].push(l);for(b=b.wc;b.next();)l=d.indexOf(b.value.fromVertex),l!==g&&0>a[g].indexOf(l)&&a[g].push(l)}h=[];for(g=0;ga[b[p]].indexOf(b[p===b.length-1?0:p+1])&&u.push(p===b.length-1?0:p+1);if(0===u.length)for(p=0;pP.indexOf(V)||eaP.indexOf(V)|| ea=t?l+1:l)),w+=l=t&&l++,B>=t&&B++,l>B&&(P=B,B=l,l=P),B-l<(b.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else g=!1;if(g)break;else b.push(c[0]),c.splice(0,1)}for(g=0;g=a?a:360,this.L())}); -D.defineProperty(Is,{eg:"arrangement"},function(){return this.Bd},function(a){this.Bd!==a&&(D.Da(a,Is,Is,"arrangement"),a===Xs||a===Js||a===Ws||a===Vs)&&(this.Bd=a,this.L())});D.defineProperty(Is,{direction:"direction"},function(){return this.ga},function(a){this.ga!==a&&(D.Da(a,Is,Is,"direction"),a===Ls||a===Us||a===Ss||a===Ts)&&(this.ga=a,this.L())}); -D.defineProperty(Is,{sorting:"sorting"},function(){return this.ti},function(a){this.ti!==a&&(D.Da(a,Is,Is,"sorting"),a===Qs||a===Rs||a===Os||Ps||a===Ms)&&(this.ti=a,this.L())});D.defineProperty(Is,{comparer:"comparer"},function(){return this.ci},function(a){this.ci!==a&&(D.h(a,"function",Is,"comparer"),this.ci=a,this.L())});D.defineProperty(Is,{spacing:"spacing"},function(){return this.ui},function(a){this.ui!==a&&(D.h(a,"number",Is,"spacing"),this.ui=a,this.L())}); -D.defineProperty(Is,{xy:"nodeDiameterFormula"},function(){return this.Zs},function(a){this.Zs!==a&&(D.Da(a,Is,Is,"nodeDiameterFormula"),a===Ns||a===Ys)&&(this.Zs=a,this.L())});D.w(Is,{PK:"actualXRadius"},function(){return this.Vd});D.w(Is,{QK:"actualYRadius"},function(){return this.dg});D.w(Is,{OK:"actualSpacing"},function(){return this.El});D.w(Is,{UH:"actualCenter"},function(){return this.GC});var Js;Is.ConstantSpacing=Js=D.s(Is,"ConstantSpacing",0);var Ws; -Is.ConstantDistance=Ws=D.s(Is,"ConstantDistance",1);var Vs;Is.ConstantAngle=Vs=D.s(Is,"ConstantAngle",2);var Xs;Is.Packed=Xs=D.s(Is,"Packed",3);var Ls;Is.Clockwise=Ls=D.s(Is,"Clockwise",4);var Us;Is.Counterclockwise=Us=D.s(Is,"Counterclockwise",5);var Ss;Is.BidirectionalLeft=Ss=D.s(Is,"BidirectionalLeft",6);var Ts;Is.BidirectionalRight=Ts=D.s(Is,"BidirectionalRight",7);var Qs;Is.Forwards=Qs=D.s(Is,"Forwards",8);var Rs;Is.Reverse=Rs=D.s(Is,"Reverse",9);var Os;Is.Ascending=Os=D.s(Is,"Ascending",10); -var Ps;Is.Descending=Ps=D.s(Is,"Descending",11);var Ms;Is.Optimized=Ms=D.s(Is,"Optimized",12);var Ns;Is.Pythagorean=Ns=D.s(Is,"Pythagorean",13);var Ys;Is.Circular=Ys=D.s(Is,"Circular",14);function Ks(){this.qq=-Infinity;this.cr=this.Co=null}Ks.prototype.compare=function(a,b){if(0this.qq||Math.abs(a)a&&0g?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new N(n.x+n.width+d.width,n.y),l[1]=new N(n.x,n.y+n.height+d.height),g=2):(p=qt(l,g, -e,k,n.width,n.height,d),q=l[p],r=new N(q.x+n.width+d.width,q.y),s=new N(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().ib,d=this.network.vertexes.j;d.next();){if(d.value.ib.jg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Ug?a.Ug=new K(lu):a.Ug.clear();a.Ug.Vc(a.network.vertexes);var c=a.Ug;c.sort(function(a,b){return null===a||null===b||a===b?0:b.sg-a.sg});for(var d=c.count-1;0<=d&&1>=c.fa(d).sg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=pe((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.ib=new C(k-r.x-h,l-r.y-m,p+2*h,q+2*m);g.focus=new N(r.x+h,r.y+m)}a.network=d;return c}function ku(a,b,c){v&&(D.l(b,ot,nt,"popNetwork:oldnet"),D.p(c,nt,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.Xh){var e=d.Xh.fa(d.UB);d.sg=e.cz;var g=e.yC,h=e.zC;d.ib=new C(d.pa-g,d.va-h,e.dz,e.bz);d.focus=new N(g,h);d.UB--}}for(c=a.network.edges.j;c.next();)c.value.network=b;a.network=b} -function mu(a,b,c){v&&(D.l(b,lu,nt,"surroundNode:oldnet"),D.p(c,nt,"surroundNode:level"));var d=b.Jn;if(null!==d&&0!==d.count){c=b.pa;var e=b.va,g=b.width,h=b.height;null!==b.Xh&&0=p.sg?l++:(k=!0,m++,h+=Math.atan2(b.va-p.va,b.pa-p.pa))}if(0!==l)for(0>1)+m)*(0===k%2?1:-1);l.pa=c+n*Math.cos(p);l.va=e+n*Math.sin(p);k++}}} -function qt(a,b,c,d,e,g,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+g-k,e=e-l-h,pe(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,pe(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.pa,e=d,g=c.va,h=g,c=1;ch-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.pa-b.pa}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.va-b.va});for(var h=a.bj,m=0,n=0,p=0,c=0;ch||p-d>h){if(g)break}else if(l-r>h||r-l>h){if(!g)break}else{var s=ou(k,e);1>s?(n=a.Gy,null===n&&(a.Gy=n=new Ia(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.Q.right-k.Q.x),n=(1+n)*m):dr?(p=Math.abs(e.Q.bottom-k.Q.y),p=(1+p)*s):ds?(n=a.Gy,null===n&&(a.Gy=n=new Ia(0)),m=n.random(),s= -n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=g.stiffness*(s-g.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=a.TJ;for(e=0;ed&&(g=d),h<-d?h=-d:h>d&&(h=d),k.pa+=g,k.va+=h,c=Math.max(c,g*g+h*h));return c>a.CF*a.CF}nt.prototype.moveFixedVertex=function(){}; -nt.prototype.commitLayout=function(){this.aC();this.commitNodes();this.Pu&&this.commitLinks()};nt.prototype.aC=function(){if(this.Xq)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Gb=Vc,b.Hb=Vc)}};nt.prototype.commitNodes=function(){var a=0,b=0;if(this.aI){var c=D.Sf();this.Kh(this.network,c);b=this.$d;a=b.x-c.x;b=b.y-c.y;D.Lb(c)}for(var c=D.Sf(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.ib),c.x+=a,c.y+=b,e.ib=c;e.commit()}D.Lb(c)}; -nt.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};nt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Vo:a};nt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Uo:a};nt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.So:a};nt.prototype.electricalFieldX=function(){return 0};nt.prototype.electricalFieldY=function(){return 0}; -nt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.To:a};nt.prototype.gravitationalFieldX=function(){return 0};nt.prototype.gravitationalFieldY=function(){return 0};nt.prototype.isFixed=function(a){return a.isFixed};D.w(nt,{vL:"currentIteration"},function(){return this.ys});D.defineProperty(nt,{aF:"arrangementSpacing"},function(){return this.xg},function(a){D.l(a,Ca,nt,"arrangementSpacing");this.xg.O(a)||(this.xg.assign(a),this.L())}); -D.defineProperty(nt,{aI:"arrangesToOrigin"},function(){return this.nr},function(a){this.nr!==a&&(D.h(a,"boolean",nt,"arrangesToOrigin"),this.nr=a,this.L())});D.defineProperty(nt,{Xq:"setsPortSpots"},function(){return this.si},function(a){this.si!==a&&(D.h(a,"boolean",nt,"setsPortSpots"),this.si=a,this.L())});D.defineProperty(nt,{comments:"comments"},function(){return this.bi},function(a){this.bi!==a&&(D.h(a,"boolean",nt,"comments"),this.bi=a,this.L())}); -D.defineProperty(nt,{AB:"maxIterations"},function(){return this.xp},function(a){this.xp!==a&&(D.h(a,"number",nt,"maxIterations"),0<=a&&(this.xp=a,this.L()))});D.defineProperty(nt,{CF:"epsilonDistance"},function(){return this.Zr},function(a){this.Zr!==a&&(D.h(a,"number",nt,"epsilonDistance"),0b.toVertex.index&&(a.My(b),b.rev=!0);break;case su:for(d=this.network.vertexes.j;d.next();)a=d.value,a.lq=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.Vs=0;for(d.reset();d.next();)b=d.value,0===b.wc.count&&Cu(this,b);for(d.reset();d.next();)b=d.value,-1===b.lq&&Cu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,g=e.finish,e.lqq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else g=!1;if(g)break;else b.push(c[0]),c.splice(0,1)}for(g=0;g=a?a:360,this.L())}); +D.defineProperty(Hs,{eg:"arrangement"},function(){return this.Bd},function(a){this.Bd!==a&&(D.Da(a,Hs,Hs,"arrangement"),a===Ws||a===Is||a===Vs||a===Us)&&(this.Bd=a,this.L())});D.defineProperty(Hs,{direction:"direction"},function(){return this.ga},function(a){this.ga!==a&&(D.Da(a,Hs,Hs,"direction"),a===Ks||a===Ts||a===Rs||a===Ss)&&(this.ga=a,this.L())}); +D.defineProperty(Hs,{sorting:"sorting"},function(){return this.ti},function(a){this.ti!==a&&(D.Da(a,Hs,Hs,"sorting"),a===Ps||a===Qs||a===Ns||Os||a===Ls)&&(this.ti=a,this.L())});D.defineProperty(Hs,{comparer:"comparer"},function(){return this.ci},function(a){this.ci!==a&&(D.h(a,"function",Hs,"comparer"),this.ci=a,this.L())});D.defineProperty(Hs,{spacing:"spacing"},function(){return this.ui},function(a){this.ui!==a&&(D.h(a,"number",Hs,"spacing"),this.ui=a,this.L())}); +D.defineProperty(Hs,{xy:"nodeDiameterFormula"},function(){return this.Zs},function(a){this.Zs!==a&&(D.Da(a,Hs,Hs,"nodeDiameterFormula"),a===Ms||a===Xs)&&(this.Zs=a,this.L())});D.w(Hs,{PK:"actualXRadius"},function(){return this.Vd});D.w(Hs,{QK:"actualYRadius"},function(){return this.dg});D.w(Hs,{OK:"actualSpacing"},function(){return this.El});D.w(Hs,{UH:"actualCenter"},function(){return this.GC});var Is;Hs.ConstantSpacing=Is=D.s(Hs,"ConstantSpacing",0);var Vs; +Hs.ConstantDistance=Vs=D.s(Hs,"ConstantDistance",1);var Us;Hs.ConstantAngle=Us=D.s(Hs,"ConstantAngle",2);var Ws;Hs.Packed=Ws=D.s(Hs,"Packed",3);var Ks;Hs.Clockwise=Ks=D.s(Hs,"Clockwise",4);var Ts;Hs.Counterclockwise=Ts=D.s(Hs,"Counterclockwise",5);var Rs;Hs.BidirectionalLeft=Rs=D.s(Hs,"BidirectionalLeft",6);var Ss;Hs.BidirectionalRight=Ss=D.s(Hs,"BidirectionalRight",7);var Ps;Hs.Forwards=Ps=D.s(Hs,"Forwards",8);var Qs;Hs.Reverse=Qs=D.s(Hs,"Reverse",9);var Ns;Hs.Ascending=Ns=D.s(Hs,"Ascending",10); +var Os;Hs.Descending=Os=D.s(Hs,"Descending",11);var Ls;Hs.Optimized=Ls=D.s(Hs,"Optimized",12);var Ms;Hs.Pythagorean=Ms=D.s(Hs,"Pythagorean",13);var Xs;Hs.Circular=Xs=D.s(Hs,"Circular",14);function Js(){this.qq=-Infinity;this.cr=this.Co=null}Js.prototype.compare=function(a,b){if(0this.qq||Math.abs(a)a&&0g?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new N(n.x+n.width+d.width,n.y),l[1]=new N(n.x,n.y+n.height+d.height),g=2):(p=pt(l,g, +e,k,n.width,n.height,d),q=l[p],r=new N(q.x+n.width+d.width,q.y),s=new N(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().ib,d=this.network.vertexes.j;d.next();){if(d.value.ib.jg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Ug?a.Ug=new K(ku):a.Ug.clear();a.Ug.Vc(a.network.vertexes);var c=a.Ug;c.sort(function(a,b){return null===a||null===b||a===b?0:b.sg-a.sg});for(var d=c.count-1;0<=d&&1>=c.fa(d).sg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=oe((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.ib=new C(k-r.x-h,l-r.y-m,p+2*h,q+2*m);g.focus=new N(r.x+h,r.y+m)}a.network=d;return c}function ju(a,b,c){v&&(D.l(b,nt,mt,"popNetwork:oldnet"),D.p(c,mt,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.Xh){var e=d.Xh.fa(d.UB);d.sg=e.cz;var g=e.yC,h=e.zC;d.ib=new C(d.pa-g,d.va-h,e.dz,e.bz);d.focus=new N(g,h);d.UB--}}for(c=a.network.edges.j;c.next();)c.value.network=b;a.network=b} +function lu(a,b,c){v&&(D.l(b,ku,mt,"surroundNode:oldnet"),D.p(c,mt,"surroundNode:level"));var d=b.Jn;if(null!==d&&0!==d.count){c=b.pa;var e=b.va,g=b.width,h=b.height;null!==b.Xh&&0=p.sg?l++:(k=!0,m++,h+=Math.atan2(b.va-p.va,b.pa-p.pa))}if(0!==l)for(0>1)+m)*(0===k%2?1:-1);l.pa=c+n*Math.cos(p);l.va=e+n*Math.sin(p);k++}}} +function pt(a,b,c,d,e,g,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+g-k,e=e-l-h,oe(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,oe(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.pa,e=d,g=c.va,h=g,c=1;ch-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.pa-b.pa}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.va-b.va});for(var h=a.bj,m=0,n=0,p=0,c=0;ch||p-d>h){if(g)break}else if(l-r>h||r-l>h){if(!g)break}else{var s=nu(k,e);1>s?(n=a.Gy,null===n&&(a.Gy=n=new Ia(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.Q.right-k.Q.x),n=(1+n)*m):dr?(p=Math.abs(e.Q.bottom-k.Q.y),p=(1+p)*s):ds?(n=a.Gy,null===n&&(a.Gy=n=new Ia(0)),m=n.random(),s= +n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=g.stiffness*(s-g.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=a.TJ;for(e=0;ed&&(g=d),h<-d?h=-d:h>d&&(h=d),k.pa+=g,k.va+=h,c=Math.max(c,g*g+h*h));return c>a.CF*a.CF}mt.prototype.moveFixedVertex=function(){}; +mt.prototype.commitLayout=function(){this.aC();this.commitNodes();this.Pu&&this.commitLinks()};mt.prototype.aC=function(){if(this.Xq)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Gb=Vc,b.Hb=Vc)}};mt.prototype.commitNodes=function(){var a=0,b=0;if(this.aI){var c=D.Sf();this.Kh(this.network,c);b=this.$d;a=b.x-c.x;b=b.y-c.y;D.Lb(c)}for(var c=D.Sf(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.ib),c.x+=a,c.y+=b,e.ib=c;e.commit()}D.Lb(c)}; +mt.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};mt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Vo:a};mt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Uo:a};mt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.So:a};mt.prototype.electricalFieldX=function(){return 0};mt.prototype.electricalFieldY=function(){return 0}; +mt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.To:a};mt.prototype.gravitationalFieldX=function(){return 0};mt.prototype.gravitationalFieldY=function(){return 0};mt.prototype.isFixed=function(a){return a.isFixed};D.w(mt,{vL:"currentIteration"},function(){return this.ys});D.defineProperty(mt,{aF:"arrangementSpacing"},function(){return this.xg},function(a){D.l(a,Ca,mt,"arrangementSpacing");this.xg.O(a)||(this.xg.assign(a),this.L())}); +D.defineProperty(mt,{aI:"arrangesToOrigin"},function(){return this.nr},function(a){this.nr!==a&&(D.h(a,"boolean",mt,"arrangesToOrigin"),this.nr=a,this.L())});D.defineProperty(mt,{Xq:"setsPortSpots"},function(){return this.si},function(a){this.si!==a&&(D.h(a,"boolean",mt,"setsPortSpots"),this.si=a,this.L())});D.defineProperty(mt,{comments:"comments"},function(){return this.bi},function(a){this.bi!==a&&(D.h(a,"boolean",mt,"comments"),this.bi=a,this.L())}); +D.defineProperty(mt,{AB:"maxIterations"},function(){return this.xp},function(a){this.xp!==a&&(D.h(a,"number",mt,"maxIterations"),0<=a&&(this.xp=a,this.L()))});D.defineProperty(mt,{CF:"epsilonDistance"},function(){return this.Zr},function(a){this.Zr!==a&&(D.h(a,"number",mt,"epsilonDistance"),0b.toVertex.index&&(a.My(b),b.rev=!0);break;case ru:for(d=this.network.vertexes.j;d.next();)a=d.value,a.lq=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.Vs=0;for(d.reset();d.next();)b=d.value,0===b.wc.count&&Bu(this,b);for(d.reset();d.next();)b=d.value,-1===b.lq&&Bu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,g=e.finish,e.lqu&&0u&&0d[this.Zf]&&(this.Cw=d[b]-1,this.Zf=b),d[b]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.Gn===m.Gn||k++;var m=0,q,r=q=p=l=0,s,u=0,t=0;s=0;var y;if(0<=c)for(n=d[h].Ye,m=0;md[this.Zf]&&(this.Cw=d[b]-1,this.Zf=b),d[b]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.Gn===m.Gn||k++;var m=0,q,r=q=p=l=0,s,u=0,t=0;s=0;var y;if(0<=c)for(n=d[h].Ye,m=0;mu||l===u&&q>s)&&k++,tl||u===l&&s>q)&&k++);if(0>=c)for(n=d[h].Se,m=0;mu||l===u&&p>t)&&k++, sl||u===l&&t>p)&&k++);g[h*e+h]=k;for(n=h+1;n=c)for(k=d[h].Se,y=d[n].Se,m=0;m=c&&(l=k.Ye);var m=null;0<=c&&(m=k.Se);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.Ye);var m=null;0<=c&&(m=k.Se);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,g[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}Gu(a,b,d);return g}function Ou(a,b,c,d,e,g){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.tc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Ou(a,m,c,d,e,g)}if(g)for(l=b.wc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Ou(a,m,c,d,e,g)}} -function Pu(a,b,c,d,e,g){if(b.component===d){b.component=c;if(e)for(var h=b.tc;h.next();)Pu(a,h.value.toVertex,c,d,e,g);if(g)for(b=b.wc;b.next();)Pu(a,b.value.fromVertex,c,d,e,g)}}function zu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid)return b}return null}function Au(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.tc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} -function Bu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.wc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function Cu(a,b){b.lq=a.Vs;a.Vs++;for(var c=b.tc;c.next();){var d=c.value,e=d.toVertex;-1===e.lq&&(d.forest=!0,Cu(a,e))}b.finish=a.Vs;a.Vs++} -ru.prototype.assignLayers=function(){switch(this.sp){case Qu:Ru(this);break;case Su:for(var a=0,b=this.network.vertexes.j;b.next();)a=Tu(this,b.value),this.Ab=Math.max(a,this.Ab);for(b.reset();b.next();)a=b.value,a.layer=this.Ab-a.layer;break;default:case tu:Ru(this);for(b=this.network.vertexes.j;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.wc.count&&Uu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.Ab=-1;for(b.reset();b.next();){var c=b.value;c.layer-= -a;this.Ab=Math.max(this.Ab,c.layer)}}};function Ru(a){for(var b=a.network.vertexes.j;b.next();){var c=Vu(a,b.value);a.Ab=Math.max(c,a.Ab)}}function Vu(a,b){var c=0;if(-1===b.layer){for(var d=b.tc;d.next();)var e=d.value,g=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Vu(a,g)+e);b.layer=c}else c=b.layer;return c}function Tu(a,b){var c=0;if(-1===b.layer){for(var d=b.wc;d.next();)var e=d.value,g=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Tu(a,g)+e);b.layer=c}else c=b.layer;return c} -function Uu(a,b){if(!b.valid){b.valid=!0;for(var c=b.tc;c.next();)Uu(a,c.value.toVertex);for(c=a.network.vertexes.j;c.next();)c.value.component=-1;for(var d=b.Ye.o,e=d.length,g=0;gh&&Ou(a,k,0,-1,!0,!1)}for(Ou(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.j;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Ye.o,e=s.length,g=0;g=c&&(l=k.Ye);var m=null;0<=c&&(m=k.Se);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.Ye);var m=null;0<=c&&(m=k.Se);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,g[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}Fu(a,b,d);return g}function Nu(a,b,c,d,e,g){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.tc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Nu(a,m,c,d,e,g)}if(g)for(l=b.wc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Nu(a,m,c,d,e,g)}} +function Ou(a,b,c,d,e,g){if(b.component===d){b.component=c;if(e)for(var h=b.tc;h.next();)Ou(a,h.value.toVertex,c,d,e,g);if(g)for(b=b.wc;b.next();)Ou(a,b.value.fromVertex,c,d,e,g)}}function yu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid)return b}return null}function zu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.tc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} +function Au(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.wc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function Bu(a,b){b.lq=a.Vs;a.Vs++;for(var c=b.tc;c.next();){var d=c.value,e=d.toVertex;-1===e.lq&&(d.forest=!0,Bu(a,e))}b.finish=a.Vs;a.Vs++} +qu.prototype.assignLayers=function(){switch(this.sp){case Pu:Qu(this);break;case Ru:for(var a=0,b=this.network.vertexes.j;b.next();)a=Su(this,b.value),this.Ab=Math.max(a,this.Ab);for(b.reset();b.next();)a=b.value,a.layer=this.Ab-a.layer;break;default:case su:Qu(this);for(b=this.network.vertexes.j;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.wc.count&&Tu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.Ab=-1;for(b.reset();b.next();){var c=b.value;c.layer-= +a;this.Ab=Math.max(this.Ab,c.layer)}}};function Qu(a){for(var b=a.network.vertexes.j;b.next();){var c=Uu(a,b.value);a.Ab=Math.max(c,a.Ab)}}function Uu(a,b){var c=0;if(-1===b.layer){for(var d=b.tc;d.next();)var e=d.value,g=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Uu(a,g)+e);b.layer=c}else c=b.layer;return c}function Su(a,b){var c=0;if(-1===b.layer){for(var d=b.wc;d.next();)var e=d.value,g=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Su(a,g)+e);b.layer=c}else c=b.layer;return c} +function Tu(a,b){if(!b.valid){b.valid=!0;for(var c=b.tc;c.next();)Tu(a,c.value.toVertex);for(c=a.network.vertexes.j;c.next();)c.value.component=-1;for(var d=b.Ye.o,e=d.length,g=0;gh&&Nu(a,k,0,-1,!0,!1)}for(Nu(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.j;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Ye.o,e=s.length,g=0;gd)&&!n&&(h=l,d=m)}if(0>g){for(c.reset();c.next();)g=c.value,1===g.component&&(g.layer-=e);b.component=0}else h.component=0}}} -function Eu(a,b,c){return 90===a.ga?c&&!b.rev||!c&&b.rev?270:90:180===a.ga?c&&!b.rev||!c&&b.rev?0:180:270===a.ga?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} -ru.prototype.initializeIndices=function(){switch(this.ip){default:case Wu:for(var a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;b.index=this.ve[c];this.ve[c]++}break;case uu:a=this.network.vertexes.j;for(b=this.Ab;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Xu(this,c);break;case Yu:for(a=this.network.vertexes.j,b=0;b<=this.Ab;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Zu(this,c)}}; -function Xu(a,b){var c=b.layer;b.index=a.ve[c];a.ve[c]++;for(var c=b.Se.Fc(),d=!0;d;)for(var d=!1,e=0;eh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;e=h;d--)g=av(this,d,-1)||g;e=this.countCrossings();e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=av(this,d,1)||g;e=this.countCrossings();e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=av(this,d,1)||g;e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1, -d=h;d<=c;d++)g=av(this,d,-1)||g;e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=av(this,d,0)||g;e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=av(this,d,0)||g;e>=a?Ju(this,b):(a=e,b=Iu(this))}break;default:case vu:for(c=this.Ab,h=0,k=a+1;(d=this.countCrossings())=h;d--)g=av(this,d,-1)||g;e=this.countCrossings();e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=av(this,d,1)||g;e=this.countCrossings(); -e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=av(this,d,1)||g;e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=av(this,d,-1)||g;e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=av(this,d,0)||g;e>=a?Ju(this,b):(a=e,b=Iu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=av(this,d,0)||g;e>=a?Ju(this,b):(a=e,b=Iu(this))}}Ju(this,b)}; -function $u(a,b,c){v&&(D.p(b,ru,"medianBarycenterCrossingReduction:unfixedLayer"),D.p(c,ru,"medianBarycenterCrossingReduction:direction"));var d=0,e=Fu(a,b),g=a.ve[b],h=Nu(a,b,c);c=Mu(a,b,c);for(d=0;dh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;e=h;d--)g=$u(this,d,-1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1, +d=h;d<=c;d++)g=$u(this,d,-1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this))}break;default:case uu:for(c=this.Ab,h=0,k=a+1;(d=this.countCrossings())=h;d--)g=$u(this,d,-1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,1)||g;e=this.countCrossings(); +e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,-1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this))}}Iu(this,b)}; +function Zu(a,b,c){v&&(D.p(b,qu,"medianBarycenterCrossingReduction:unfixedLayer"),D.p(c,qu,"medianBarycenterCrossingReduction:direction"));var d=0,e=Eu(a,b),g=a.ve[b],h=Mu(a,b,c);c=Lu(a,b,c);for(d=0;dg+1&&(q+=4*(w-g),r+=4*(w-(g+1)))}B=d[g].tc.j;for(B.reset();B.next();)if(w=B.value,A=w.toVertex,w.valid&&A.layer===b){for(w=0;d[w]!==A;)w++;w===g+1&&(r+=1)}B=d[g+1].wc.j;for(B.reset();B.next();)if(w=B.value,A=w.fromVertex,w.valid&&A.layer===b){for(w=0;d[w]!==A;)w++;wg+1&&(q+=4*(w-(g+1)),r+=4*(w-g))}B=d[g+1].tc.j;for(B.reset();B.next();)if(w=B.value,A=w.toVertex,w.valid&& -A.layer===b){for(w=0;d[w]!==A;)w++;w===g&&(q+=1)}var w=A=0,B=h[d[g].index],P=k[d[g].index],H=h[d[g+1].index],R=k[d[g+1].index];-1!==B&&(A+=Math.abs(B-s),w+=Math.abs(B-y));-1!==P&&(A+=Math.abs(P-s),w+=Math.abs(P-y));-1!==H&&(A+=Math.abs(H-u),w+=Math.abs(H-t));-1!==R&&(A+=Math.abs(R-u),w+=Math.abs(R-t));if(r>1)+8*d;this.Rb*=8}if(0!==(this.qj&ev))for(b=!0;b;){b=!1;for(a=this.Zf+1;a<=this.Ab;a++)b=fv(this,a,1)||b; -for(a=this.Zf-1;0<=a;a--)b=fv(this,a,-1)||b;b=fv(this,this.Zf,0)||b}if(0!==(this.qj&gv)){for(a=this.Zf+1;a<=this.Ab;a++)hv(this,a,1);for(a=this.Zf-1;0<=a;a--)hv(this,a,-1);hv(this,this.Zf,0)}c&&(iv(this,-1),iv(this,1));if(0!==(this.qj&ev))for(b=!0;b;){b=!1;b=fv(this,this.Zf,0)||b;for(a=this.Zf+1;a<=this.Ab;a++)b=fv(this,a,0)||b;for(a=this.Zf-1;0<=a;a--)b=fv(this,a,0)||b}}; -function fv(a,b,c){v&&(D.p(b,ru,"bendStraighten:unfixedLayer"),D.p(c,ru,"bendStraighten:direction"));for(var d=!1;jv(a,b,c);)d=!0;return d} -function jv(a,b,c){v&&(D.p(b,ru,"shiftbendStraighten:unfixedLayer"),D.p(c,ru,"shiftbendStraighten:direction"));var d=0,e=Fu(a,b),g=a.ve[b],h=Mu(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=g||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q= -0,u=0,t=0,y=0,w=0;if(0>=c)for(var A=e[d].wc.j;A.next();){var w=A.value,B=w.fromVertex;w.valid&&B.layer!==b&&(t=Hu(w),y=w.portFromColOffset,w=w.portToColOffset,B=B.column,q+=(Math.abs(n+w-(B+y))+1)*t,s+=(Math.abs(r+w-(B+y))+1)*t,u+=(Math.abs(p+w-(B+y))+1)*t)}if(0<=c)for(A=e[d].tc.j;A.next();)w=A.value,B=w.toVertex,w.valid&&B.layer!==b&&(t=Hu(w),y=w.portFromColOffset,w=w.portToColOffset,B=B.column,q+=(Math.abs(n+y-(B+w))+1)*t,s+=(Math.abs(r+y-(B+w))+1)*t,u+=(Math.abs(p+y-(B+w))+1)*t);w=y=t=0;A=h[e[d].index]; -B=k[e[d].index];-1!==A&&(t+=Math.abs(A-n),y+=Math.abs(A-r),w+=Math.abs(A-p));-1!==B&&(t+=Math.abs(B-n),y+=Math.abs(B-r),w+=Math.abs(B-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}Gu(a,b,e);a.normalize()} -function kv(a,b){v&&(D.p(b,ru,"packAux:column"),D.p(1,ru,"packAux:direction"));for(var c=!0,d=a.network.vertexes.j;d.next();){var e=d.value,g=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-g<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} -function lv(a,b){v&&(D.p(b,ru,"tightPackAux:column"),D.p(1,ru,"tightPackAux:direction"));for(var c=b,c=b+1,d=0,e=[],g=[],d=0;d<=a.Ab;d++)e[d]=!1,g[d]=!1;for(var h=a.network.vertexes.j;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(g[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.Ab;d++)k=k&&!(e[d]&&g[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c} -function iv(a,b){v&&D.p(b,ru,"componentPack:direction");for(var c=0;c<=a.Rb;c++)for(;kv(a,c););a.normalize();for(c=0;ce?Ju(a,d):hb)for(c=a.Rb;0<=c;c--)for(d=Iu(a),e=Lu(a),g=e+1;ee?Ju(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Lg);a.Lg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Pu(a,b,a.Lg,-1,!0,!0),a.Lg++);var g=0;b=[];for(g=0;g>1)+8*d;this.Rb*=8}if(0!==(this.qj&dv))for(b=!0;b;){b=!1;for(a=this.Zf+1;a<=this.Ab;a++)b=ev(this,a,1)||b; +for(a=this.Zf-1;0<=a;a--)b=ev(this,a,-1)||b;b=ev(this,this.Zf,0)||b}if(0!==(this.qj&fv)){for(a=this.Zf+1;a<=this.Ab;a++)gv(this,a,1);for(a=this.Zf-1;0<=a;a--)gv(this,a,-1);gv(this,this.Zf,0)}c&&(hv(this,-1),hv(this,1));if(0!==(this.qj&dv))for(b=!0;b;){b=!1;b=ev(this,this.Zf,0)||b;for(a=this.Zf+1;a<=this.Ab;a++)b=ev(this,a,0)||b;for(a=this.Zf-1;0<=a;a--)b=ev(this,a,0)||b}}; +function ev(a,b,c){v&&(D.p(b,qu,"bendStraighten:unfixedLayer"),D.p(c,qu,"bendStraighten:direction"));for(var d=!1;iv(a,b,c);)d=!0;return d} +function iv(a,b,c){v&&(D.p(b,qu,"shiftbendStraighten:unfixedLayer"),D.p(c,qu,"shiftbendStraighten:direction"));var d=0,e=Eu(a,b),g=a.ve[b],h=Lu(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=g||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q= +0,u=0,t=0,y=0,w=0;if(0>=c)for(var A=e[d].wc.j;A.next();){var w=A.value,B=w.fromVertex;w.valid&&B.layer!==b&&(t=Gu(w),y=w.portFromColOffset,w=w.portToColOffset,B=B.column,q+=(Math.abs(n+w-(B+y))+1)*t,s+=(Math.abs(r+w-(B+y))+1)*t,u+=(Math.abs(p+w-(B+y))+1)*t)}if(0<=c)for(A=e[d].tc.j;A.next();)w=A.value,B=w.toVertex,w.valid&&B.layer!==b&&(t=Gu(w),y=w.portFromColOffset,w=w.portToColOffset,B=B.column,q+=(Math.abs(n+y-(B+w))+1)*t,s+=(Math.abs(r+y-(B+w))+1)*t,u+=(Math.abs(p+y-(B+w))+1)*t);w=y=t=0;A=h[e[d].index]; +B=k[e[d].index];-1!==A&&(t+=Math.abs(A-n),y+=Math.abs(A-r),w+=Math.abs(A-p));-1!==B&&(t+=Math.abs(B-n),y+=Math.abs(B-r),w+=Math.abs(B-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}Fu(a,b,e);a.normalize()} +function jv(a,b){v&&(D.p(b,qu,"packAux:column"),D.p(1,qu,"packAux:direction"));for(var c=!0,d=a.network.vertexes.j;d.next();){var e=d.value,g=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-g<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} +function kv(a,b){v&&(D.p(b,qu,"tightPackAux:column"),D.p(1,qu,"tightPackAux:direction"));for(var c=b,c=b+1,d=0,e=[],g=[],d=0;d<=a.Ab;d++)e[d]=!1,g[d]=!1;for(var h=a.network.vertexes.j;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(g[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.Ab;d++)k=k&&!(e[d]&&g[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c} +function hv(a,b){v&&D.p(b,qu,"componentPack:direction");for(var c=0;c<=a.Rb;c++)for(;jv(a,c););a.normalize();for(c=0;ce?Iu(a,d):hb)for(c=a.Rb;0<=c;c--)for(d=Hu(a),e=Ku(a),g=e+1;ee?Iu(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Lg);a.Lg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Ou(a,b,a.Lg,-1,!0,!0),a.Lg++);var g=0;b=[];for(g=0;gc)for(k=a.Rb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -ru.prototype.commitLayout=function(){if(this.Xq)for(var a=Du(this,!0),b=Du(this,!1),c=this.network.edges.j;c.next();){var d=c.value.link;null!==d&&(d.Gb=a,d.Hb=b)}this.commitNodes();this.JA();this.Pu&&this.commitLinks()};function Du(a,b){return 270===a.ga?b?$c:gd:90===a.ga?b?gd:$c:180===a.ga?b?ed:fd:b?fd:ed} -ru.prototype.commitNodes=function(){this.Jg=[];this.Yf=[];this.Xf=[];this.Wb=[];for(var a=0;a<=this.Ab;a++)this.Jg[a]=0,this.Yf[a]=0,this.Xf[a]=0,this.Wb[a]=0;for(a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;this.Jg[c]=Math.max(this.Jg[c],this.nodeMinLayerSpace(b,!0));this.Yf[c]=Math.max(this.Yf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.cn,c=0;c<=this.Ab;c++){var e=d;0>=this.Jg[c]+this.Yf[c]&&(e=0);0=this.Jg[c]+this.Yf[c]&&(e=0);0=r.Q.bottom?(Ra=r.Q.y+r.Q.height, b.B(W++,sa,Ra+pb),b.B(W++,sa,Ra),b.B(W++,sa,Ra-Oa)):(b.B(W++,sa,oa+pb),b.B(W++,sa,oa),b.B(W++,sa,oa-Oa)):270===this.ga?oa<=r.Q.y?(Ra=r.Q.y,b.B(W++,sa,Ra-Oa),b.B(W++,sa,Ra),b.B(W++,sa,Ra+pb)):(b.B(W++,sa,oa-Oa),b.B(W++,sa,oa),b.B(W++,sa,oa+pb)):0===this.ga&&(sa>=r.Q.right?(Ra=r.Q.x+r.Q.width,b.B(W++,Ra+pb,oa),b.B(W++,Ra,oa),b.B(W++,Ra-Oa,oa)):(b.B(W++,sa+pb,oa),b.B(W++,sa,oa),b.B(W++,sa-Oa,oa)));else{b.B(W++,ib,ub);var vd=0;if(180===this.ga||0===this.ga){if(180===this.ga?sa>=r.Q.right:sa<=r.Q.x)vd= @@ -2037,138 +2037,138 @@ this.Jg[q.layer]);pb=Math.max(10,this.Yf[q.layer]);vd=0;if(180===this.ga||0===th if(Sa!==r)if(ib=b.m(W-1).x,ub=b.m(W-1).y,sa=Sa.pa,oa=Sa.va,hb)if(180===this.ga||0===this.ga){var Md=null!==Qc?Qc.va:ub;Md!==oa&&(ab=this.Wb[Sa.layer],2===W&&(ab=0===this.ga?Math.max(ab,ib):Math.min(ab,ib)),b.B(W++,ab,ub),b.B(W++,ab,oa))}else{var Jf=null!==Qc?Qc.pa:ib;Jf!==sa&&(ab=this.Wb[Sa.layer],2===W&&(ab=90===this.ga?Math.max(ab,ub):Math.min(ab,ub)),b.B(W++,ib,ab),b.B(W++,sa,ab))}else Oa=Math.max(10,this.Jg[Sa.layer]),pb=Math.max(10,this.Yf[Sa.layer]),180===this.ga?(b.B(W++,sa+pb,oa),La&&b.B(W++, sa,oa),b.B(W++,sa-Oa,oa)):90===this.ga?(b.B(W++,sa,oa-Oa),La&&b.B(W++,sa,oa),b.B(W++,sa,oa+pb)):270===this.ga?(b.B(W++,sa,oa+pb),La&&b.B(W++,sa,oa),b.B(W++,sa,oa-Oa)):(b.B(W++,sa-Oa,oa),La&&b.B(W++,sa,oa),b.B(W++,sa+pb,oa));q=Sa}hb&&(ib=b.m(W-1).x,ub=b.m(W-1).y,sa=b.m(W).x,oa=b.m(W).y,180===this.ga||0===this.ga?ub!==oa&&(ab=0===this.ga?Math.min(Math.max((sa+ib)/2,this.Wb[r.layer]),sa):Math.max(Math.min((sa+ib)/2,this.Wb[r.layer]),sa),b.B(W++,ab,ub),b.B(W++,ab,oa)):ib!==sa&&(ab=90===this.ga?Math.min(Math.max((oa+ ub)/2,this.Wb[r.layer]),oa):Math.max(Math.min((oa+ub)/2,this.Wb[r.layer]),oa),b.B(W++,ib,ab),b.B(W++,sa,ab)))}if(null!==d&&La){if(null!==h){if(n===dc){var se=b.m(0),be=b.m(2);se.O(be)||b.ia(1,(se.x+be.x)/2,(se.y+be.y)/2)}Da=b.getLinkPoint(e,h,dc,!0,!1,g,k);Da.H()||Da.set(e.aa.km);b.ia(0,Da.x,Da.y)}null!==k&&(p===dc&&(se=b.m(b.ta-1),be=b.m(b.ta-3),se.O(be)||b.ia(b.ta-2,(se.x+be.x)/2,(se.y+be.y)/2)),Da=b.getLinkPoint(g,k,dc,!1,!1,e,h),Da.H()||Da.set(g.aa.km),b.ia(b.ta-1,Da.x,Da.y))}b.Ej();c.commit()}}}for(var jd= -new K(J),vh=this.network.edges.j;vh.next();){var Kf=vh.value.link;null!==Kf&&Kf.ic&&!jd.contains(Kf)&&jd.add(Kf)}if(0oc.y&&(zc=jb.y>oc.y?0:xd.xqc.x&&(Kg=zh.x>qc.x?0:fc.yb.layer?1:a.jfb.jf?1:a.Feb.Fe?1:0:0};ru.prototype.WG=function(a,b){return a instanceof nv&&b instanceof nv&&a!==b?a.firstb.first||a.Lib.Li||a.jfb.jf?1:a.Feb.Fe?1:0:0}; -ru.prototype.Py=function(a,b){return a instanceof nv&&b instanceof nv&&a!==b?a.seb.se||a.Lib.Li||a.jfb.jf?1:a.Feb.Fe?1:0:0};function ov(a,b){v&&(D.p(a,ru,"isApprox:a"),D.p(b,ru,"isApprox:b"));var c=a-b;return-1c}function pv(a,b,c,d){v&&(D.p(a,ru,"isUnoccupied2:px"),D.p(b,ru,"isUnoccupied2:py"),D.p(c,ru,"isUnoccupied2:qx"),D.p(d,ru,"isUnoccupied2:qy"));return!0} -function Fu(a,b){var c,d=a.ve[b];if(d>=a.yh.length){c=[];for(var e=0;ea&&(this.qj=a,this.L()))});D.defineProperty(ru,{Xq:"setsPortSpots"},function(){return this.si},function(a){this.si!==a&&(D.h(a,"boolean",ru,"setsPortSpots"),this.si=a,this.L())});D.defineProperty(ru,{sG:"linkSpacing"},function(){return this.Ds},function(a){this.Ds!==a&&(D.h(a,"number",ru,"linkSpacing"),0<=a&&(this.Ds=a,this.L()))});D.w(ru,{GJ:"maxLayer"},function(){return this.Ab}); -D.w(ru,{eM:"maxIndex"},function(){return this.Cw});D.w(ru,{dM:"maxColumn"},function(){return this.Rb});D.w(ru,{jM:"minIndexLayer"},function(){return this.Ms});D.w(ru,{fM:"maxIndexLayer"},function(){return this.Zf});var su;ru.CycleDepthFirst=su=D.s(ru,"CycleDepthFirst",0);var yu;ru.CycleGreedy=yu=D.s(ru,"CycleGreedy",1);var tu;ru.LayerOptimalLinkLength=tu=D.s(ru,"LayerOptimalLinkLength",0);var Qu;ru.LayerLongestPathSink=Qu=D.s(ru,"LayerLongestPathSink",1);var Su; -ru.LayerLongestPathSource=Su=D.s(ru,"LayerLongestPathSource",2);var uu;ru.InitDepthFirstOut=uu=D.s(ru,"InitDepthFirstOut",0);var Yu;ru.InitDepthFirstIn=Yu=D.s(ru,"InitDepthFirstIn",1);var Wu;ru.InitNaive=Wu=D.s(ru,"InitNaive",2);var bv;ru.AggressiveNone=bv=D.s(ru,"AggressiveNone",0);var vu;ru.AggressiveLess=vu=D.s(ru,"AggressiveLess",1);var cv;ru.AggressiveMore=cv=D.s(ru,"AggressiveMore",2);ru.PackNone=0;var dv;ru.PackExpand=dv=1;var ev;ru.PackStraighten=ev=2;var gv;ru.PackMedian=gv=4;var wu; -ru.PackAll=wu=7;function nv(){this.index=this.Fe=this.jf=this.se=this.first=this.layer=0;this.link=null;this.Li=0}D.ne(nv,{layer:!0,first:!0,se:!0,jf:!0,Fe:!0,index:!0,link:!0,Li:!0});function xu(){ua.call(this)}D.Ta(xu,ua);D.ka("LayeredDigraphNetwork",xu);xu.prototype.createVertex=function(){return new qv};xu.prototype.createEdge=function(){return new rv}; -function qv(){va.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.lq=NaN;this.Gn=0;this.HB=this.IB=null}D.Ta(qv,va);D.ka("LayeredDigraphVertex",qv);function rv(){wa.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}D.Ta(rv,wa);D.ka("LayeredDigraphEdge",rv); -function $(){0b.layer?1:a.jfb.jf?1:a.Feb.Fe?1:0:0};qu.prototype.WG=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.firstb.first||a.Lib.Li||a.jfb.jf?1:a.Feb.Fe?1:0:0}; +qu.prototype.Py=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.seb.se||a.Lib.Li||a.jfb.jf?1:a.Feb.Fe?1:0:0};function nv(a,b){v&&(D.p(a,qu,"isApprox:a"),D.p(b,qu,"isApprox:b"));var c=a-b;return-1c}function ov(a,b,c,d){v&&(D.p(a,qu,"isUnoccupied2:px"),D.p(b,qu,"isUnoccupied2:py"),D.p(c,qu,"isUnoccupied2:qx"),D.p(d,qu,"isUnoccupied2:qy"));return!0} +function Eu(a,b){var c,d=a.ve[b];if(d>=a.yh.length){c=[];for(var e=0;ea&&(this.qj=a,this.L()))});D.defineProperty(qu,{Xq:"setsPortSpots"},function(){return this.si},function(a){this.si!==a&&(D.h(a,"boolean",qu,"setsPortSpots"),this.si=a,this.L())});D.defineProperty(qu,{sG:"linkSpacing"},function(){return this.Ds},function(a){this.Ds!==a&&(D.h(a,"number",qu,"linkSpacing"),0<=a&&(this.Ds=a,this.L()))});D.w(qu,{GJ:"maxLayer"},function(){return this.Ab}); +D.w(qu,{eM:"maxIndex"},function(){return this.Cw});D.w(qu,{dM:"maxColumn"},function(){return this.Rb});D.w(qu,{jM:"minIndexLayer"},function(){return this.Ms});D.w(qu,{fM:"maxIndexLayer"},function(){return this.Zf});var ru;qu.CycleDepthFirst=ru=D.s(qu,"CycleDepthFirst",0);var xu;qu.CycleGreedy=xu=D.s(qu,"CycleGreedy",1);var su;qu.LayerOptimalLinkLength=su=D.s(qu,"LayerOptimalLinkLength",0);var Pu;qu.LayerLongestPathSink=Pu=D.s(qu,"LayerLongestPathSink",1);var Ru; +qu.LayerLongestPathSource=Ru=D.s(qu,"LayerLongestPathSource",2);var tu;qu.InitDepthFirstOut=tu=D.s(qu,"InitDepthFirstOut",0);var Xu;qu.InitDepthFirstIn=Xu=D.s(qu,"InitDepthFirstIn",1);var Vu;qu.InitNaive=Vu=D.s(qu,"InitNaive",2);var av;qu.AggressiveNone=av=D.s(qu,"AggressiveNone",0);var uu;qu.AggressiveLess=uu=D.s(qu,"AggressiveLess",1);var bv;qu.AggressiveMore=bv=D.s(qu,"AggressiveMore",2);qu.PackNone=0;var cv;qu.PackExpand=cv=1;var dv;qu.PackStraighten=dv=2;var fv;qu.PackMedian=fv=4;var vu; +qu.PackAll=vu=7;function mv(){this.index=this.Fe=this.jf=this.se=this.first=this.layer=0;this.link=null;this.Li=0}D.ne(mv,{layer:!0,first:!0,se:!0,jf:!0,Fe:!0,index:!0,link:!0,Li:!0});function wu(){ua.call(this)}D.Ta(wu,ua);D.ka("LayeredDigraphNetwork",wu);wu.prototype.createVertex=function(){return new pv};wu.prototype.createEdge=function(){return new qv}; +function pv(){va.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.lq=NaN;this.Gn=0;this.HB=this.IB=null}D.Ta(pv,va);D.ka("LayeredDigraphVertex",pv);function qv(){wa.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}D.Ta(qv,wa);D.ka("LayeredDigraphEdge",qv); +function $(){0b.level)return!1;a.removeChild(c.parent,c)}return!0} -$.prototype.removeChild=function(a,b){if(null!==a&&null!==b){v&&D.l(a,xv,$,"removeChild:p");v&&D.l(b,xv,$,"removeChild:c");for(var c=a.children,d=0,e=0;eb.level)return!1;a.removeChild(c.parent,c)}return!0} +$.prototype.removeChild=function(a,b){if(null!==a&&null!==b){v&&D.l(a,wv,$,"removeChild:p");v&&D.l(b,wv,$,"removeChild:c");for(var c=a.children,d=0,e=0;eg?hw(a,k,Aa,A,B):iw(a,k,Aa,A,B);Aa=B.x;A=B.width;B=B.height;break;case Wv:for(m=0;ms&&(eaxb&&(Sw(a,-xb,0,hb,m-1),Tw(H,-xb,0),Tw(R,-xb,0),xb=0)}n.sa.n(xb,la);A=Math.max(A,aa);B=Math.max(B,P+(0===Da?0:y)+W.height);ea=aa}else{0s&&(laxb&&(Sw(a,0,-xb,hb,m-1),Tw(H,0,-xb),Tw(R,0,-xb),xb=0);n.sa.n(ea,xb);B=Math.max(B,V);A=Math.max(A,P+(0===Da?0:y)+W.width);la=V}La++}0< -Da&&(b?(B+=Math.max(0,c),eaq&&(q=0),135w&&(w=0),p===Xv&&(l+=u/2+a.W.y),k+=d+c):b?(null===a.comments?d>A&&(p=Xw(p,d-A,0),k=p.x,l=p.y,A=d,q=0):A=Vw(a,A,q),0>q&&(k-=q,q=0),135B&&(p=Xw(p,0,e-B),k=p.x,l=p.y,B=e,w=0):B=Ww(a,B,w),0>w&&(l-=w,w=0),k+=d+c);if(0g[0].x?g[2].assign(g[1]):g[1].assign(g[2])),g[3].yg[0].x?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(q+d,0),p[1].n(p[0].x,e),p[2].yg[0].y?g[2].assign(g[1]):g[1].assign(g[2])),g[3].xg[0].y?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(0,w+e),p[1].n(d,p[0].y),p[2].xg?gw(a,k,Aa,A,B):hw(a,k,Aa,A,B);Aa=B.x;A=B.width;B=B.height;break;case Vv:for(m=0;ms&&(eaxb&&(Rw(a,-xb,0,hb,m-1),Sw(H,-xb,0),Sw(R,-xb,0),xb=0)}n.sa.n(xb,la);A=Math.max(A,aa);B=Math.max(B,P+(0===Da?0:y)+W.height);ea=aa}else{0s&&(laxb&&(Rw(a,0,-xb,hb,m-1),Sw(H,0,-xb),Sw(R,0,-xb),xb=0);n.sa.n(ea,xb);B=Math.max(B,V);A=Math.max(A,P+(0===Da?0:y)+W.width);la=V}La++}0< +Da&&(b?(B+=Math.max(0,c),eaq&&(q=0),135w&&(w=0),p===Wv&&(l+=u/2+a.W.y),k+=d+c):b?(null===a.comments?d>A&&(p=Ww(p,d-A,0),k=p.x,l=p.y,A=d,q=0):A=Uw(a,A,q),0>q&&(k-=q,q=0),135B&&(p=Ww(p,0,e-B),k=p.x,l=p.y,B=e,w=0):B=Vw(a,B,w),0>w&&(l-=w,w=0),k+=d+c);if(0g[0].x?g[2].assign(g[1]):g[1].assign(g[2])),g[3].yg[0].x?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(q+d,0),p[1].n(p[0].x,e),p[2].yg[0].y?g[2].assign(g[1]):g[1].assign(g[2])),g[3].xg[0].y?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(0,w+e),p[1].n(d,p[0].y),p[2].xc?hw(b,e,La,P,H):iw(b,e,La,P,H);La=H.x;P=H.width;H=H.height;break;case Wv:for(k=0;kr&&(aar&&(Vp&&(p=0),135A&&(A=0));b.Wa.n(p,A);b.tb.n(P,H)}} -function hw(a,b,c,d,e){v&&D.l(a,xv,$,"layoutBusChildrenPosDir:v");var g=b.length;if(0===g)return new C(c,0,d,e);if(1===g){var h=b[0];d=h.tb.width;e=h.tb.height;return new C(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===cw(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(w,q)+b+s.height),0>h.sa.x&&(c=ax(a,h.sa.x,!1,c,k))):(h.sa.n(d+b,c+k/2-h.W.y-h.Wa.y),d=Math.max(d,Math.max(y,p)+b+s.width),m=c+k/2-h.W.y-h.Wa.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.sa.y&&(c=ax(a,h.sa.y,!0,c,k))));return new C(c,0,d,e)} -function iw(a,b,c,d,e){v&&D.l(a,xv,$,"layoutBusChildrenNegDir:v");var g=b.length;if(0===g)return new C(c,0,d,e);if(1===g){var h=b[0];d=h.tb.width;e=h.tb.height;return new C(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===cw(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(w,q))+l+s.height),0>h.sa.x&&(c=ax(a,h.sa.x,!1,c,k))):(h.sa.n(-d-s.width-l,c+k/2-h.W.y-h.Wa.y),d=Math.max(d,Math.abs(Math.min(y,p))+l+s.width),p=c+k/2-h.W.y-h.Wa.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.sa.y&&(c=ax(a,h.sa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case dw:return a.width>b?a.width:b;case ew:return 2*a.W.x>b?a.width:b+a.width-2*a.W.x;case Vv:case Kv:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Wv:return a.width-a.W.x+a.nodeSpacing/2+b;case Xv:return Math.max(a.width,a.W.x+a.nodeSpacing/2+b);default:return b}} -function Ww(a,b,c){v&&D.l(a,xv,$,"calculateSubheight:v");switch(a.alignment){case Tv:case Uw:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case dw:return a.height>b?a.height:b;case ew:return 2*a.W.y>b?a.height:b+a.height-2*a.W.y;case Vv:case Kv:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Wv:return a.height-a.W.y+a.nodeSpacing/2+b;case Xv:return Math.max(a.height,a.W.y+a.nodeSpacing/2+b);default:return b}} -function Xw(a,b,c){v&&D.l(a,ya,$,"alignOffset:align");switch(a){case Uw:b/=2;c/=2;break;case Tv:b/=2;c/=2;break;case dw:c=b=0;break;case ew:break;default:D.k("Unhandled alignment value "+a.toString())}return new N(b,c)}function Pw(a,b,c,d,e,g){v&&D.l(a,xv,$,"shiftRelPosAlign:v");v&&D.l(b,ya,$,"shiftRelPosAlign:align");b=Xw(b,c,d);Sw(a,b.x,b.y,e,g)}function Sw(a,b,c,d,e){v&&D.l(a,xv,$,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var g=a[d].sa;g.x+=b;g.y+=c}} -function Qw(a,b,c,d){v&&(D.l(b,xv,$,"recordMidPoints:v"),D.h(c,"number",$,"recordMidPoints:x"),D.h(d,"number",$,"recordMidPoints:y"));var e=b.parent;switch(a.Wf){case tv:for(a=b.wc;a.next();)b=a.value,b.fromVertex===e&&b.nt.n(c,d);break;case Av:for(a=b.tc;a.next();)b=a.value,b.toVertex===e&&b.nt.n(c,d);break;default:D.k("Unhandled path value "+a.Wf.toString())}}function Tw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m= -l=0;lt&&e.ye.y&&tb.length||null===l||2>l.length)d=null;else{n=Ow(a,b.length+l.length);for(d=g=e=0;ge;)t=l[g++],n[d++].n(t.x+m,t.y);l=Ow(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Ow(a,p.length+g.length);for(m=y=l=0;lg;)e=p[l++], -n[m++].n(e.x,e.y);e=Ow(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lg&&e.xe.x&&gb.length||null===l||2>l.length)d=null;else{n=Ow(a,b.length+l.length);for(d=g=e=0;ge;)t=l[g++],n[d++].n(t.x,t.y+m);l=Ow(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Ow(a,p.length+g.length);for(m=y=l=0;lg;)e=p[l++],n[m++].n(e.x,e.y);e=Ow(a,m);for(l=0;lc?gw(b,e,La,P,H):hw(b,e,La,P,H);La=H.x;P=H.width;H=H.height;break;case Vv:for(k=0;kr&&(aar&&(Vp&&(p=0),135A&&(A=0));b.Wa.n(p,A);b.tb.n(P,H)}} +function gw(a,b,c,d,e){v&&D.l(a,wv,$,"layoutBusChildrenPosDir:v");var g=b.length;if(0===g)return new C(c,0,d,e);if(1===g){var h=b[0];d=h.tb.width;e=h.tb.height;return new C(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===bw(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(w,q)+b+s.height),0>h.sa.x&&(c=$w(a,h.sa.x,!1,c,k))):(h.sa.n(d+b,c+k/2-h.W.y-h.Wa.y),d=Math.max(d,Math.max(y,p)+b+s.width),m=c+k/2-h.W.y-h.Wa.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.sa.y&&(c=$w(a,h.sa.y,!0,c,k))));return new C(c,0,d,e)} +function hw(a,b,c,d,e){v&&D.l(a,wv,$,"layoutBusChildrenNegDir:v");var g=b.length;if(0===g)return new C(c,0,d,e);if(1===g){var h=b[0];d=h.tb.width;e=h.tb.height;return new C(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===bw(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(w,q))+l+s.height),0>h.sa.x&&(c=$w(a,h.sa.x,!1,c,k))):(h.sa.n(-d-s.width-l,c+k/2-h.W.y-h.Wa.y),d=Math.max(d,Math.abs(Math.min(y,p))+l+s.width),p=c+k/2-h.W.y-h.Wa.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.sa.y&&(c=$w(a,h.sa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case cw:return a.width>b?a.width:b;case dw:return 2*a.W.x>b?a.width:b+a.width-2*a.W.x;case Uv:case Jv:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Vv:return a.width-a.W.x+a.nodeSpacing/2+b;case Wv:return Math.max(a.width,a.W.x+a.nodeSpacing/2+b);default:return b}} +function Vw(a,b,c){v&&D.l(a,wv,$,"calculateSubheight:v");switch(a.alignment){case Sv:case Tw:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case cw:return a.height>b?a.height:b;case dw:return 2*a.W.y>b?a.height:b+a.height-2*a.W.y;case Uv:case Jv:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Vv:return a.height-a.W.y+a.nodeSpacing/2+b;case Wv:return Math.max(a.height,a.W.y+a.nodeSpacing/2+b);default:return b}} +function Ww(a,b,c){v&&D.l(a,ya,$,"alignOffset:align");switch(a){case Tw:b/=2;c/=2;break;case Sv:b/=2;c/=2;break;case cw:c=b=0;break;case dw:break;default:D.k("Unhandled alignment value "+a.toString())}return new N(b,c)}function Ow(a,b,c,d,e,g){v&&D.l(a,wv,$,"shiftRelPosAlign:v");v&&D.l(b,ya,$,"shiftRelPosAlign:align");b=Ww(b,c,d);Rw(a,b.x,b.y,e,g)}function Rw(a,b,c,d,e){v&&D.l(a,wv,$,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var g=a[d].sa;g.x+=b;g.y+=c}} +function Pw(a,b,c,d){v&&(D.l(b,wv,$,"recordMidPoints:v"),D.h(c,"number",$,"recordMidPoints:x"),D.h(d,"number",$,"recordMidPoints:y"));var e=b.parent;switch(a.Wf){case sv:for(a=b.wc;a.next();)b=a.value,b.fromVertex===e&&b.nt.n(c,d);break;case zv:for(a=b.tc;a.next();)b=a.value,b.toVertex===e&&b.nt.n(c,d);break;default:D.k("Unhandled path value "+a.Wf.toString())}}function Sw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m= +l=0;lt&&e.ye.y&&tb.length||null===l||2>l.length)d=null;else{n=Nw(a,b.length+l.length);for(d=g=e=0;ge;)t=l[g++],n[d++].n(t.x+m,t.y);l=Nw(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Nw(a,p.length+g.length);for(m=y=l=0;lg;)e=p[l++], +n[m++].n(e.x,e.y);e=Nw(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lg&&e.xe.x&&gb.length||null===l||2>l.length)d=null;else{n=Nw(a,b.length+l.length);for(d=g=e=0;ge;)t=l[g++],n[d++].n(t.x,t.y+m);l=Nw(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Nw(a,p.length+g.length);for(m=y=l=0;lg;)e=p[l++],n[m++].n(e.x,e.y);e=Nw(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} -function fw(a){v&&D.l(a,xv,$,"computeLayerSpacing:v");var b=cw(a),b=90===b||270===b,c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0} +function ew(a){v&&D.l(a,wv,$,"computeLayerSpacing:v");var b=bw(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.Aa.nodeIndentPastParent=a,this.L()))}); D.defineProperty($,{nodeSpacing:"nodeSpacing"},function(){return this.Aa.nodeSpacing},function(a){this.Aa.nodeSpacing!==a&&(D.h(a,"number",$,"nodeSpacing"),this.Aa.nodeSpacing=a,this.L())});D.defineProperty($,{layerSpacing:"layerSpacing"},function(){return this.Aa.layerSpacing},function(a){this.Aa.layerSpacing!==a&&(D.h(a,"number",$,"layerSpacing"),this.Aa.layerSpacing=a,this.L())}); -D.defineProperty($,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.Aa.layerSpacingParentOverlap},function(a){this.Aa.layerSpacingParentOverlap!==a&&(D.h(a,"number",$,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.Aa.layerSpacingParentOverlap=a,this.L()))});D.defineProperty($,{compaction:"compaction"},function(){return this.Aa.compaction},function(a){this.Aa.compaction!==a&&(D.Da(a,$,$,"compaction"),a===$v||a===bw)&&(this.Aa.compaction=a,this.L())}); +D.defineProperty($,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.Aa.layerSpacingParentOverlap},function(a){this.Aa.layerSpacingParentOverlap!==a&&(D.h(a,"number",$,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.Aa.layerSpacingParentOverlap=a,this.L()))});D.defineProperty($,{compaction:"compaction"},function(){return this.Aa.compaction},function(a){this.Aa.compaction!==a&&(D.Da(a,$,$,"compaction"),a===Zv||a===aw)&&(this.Aa.compaction=a,this.L())}); D.defineProperty($,{breadthLimit:"breadthLimit"},function(){return this.Aa.breadthLimit},function(a){this.Aa.breadthLimit!==a&&(D.h(a,"number",$,"breadthLimit"),0<=a&&(this.Aa.breadthLimit=a,this.L()))});D.defineProperty($,{rowSpacing:"rowSpacing"},function(){return this.Aa.rowSpacing},function(a){this.Aa.rowSpacing!==a&&(D.h(a,"number",$,"rowSpacing"),this.Aa.rowSpacing=a,this.L())}); D.defineProperty($,{rowIndent:"rowIndent"},function(){return this.Aa.rowIndent},function(a){this.Aa.rowIndent!==a&&(D.h(a,"number",$,"rowIndent"),0<=a&&(this.Aa.rowIndent=a,this.L()))});D.defineProperty($,{commentSpacing:"commentSpacing"},function(){return this.Aa.commentSpacing},function(a){this.Aa.commentSpacing!==a&&(D.h(a,"number",$,"commentSpacing"),this.Aa.commentSpacing=a,this.L())}); D.defineProperty($,{commentMargin:"commentMargin"},function(){return this.Aa.commentMargin},function(a){this.Aa.commentMargin!==a&&(D.h(a,"number",$,"commentMargin"),this.Aa.commentMargin=a,this.L())});D.defineProperty($,{setsPortSpot:"setsPortSpot"},function(){return this.Aa.setsPortSpot},function(a){this.Aa.setsPortSpot!==a&&(D.h(a,"boolean",$,"setsPortSpot"),this.Aa.setsPortSpot=a,this.L())}); D.defineProperty($,{portSpot:"portSpot"},function(){return this.Aa.portSpot},function(a){D.l(a,S,$,"portSpot");this.Aa.portSpot.O(a)||(this.Aa.portSpot=a,this.L())});D.defineProperty($,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.Aa.setsChildPortSpot},function(a){this.Aa.setsChildPortSpot!==a&&(D.h(a,"boolean",$,"setsChildPortSpot"),this.Aa.setsChildPortSpot=a,this.L())}); -D.defineProperty($,{childPortSpot:"childPortSpot"},function(){return this.Aa.childPortSpot},function(a){D.l(a,S,$,"childPortSpot");this.Aa.childPortSpot.O(a)||(this.Aa.childPortSpot=a,this.L())});D.defineProperty($,{kL:"alternateSorting"},function(){return this.Ba.sorting},function(a){this.Ba.sorting!==a&&(D.Da(a,$,$,"alternateSorting"),a===Pv||a===Qv||a===Rv||Sv)&&(this.Ba.sorting=a,this.L())}); +D.defineProperty($,{childPortSpot:"childPortSpot"},function(){return this.Aa.childPortSpot},function(a){D.l(a,S,$,"childPortSpot");this.Aa.childPortSpot.O(a)||(this.Aa.childPortSpot=a,this.L())});D.defineProperty($,{kL:"alternateSorting"},function(){return this.Ba.sorting},function(a){this.Ba.sorting!==a&&(D.Da(a,$,$,"alternateSorting"),a===Ov||a===Pv||a===Qv||Rv)&&(this.Ba.sorting=a,this.L())}); D.defineProperty($,{ZK:"alternateComparer"},function(){return this.Ba.comparer},function(a){this.Ba.comparer!==a&&(D.h(a,"function",$,"alternateComparer"),this.Ba.comparer=a,this.L())});D.defineProperty($,{TK:"alternateAngle"},function(){return this.Ba.angle},function(a){this.Ba.angle!==a&&(D.h(a,"number",$,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.Ba.angle=a,this.L())}); D.defineProperty($,{SK:"alternateAlignment"},function(){return this.Ba.alignment},function(a){this.Ba.alignment!==a&&(D.Da(a,$,$,"alternateAlignment"),this.Ba.alignment=a,this.L())});D.defineProperty($,{cL:"alternateNodeIndent"},function(){return this.Ba.nodeIndent},function(a){this.Ba.nodeIndent!==a&&(D.h(a,"number",$,"alternateNodeIndent"),0<=a&&(this.Ba.nodeIndent=a,this.L()))}); D.defineProperty($,{dL:"alternateNodeIndentPastParent"},function(){return this.Ba.nodeIndentPastParent},function(a){this.Ba.nodeIndentPastParent!==a&&(D.h(a,"number",$,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.Ba.nodeIndentPastParent=a,this.L()))});D.defineProperty($,{eL:"alternateNodeSpacing"},function(){return this.Ba.nodeSpacing},function(a){this.Ba.nodeSpacing!==a&&(D.h(a,"number",$,"alternateNodeSpacing"),this.Ba.nodeSpacing=a,this.L())}); D.defineProperty($,{aL:"alternateLayerSpacing"},function(){return this.Ba.layerSpacing},function(a){this.Ba.layerSpacing!==a&&(D.h(a,"number",$,"alternateLayerSpacing"),this.Ba.layerSpacing=a,this.L())});D.defineProperty($,{bL:"alternateLayerSpacingParentOverlap"},function(){return this.Ba.layerSpacingParentOverlap},function(a){this.Ba.layerSpacingParentOverlap!==a&&(D.h(a,"number",$,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.Ba.layerSpacingParentOverlap=a,this.L()))}); -D.defineProperty($,{YK:"alternateCompaction"},function(){return this.Ba.compaction},function(a){this.Ba.compaction!==a&&(D.Da(a,$,$,"alternateCompaction"),a===$v||a===bw)&&(this.Ba.compaction=a,this.L())});D.defineProperty($,{UK:"alternateBreadthLimit"},function(){return this.Ba.breadthLimit},function(a){this.Ba.breadthLimit!==a&&(D.h(a,"number",$,"alternateBreadthLimit"),0<=a&&(this.Ba.breadthLimit=a,this.L()))}); +D.defineProperty($,{YK:"alternateCompaction"},function(){return this.Ba.compaction},function(a){this.Ba.compaction!==a&&(D.Da(a,$,$,"alternateCompaction"),a===Zv||a===aw)&&(this.Ba.compaction=a,this.L())});D.defineProperty($,{UK:"alternateBreadthLimit"},function(){return this.Ba.breadthLimit},function(a){this.Ba.breadthLimit!==a&&(D.h(a,"number",$,"alternateBreadthLimit"),0<=a&&(this.Ba.breadthLimit=a,this.L()))}); D.defineProperty($,{hL:"alternateRowSpacing"},function(){return this.Ba.rowSpacing},function(a){this.Ba.rowSpacing!==a&&(D.h(a,"number",$,"alternateRowSpacing"),this.Ba.rowSpacing=a,this.L())});D.defineProperty($,{gL:"alternateRowIndent"},function(){return this.Ba.rowIndent},function(a){this.Ba.rowIndent!==a&&(D.h(a,"number",$,"alternateRowIndent"),0<=a&&(this.Ba.rowIndent=a,this.L()))}); D.defineProperty($,{XK:"alternateCommentSpacing"},function(){return this.Ba.commentSpacing},function(a){this.Ba.commentSpacing!==a&&(D.h(a,"number",$,"alternateCommentSpacing"),this.Ba.commentSpacing=a,this.L())});D.defineProperty($,{WK:"alternateCommentMargin"},function(){return this.Ba.commentMargin},function(a){this.Ba.commentMargin!==a&&(D.h(a,"number",$,"alternateCommentMargin"),this.Ba.commentMargin=a,this.L())}); D.defineProperty($,{jL:"alternateSetsPortSpot"},function(){return this.Ba.setsPortSpot},function(a){this.Ba.setsPortSpot!==a&&(D.h(a,"boolean",$,"alternateSetsPortSpot"),this.Ba.setsPortSpot=a,this.L())});D.defineProperty($,{fL:"alternatePortSpot"},function(){return this.Ba.portSpot},function(a){D.l(a,S,$,"alternatePortSpot");this.Ba.portSpot.O(a)||(this.Ba.portSpot=a,this.L())}); -D.defineProperty($,{iL:"alternateSetsChildPortSpot"},function(){return this.Ba.setsChildPortSpot},function(a){this.Ba.setsChildPortSpot!==a&&(D.h(a,"boolean",$,"alternateSetsChildPortSpot"),this.Ba.setsChildPortSpot=a,this.L())});D.defineProperty($,{VK:"alternateChildPortSpot"},function(){return this.Ba.childPortSpot},function(a){D.l(a,S,$,"alternateChildPortSpot");this.Ba.childPortSpot.O(a)||(this.Ba.childPortSpot=a,this.L())});var sv;$.PathDefault=sv=D.s($,"PathDefault",-1);var tv; -$.PathDestination=tv=D.s($,"PathDestination",0);var Av;$.PathSource=Av=D.s($,"PathSource",1);var Pv;$.SortingForwards=Pv=D.s($,"SortingForwards",10);var Qv;$.SortingReverse=Qv=D.s($,"SortingReverse",11);var Rv;$.SortingAscending=Rv=D.s($,"SortingAscending",12);var Sv;$.SortingDescending=Sv=D.s($,"SortingDescending",13);var Uw;$.AlignmentCenterSubtrees=Uw=D.s($,"AlignmentCenterSubtrees",20);var Tv;$.AlignmentCenterChildren=Tv=D.s($,"AlignmentCenterChildren",21);var dw; -$.AlignmentStart=dw=D.s($,"AlignmentStart",22);var ew;$.AlignmentEnd=ew=D.s($,"AlignmentEnd",23);var Vv;$.AlignmentBus=Vv=D.s($,"AlignmentBus",24);var Kv;$.AlignmentBusBranching=Kv=D.s($,"AlignmentBusBranching",25);var Wv;$.AlignmentTopLeftBus=Wv=D.s($,"AlignmentTopLeftBus",26);var Xv;$.AlignmentBottomRightBus=Xv=D.s($,"AlignmentBottomRightBus",27);var $v;$.CompactionNone=$v=D.s($,"CompactionNone",30);var bw;$.CompactionBlock=bw=D.s($,"CompactionBlock",31);var uv; -$.StyleLayered=uv=D.s($,"StyleLayered",40);var Ov;$.StyleLastParents=Ov=D.s($,"StyleLastParents",41);var Nv;$.StyleAlternating=Nv=D.s($,"StyleAlternating",42);var Mv;$.StyleRootOnly=Mv=D.s($,"StyleRootOnly",43);var wv;$.ArrangementVertical=wv=D.s($,"ArrangementVertical",50);var cx;$.ArrangementHorizontal=cx=D.s($,"ArrangementHorizontal",51);var zv;$.ArrangementFixedRoots=zv=D.s($,"ArrangementFixedRoots",52);var vv;$.LayerIndividual=vv=D.s($,"LayerIndividual",60);var Iv; -$.LayerSiblings=Iv=D.s($,"LayerSiblings",61);var Hv;$.LayerUniform=Hv=D.s($,"LayerUniform",62);function yv(){ua.call(this)}D.Ta(yv,ua);D.ka("TreeNetwork",yv);yv.prototype.createVertex=function(){return new xv};yv.prototype.createEdge=function(){return new ex}; -function xv(){va.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.sa=new N(0,0);this.tb=new Ca(0,0);this.Wa=new N(0,0);this.Sq=this.Rq=this.kK=!1;this.kv=this.Ru=null;this.sorting=Pv;this.comparer=ys;this.angle=0;this.alignment=Tv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=bw;this.breadthLimit= -0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=Vc;this.setsChildPortSpot=!0;this.childPortSpot=Vc}D.Ta(xv,va);D.ka("TreeVertex",xv); -xv.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing, -this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};D.w(xv,{In:"childrenCount"},function(){return this.children.length});D.defineProperty(xv,{BM:"relativePosition"},function(){return this.sa},function(a){this.sa.set(a)});D.defineProperty(xv,{NM:"subtreeSize"},function(){return this.tb},function(a){this.tb.set(a)}); -D.defineProperty(xv,{MM:"subtreeOffset"},function(){return this.Wa},function(a){this.Wa.set(a)});function ex(){wa.call(this);this.nt=new N(0,0)}D.Ta(ex,wa);D.ka("TreeEdge",ex); -ex.prototype.commit=function(){var a=this.link;if(null!==a&&!a.Nj){var b=this.network.Zb,c=null,d=null;switch(b.Wf){case tv:c=this.fromVertex;d=this.toVertex;break;case Av:c=this.toVertex;d=this.fromVertex;break;default:D.k("Unhandled path value "+b.Wf.toString())}if(null!==c&&null!==d)if(b=this.nt,0!==b.x||0!==b.y||c.kK){var d=c.ib,e=cw(c),g=fw(c),h=c.rowSpacing;a.Ao();var k=a.lf===Vj,l=a.ic,m=0,n,p;a.Fm();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-gw(c))))):c.alignment===dw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-gw(c))))):c.alignment===dw?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-gw(c))))):c.alignment===dw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-gw(c))))):c.alignment===dw?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-fw(c))))):c.alignment===cw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-fw(c))))):c.alignment===cw?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-fw(c))))):c.alignment===cw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-fw(c))))):c.alignment===cw?(r=d.left+b.x,0===b.x&&n.xc;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,f="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cd;d++)b[w.Kg("7ca11abfd7330390")](w.Kg(c[d-1]),10,15*d+0);b[w.Kg("7ca11abfd022028846")]=w.Kg("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Kg("7ca11abfd7330390")](w.Kg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])w.p=function(a,b){var c=new da(a,b,2);Object.freeze(c);a[b]=c;var d=a.fv;d instanceof ma||(d=new ma("string",da),a.fv=d);d.add(b,c);return c};return a}();function da(a,b,c){w.oc(this);this.pC=a;this.Sb=b;this.fH=c}w.ga("EnumValue",da);da.prototype.toString=function(){return w.qf(this.pC)+"."+this.Sb};w.u(da,{Ie:"classType"},function(){return this.pC});w.u(da,{name:"name"},function(){return this.Sb});w.u(da,{value:"value"},function(){return this.fH}); var pa;da.findName=pa=function(a,b){if(void 0===b||null===b||""===b)return null;w.j(a,"function","findName:classfunc");w.j(b,"string","EnumValue.findName:name");var c=a.fv;return c instanceof ma?c.ka(b):null};function qa(){this.nC=[]}qa.prototype.toString=function(){return this.nC.join("")};qa.prototype.add=function(a){""!==a&&this.nC.push(a)};function ra(){} @@ -158,700 +158,700 @@ Kc.prototype.copy=function(){var a=new Kc;a.Ub[0]=this.Ub[0];a.Ub[1]=this.Ub[1]; Nc.prototype.addColorStop=function(a,b){this.HE.push({offset:a,color:b})}; function Oc(a,b,c){this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.In=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.strokeStyle="#000000";this.textAlign="start";this.Jp=!1;this.Eg=this.lt=this.kt=0;this.document=b||document;this.VE=c;this.Mx=null;this.path=[];this.uh=new Kc;this.stack=[];this.rf=[];this.ux=a;this.hJ="http://www.w3.org/2000/svg"; this.width=this.ux.width;this.height=this.ux.height;this.lm=Pc(this,"svg",{width:this.width+"px",height:this.height+"px",viewBox:"0 0 "+this.ux.width+" "+this.ux.height});this.lm.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg");this.lm.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");Qc(this,1,0,0,1,0,0);a=w.rm++;b=Pc(this,"clipPath",{id:"mainClip"+a});b.appendChild(Pc(this,"rect",{x:0,y:0,width:this.width,height:this.height})); -this.lm.appendChild(b);this.rf[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}g=Oc.prototype;g.arc=function(a,b,c,d,e,f){Rc(this,a,b,c,d,e,f)};g.beginPath=function(){this.path=[]};g.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};g.clearRect=function(){};g.clip=function(){Sc(this,"clipPath",this.path,new Kc)};g.closePath=function(){this.path.push(["z"])};g.createLinearGradient=function(a,b,c,d){var e=new Nc("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -g.createPattern=function(){return null};g.createRadialGradient=function(a,b,c,d,e,f){var h=new Nc("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=e;h.r2=f;return h}; +this.lm.appendChild(b);this.rf[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}g=Oc.prototype;g.arc=function(a,b,c,d,e,f){var h=2*Math.PI,k=c*Math.cos(d),l=c*Math.sin(d),m=a+k,n=b+l,p=f?0:1;d=f?d-e:e-d;0>d&&(d=d%h+h);d>h-1E-6?(this.path.push(["A",c,c,0,1,p,a-k,b-l]),this.path.push(["A",c,c,0,1,p,m,n])):1E-6=Math.PI),p,a+c*Math.cos(e),b+c*Math.sin(e)])};g.beginPath=function(){this.path=[]}; +g.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};g.clearRect=function(){};g.clip=function(){Rc(this,"clipPath",this.path,new Kc)};g.closePath=function(){this.path.push(["z"])};g.createLinearGradient=function(a,b,c,d){var e=new Nc("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e};g.createPattern=function(){return null};g.createRadialGradient=function(a,b,c,d,e,f){var h=new Nc("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=e;h.r2=f;return h}; g.drawImage=function(a,b,c,d,e,f,h,k,l){var m="";a instanceof HTMLCanvasElement&&(m=a.toDataURL());a instanceof HTMLImageElement&&(m=a.src);void 0===d&&(f=b,h=c,k=d=a.naturalWidth,l=e=a.naturalHeight);d=d||0;e=e||0;f=f||0;h=h||0;k=k||0;l=l||0;m={x:0,y:0,width:a.naturalWidth,height:a.naturalHeight,href:m,preserveAspectRatio:"xMidYMid slice"};Wa(d,k)&&Wa(e,l)||(m.preserveAspectRatio="none");var n="";k/=d;l/=e;if(0!==f||0!==h)n+=" translate("+f+", "+h+")";if(1!==k||1!==l)n+=" scale("+k+", "+l+")";if(0!== -b||0!==c)n+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==a.naturalWidth||e!==a.naturalHeight)a="CLIP"+w.rm++,f=Pc(this,"clipPath",{id:a}),f.appendChild(Pc(this,"rect",{x:b,y:c,width:d,height:e})),this.lm.appendChild(f),m["clip-path"]="url(#"+a+")";Tc(this,"image",m,this.uh,n);this.addElement("image",m)};g.fill=function(){Sc(this,"fill",this.path,this.uh)};g.Lg=function(){this.Jp?this.clip():this.fill()};g.fillRect=function(a,b,c,d){Uc(this,"fill",[a,b,c,d],this.uh)}; -g.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};Tc(this,"fill",b,this.uh);this.addElement("text",b,a[0])};g.lineTo=function(a,b){this.path.push(["L",a,b])};g.moveTo=function(a,b){this.path.push(["M",a,b])};g.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};g.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; +b||0!==c)n+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==a.naturalWidth||e!==a.naturalHeight)a="CLIP"+w.rm++,f=Pc(this,"clipPath",{id:a}),f.appendChild(Pc(this,"rect",{x:b,y:c,width:d,height:e})),this.lm.appendChild(f),m["clip-path"]="url(#"+a+")";Sc(this,"image",m,this.uh,n);this.addElement("image",m)};g.fill=function(){Rc(this,"fill",this.path,this.uh)};g.Lg=function(){this.Jp?this.clip():this.fill()};g.fillRect=function(a,b,c,d){Tc(this,"fill",[a,b,c,d],this.uh)}; +g.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};Sc(this,"fill",b,this.uh);this.addElement("text",b,a[0])};g.lineTo=function(a,b){this.path.push(["L",a,b])};g.moveTo=function(a,b){this.path.push(["M",a,b])};g.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};g.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; g.restore=function(){this.uh=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.In=a.In;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign}; g.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,In:this.In,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(k=0;k=2*Math.PI?(Rc(a,b,c,d,e,e+Math.PI,h),Rc(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,f])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,f]))}}function Qc(a,b,c,d,e,f,h){var k=new Kc;k.Ub=[b,c,d,e,f,h];b={};Tc(a,"g",b,k);k=a.addElement("g",b);a.rf.push(k)} +return"url(#"+c+")"}function Tc(a,b,c,d){c={x:c[0],y:c[1],width:c[2],height:c[3]};Sc(a,b,c,d);a.addElement("rect",c)} +function Rc(a,b,c,d){for(var e=[],f=0;fb?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.$q?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.$q?this.clip():this.fill()}; -g.Gj=function(){this.$q||this.stroke()};w.defineProperty(Xc,{Jp:"clipInsteadOfFill"},function(){return this.$q},function(a){this.$q=a});g=Xc.prototype;g.EB=function(a,b,c){this.kt=a;this.lt=b;this.Eg=c};g.jm=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.Zn=function(){this.shadowOffsetX=this.kt;this.shadowOffsetY=this.lt;this.shadowBlur=this.Eg}; +g.quadraticCurveTo=function(a,b,c,d){this.ua.quadraticCurveTo(a,b,c,d)};g.rect=function(a,b,c,d){this.ua.rect(a,b,c,d)};g.restore=function(){this.ua.restore()};Wc.prototype.rotate=function(a){this.ua.rotate(a)};g=Wc.prototype;g.save=function(){this.ua.save()};g.setTransform=function(a,b,c,d,e,f){this.ua.setTransform(a,b,c,d,e,f)};g.scale=function(a,b){this.ua.scale(a,b)};g.stroke=function(){this.ua.stroke()}; +g.transform=function(a,b,c,d,e,f){1===a&&0===b&&0===c&&1===d&&0===e&&0===f||this.ua.transform(a,b,c,d,e,f)};g.translate=function(a,b){this.ua.translate(a,b)};g.Lg=function(a){if(a instanceof ga&&a.type===Xc){var b=a.po;a=a.Vy;a>b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.$q?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.$q?this.clip():this.fill()}; +g.Gj=function(){this.$q||this.stroke()};w.defineProperty(Wc,{Jp:"clipInsteadOfFill"},function(){return this.$q},function(a){this.$q=a});g=Wc.prototype;g.EB=function(a,b,c){this.kt=a;this.lt=b;this.Eg=c};g.jm=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.Zn=function(){this.shadowOffsetX=this.kt;this.shadowOffsetY=this.lt;this.shadowBlur=this.Eg}; g.vA=function(a,b){var c=this.ua;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else return!1;return!0};g.sA=function(){var a=this.ua;void 0!==a.setLineDash?(a.setLineDash(w.Tk),a.lineDashOffset=0):void 0!==a.webkitLineDash&&(a.webkitLineDash=w.Tk,a.webkitLineDashOffset=0)};g.Je=function(a){a&&(this.Ry="");this.Qy=this.Sy=""}; -var cd=(Math.sqrt(2)-1)/3*4,dd=(new y(0,0)).Ha(),ed=(new B(0,0,0,0)).Ha(),fd=(new hb(0,0,0,0)).Ha(),nd=(new hb(2,2,2,2)).Ha(),od=(new y(6,6)).Ha(),pd=(new y(-Infinity,-Infinity)).Ha(),qd=(new y(Infinity,Infinity)).Ha(),rd=(new ia(0,0)).Ha(),sd=(new ia(1,1)).Ha(),Bd=(new ia(6,6)).Ha(),Cd=(new ia(8,8)).Ha(),Dd=(new ia(10,10)).Ha(),Ed=(new ia(Infinity,Infinity)).Ha(),Fd=(new y(NaN,NaN)).Ha(),Gd=(new ia(NaN,NaN)).Ha(),Nd=(new B(NaN,NaN,NaN,NaN)).Ha(),Od=(new K(.156,.156)).Ha(),Pd=(new K(.844,.844)).Ha(), -Qd=new ra,Rd=new ra,Sd=null;function Td(a){if(0>=a)return 0;var b=Sd;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);Sd=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function J(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=h&&h<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=f&&f<=h+e)return!0}else return!0;return!1} -function Vd(a,b,c,d,e,f,h,k,l,m,n,p){if(Ud(a,b,h,k,p,c,d)&&Ud(a,b,h,k,p,e,f))return Ud(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+f)/2,t=(d+s)/2,x=(c+u)/2;return Vd(a,b,q,r,d,c,t,x,l,m,n,p)||Vd(t,x,s,u,e,f,h,k,l,m,n,p)} -function Wd(a,b,c,d,e,f,h,k,l,m){if(Ud(a,b,h,k,l,c,d)&&Ud(a,b,h,k,l,e,f))ab(m,a,b,0,0),ab(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,u=(c+r)/2;Wd(a,b,n,p,d,c,s,u,l,m);Wd(s,u,q,r,e,f,h,k,l,m)}} -function Xd(a,b,c,d,e,f,h,k,l,m){if(Ud(a,b,h,k,l,c,d)&&Ud(a,b,h,k,l,e,f))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,u=(c+r)/2;Xd(a,b,n,p,d,c,s,u,l,m);Xd(s,u,q,r,e,f,h,k,l,m)}} -function ee(a,b,c,d,e,f,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+f*l;e=e*s+h*l;f=f*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+f*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=f}function fe(a,b,c,d,e,f,h,k,l,m){if(Ud(a,b,e,f,m,c,d))return Ud(a,b,e,f,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var q=(n+c)/2,r=(p+d)/2;return fe(a,b,n,p,q,r,h,k,l,m)||fe(q,r,c,d,e,f,h,k,l,m)} -function ge(a,b,c,d,e,f,h,k){if(Ud(a,b,e,f,h,c,d))ab(k,a,b,0,0),ab(k,e,f,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;ge(a,b,l,m,n,p,h,k);ge(n,p,c,d,e,f,h,k)}}function he(a,b,c,d,e,f,h,k){if(Ud(a,b,e,f,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(f);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;he(a,b,l,m,n,p,h,k);he(n,p,c,d,e,f,h,k)}} -function ie(a,b,c,d,e,f,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(Ud(a,b,h,k,q,c,d)&&Ud(a,b,h,k,q,e,f)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+f)/2;e=(e+h)/2;f=(f+k)/2;var t=(s+c)/2,x=(u+d)/2;c=(c+e)/2;d=(d+f)/2;var v=(t+c)/2,z=(x+d)/2, -A=(n-l)*(n-l)+(p-m)*(p-m),L=!1;ie(a,b,s,u,t,x,v,z,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(Ud(a,b,h,k,q,c,d)&&Ud(a,b,h,k,q,e,f)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,x=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(s+t)/2;c=(u+x)/2;var t=(t+e)/2,x=(x+f)/2, -v=(d+t)/2,z=(c+x)/2,r=r+je(a,b,s,u,d,c,v,z,l,m,n,p,q),r=r+je(v,z,t,x,e,f,h,k,l,m,n,p,q)}return r} +var bd=(Math.sqrt(2)-1)/3*4,cd=(new y(0,0)).Ha(),dd=(new B(0,0,0,0)).Ha(),ed=(new hb(0,0,0,0)).Ha(),fd=(new hb(2,2,2,2)).Ha(),nd=(new y(6,6)).Ha(),od=(new y(-Infinity,-Infinity)).Ha(),pd=(new y(Infinity,Infinity)).Ha(),qd=(new ia(0,0)).Ha(),rd=(new ia(1,1)).Ha(),sd=(new ia(6,6)).Ha(),Bd=(new ia(8,8)).Ha(),Cd=(new ia(10,10)).Ha(),Dd=(new ia(Infinity,Infinity)).Ha(),Ed=(new y(NaN,NaN)).Ha(),Fd=(new ia(NaN,NaN)).Ha(),Gd=(new B(NaN,NaN,NaN,NaN)).Ha(),Nd=(new K(.156,.156)).Ha(),Od=(new K(.844,.844)).Ha(), +Pd=new ra,Qd=new ra,Rd=null;function Sd(a){if(0>=a)return 0;var b=Rd;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);Rd=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function J(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=h&&h<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=f&&f<=h+e)return!0}else return!0;return!1} +function Ud(a,b,c,d,e,f,h,k,l,m,n,p){if(Td(a,b,h,k,p,c,d)&&Td(a,b,h,k,p,e,f))return Td(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+f)/2,t=(d+s)/2,x=(c+u)/2;return Ud(a,b,q,r,d,c,t,x,l,m,n,p)||Ud(t,x,s,u,e,f,h,k,l,m,n,p)} +function Vd(a,b,c,d,e,f,h,k,l,m){if(Td(a,b,h,k,l,c,d)&&Td(a,b,h,k,l,e,f))ab(m,a,b,0,0),ab(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,u=(c+r)/2;Vd(a,b,n,p,d,c,s,u,l,m);Vd(s,u,q,r,e,f,h,k,l,m)}} +function Wd(a,b,c,d,e,f,h,k,l,m){if(Td(a,b,h,k,l,c,d)&&Td(a,b,h,k,l,e,f))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,u=(c+r)/2;Wd(a,b,n,p,d,c,s,u,l,m);Wd(s,u,q,r,e,f,h,k,l,m)}} +function Xd(a,b,c,d,e,f,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+f*l;e=e*s+h*l;f=f*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+f*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=f}function ee(a,b,c,d,e,f,h,k,l,m){if(Td(a,b,e,f,m,c,d))return Td(a,b,e,f,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var q=(n+c)/2,r=(p+d)/2;return ee(a,b,n,p,q,r,h,k,l,m)||ee(q,r,c,d,e,f,h,k,l,m)} +function fe(a,b,c,d,e,f,h,k){if(Td(a,b,e,f,h,c,d))ab(k,a,b,0,0),ab(k,e,f,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;fe(a,b,l,m,n,p,h,k);fe(n,p,c,d,e,f,h,k)}}function ge(a,b,c,d,e,f,h,k){if(Td(a,b,e,f,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(f);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;ge(a,b,l,m,n,p,h,k);ge(n,p,c,d,e,f,h,k)}} +function he(a,b,c,d,e,f,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(Td(a,b,h,k,q,c,d)&&Td(a,b,h,k,q,e,f)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+f)/2;e=(e+h)/2;f=(f+k)/2;var t=(s+c)/2,x=(u+d)/2;c=(c+e)/2;d=(d+f)/2;var v=(t+c)/2,z=(x+d)/2, +A=(n-l)*(n-l)+(p-m)*(p-m),L=!1;he(a,b,s,u,t,x,v,z,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(Td(a,b,h,k,q,c,d)&&Td(a,b,h,k,q,e,f)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,x=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(s+t)/2;c=(u+x)/2;var t=(t+e)/2,x=(x+f)/2, +v=(d+t)/2,z=(c+x)/2,r=r+ie(a,b,s,u,d,c,v,z,l,m,n,p,q),r=r+ie(v,z,t,x,e,f,h,k,l,m,n,p,q)}return r} function La(a,b,c,d,e,f,h){if(Wa(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(Wa(b,d)){ac)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005c)return l.x=a,l.y=c,!1;l.x=a;l.y=f;return!0}h=(d-b)/(c-a);if(Wa(k,h))return La(a,b,c,d,e,f,l),!1;e=(h*a-k*e+f-b)/(h-k);if(Wa(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}f= -h*(e-a)+b;return La(a,b,c,d,e,f,l)}function le(a,b,c,d,e,f,h,k,l){var m=1E21,n=a,p=b;if(ke(a,b,a,d,e,f,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-f)*(l.y-f);qm} -function me(a,b,c,d,e,f,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(f-k)/m,h=a,n=k*h+(f-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(f-k)/m,a=b-d*a,h=(f-k*e-a)/(d-k),n=d*h+a);l.m(h,n);return l} -function ne(a,b,c){var d=b.x,e=b.y,f=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===f?(f=a=0,e=m):e===h?(d=k):a.Ia(b)||a.Ia(c)||oe(k,m,l,m,d,e,f,h)||oe(l,m,l,n,d,e,f,h)||oe(l,n,k,n,d,e,f,h)||oe(k,n,k,m,d,e,f,h)?!0:!1}function oe(a,b,c,d,e,f,h,k){return 0>=pe(a,b,c,d,e,f)*pe(a,b,c,d,h,k)&&0>=pe(e,f,h,k,a,b)*pe(e,f,h,k,c,d)} -function pe(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return 0>f?-1:0a&&(a+=360);360<=a&&(a-=360);return a} -function ze(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);var f=b>c?-1:1;d=[];var h=e/2,k=b;c=Math.min(2*e,Math.abs(c-b));if(1E-5>c)return b=k+f*Math.min(c,h),f=0+a*Math.cos(k),k=0+a*Math.sin(k),h=0+a*Math.cos(b),a=0+a*Math.sin(b),b=(f+h)/2,c=(k+a)/2,d.push([f,k,b,c,b,c,h,a]),d;for(;1E-5c,f=0>d,h=0,k=h=0;af;++f){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.ha.toString()+" "+this.fa.toString()+"L"+this.C.toString()+" "+this.D.toString():"M"+this.ha.toFixed(a)+" "+this.fa.toFixed(a)+"L"+this.C.toFixed(a)+" "+this.D.toFixed(a);case He:var b=new B(this.ha,this.fa,0,0);b.GG(this.C,this.D,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ -"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Ie:b=new B(this.ha,this.fa,0,0);b.GG(this.C,this.D,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ -2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case De:for(var b="",c=this.fc.n,d=c.length,e=0;e=L-1?!0:null!==l[t+1].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)}function d(){t++;return l[t]}function e(){var a=new y(parseFloat(d()),parseFloat(d()));x===x.toLowerCase()&&(a.x=A.x+a.x,a.y=A.y+a.y);return a}function f(){return A=e()}function h(){return z=e()}function k(){return"c"!==v.toLowerCase()&&"s"!==v.toLowerCase()?A:new y(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&w.Fd(a,"string",Ce,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, +function je(a,b,c,d,e,f,h,k,l){if(J(a,c)&&J(b,d))return l.x=a,l.y=b,!1;if(Wa(e,h)){if(Wa(a,c))return La(a,b,c,d,e,f,l),!1;f=(d-b)/(c-a)*(e-a)+b;return La(a,b,c,d,e,f,l)}k=(k-f)/(h-e);if(Wa(a,c)){f=k*(a-e)+f;c=h=0;bc)return l.x=a,l.y=c,!1;l.x=a;l.y=f;return!0}h=(d-b)/(c-a);if(Wa(k,h))return La(a,b,c,d,e,f,l),!1;e=(h*a-k*e+f-b)/(h-k);if(Wa(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}f= +h*(e-a)+b;return La(a,b,c,d,e,f,l)}function ke(a,b,c,d,e,f,h,k,l){var m=1E21,n=a,p=b;if(je(a,b,a,d,e,f,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-f)*(l.y-f);qm} +function le(a,b,c,d,e,f,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(f-k)/m,h=a,n=k*h+(f-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(f-k)/m,a=b-d*a,h=(f-k*e-a)/(d-k),n=d*h+a);l.m(h,n);return l} +function me(a,b,c){var d=b.x,e=b.y,f=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===f?(f=a=0,e=m):e===h?(d=k):a.Ia(b)||a.Ia(c)||ne(k,m,l,m,d,e,f,h)||ne(l,m,l,n,d,e,f,h)||ne(l,n,k,n,d,e,f,h)||ne(k,n,k,m,d,e,f,h)?!0:!1}function ne(a,b,c,d,e,f,h,k){return 0>=oe(a,b,c,d,e,f)*oe(a,b,c,d,h,k)&&0>=oe(e,f,h,k,a,b)*oe(e,f,h,k,c,d)} +function oe(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return 0>f?-1:0a&&(a+=360);360<=a&&(a-=360);return a} +function ye(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);var f=b>c?-1:1;d=[];var h=e/2,k=b;c=Math.min(2*e,Math.abs(c-b));if(1E-5>c)return b=k+f*Math.min(c,h),f=0+a*Math.cos(k),k=0+a*Math.sin(k),h=0+a*Math.cos(b),a=0+a*Math.sin(b),b=(f+h)/2,c=(k+a)/2,d.push([f,k,b,c,b,c,h,a]),d;for(;1E-5c,f=0>d,h=0,k=h=0;af;++f){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.ha.toString()+" "+this.fa.toString()+"L"+this.C.toString()+" "+this.D.toString():"M"+this.ha.toFixed(a)+" "+this.fa.toFixed(a)+"L"+this.C.toFixed(a)+" "+this.D.toFixed(a);case Ge:var b=new B(this.ha,this.fa,0,0);b.GG(this.C,this.D,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ +"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case He:b=new B(this.ha,this.fa,0,0);b.GG(this.C,this.D,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ +2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ce:for(var b="",c=this.fc.n,d=c.length,e=0;e=L-1?!0:null!==l[t+1].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)}function d(){t++;return l[t]}function e(){var a=new y(parseFloat(d()),parseFloat(d()));x===x.toLowerCase()&&(a.x=A.x+a.x,a.y=A.y+a.y);return a}function f(){return A=e()}function h(){return z=e()}function k(){return"c"!==v.toLowerCase()&&"s"!==v.toLowerCase()?A:new y(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&w.Fd(a,"string",Be,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=0;m=L-1);)if(v=x,x=d(),""!==x)switch(x.toUpperCase()){case "X":s=!0;r=q=!1;break;case "M":m=f();null===p.Yb||!0===s?(M(p,m.x,m.y,q,!1,!r),s=!1):p.moveTo(m.x,m.y);for(n=A;!c();)m=f(),p.lineTo(m.x,m.y);break;case "L":for(;!c();)m= -f(),p.lineTo(m.x,m.y);break;case "H":for(;!c();)A=m=new y((x===x.toLowerCase()?A.x:0)+parseFloat(d()),A.y),p.lineTo(A.x,A.y);break;case "V":for(;!c();)A=m=new y(A.x,(x===x.toLowerCase()?A.y:0)+parseFloat(d())),p.lineTo(A.x,A.y);break;case "C":for(;!c();){var u=e(),E=h(),m=f();N(p,u.x,u.y,E.x,E.y,m.x,m.y)}break;case "S":for(;!c();)u=k(),E=h(),m=f(),N(p,u.x,u.y,E.x,E.y,m.x,m.y);break;case "Q":for(;!c();)E=h(),m=f(),Qe(p,E.x,E.y,m.x,m.y);break;case "T":for(;!c();)z=E=k(),m=f(),Qe(p,E.x,E.y,m.x,m.y); -break;case "B":for(;!c();){var m=parseFloat(d()),u=parseFloat(d()),E=parseFloat(d()),P=parseFloat(d()),$=parseFloat(d()),S=$,ba=!1;c()||(S=parseFloat(d()),c()||(ba=0!==parseFloat(d())));x===x.toLowerCase()&&(E+=A.x,P+=A.y);p.arcTo(m,u,E,P,$,S,ba)}break;case "A":for(;!c();)u=Math.abs(parseFloat(d())),E=Math.abs(parseFloat(d())),P=parseFloat(d()),$=!!parseFloat(d()),S=!!parseFloat(d()),m=f(),Re(p,u,E,P,$,S,m.x,m.y);break;case "Z":m=p.o.fc.n[p.o.fc.length-1];O(p);A=n;break;case "F":u="";for(m=1;l[t+ -m];)if(null!==l[t+m].match(/[Uu]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?q=!0:Se(p);break;case "U":u="";for(m=1;l[t+m];)if(null!==l[t+m].match(/[Ff]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?r=!0:p.bb(!1)}n=p.o;w.q(p);if(b)for(p=n.fc.i;p.next();)m=p.value,m.qu=!0;return n}; -function Te(a,b){for(var c=a.length,d=w.K(),e=0;eh&&(h+=360),s.Ae+=h);0>a&&(s.Ae=180-s.Ae,s.vf=-s.vf);0>d&&(s.Ae=-s.Ae,s.vf=-s.vf);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case rf:h=s.C;k=s.D;s.C=h* +f(),p.lineTo(m.x,m.y);break;case "H":for(;!c();)A=m=new y((x===x.toLowerCase()?A.x:0)+parseFloat(d()),A.y),p.lineTo(A.x,A.y);break;case "V":for(;!c();)A=m=new y(A.x,(x===x.toLowerCase()?A.y:0)+parseFloat(d())),p.lineTo(A.x,A.y);break;case "C":for(;!c();){var u=e(),E=h(),m=f();N(p,u.x,u.y,E.x,E.y,m.x,m.y)}break;case "S":for(;!c();)u=k(),E=h(),m=f(),N(p,u.x,u.y,E.x,E.y,m.x,m.y);break;case "Q":for(;!c();)E=h(),m=f(),Pe(p,E.x,E.y,m.x,m.y);break;case "T":for(;!c();)z=E=k(),m=f(),Pe(p,E.x,E.y,m.x,m.y); +break;case "B":for(;!c();){var m=parseFloat(d()),u=parseFloat(d()),E=parseFloat(d()),P=parseFloat(d()),$=parseFloat(d()),S=$,ba=!1;c()||(S=parseFloat(d()),c()||(ba=0!==parseFloat(d())));x===x.toLowerCase()&&(E+=A.x,P+=A.y);p.arcTo(m,u,E,P,$,S,ba)}break;case "A":for(;!c();)u=Math.abs(parseFloat(d())),E=Math.abs(parseFloat(d())),P=parseFloat(d()),$=!!parseFloat(d()),S=!!parseFloat(d()),m=f(),Qe(p,u,E,P,$,S,m.x,m.y);break;case "Z":m=p.o.fc.n[p.o.fc.length-1];O(p);A=n;break;case "F":u="";for(m=1;l[t+ +m];)if(null!==l[t+m].match(/[Uu]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?q=!0:Re(p);break;case "U":u="";for(m=1;l[t+m];)if(null!==l[t+m].match(/[Ff]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?r=!0:p.bb(!1)}n=p.o;w.q(p);if(b)for(p=n.fc.i;p.next();)m=p.value,m.qu=!0;return n}; +function Se(a,b){for(var c=a.length,d=w.K(),e=0;eh&&(h+=360),s.Ae+=h);0>a&&(s.Ae=180-s.Ae,s.vf=-s.vf);0>d&&(s.Ae=-s.Ae,s.vf=-s.vf);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case qf:h=s.C;k=s.D;s.C=h* a+k*c+e;s.D=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Kj+=h);0>a&&(s.Kj=180-s.Kj,s.am=!s.am);0>d&&(s.Kj=-s.Kj,s.am=!s.am);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:w.k("Unknown Segment type: "+s.type)}}}}this.gb=!0;return this}; -Ce.prototype.Ia=function(a,b,c,d){var e=a.x,f=a.y,h=this.ab.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.fc.n,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(f>k?f-k:k-f)){if(e=a=0,fe)return 0}else if(ee)return 0;return 0a?a=0:1=f)return d=(f-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.m(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.m(NaN,NaN);return b}; -Ce.prototype.getAngleAlongPath=Ce.prototype.hF=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;f+=m}}return NaN}; -Ce.prototype.getFractionForPoint=Ce.prototype.aI=function(a){if(this.type===Ge){var b=this.ha,c=this.fa,d=this.C,e=this.D;if(b!==d||c!==e){var f=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(f-b)/(k-h)):((f-b)*(f-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===He){if(b=this.ha,c=this.fa,d=this.C,e=this.D,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,f=a.x; +Be.prototype.Ia=function(a,b,c,d){var e=a.x,f=a.y,h=this.ab.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.fc.n,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(f>k?f-k:k-f)){if(e=a=0,fe)return 0}else if(ee)return 0;return 0a?a=0:1=f)return d=(f-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.m(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.m(NaN,NaN);return b}; +Be.prototype.getAngleAlongPath=Be.prototype.hF=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;f+=m}}return NaN}; +Be.prototype.getFractionForPoint=Be.prototype.aI=function(a){if(this.type===Fe){var b=this.ha,c=this.fa,d=this.C,e=this.D;if(b!==d||c!==e){var f=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(f-b)/(k-h)):((f-b)*(f-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===Ge){if(b=this.ha,c=this.fa,d=this.C,e=this.D,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,f=a.x; a=a.y;f=Math.min(Math.max(f,b),d);a=Math.min(Math.max(a,c),e);var b=Math.abs(f-b),d=Math.abs(f-d),c=Math.abs(a-c),e=Math.abs(a-e),m=Math.min(b,d,c,e);if(m===c)return f/l;if(m===d)return(h+a)/l;if(m===e)return(2*h+k-f)/l;if(m===b)return(2*h+2*k-a)/l}}else{for(var e=this.Cx,h=this.$t,k=this.au,l=w.K(),c=Infinity,b=d=0,f=e.length,n=m=0,p=0;pa?0:1a?"M"+this.ha.toString()+" "+this.fa.toString():"M"+this.ha.toFixed(a)+" "+this.fa.toFixed(a),c=this.wb.n,d=c.length,e=0;ea&&(a+=360),this.Kd=a,this.Xe=0,this.mh=Math.max(d,0),this.Dg=Math.max(e,0),this.So="boolean"===typeof h?!!h:!1,this.no=!!k):(this.Kd=d,this.Xe=e,a===qf&&(f=Math.max(f,0)),this.mh=f,"number"===typeof h?(a===qf&&(h=Math.max(h,0)),this.Dg=h):this.Dg=0,this.no=this.So=!1);this.Rh=!1;this.gb= -!0;this.Jh=null}w.ga("PathSegment",xf);w.mi(xf);xf.prototype.copy=function(){var a=new xf;a.na=this.na;a.yb=this.yb;a.Gb=this.Gb;a.Kd=this.Kd;a.Xe=this.Xe;a.mh=this.mh;a.Dg=this.Dg;a.So=this.So;a.no=this.no;a.Rh=this.Rh;a.gb=this.gb;return a}; -xf.prototype.equalsApprox=xf.prototype.Oc=function(a){if(!(a instanceof xf)||this.type!==a.type||this.Gx!==a.Gx)return!1;switch(this.type){case Ve:case Ne:return J(this.C,a.C)&&J(this.D,a.D);case We:return J(this.C,a.C)&&J(this.D,a.D)&&J(this.wc,a.wc)&&J(this.Rc,a.Rc)&&J(this.Ch,a.Ch)&&J(this.Dh,a.Dh);case pf:return J(this.C,a.C)&&J(this.D,a.D)&&J(this.wc,a.wc)&&J(this.Rc,a.Rc);case qf:return J(this.Ae,a.Ae)&&J(this.vf,a.vf)&&J(this.la,a.la)&&J(this.ra,a.ra)&&J(this.radiusX,a.radiusX)&&J(this.radiusY, -a.radiusY);case rf:return this.am===a.am&&this.Ix===a.Ix&&J(this.Kj,a.Kj)&&J(this.C,a.C)&&J(this.D,a.D)&&J(this.radiusX,a.radiusX)&&J(this.radiusY,a.radiusY);default:return!1}};xf.prototype.hc=function(a){a.Ie===xf?this.type=a:w.Ij(this,a)}; -xf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Ve:b=0>a?"M"+this.C.toString()+" "+this.D.toString():"M"+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case Ne:b=0>a?"L"+this.C.toString()+" "+this.D.toString():"L"+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case We:b=0>a?"C"+this.wc.toString()+" "+this.Rc.toString()+" "+this.Ch.toString()+" "+this.Dh.toString()+" "+this.C.toString()+" "+this.D.toString():"C"+this.wc.toFixed(a)+" "+this.Rc.toFixed(a)+" "+this.Ch.toFixed(a)+ -" "+this.Dh.toFixed(a)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case pf:b=0>a?"Q"+this.wc.toString()+" "+this.Rc.toString()+" "+this.C.toString()+" "+this.D.toString():"Q"+this.wc.toFixed(a)+" "+this.Rc.toFixed(a)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case qf:b=0>a?"B"+this.Ae.toString()+" "+this.vf.toString()+" "+this.la.toString()+" "+this.ra.toString()+" "+this.radiusX:"B"+this.Ae.toFixed(a)+" "+this.vf.toFixed(a)+" "+this.la.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.radiusX; -break;case rf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Kj.toString()+" "+(this.Ix?1:0)+" "+(this.am?1:0)+" "+this.C.toString()+" "+this.D.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Kj.toFixed(a)+" "+(this.Ix?1:0)+" "+(this.am?1:0)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;default:b=this.type.toString()}return b+(this.Rh?"z":"")};var Ve;xf.Move=Ve=w.p(xf,"Move",0);var Ne;xf.Line=Ne=w.p(xf,"Line",1);var We; -xf.Bezier=We=w.p(xf,"Bezier",2);var pf;xf.QuadraticBezier=pf=w.p(xf,"QuadraticBezier",3);var qf;xf.Arc=qf=w.p(xf,"Arc",4);var rf;xf.SvgArc=rf=w.p(xf,"SvgArc",4);xf.prototype.freeze=function(){this.P=!0;return this};xf.prototype.Qa=function(){this.P=!1;return this};xf.prototype.close=xf.prototype.close=function(){this.Rh=!0;return this}; -function sf(a,b){if(null!==a.Jh&&!1===b.gb)return a.Jh;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Jh=[],a.Jh;var e=a.Kd,f=a.Xe,h=ze(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>f?1:b/f;r=b>f?f/b:1;b=ze(b>f?b:f,n,n+h,!0);f=w.Wg();f.reset();f.translate(c,d);f.rotate(a.Kd,0,0);f.scale(l,r);Te(b,f);w.df(f);a.Jh=b;return a.Jh} -w.defineProperty(xf,{Gx:"isClosed"},function(){return this.Rh},function(a){this.Rh!==a&&(this.Rh=a,this.gb=!0)});w.defineProperty(xf,{type:"type"},function(){return this.na},function(a){this.P&&w.ma(this,a);this.na=a;this.gb=!0});w.defineProperty(xf,{C:"endX"},function(){return this.yb},function(a){this.P&&w.ma(this,a);this.yb=a;this.gb=!0});w.defineProperty(xf,{D:"endY"},function(){return this.Gb},function(a){this.P&&w.ma(this,a);this.Gb=a;this.gb=!0}); -w.defineProperty(xf,{wc:"point1X"},function(){return this.Kd},function(a){this.P&&w.ma(this,a);this.Kd=a;this.gb=!0});w.defineProperty(xf,{Rc:"point1Y"},function(){return this.Xe},function(a){this.P&&w.ma(this,a);this.Xe=a;this.gb=!0});w.defineProperty(xf,{Ch:"point2X"},function(){return this.mh},function(a){this.P&&w.ma(this,a);this.mh=a;this.gb=!0});w.defineProperty(xf,{Dh:"point2Y"},function(){return this.Dg},function(a){this.P&&w.ma(this,a);this.Dg=a;this.gb=!0}); -w.defineProperty(xf,{la:"centerX"},function(){return this.Kd},function(a){this.P&&w.ma(this,a);this.Kd=a;this.gb=!0});w.defineProperty(xf,{ra:"centerY"},function(){return this.Xe},function(a){this.P&&w.ma(this,a);this.Xe=a;this.gb=!0});w.defineProperty(xf,{radiusX:"radiusX"},function(){return this.mh},function(a){0>a&&w.Fa(a,">= zero",xf,"radiusX");this.P&&w.ma(this,a);this.mh=a;this.gb=!0}); -w.defineProperty(xf,{radiusY:"radiusY"},function(){return this.Dg},function(a){0>a&&w.Fa(a,">= zero",xf,"radiusY");this.P&&w.ma(this,a);this.Dg=a;this.gb=!0});w.defineProperty(xf,{Ae:"startAngle"},function(){return this.yb},function(a){this.yb!==a&&(this.P&&w.ma(this,a),a%=360,0>a&&(a+=360),this.yb=a,this.gb=!0)});w.defineProperty(xf,{vf:"sweepAngle"},function(){return this.Gb},function(a){this.P&&w.ma(this,a);360a&&(a=-360);this.Gb=a;this.gb=!0}); -w.defineProperty(xf,{am:"isClockwiseArc"},function(){return this.no},function(a){this.P&&w.ma(this,a);this.no=a;this.gb=!0});w.defineProperty(xf,{Ix:"isLargeArc"},function(){return this.So},function(a){this.P&&w.ma(this,a);this.So=a;this.gb=!0});w.defineProperty(xf,{Kj:"xAxisRotation"},function(){return this.Kd},function(a){a%=360;0>a&&(a+=360);this.P&&w.ma(this,a);this.Kd=a;this.gb=!0}); -function zf(){this.aa=null;this.Zz=(new y(0,0)).freeze();this.dz=(new y(0,0)).freeze();this.sv=this.ow=0;this.tv=1;this.cw="";this.Tw=this.Gv=!1;this.Ev=this.uv=0;this.Nj=this.Pv=this.Zv=!1;this.Dr=null;this.Rw=0;this.Gg=this.Qw=null}w.ga("InputEvent",zf); -zf.prototype.copy=function(){var a=new zf;a.aa=this.aa;a.Zz.assign(this.Ce);a.dz.assign(this.da);a.ow=this.ow;a.sv=this.sv;a.tv=this.tv;a.cw=this.cw;a.Gv=this.Gv;a.Tw=this.Tw;a.uv=this.uv;a.Ev=this.Ev;a.Zv=this.Zv;a.Pv=this.Pv;a.Nj=this.Nj;a.Dr=this.Dr;a.Rw=this.Rw;a.Qw=this.Qw;a.Gg=this.Gg;return a}; -zf.prototype.toString=function(){var a="^";0!==this.md&&(a+="M:"+this.md);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.re&&(a+="C:"+this.re);0!==this.Dk&&(a+="D:"+this.Dk);this.tc&&(a+="h");this.bubbles&&(a+="b");null!==this.da&&(a+="@"+this.da.toString());return a};w.defineProperty(zf,{g:"diagram"},function(){return this.aa},function(a){this.aa=a});w.defineProperty(zf,{Ce:"viewPoint"},function(){return this.Zz},function(a){w.G(a,y,zf,"viewPoint");this.Zz.assign(a)}); -w.defineProperty(zf,{da:"documentPoint"},function(){return this.dz},function(a){w.G(a,y,zf,"documentPoint");this.dz.assign(a)});zf.prototype.getMultiTouchViewPoint=zf.prototype.Dx=function(a,b){var c=this.g;if(null===c)return b;Af(c,this.event,a,b);return b};zf.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;Af(c,this.event,a,b);b.assign(c.OB(b));return b};w.defineProperty(zf,{md:"modifiers"},function(){return this.ow},function(a){this.ow=a}); -w.defineProperty(zf,{button:"button"},function(){return this.sv},function(a){this.sv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});w.defineProperty(zf,{buttons:"buttons"},function(){return this.tv},function(a){this.tv=a});w.defineProperty(zf,{key:"key"},function(){return this.cw},function(a){this.cw=a});w.defineProperty(zf,{Ek:"down"},function(){return this.Gv},function(a){this.Gv=a}); -w.defineProperty(zf,{up:"up"},function(){return this.Tw},function(a){this.Tw=a});w.defineProperty(zf,{re:"clickCount"},function(){return this.uv},function(a){this.uv=a});w.defineProperty(zf,{Dk:"delta"},function(){return this.Ev},function(a){this.Ev=a});w.defineProperty(zf,{uu:"isMultiTouch"},function(){return this.Zv},function(a){this.Zv=a});w.defineProperty(zf,{tc:"handled"},function(){return this.Pv},function(a){this.Pv=a}); -w.defineProperty(zf,{bubbles:"bubbles"},function(){return this.Nj},function(a){this.Nj=a});w.defineProperty(zf,{event:"event"},function(){return this.Dr},function(a){this.Dr=a});w.u(zf,{yj:"isTouchEvent"},function(){var a=window.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=window.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)});w.u(zf,{yh:"isMac"},function(){return w.yh}); -w.defineProperty(zf,{timestamp:"timestamp"},function(){return this.Rw},function(a){this.Rw=a});w.defineProperty(zf,{If:"targetDiagram"},function(){return this.Qw},function(a){this.Qw=a});w.defineProperty(zf,{Be:"targetObject"},function(){return this.Gg},function(a){this.Gg=a});w.defineProperty(zf,{control:"control"},function(){return 0!==(this.md&1)},function(a){this.md=a?this.md|1:this.md&-2}); -w.defineProperty(zf,{shift:"shift"},function(){return 0!==(this.md&4)},function(a){this.md=a?this.md|4:this.md&-5});w.defineProperty(zf,{alt:"alt"},function(){return 0!==(this.md&2)},function(a){this.md=a?this.md|2:this.md&-3});w.defineProperty(zf,{Du:"meta"},function(){return 0!==(this.md&8)},function(a){this.md=a?this.md|8:this.md&-9}); -w.defineProperty(zf,{left:"left"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); -w.defineProperty(zf,{right:"right"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},function(a){this.buttons=a?this.buttons|2:this.buttons&-3}); -w.defineProperty(zf,{xL:"middle"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});function Bf(){this.aa=null;this.Sb="";this.xw=this.Ow=null;this.Xq=!1}w.ga("DiagramEvent",Bf);Bf.prototype.copy=function(){var a=new Bf;a.aa=this.aa;a.Sb=this.Sb;a.Ow=this.Ow;a.xw=this.xw;a.Xq=this.Xq;return a}; -Bf.prototype.toString=function(){var a="*"+this.name;null!==this.GB&&(a+=":"+this.GB.toString());null!==this.iB&&(a+="("+this.iB.toString()+")");return a};w.defineProperty(Bf,{g:"diagram"},function(){return this.aa},function(a){this.aa=a});w.defineProperty(Bf,{name:"name"},function(){return this.Sb},function(a){this.Sb=a});w.defineProperty(Bf,{GB:"subject"},function(){return this.Ow},function(a){this.Ow=a});w.defineProperty(Bf,{iB:"parameter"},function(){return this.xw},function(a){this.xw=a}); -w.defineProperty(Bf,{cancel:"cancel"},function(){return this.Xq},function(a){this.Xq!==a&&w.Rt("DiagramEvent.cancel","2.0");this.Xq=a});function Cf(){this.Yq=Df;this.Wm=this.nw="";this.Cs=this.Ds=this.Is=this.Js=this.Gs=this.aa=this.ne=null}w.ga("ChangedEvent",Cf);var Ef;Cf.Transaction=Ef=w.p(Cf,"Transaction",-1);var Df;Cf.Property=Df=w.p(Cf,"Property",0);var Ff;Cf.Insert=Ff=w.p(Cf,"Insert",1);var Qf;Cf.Remove=Qf=w.p(Cf,"Remove",2); -Cf.prototype.clear=Cf.prototype.clear=function(){this.Cs=this.Ds=this.Is=this.Js=this.Gs=this.aa=this.ne=null};Cf.prototype.copy=function(){var a=new Cf;a.Yq=this.Yq;a.nw=this.nw;a.Wm=this.Wm;a.ne=this.ne;a.aa=this.aa;a.Gs=this.Gs;var b=this.Js;a.Js=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.Is;a.Is=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.Ds;a.Ds=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.Cs;a.Cs=w.Pa(b)&&"function"===typeof b.S?b.S():b;return a}; -Cf.prototype.hc=function(a){a.Ie===Cf?this.Dc=a:w.Ij(this,a)}; -Cf.prototype.toString=function(){var a="",a=this.Dc===Ef?a+"* ":this.Dc===Df?a+(null!==this.$?"!m":"!d"):a+((null!==this.$?"!m":"!d")+this.Dc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.uf&&this.uf!==this.propertyName&&(a+=" "+this.uf);a+=": ";this.Dc===Ef?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Rf(this.object)),null!==this.oldValue&&(a+=" old: "+Rf(this.oldValue)),null!==this.Dj&&(a+=" "+this.Dj),null!==this.newValue&&(a+= -" new: "+Rf(this.newValue)),null!==this.Cj&&(a+=" "+this.Cj));return a};Cf.prototype.getValue=Cf.prototype.ka=function(a){return a?this.oldValue:this.newValue};Cf.prototype.getParam=function(a){return a?this.Dj:this.Cj};Cf.prototype.canUndo=Cf.prototype.canUndo=function(){return null!==this.$||null!==this.g?!0:!1};Cf.prototype.undo=Cf.prototype.undo=function(){this.canUndo()&&(null!==this.$?this.$.nn(this,!0):null!==this.g&&this.g.nn(this,!0))}; -Cf.prototype.canRedo=Cf.prototype.canRedo=function(){return null!==this.$||null!==this.g?!0:!1};Cf.prototype.redo=Cf.prototype.redo=function(){this.canRedo()&&(null!==this.$?this.$.nn(this,!1):null!==this.g&&this.g.nn(this,!1))};w.defineProperty(Cf,{$:"model"},function(){return this.ne},function(a){this.ne=a});w.defineProperty(Cf,{g:"diagram"},function(){return this.aa},function(a){this.aa=a});w.defineProperty(Cf,{Dc:"change"},function(){return this.Yq},function(a){this.Yq=a}); -w.defineProperty(Cf,{uf:"modelChange"},function(){return this.nw},function(a){this.nw=a});w.defineProperty(Cf,{propertyName:"propertyName"},function(){return this.Wm},function(a){this.Wm=a});w.u(Cf,{HF:"isTransactionFinished"},function(){return this.Yq===Ef&&("CommittedTransaction"===this.Wm||"FinishedUndo"===this.Wm||"FinishedRedo"===this.Wm)});w.defineProperty(Cf,{object:"object"},function(){return this.Gs},function(a){this.Gs=a}); -w.defineProperty(Cf,{oldValue:"oldValue"},function(){return this.Js},function(a){this.Js=a});w.defineProperty(Cf,{Dj:"oldParam"},function(){return this.Is},function(a){this.Is=a});w.defineProperty(Cf,{newValue:"newValue"},function(){return this.Ds},function(a){this.Ds=a});w.defineProperty(Cf,{Cj:"newParam"},function(){return this.Cs},function(a){this.Cs=a}); -function F(a){1a?0:1a?"M"+this.ha.toString()+" "+this.fa.toString():"M"+this.ha.toFixed(a)+" "+this.fa.toFixed(a),c=this.wb.n,d=c.length,e=0;ea&&(a+=360),this.Kd=a,this.Xe=0,this.mh=Math.max(d,0),this.Dg=Math.max(e,0),this.So="boolean"===typeof h?!!h:!1,this.no=!!k):(this.Kd=d,this.Xe=e,a===pf&&(f=Math.max(f,0)),this.mh=f,"number"===typeof h?(a===pf&&(h=Math.max(h,0)),this.Dg=h):this.Dg=0,this.no=this.So=!1);this.Rh=!1;this.gb= +!0;this.Jh=null}w.ga("PathSegment",wf);w.mi(wf);wf.prototype.copy=function(){var a=new wf;a.na=this.na;a.yb=this.yb;a.Gb=this.Gb;a.Kd=this.Kd;a.Xe=this.Xe;a.mh=this.mh;a.Dg=this.Dg;a.So=this.So;a.no=this.no;a.Rh=this.Rh;a.gb=this.gb;return a}; +wf.prototype.equalsApprox=wf.prototype.Oc=function(a){if(!(a instanceof wf)||this.type!==a.type||this.Gx!==a.Gx)return!1;switch(this.type){case Ue:case Me:return J(this.C,a.C)&&J(this.D,a.D);case Ve:return J(this.C,a.C)&&J(this.D,a.D)&&J(this.wc,a.wc)&&J(this.Rc,a.Rc)&&J(this.Ch,a.Ch)&&J(this.Dh,a.Dh);case We:return J(this.C,a.C)&&J(this.D,a.D)&&J(this.wc,a.wc)&&J(this.Rc,a.Rc);case pf:return J(this.Ae,a.Ae)&&J(this.vf,a.vf)&&J(this.la,a.la)&&J(this.ra,a.ra)&&J(this.radiusX,a.radiusX)&&J(this.radiusY, +a.radiusY);case qf:return this.am===a.am&&this.Ix===a.Ix&&J(this.Kj,a.Kj)&&J(this.C,a.C)&&J(this.D,a.D)&&J(this.radiusX,a.radiusX)&&J(this.radiusY,a.radiusY);default:return!1}};wf.prototype.hc=function(a){a.Ie===wf?this.type=a:w.Ij(this,a)}; +wf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Ue:b=0>a?"M"+this.C.toString()+" "+this.D.toString():"M"+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case Me:b=0>a?"L"+this.C.toString()+" "+this.D.toString():"L"+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case Ve:b=0>a?"C"+this.wc.toString()+" "+this.Rc.toString()+" "+this.Ch.toString()+" "+this.Dh.toString()+" "+this.C.toString()+" "+this.D.toString():"C"+this.wc.toFixed(a)+" "+this.Rc.toFixed(a)+" "+this.Ch.toFixed(a)+ +" "+this.Dh.toFixed(a)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case We:b=0>a?"Q"+this.wc.toString()+" "+this.Rc.toString()+" "+this.C.toString()+" "+this.D.toString():"Q"+this.wc.toFixed(a)+" "+this.Rc.toFixed(a)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case pf:b=0>a?"B"+this.Ae.toString()+" "+this.vf.toString()+" "+this.la.toString()+" "+this.ra.toString()+" "+this.radiusX:"B"+this.Ae.toFixed(a)+" "+this.vf.toFixed(a)+" "+this.la.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.radiusX; +break;case qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Kj.toString()+" "+(this.Ix?1:0)+" "+(this.am?1:0)+" "+this.C.toString()+" "+this.D.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Kj.toFixed(a)+" "+(this.Ix?1:0)+" "+(this.am?1:0)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;default:b=this.type.toString()}return b+(this.Rh?"z":"")};var Ue;wf.Move=Ue=w.p(wf,"Move",0);var Me;wf.Line=Me=w.p(wf,"Line",1);var Ve; +wf.Bezier=Ve=w.p(wf,"Bezier",2);var We;wf.QuadraticBezier=We=w.p(wf,"QuadraticBezier",3);var pf;wf.Arc=pf=w.p(wf,"Arc",4);var qf;wf.SvgArc=qf=w.p(wf,"SvgArc",4);wf.prototype.freeze=function(){this.P=!0;return this};wf.prototype.Qa=function(){this.P=!1;return this};wf.prototype.close=wf.prototype.close=function(){this.Rh=!0;return this}; +function rf(a,b){if(null!==a.Jh&&!1===b.gb)return a.Jh;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Jh=[],a.Jh;var e=a.Kd,f=a.Xe,h=ye(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>f?1:b/f;r=b>f?f/b:1;b=ye(b>f?b:f,n,n+h,!0);f=w.Wg();f.reset();f.translate(c,d);f.rotate(a.Kd,0,0);f.scale(l,r);Se(b,f);w.df(f);a.Jh=b;return a.Jh} +w.defineProperty(wf,{Gx:"isClosed"},function(){return this.Rh},function(a){this.Rh!==a&&(this.Rh=a,this.gb=!0)});w.defineProperty(wf,{type:"type"},function(){return this.na},function(a){this.P&&w.ma(this,a);this.na=a;this.gb=!0});w.defineProperty(wf,{C:"endX"},function(){return this.yb},function(a){this.P&&w.ma(this,a);this.yb=a;this.gb=!0});w.defineProperty(wf,{D:"endY"},function(){return this.Gb},function(a){this.P&&w.ma(this,a);this.Gb=a;this.gb=!0}); +w.defineProperty(wf,{wc:"point1X"},function(){return this.Kd},function(a){this.P&&w.ma(this,a);this.Kd=a;this.gb=!0});w.defineProperty(wf,{Rc:"point1Y"},function(){return this.Xe},function(a){this.P&&w.ma(this,a);this.Xe=a;this.gb=!0});w.defineProperty(wf,{Ch:"point2X"},function(){return this.mh},function(a){this.P&&w.ma(this,a);this.mh=a;this.gb=!0});w.defineProperty(wf,{Dh:"point2Y"},function(){return this.Dg},function(a){this.P&&w.ma(this,a);this.Dg=a;this.gb=!0}); +w.defineProperty(wf,{la:"centerX"},function(){return this.Kd},function(a){this.P&&w.ma(this,a);this.Kd=a;this.gb=!0});w.defineProperty(wf,{ra:"centerY"},function(){return this.Xe},function(a){this.P&&w.ma(this,a);this.Xe=a;this.gb=!0});w.defineProperty(wf,{radiusX:"radiusX"},function(){return this.mh},function(a){0>a&&w.Fa(a,">= zero",wf,"radiusX");this.P&&w.ma(this,a);this.mh=a;this.gb=!0}); +w.defineProperty(wf,{radiusY:"radiusY"},function(){return this.Dg},function(a){0>a&&w.Fa(a,">= zero",wf,"radiusY");this.P&&w.ma(this,a);this.Dg=a;this.gb=!0});w.defineProperty(wf,{Ae:"startAngle"},function(){return this.yb},function(a){this.yb!==a&&(this.P&&w.ma(this,a),a%=360,0>a&&(a+=360),this.yb=a,this.gb=!0)});w.defineProperty(wf,{vf:"sweepAngle"},function(){return this.Gb},function(a){this.P&&w.ma(this,a);360a&&(a=-360);this.Gb=a;this.gb=!0}); +w.defineProperty(wf,{am:"isClockwiseArc"},function(){return this.no},function(a){this.P&&w.ma(this,a);this.no=a;this.gb=!0});w.defineProperty(wf,{Ix:"isLargeArc"},function(){return this.So},function(a){this.P&&w.ma(this,a);this.So=a;this.gb=!0});w.defineProperty(wf,{Kj:"xAxisRotation"},function(){return this.Kd},function(a){a%=360;0>a&&(a+=360);this.P&&w.ma(this,a);this.Kd=a;this.gb=!0}); +function yf(){this.aa=null;this.Zz=(new y(0,0)).freeze();this.dz=(new y(0,0)).freeze();this.sv=this.ow=0;this.tv=1;this.cw="";this.Tw=this.Gv=!1;this.Ev=this.uv=0;this.Nj=this.Pv=this.Zv=!1;this.Dr=null;this.Rw=0;this.Gg=this.Qw=null}w.ga("InputEvent",yf); +yf.prototype.copy=function(){var a=new yf;a.aa=this.aa;a.Zz.assign(this.Ce);a.dz.assign(this.da);a.ow=this.ow;a.sv=this.sv;a.tv=this.tv;a.cw=this.cw;a.Gv=this.Gv;a.Tw=this.Tw;a.uv=this.uv;a.Ev=this.Ev;a.Zv=this.Zv;a.Pv=this.Pv;a.Nj=this.Nj;a.Dr=this.Dr;a.Rw=this.Rw;a.Qw=this.Qw;a.Gg=this.Gg;return a}; +yf.prototype.toString=function(){var a="^";0!==this.md&&(a+="M:"+this.md);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.re&&(a+="C:"+this.re);0!==this.Dk&&(a+="D:"+this.Dk);this.tc&&(a+="h");this.bubbles&&(a+="b");null!==this.da&&(a+="@"+this.da.toString());return a};w.defineProperty(yf,{g:"diagram"},function(){return this.aa},function(a){this.aa=a});w.defineProperty(yf,{Ce:"viewPoint"},function(){return this.Zz},function(a){w.G(a,y,yf,"viewPoint");this.Zz.assign(a)}); +w.defineProperty(yf,{da:"documentPoint"},function(){return this.dz},function(a){w.G(a,y,yf,"documentPoint");this.dz.assign(a)});yf.prototype.getMultiTouchViewPoint=yf.prototype.Dx=function(a,b){var c=this.g;if(null===c)return b;zf(c,this.event,a,b);return b};yf.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;zf(c,this.event,a,b);b.assign(c.OB(b));return b};w.defineProperty(yf,{md:"modifiers"},function(){return this.ow},function(a){this.ow=a}); +w.defineProperty(yf,{button:"button"},function(){return this.sv},function(a){this.sv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});w.defineProperty(yf,{buttons:"buttons"},function(){return this.tv},function(a){this.tv=a});w.defineProperty(yf,{key:"key"},function(){return this.cw},function(a){this.cw=a});w.defineProperty(yf,{Ek:"down"},function(){return this.Gv},function(a){this.Gv=a}); +w.defineProperty(yf,{up:"up"},function(){return this.Tw},function(a){this.Tw=a});w.defineProperty(yf,{re:"clickCount"},function(){return this.uv},function(a){this.uv=a});w.defineProperty(yf,{Dk:"delta"},function(){return this.Ev},function(a){this.Ev=a});w.defineProperty(yf,{uu:"isMultiTouch"},function(){return this.Zv},function(a){this.Zv=a});w.defineProperty(yf,{tc:"handled"},function(){return this.Pv},function(a){this.Pv=a}); +w.defineProperty(yf,{bubbles:"bubbles"},function(){return this.Nj},function(a){this.Nj=a});w.defineProperty(yf,{event:"event"},function(){return this.Dr},function(a){this.Dr=a});w.u(yf,{yj:"isTouchEvent"},function(){var a=window.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=window.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)});w.u(yf,{yh:"isMac"},function(){return w.yh}); +w.defineProperty(yf,{timestamp:"timestamp"},function(){return this.Rw},function(a){this.Rw=a});w.defineProperty(yf,{If:"targetDiagram"},function(){return this.Qw},function(a){this.Qw=a});w.defineProperty(yf,{Be:"targetObject"},function(){return this.Gg},function(a){this.Gg=a});w.defineProperty(yf,{control:"control"},function(){return 0!==(this.md&1)},function(a){this.md=a?this.md|1:this.md&-2}); +w.defineProperty(yf,{shift:"shift"},function(){return 0!==(this.md&4)},function(a){this.md=a?this.md|4:this.md&-5});w.defineProperty(yf,{alt:"alt"},function(){return 0!==(this.md&2)},function(a){this.md=a?this.md|2:this.md&-3});w.defineProperty(yf,{Du:"meta"},function(){return 0!==(this.md&8)},function(a){this.md=a?this.md|8:this.md&-9}); +w.defineProperty(yf,{left:"left"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); +w.defineProperty(yf,{right:"right"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},function(a){this.buttons=a?this.buttons|2:this.buttons&-3}); +w.defineProperty(yf,{xL:"middle"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});function Af(){this.aa=null;this.Sb="";this.xw=this.Ow=null;this.Xq=!1}w.ga("DiagramEvent",Af);Af.prototype.copy=function(){var a=new Af;a.aa=this.aa;a.Sb=this.Sb;a.Ow=this.Ow;a.xw=this.xw;a.Xq=this.Xq;return a}; +Af.prototype.toString=function(){var a="*"+this.name;null!==this.GB&&(a+=":"+this.GB.toString());null!==this.iB&&(a+="("+this.iB.toString()+")");return a};w.defineProperty(Af,{g:"diagram"},function(){return this.aa},function(a){this.aa=a});w.defineProperty(Af,{name:"name"},function(){return this.Sb},function(a){this.Sb=a});w.defineProperty(Af,{GB:"subject"},function(){return this.Ow},function(a){this.Ow=a});w.defineProperty(Af,{iB:"parameter"},function(){return this.xw},function(a){this.xw=a}); +w.defineProperty(Af,{cancel:"cancel"},function(){return this.Xq},function(a){this.Xq!==a&&w.Rt("DiagramEvent.cancel","2.0");this.Xq=a});function Bf(){this.Yq=Cf;this.Wm=this.nw="";this.Cs=this.Ds=this.Is=this.Js=this.Gs=this.aa=this.ne=null}w.ga("ChangedEvent",Bf);var Df;Bf.Transaction=Df=w.p(Bf,"Transaction",-1);var Cf;Bf.Property=Cf=w.p(Bf,"Property",0);var Ef;Bf.Insert=Ef=w.p(Bf,"Insert",1);var Ff;Bf.Remove=Ff=w.p(Bf,"Remove",2); +Bf.prototype.clear=Bf.prototype.clear=function(){this.Cs=this.Ds=this.Is=this.Js=this.Gs=this.aa=this.ne=null};Bf.prototype.copy=function(){var a=new Bf;a.Yq=this.Yq;a.nw=this.nw;a.Wm=this.Wm;a.ne=this.ne;a.aa=this.aa;a.Gs=this.Gs;var b=this.Js;a.Js=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.Is;a.Is=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.Ds;a.Ds=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.Cs;a.Cs=w.Pa(b)&&"function"===typeof b.S?b.S():b;return a}; +Bf.prototype.hc=function(a){a.Ie===Bf?this.Dc=a:w.Ij(this,a)}; +Bf.prototype.toString=function(){var a="",a=this.Dc===Df?a+"* ":this.Dc===Cf?a+(null!==this.$?"!m":"!d"):a+((null!==this.$?"!m":"!d")+this.Dc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.uf&&this.uf!==this.propertyName&&(a+=" "+this.uf);a+=": ";this.Dc===Df?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qf(this.object)),null!==this.oldValue&&(a+=" old: "+Qf(this.oldValue)),null!==this.Dj&&(a+=" "+this.Dj),null!==this.newValue&&(a+= +" new: "+Qf(this.newValue)),null!==this.Cj&&(a+=" "+this.Cj));return a};Bf.prototype.getValue=Bf.prototype.ka=function(a){return a?this.oldValue:this.newValue};Bf.prototype.getParam=function(a){return a?this.Dj:this.Cj};Bf.prototype.canUndo=Bf.prototype.canUndo=function(){return null!==this.$||null!==this.g?!0:!1};Bf.prototype.undo=Bf.prototype.undo=function(){this.canUndo()&&(null!==this.$?this.$.nn(this,!0):null!==this.g&&this.g.nn(this,!0))}; +Bf.prototype.canRedo=Bf.prototype.canRedo=function(){return null!==this.$||null!==this.g?!0:!1};Bf.prototype.redo=Bf.prototype.redo=function(){this.canRedo()&&(null!==this.$?this.$.nn(this,!1):null!==this.g&&this.g.nn(this,!1))};w.defineProperty(Bf,{$:"model"},function(){return this.ne},function(a){this.ne=a});w.defineProperty(Bf,{g:"diagram"},function(){return this.aa},function(a){this.aa=a});w.defineProperty(Bf,{Dc:"change"},function(){return this.Yq},function(a){this.Yq=a}); +w.defineProperty(Bf,{uf:"modelChange"},function(){return this.nw},function(a){this.nw=a});w.defineProperty(Bf,{propertyName:"propertyName"},function(){return this.Wm},function(a){this.Wm=a});w.u(Bf,{HF:"isTransactionFinished"},function(){return this.Yq===Df&&("CommittedTransaction"===this.Wm||"FinishedUndo"===this.Wm||"FinishedRedo"===this.Wm)});w.defineProperty(Bf,{object:"object"},function(){return this.Gs},function(a){this.Gs=a}); +w.defineProperty(Bf,{oldValue:"oldValue"},function(){return this.Js},function(a){this.Js=a});w.defineProperty(Bf,{Dj:"oldParam"},function(){return this.Is},function(a){this.Is=a});w.defineProperty(Bf,{newValue:"newValue"},function(){return this.Ds},function(a){this.Ds=a});w.defineProperty(Bf,{Cj:"newParam"},function(){return this.Cs},function(a){this.Cs=a}); +function F(a){1f?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}return'"'+b+'"'}; -F.prototype.writeJsonValue=F.prototype.dv=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.dv(a.valueOf()):w.isArray(a)?Xf(this,a):w.Pa(a)?Uf(this,a):"function"===typeof a?"null":a.toString()}; -function Xf(a,b,c){void 0===c&&(c=!1);var d=w.Za(b);if(0>=d)return"[]";var e=new qa;e.add("[ ");c&&1=d)return"[]";var e=new qa;e.add("[ ");c&&1d)return;w.Jg(a.He,d)}vg(a,"nodeDataArray",Qf,"nodeDataArray",a,b,null,d,null);a.cv(b)} -F.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.Za(a),c=0;cd)return;w.Jg(a.He,d)}ug(a,"nodeDataArray",Ff,"nodeDataArray",a,b,null,d,null);a.cv(b)} +F.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.Za(a),c=0;cb&&(b=w.Za(a));w.qh(a,b,c);vg(this,"",Ff,"",a,null,c,null,b)};F.prototype.removeArrayItem=F.prototype.$F=function(a,b){void 0===b&&(b=-1);a===this.He&&w.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.Za(a)-1);var c=w.Ba(a,b);w.Jg(a,b);vg(this,"",Qf,"",a,c,null,b,null)}; -w.defineProperty(F,{Tn:"nodeCategoryProperty"},function(){return this.Rm},function(a){var b=this.Rm;b!==a&&(wg(a,F,"nodeCategoryProperty"),this.Rm=a,this.h("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.CA=function(a){if(null===a)return"";var b=this.Rm;if(""===b)return"";b=w.ub(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -F.prototype.setCategoryForNodeData=F.prototype.sy=function(a,b){w.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.Rm;if(""!==c)if(this.Ke(a)){var d=w.ub(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),vg(this,"nodeCategory",Df,c,a,d,b))}else w.Ma(a,c,b)}}; +w.defineProperty(F,{nA:"copiesArrayObjects"},function(){return this.dr},function(a){var b=this.dr;b!==a&&(null!==a&&w.j(a,"boolean",F,"copiesArrayObjects"),this.dr=a,this.h("copiesArrayObjects",b,a))});F.prototype.copyNodeData=function(a){if(null===a)return null;var b=null,b=this.so,b=null!==b?b(a,this):Cg(this,a,!0);w.Pa(b)&&w.oc(b);return b}; +function Cg(a,b,c){if(a.oA&&Array.isArray(b)){var d=[];for(c=0;cb&&(b=w.Za(a));w.qh(a,b,c);ug(this,"",Ef,"",a,null,c,null,b)};F.prototype.removeArrayItem=F.prototype.$F=function(a,b){void 0===b&&(b=-1);a===this.He&&w.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.Za(a)-1);var c=w.Ba(a,b);w.Jg(a,b);ug(this,"",Ff,"",a,c,null,b,null)}; +w.defineProperty(F,{Tn:"nodeCategoryProperty"},function(){return this.Rm},function(a){var b=this.Rm;b!==a&&(vg(a,F,"nodeCategoryProperty"),this.Rm=a,this.h("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.CA=function(a){if(null===a)return"";var b=this.Rm;if(""===b)return"";b=w.ub(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; +F.prototype.setCategoryForNodeData=F.prototype.sy=function(a,b){w.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.Rm;if(""!==c)if(this.Ke(a)){var d=w.ub(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),ug(this,"nodeCategory",Cf,c,a,d,b))}else w.Ma(a,c,b)}}; function Q(a,b){F.call(this);2w.Ml(d,a.newValue)&&w.qh(d,c,a.newValue));return}}else if(a.Dc=== -Qf){c=a.Dj;if("linkDataArray"===a.uf){d=a.oldValue;w.Pa(d)&&"number"===typeof c&&(e=this.ef(d),b?(this.Si.add(d),w.Ba(this.mf,c)!==d&&w.qh(this.mf,c,d),void 0!==e&&this.gd.add(e,d)):(this.Si.remove(d),w.Ba(this.mf,c)===d&&w.Jg(this.mf,c),void 0!==e&&this.gd.remove(e)));return}if("linkLabelKeys"===a.uf){d=this.Jk(a.object);w.isArray(d)&&"number"===typeof c&&(b?0>w.Ml(d,a.newValue)&&w.qh(d,c,a.newValue):(c=w.Ml(d,a.newValue),0<=c&&w.Jg(d,c)));return}}F.prototype.nn.call(this,a,b)}; +g.nn=function(a,b){if(a.Dc===Ef){var c=a.Cj;if("linkDataArray"===a.uf){var d=a.newValue;if(w.Pa(d)&&"number"===typeof c){var e=this.ef(d);b?(this.Si.remove(d),w.Ba(this.mf,c)===d&&w.Jg(this.mf,c),void 0!==e&&this.gd.remove(e)):(this.Si.add(d),w.Ba(this.mf,c)!==d&&w.qh(this.mf,c,d),void 0!==e&&this.gd.add(e,d))}return}if("linkLabelKeys"===a.uf){d=this.Jk(a.object);w.isArray(d)&&"number"===typeof c&&(b?(c=w.Ml(d,a.newValue),0<=c&&w.Jg(d,c)):0>w.Ml(d,a.newValue)&&w.qh(d,c,a.newValue));return}}else if(a.Dc=== +Ff){c=a.Dj;if("linkDataArray"===a.uf){d=a.oldValue;w.Pa(d)&&"number"===typeof c&&(e=this.ef(d),b?(this.Si.add(d),w.Ba(this.mf,c)!==d&&w.qh(this.mf,c,d),void 0!==e&&this.gd.add(e,d)):(this.Si.remove(d),w.Ba(this.mf,c)===d&&w.Jg(this.mf,c),void 0!==e&&this.gd.remove(e)));return}if("linkLabelKeys"===a.uf){d=this.Jk(a.object);w.isArray(d)&&"number"===typeof c&&(b?0>w.Ml(d,a.newValue)&&w.qh(d,c,a.newValue):(c=w.Ml(d,a.newValue),0<=c&&w.Jg(d,c)));return}}F.prototype.nn.call(this,a,b)}; w.defineProperty(Q,{eA:"archetypeNodeData"},function(){return this.vm},function(a){var b=this.vm;b!==a&&(null!==a&&w.G(a,Object,Q,"archetypeNodeData"),this.vm=a,this.h("archetypeNodeData",b,a))});Q.prototype.Ln=function(a){if(void 0!==a){var b=this.vm;if(null!==b){var c=this.we(a);null===c&&(c=this.copyNodeData(b),w.Ma(c,this.lk,a),this.Jl(c))}return a}}; -w.defineProperty(Q,{Jn:"linkFromKeyProperty"},function(){return this.Vh},function(a){var b=this.Vh;b!==a&&(wg(a,Q,"linkFromKeyProperty"),this.Vh=a,this.h("linkFromKeyProperty",b,a))});Q.prototype.getFromKeyForLinkData=Q.prototype.Xl=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=w.ub(a,b),void 0!==b)){if(xg(b))return b;w.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; -Q.prototype.setFromKeyForLinkData=Q.prototype.wB=function(a,b){null===b&&(b=void 0);void 0===b||xg(b)||w.Fd(b,"number or string",Q,"setFromKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(b=this.Ln(b),this.th(a)){var d=w.ub(a,c);d!==b&&(Cg(this,d,a),w.Ma(a,c,b),null===this.we(b)&&Bg(this,b,a),vg(this,"linkFromKey",Df,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(Q,{Kn:"linkToKeyProperty"},function(){return this.Wh},function(a){var b=this.Wh;b!==a&&(wg(a,Q,"linkToKeyProperty"),this.Wh=a,this.h("linkToKeyProperty",b,a))});Q.prototype.getToKeyForLinkData=Q.prototype.Yl=function(a){if(null!==a){var b=this.Wh;if(""!==b&&(b=w.ub(a,b),void 0!==b)){if(xg(b))return b;w.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; -Q.prototype.setToKeyForLinkData=Q.prototype.CB=function(a,b){null===b&&(b=void 0);void 0===b||xg(b)||w.Fd(b,"number or string",Q,"setToKeyForLinkData:key");if(null!==a){var c=this.Wh;if(""!==c)if(b=this.Ln(b),this.th(a)){var d=w.ub(a,c);d!==b&&(Cg(this,d,a),w.Ma(a,c,b),null===this.we(b)&&Bg(this,b,a),vg(this,"linkToKey",Df,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(Q,{zu:"linkFromPortIdProperty"},function(){return this.Mm},function(a){var b=this.Mm;b!==a&&(wg(a,Q,"linkFromPortIdProperty"),a!==this.Jn&&a!==this.Kn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Mm=a,this.h("linkFromPortIdProperty",b,a))});Q.prototype.getFromPortIdForLinkData=Q.prototype.bI=function(a){if(null===a)return"";var b=this.Mm;if(""===b)return"";a=w.ub(a,b);return void 0===a?"":a}; -Q.prototype.setFromPortIdForLinkData=Q.prototype.xB=function(a,b){w.j(b,"string",Q,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.Mm;if(""!==c)if(this.th(a)){var d=w.ub(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),vg(this,"linkFromPortId",Df,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(Q,{Bu:"linkToPortIdProperty"},function(){return this.Nm},function(a){var b=this.Nm;b!==a&&(wg(a,Q,"linkToPortIdProperty"),a!==this.Jn&&a!==this.Kn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Nm=a,this.h("linkToPortIdProperty",b,a))});Q.prototype.getToPortIdForLinkData=Q.prototype.fI=function(a){if(null===a)return"";var b=this.Nm;if(""===b)return"";a=w.ub(a,b);return void 0===a?"":a}; -Q.prototype.setToPortIdForLinkData=Q.prototype.DB=function(a,b){w.j(b,"string",Q,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Nm;if(""!==c)if(this.th(a)){var d=w.ub(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),vg(this,"linkToPortId",Df,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}};w.defineProperty(Q,{Au:"linkLabelKeysProperty"},function(){return this.zg},function(a){var b=this.zg;b!==a&&(wg(a,Q,"linkLabelKeysProperty"),this.zg=a,this.h("linkLabelKeysProperty",b,a))}); +w.defineProperty(Q,{Jn:"linkFromKeyProperty"},function(){return this.Vh},function(a){var b=this.Vh;b!==a&&(vg(a,Q,"linkFromKeyProperty"),this.Vh=a,this.h("linkFromKeyProperty",b,a))});Q.prototype.getFromKeyForLinkData=Q.prototype.Xl=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=w.ub(a,b),void 0!==b)){if(wg(b))return b;w.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; +Q.prototype.setFromKeyForLinkData=Q.prototype.wB=function(a,b){null===b&&(b=void 0);void 0===b||wg(b)||w.Fd(b,"number or string",Q,"setFromKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(b=this.Ln(b),this.th(a)){var d=w.ub(a,c);d!==b&&(Bg(this,d,a),w.Ma(a,c,b),null===this.we(b)&&Ag(this,b,a),ug(this,"linkFromKey",Cf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}}; +w.defineProperty(Q,{Kn:"linkToKeyProperty"},function(){return this.Wh},function(a){var b=this.Wh;b!==a&&(vg(a,Q,"linkToKeyProperty"),this.Wh=a,this.h("linkToKeyProperty",b,a))});Q.prototype.getToKeyForLinkData=Q.prototype.Yl=function(a){if(null!==a){var b=this.Wh;if(""!==b&&(b=w.ub(a,b),void 0!==b)){if(wg(b))return b;w.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; +Q.prototype.setToKeyForLinkData=Q.prototype.CB=function(a,b){null===b&&(b=void 0);void 0===b||wg(b)||w.Fd(b,"number or string",Q,"setToKeyForLinkData:key");if(null!==a){var c=this.Wh;if(""!==c)if(b=this.Ln(b),this.th(a)){var d=w.ub(a,c);d!==b&&(Bg(this,d,a),w.Ma(a,c,b),null===this.we(b)&&Ag(this,b,a),ug(this,"linkToKey",Cf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}}; +w.defineProperty(Q,{zu:"linkFromPortIdProperty"},function(){return this.Mm},function(a){var b=this.Mm;b!==a&&(vg(a,Q,"linkFromPortIdProperty"),a!==this.Jn&&a!==this.Kn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Mm=a,this.h("linkFromPortIdProperty",b,a))});Q.prototype.getFromPortIdForLinkData=Q.prototype.bI=function(a){if(null===a)return"";var b=this.Mm;if(""===b)return"";a=w.ub(a,b);return void 0===a?"":a}; +Q.prototype.setFromPortIdForLinkData=Q.prototype.xB=function(a,b){w.j(b,"string",Q,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.Mm;if(""!==c)if(this.th(a)){var d=w.ub(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),ug(this,"linkFromPortId",Cf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}}; +w.defineProperty(Q,{Bu:"linkToPortIdProperty"},function(){return this.Nm},function(a){var b=this.Nm;b!==a&&(vg(a,Q,"linkToPortIdProperty"),a!==this.Jn&&a!==this.Kn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Nm=a,this.h("linkToPortIdProperty",b,a))});Q.prototype.getToPortIdForLinkData=Q.prototype.fI=function(a){if(null===a)return"";var b=this.Nm;if(""===b)return"";a=w.ub(a,b);return void 0===a?"":a}; +Q.prototype.setToPortIdForLinkData=Q.prototype.DB=function(a,b){w.j(b,"string",Q,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Nm;if(""!==c)if(this.th(a)){var d=w.ub(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),ug(this,"linkToPortId",Cf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}};w.defineProperty(Q,{Au:"linkLabelKeysProperty"},function(){return this.zg},function(a){var b=this.zg;b!==a&&(vg(a,Q,"linkLabelKeysProperty"),this.zg=a,this.h("linkLabelKeysProperty",b,a))}); Q.prototype.getLabelKeysForLinkData=Q.prototype.Jk=function(a){if(null===a)return w.Tk;var b=this.zg;if(""===b)return w.Tk;a=w.ub(a,b);return void 0===a?w.Tk:a}; -Q.prototype.setLabelKeysForLinkData=Q.prototype.rG=function(a,b){w.gA(b,Q,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.zg;if(""!==c)if(this.th(a)){var d=w.ub(a,c);void 0===d&&(d=w.Tk);if(d!==b){for(var e=w.Za(d),f=0;fe||(w.Jg(d,e),this.th(a)&&(Cg(this,b,a),vg(this,"linkLabelKeys",Qf,c,a,b,null,e,null)))}else void 0!==d&&w.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +Q.prototype.setLabelKeysForLinkData=Q.prototype.rG=function(a,b){w.gA(b,Q,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.zg;if(""!==c)if(this.th(a)){var d=w.ub(a,c);void 0===d&&(d=w.Tk);if(d!==b){for(var e=w.Za(d),f=0;fe||(w.Jg(d,e),this.th(a)&&(Bg(this,b,a),ug(this,"linkLabelKeys",Ff,c,a,b,null,e,null)))}else void 0!==d&&w.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; w.defineProperty(Q,{Pg:"linkDataArray"},function(){return this.mf},function(a){var b=this.mf;if(b!==a){w.gA(a,Q,"linkDataArray");this.gd.clear();for(var c=w.Za(a),d=0;dd)return;w.Jg(a.mf,d)}vg(a,"linkDataArray",Qf,"linkDataArray",a,b,null,d,null);c=a.Xl(b);Cg(a,c,b);c=a.Yl(b);Cg(a,c,b);d=a.Jk(b);if(w.isArray(d))for(var e=w.Za(d),f=0;fd)return;w.Jg(a.mf,d)}ug(a,"linkDataArray",Ff,"linkDataArray",a,b,null,d,null);c=a.Xl(b);Bg(a,c,b);c=a.Yl(b);Bg(a,c,b);d=a.Jk(b);if(w.isArray(d))for(var e=w.Za(d),f=0;fa.ti&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.ti;d&&b&&a.jd("CommittingTransaction",c,a.pj);var e=0;if(0a.uj;e--)f=d.ea(e),null!==f&&f.clear(), +Q.prototype.setCategoryForLinkData=Q.prototype.pG=function(a,b){w.j(b,"string",Q,"setCategoryForLinkData:cat");if(null!==a){var c=this.Lm;if(""!==c)if(this.th(a)){var d=w.ub(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),ug(this,"linkCategory",Cf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.Ma(a,c,b)}}; +function Zf(a){1a.ti&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.ti;d&&b&&a.jd("CommittingTransaction",c,a.pj);var e=0;if(0a.uj;e--)f=d.ea(e),null!==f&&f.clear(), d.dd(e),a.yz=!0;e=a.NF;0===e&&(e=1);0=e&&(f=d.ea(0),null!==f&&f.clear(),d.dd(0),a.bh--);d.add(b);a.bh++;d.freeze();f=b}a.jd("CommittedTransaction",c,f)}else{a.fh=!0;try{a.isEnabled&&null!==f&&(f.ou=!0,f.undo())}finally{a.jd("RolledBackTransaction",c,f),a.fh=!1}null!==f&&f.clear()}a.Dv=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Wf;for(b=c.count-1;b>=a;b--)d=c.ea(b),null!==d&&d.undo(),c.Qa(),c.dd(b);c.freeze()}return!1} -Sf.prototype.canUndo=Sf.prototype.canUndo=function(){if(!this.isEnabled||0=this.ti&&!this.nz&&(a=a.g,null!==a&&!1===a.Gn||w.trace("Change not within a transaction: "+c.toString()))}}; -Sf.prototype.skipsEvent=function(a){if(null===a||0>a.Dc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Pc)return!0}else if(a instanceof qg&&a.Pc)return!0;return!1};w.u(Sf,{$I:"models"},function(){return this.Dz.i});w.defineProperty(Sf,{isEnabled:"isEnabled"},function(){return this.lf},function(a){this.lf=a});w.u(Sf,{EG:"transactionToUndo"},function(){return 0<=this.uj&&this.uj<=this.history.count-1?this.history.ea(this.uj):null}); -w.u(Sf,{DG:"transactionToRedo"},function(){return this.uj=this.ti&&!this.nz&&(a=a.g,null!==a&&!1===a.Gn||w.trace("Change not within a transaction: "+c.toString()))}}; +Rf.prototype.skipsEvent=function(a){if(null===a||0>a.Dc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Pc)return!0}else if(a instanceof pg&&a.Pc)return!0;return!1};w.u(Rf,{$I:"models"},function(){return this.Dz.i});w.defineProperty(Rf,{isEnabled:"isEnabled"},function(){return this.lf},function(a){this.lf=a});w.u(Rf,{EG:"transactionToUndo"},function(){return 0<=this.uj&&this.uj<=this.history.count-1?this.history.ea(this.uj):null}); +w.u(Rf,{DG:"transactionToRedo"},function(){return this.ujb.zh||(b.scale=a))};sg.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Cy);w.Ad(a,sg,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Nl!==ph)return!1;a*=b.scale;return ab.zh?!1:b.ix}; -sg.prototype.increaseZoom=function(a){void 0===a&&(a=this.Cy);w.Ad(a,sg,"increaseZoom:factor");var b=this.g;null!==b&&b.Nl===ph&&(a*=b.scale,ab.zh||(b.scale=a))};sg.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Cy);w.Ad(a,sg,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Nl!==ph)return!1;a*=b.scale;return ab.zh?!1:b.ix};sg.prototype.resetZoom=function(a){void 0===a&&(a=this.qx);w.Ad(a,sg,"resetZoom:newscale");var b=this.g;null===b||ab.zh||(b.scale=a)}; -sg.prototype.canResetZoom=function(a){void 0===a&&(a=this.qx);w.Ad(a,sg,"canResetZoom:newscale");var b=this.g;return null===b||ab.zh?!1:b.ix};sg.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.bA&&!isNaN(this.zz)&&a.te.L(this.aA)?(a.scale=this.zz,a.position=this.oD,this.bA=NaN,this.aA=ed):(this.zz=b,this.oD=c.copy(),a.zoomToFit(),this.bA=a.scale,this.aA=a.te.copy())}};sg.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.ix}; -sg.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w.G(a,R,sg,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.ej&&(this.ej.next()?a=this.ej.value:this.ej=null)}catch(c){this.ej=null}null===a&&(0b.zh||(b.scale=a))};rg.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Cy);w.Ad(a,rg,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Nl!==oh)return!1;a*=b.scale;return ab.zh?!1:b.ix}; +rg.prototype.increaseZoom=function(a){void 0===a&&(a=this.Cy);w.Ad(a,rg,"increaseZoom:factor");var b=this.g;null!==b&&b.Nl===oh&&(a*=b.scale,ab.zh||(b.scale=a))};rg.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Cy);w.Ad(a,rg,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Nl!==oh)return!1;a*=b.scale;return ab.zh?!1:b.ix};rg.prototype.resetZoom=function(a){void 0===a&&(a=this.qx);w.Ad(a,rg,"resetZoom:newscale");var b=this.g;null===b||ab.zh||(b.scale=a)}; +rg.prototype.canResetZoom=function(a){void 0===a&&(a=this.qx);w.Ad(a,rg,"canResetZoom:newscale");var b=this.g;return null===b||ab.zh?!1:b.ix};rg.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.bA&&!isNaN(this.zz)&&a.te.L(this.aA)?(a.scale=this.zz,a.position=this.oD,this.bA=NaN,this.aA=dd):(this.zz=b,this.oD=c.copy(),a.zoomToFit(),this.bA=a.scale,this.aA=a.te.copy())}};rg.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.ix}; +rg.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w.G(a,R,rg,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.ej&&(this.ej.next()?a=this.ej.value:this.ej=null)}catch(c){this.ej=null}null===a&&(0h&&(h=-3),0k&&(k=-3); +qg.prototype.standardMouseOver=function(){var a=this.g;if(null!==a){var b=a.R;if(null!==b.g&&!0!==a.Ka.rc){var c=a.cb;a.cb=!0;var d=a.eh?a.Ne(b.da,null,null):null;b.Be=d;var e=!1;if(d!==a.to){var f=a.to,h=f;a.to=d;this.doCurrentObjectChanged(f,d);for(b.tc=!1;null!==f;){var k=f.Fu;if(null!==k){if(d===f)break;if(null!==d&&d.bm(f))break;k(b,f,d);e=!0;if(b.tc)break}f=f.Q}f=h;for(b.tc=!1;null!==d;){k=d.Eu;if(null!==k){if(f===d)break;if(null!==f&&f.bm(d))break;k(b,d,f);e=!0;if(b.tc)break}d=d.Q}d=a.to}if(null!== +d){f=d;for(h="";null!==f;){h=f.cursor;if(""!==h)break;f=f.Q}a.jc=h;b.tc=!1;for(f=d;null!==f;){d=f.dB;if(null!==d&&(d(b,f),e=!0,b.tc))break;f=f.Q}}else a.jc="",d=a.dB,null!==d&&(d(b),e=!0);e&&a.ye();a.cb=c}}};qg.prototype.doCurrentObjectChanged=function(){}; +qg.prototype.standardMouseWheel=function(){var a=this.g;if(null!==a){var b=a.R,c=b.Dk;if(0!==c&&a.te.I()){var d=a.pb,e=a.fb.Gu;if((e===Oh&&!b.shift||e===Ph&&b.control)&&(0h&&(h=-3),0k&&(k=-3); if(void 0===f||void 0===h||void 0===k||0===h&&0===k||b.shift)!b.shift&&a.qe?(f=a.Uu,e=3*e*f,0e||Math.abs(b.y-a.y)>d};w.u(rg,{g:"diagram"},function(){return this.aa}); -w.defineProperty(rg,{name:"name"},function(){return this.Sb},function(a){w.j(a,"string",rg,"name");this.Sb=a});w.defineProperty(rg,{isEnabled:"isEnabled"},function(){return this.lf},function(a){w.j(a,"boolean",rg,"isEnabled");this.lf=a});w.defineProperty(rg,{sa:"isActive"},function(){return this.bD},function(a){w.j(a,"boolean",rg,"isActive");this.bD=a});w.defineProperty(rg,{Lf:"transactionResult"},function(){return this.jE},function(a){null!==a&&w.j(a,"string",rg,"transactionResult");this.jE=a}); -function oh(){rg.call(this);0e&&(e=k),l>f&&(f=l))}}Infinity===c?b.m(0,0,0,0):b.m(c,d,e-c,f-d)} -function Ei(a,b){if(null===a.ec){var c=a.g;if(!(null===c||b&&(c.hb||c.Df))&&null!==a.$b){var d=c.ja;d.isEnabled&&d.CF?null!==d.pj&&0c.qa)){var d=a.g;if(null!==d&&!d.hb){var e=a.cj;if(null!==e){var f=null,h=null;null===c.W&&(f=Oi(a,c.l(0),!1),null!==f&&(h=f.U));var k=null,l=null;null===c.Z&&(k=Oi(a,c.l(c.qa-1),!0),null!==k&&(l=k.U));e.isValidLink(h,f,l,k)?b?(c.Np=c.l(0),c.Op=c.l(c.qa-1),c.si=!1,c.W=h,null!==f&&(c.Ng=f.Vd),c.Z=l,null!==k&&(c.Hh=k.Vd),c.lc!==a.rw&&d.Aa("LinkRelinked",c,a.rw),c.Ic!==a.sw&&d.Aa("LinkRelinked",c,a.sw)):Pi(e,h,f,l,k):Pi(e,null,null,null,null)}}}} -oh.prototype.doDragOver=function(){}; -function Qi(a,b){var c=a.g;if(null!==c){a.rj&&Li(a,!0);$h(a);var d=Mi(c,b,null,function(b){return!Ji(a,b)}),e=c.R;e.Be=d;if(null!==d){e.tc=!1;for(var f=d;null!==f;){var h=f.aB;if(null!==h&&(h(e,f),e.tc))break;f=Ni(f)}}else f=c.aB,null!==f&&f(e);if(a.sa||null!==Th){for(e=(a.ec||a.$b).i;e.next();)f=e.key,f instanceof T&&f.he.each(function(a){a.si=!1});a.doDropOnto(b,d);if(a.sa||null!==Th){d=w.Kf();for(e=c.selection.i;e.next();)f=e.value,f instanceof T&&Ri(c,f.getAvoidableRect(d));w.Eb(d)}}}} -function Ri(a,b){var c=!1;a.rb.Bk(b)&&(c=!0);c=a.xA(b,function(a){return a.U},function(a){return a instanceof W},!0,function(a){return a instanceof W},c);if(0!==c.count)for(c=c.i;c.next();){var d=c.value;d.$l&&d.Wb()}}oh.prototype.doDropOnto=function(){}; -oh.prototype.doMouseMove=function(){if(this.sa){var a=this.g;null!==a&&null!==this.un&&null!==this.$b&&(this.mayCopy()?(a.jc="copy",Ei(this,!1),Sh(this,this.ec),Fi(this,this.ec,!1),ai(this,this.ec)):this.mayMove()?(di(this),Fi(this,this.$b,!0)):this.mayDragOut()?(a.jc="no-drop",Ei(this,!1),Fi(this,this.ec,!1)):di(this),Ki(this,a.R.da))}}; -oh.prototype.doMouseUp=function(){if(this.sa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.ec?(di(this),Ei(this,!0),Sh(this,this.ec),Fi(this,this.ec,!1),ai(this,this.ec),null!==this.ec&&a.nG(this.ec.Jj())):(b=!0,di(this),this.mayMove()&&(Fi(this,this.$b,!0),Ki(this,a.R.da)));this.yr=!0;Qi(this,a.R.da);if(this.sa){this.ec=null;if(b&&null!==this.$b)for(b=this.$b.i;b.next();){var d=b.key;d instanceof T&&(d=d.Da,null===d||null===d.placeholder||this.$b.contains(d)||d.placeholder.H())}a.Fc(); -ai(this,this.$b);this.Lf=c?"Copy":"Move";a.Aa(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};oh.prototype.mayCopy=function(){if(!this.zF)return!1;var a=this.g;if(null===a||a.hb||a.Df||!a.Dp||!a.yk||(w.yh?!a.R.alt:!a.R.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.fe()&&b.canCopy())return!0}return null!==this.ld&&this.rj&&this.ld.canCopy()?!0:!1}; -oh.prototype.mayDragOut=function(){if(!this.zF)return!1;var a=this.g;if(null===a||!a.Kt||!a.yk||a.Ll)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.fe()&&b.canCopy())return!0}return null!==this.ld&&this.rj&&this.ld.canCopy()?!0:!1};oh.prototype.mayMove=function(){var a=this.g;if(null===a||a.hb||!a.Ll)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.fe()&&b.canMove())return!0}return null!==this.ld&&this.rj&&this.ld.canMove()?!0:!1};var bi=new H(oh),Th=null,Uh=null; -oh.prototype.getDraggingSource=function(){return Th};oh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.xE||a.hb||a.Df||!a.Dp)return!1;var b=Th;return null===b||null===b.g||b.g.$.Sl!==a.$.Sl?!1:!0};oh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Ka.Gh();Si(a);a.Ka.Gh();a=Th;null!==a&&null!==a.g&&(a.g.jc="copy")}};oh.prototype.doSimulatedDragLeave=function(){var a=Th;null!==a&&a.doSimulatedDragOut();this.doCancel()}; -oh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Th;null!==b&&null!==b.$b&&this.mayDragIn()&&(a.jc="copy",Ti(this,b.$b.Jj(),!1),Fi(this,this.ec,!1),Ki(this,a.R.da))}}; -oh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Th;if(null!==b){var c=b.g;b.yr=!0;di(this);this.mayDragIn()&&(this.Hb("Drop"),Ti(this,b.$b.Jj(),!0),Fi(this,this.ec,!1),null!==this.ec&&a.nG(this.ec.Jj()),Qi(this,a.R.da),a.Fc(),b=a.selection,null!==this.ec?this.Lf="ExternalCopy":b=new I(R),this.ec=null,a.doFocus(),a.Aa("ExternalObjectsDropped",b,c),this.Sk())}}}; -function Ti(a,b,c){if(null===a.ec){var d=a.g;if(null!==d&&!d.hb&&!d.Df){d.cb=!c;d.Mq=!c;a.Rk=d.R.da;c=d.Mp(b,d,!0);var e=w.Kf();Di(b,e);var d=e.x+e.width/2,f=e.y+e.height/2;w.Eb(e);var e=a.Mw,h=new ma(R),k=w.K();for(b=b.i;b.next();){var l=b.value,m=c.ka(l);l.fe()&&l.canCopy()?(l=l.location,k.m(e.x-(d-l.x),e.y-(f-l.y)),m.location=k,m.cf(),h.add(m,Xh(a,k))):l instanceof W&&l.canCopy()&&(m.Ok(e.x-d,e.y-f),h.add(m,Xh(a)))}w.v(k);a.ec=h;Rh(a,h.Jj());null!==a.ld&&(c=a.ld,d=c.Wn,c.Ok(a.Rk.x-(d.x+d.width/ -2),a.Rk.y-(d.y+d.height/2)))}}}oh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.jc="":a.jc="no-drop")};function Yh(a){this.point=a;this.sG=dd}w.ga("DraggingInfo",Yh);function Gi(a,b,c){this.Qc=a;this.info=b;this.iI=c} -function Ui(){0=d&&(d=.1);for(var e=this,f=b.wn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var h=f.value,k=h.U;if(k instanceof T){var l=h.Wa(Jb,w.K()),m=c.x-l.x,n=c.y-l.y;w.v(l);l=m*m+n*n;lc){if(null!==this.mc&&a===this.Qg&&b===this.Rg)return!0;var d=b.Vd;null===d&&(d="");if(a.zx(d).count>=c)return!1}return!0}; -Ui.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.eq;if(null!==this.g&&this.g.$a===this&&(null!==a.layer&&!a.layer.Lt||!0!==b.AG))return!1;var c=b.VJ;if(Infinity>c){if(null!==this.mc&&a===this.Sg&&b===this.Tg)return!0;var d=b.Vd;null===d&&(d="");if(a.Mg(d).count>=c)return!1}return!0};Ui.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.U,d=b.U;return null!==c&&c===d}; -Ui.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.U;if(!(c instanceof T))return!1;var d=a.Vd;null===d&&(d="");var e=b.U;if(!(e instanceof T))return!1;var f=b.Vd;null===f&&(f="");for(e=e.Mg(f);e.next();)if(f=e.value,f.W===c&&f.Ng===d)return!0;return!1}; -Ui.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.ZH&&d.UJ||!this.isInSameNode(b,d))&&(b.YH&&d.TJ||!this.isLinked(b,d)))||null!==this.mc&&(null!==a&&this.isLabelDependentOnLink(a,this.mc)||null!==c&&this.isLabelDependentOnLink(c,this.mc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.mc))return!1;if(null!==a){var e=a.Sx;if(null!==e&&!e(a,b,c,d,this.mc))return!1}if(null!== -c&&(e=c.Sx,null!==e&&!e(a,b,c,d,this.mc)))return!1;e=this.Sx;return null!==e?e(a,b,c,d,this.mc):!0};Ui.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Xb;if(null===c)return!1;if(c===b)return!0;var d=new I(T);d.add(a);return Vi(this,c,b,d)};function Vi(a,b,c,d){if(b===c)return!0;var e=b.W;if(null!==e&&e.Cf&&(d.add(e),Vi(a,e.Xb,c,d)))return!0;b=b.Z;return null!==b&&b.Cf&&(d.add(b),Vi(a,b.Xb,c,d))?!0:!1} -Ui.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.eq;var d=null!==this.g?this.g.aK:Wi;if(d!==Wi){if(d===Xi){d=c||this.wf;if(null!==d&&!d.bc)return!0;for(d=b.he;d.next();){var e=d.value;if(e!==c&&e.bc&&e.Z===b)return!1}return!Yi(this,a,b,c,!0)}if(d===Zi){d=c||this.wf;if(null!==d&&!d.bc)return!0;for(d=a.he;d.next();)if(e=d.value,e!==c&&e.bc&&e.W===a)return!1;return!Yi(this,a,b,c,!0)}if(d===$i)return a===b?a=!0:(d=new I(T),d.add(b),a=aj(this,d,a,b,c)),!a; -if(d===bj)return!Yi(this,a,b,c,!1);if(d===cj)return a===b?a=!0:(d=new I(T),d.add(b),a=dj(this,d,a,b,c)),!a}return!0};function Yi(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.he;f.next();){var h=f.value;if(h!==d&&(!e||h.bc)&&h.Z===b&&(h=h.W,h!==b&&Yi(a,h,c,d,e)))return!0}return!1} -function aj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.he;f.next();){var h=f.value;if(h!==e&&h.Z===c&&(h=h.W,h!==c&&aj(a,b,h,d,e)))return!0}return!1}function dj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.he;f.next();){var h=f.value;if(h!==e){var k=h.W,h=h.Z,k=k===c?h:k;if(k!==c&&dj(a,b,k,d,e))return!0}}return!1} -w.defineProperty(Ui,{Sx:"linkValidation"},function(){return this.vl},function(a){null!==a&&w.j(a,"function",Ui,"linkValidation");this.vl=a});w.defineProperty(Ui,{ey:"portTargeted"},function(){return this.LD},function(a){null!==a&&w.j(a,"function",Ui,"portTargeted");this.LD=a});function ej(){0b.Zt+1&&ce||Math.abs(b.y-a.y)>d};w.u(qg,{g:"diagram"},function(){return this.aa}); +w.defineProperty(qg,{name:"name"},function(){return this.Sb},function(a){w.j(a,"string",qg,"name");this.Sb=a});w.defineProperty(qg,{isEnabled:"isEnabled"},function(){return this.lf},function(a){w.j(a,"boolean",qg,"isEnabled");this.lf=a});w.defineProperty(qg,{sa:"isActive"},function(){return this.bD},function(a){w.j(a,"boolean",qg,"isActive");this.bD=a});w.defineProperty(qg,{Lf:"transactionResult"},function(){return this.jE},function(a){null!==a&&w.j(a,"string",qg,"transactionResult");this.jE=a}); +function nh(){qg.call(this);0e&&(e=k),l>f&&(f=l))}}Infinity===c?b.m(0,0,0,0):b.m(c,d,e-c,f-d)} +function Di(a,b){if(null===a.ec){var c=a.g;if(!(null===c||b&&(c.hb||c.Df))&&null!==a.$b){var d=c.ja;d.isEnabled&&d.CF?null!==d.pj&&0c.qa)){var d=a.g;if(null!==d&&!d.hb){var e=a.cj;if(null!==e){var f=null,h=null;null===c.W&&(f=Ni(a,c.l(0),!1),null!==f&&(h=f.U));var k=null,l=null;null===c.Z&&(k=Ni(a,c.l(c.qa-1),!0),null!==k&&(l=k.U));e.isValidLink(h,f,l,k)?b?(c.Np=c.l(0),c.Op=c.l(c.qa-1),c.si=!1,c.W=h,null!==f&&(c.Ng=f.Vd),c.Z=l,null!==k&&(c.Hh=k.Vd),c.lc!==a.rw&&d.Aa("LinkRelinked",c,a.rw),c.Ic!==a.sw&&d.Aa("LinkRelinked",c,a.sw)):Oi(e,h,f,l,k):Oi(e,null,null,null,null)}}}} +nh.prototype.doDragOver=function(){}; +function Pi(a,b){var c=a.g;if(null!==c){a.rj&&Ki(a,!0);Zh(a);var d=Li(c,b,null,function(b){return!Ii(a,b)}),e=c.R;e.Be=d;if(null!==d){e.tc=!1;for(var f=d;null!==f;){var h=f.aB;if(null!==h&&(h(e,f),e.tc))break;f=Mi(f)}}else f=c.aB,null!==f&&f(e);if(a.sa||null!==Sh){for(e=(a.ec||a.$b).i;e.next();)f=e.key,f instanceof T&&f.he.each(function(a){a.si=!1});a.doDropOnto(b,d);if(a.sa||null!==Sh){d=w.Kf();for(e=c.selection.i;e.next();)f=e.value,f instanceof T&&Qi(c,f.getAvoidableRect(d));w.Eb(d)}}}} +function Qi(a,b){var c=!1;a.rb.Bk(b)&&(c=!0);c=a.xA(b,function(a){return a.U},function(a){return a instanceof W},!0,function(a){return a instanceof W},c);if(0!==c.count)for(c=c.i;c.next();){var d=c.value;d.$l&&d.Wb()}}nh.prototype.doDropOnto=function(){}; +nh.prototype.doMouseMove=function(){if(this.sa){var a=this.g;null!==a&&null!==this.un&&null!==this.$b&&(this.mayCopy()?(a.jc="copy",Di(this,!1),Rh(this,this.ec),Ei(this,this.ec,!1),$h(this,this.ec)):this.mayMove()?(ci(this),Ei(this,this.$b,!0)):this.mayDragOut()?(a.jc="no-drop",Di(this,!1),Ei(this,this.ec,!1)):ci(this),Ji(this,a.R.da))}}; +nh.prototype.doMouseUp=function(){if(this.sa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.ec?(ci(this),Di(this,!0),Rh(this,this.ec),Ei(this,this.ec,!1),$h(this,this.ec),null!==this.ec&&a.nG(this.ec.Jj())):(b=!0,ci(this),this.mayMove()&&(Ei(this,this.$b,!0),Ji(this,a.R.da)));this.yr=!0;Pi(this,a.R.da);if(this.sa){this.ec=null;if(b&&null!==this.$b)for(b=this.$b.i;b.next();){var d=b.key;d instanceof T&&(d=d.Da,null===d||null===d.placeholder||this.$b.contains(d)||d.placeholder.H())}a.Fc(); +$h(this,this.$b);this.Lf=c?"Copy":"Move";a.Aa(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};nh.prototype.mayCopy=function(){if(!this.zF)return!1;var a=this.g;if(null===a||a.hb||a.Df||!a.Dp||!a.yk||(w.yh?!a.R.alt:!a.R.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.fe()&&b.canCopy())return!0}return null!==this.ld&&this.rj&&this.ld.canCopy()?!0:!1}; +nh.prototype.mayDragOut=function(){if(!this.zF)return!1;var a=this.g;if(null===a||!a.Kt||!a.yk||a.Ll)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.fe()&&b.canCopy())return!0}return null!==this.ld&&this.rj&&this.ld.canCopy()?!0:!1};nh.prototype.mayMove=function(){var a=this.g;if(null===a||a.hb||!a.Ll)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.fe()&&b.canMove())return!0}return null!==this.ld&&this.rj&&this.ld.canMove()?!0:!1};var ai=new H(nh),Sh=null,Th=null; +nh.prototype.getDraggingSource=function(){return Sh};nh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.xE||a.hb||a.Df||!a.Dp)return!1;var b=Sh;return null===b||null===b.g||b.g.$.Sl!==a.$.Sl?!1:!0};nh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Ka.Gh();Ri(a);a.Ka.Gh();a=Sh;null!==a&&null!==a.g&&(a.g.jc="copy")}};nh.prototype.doSimulatedDragLeave=function(){var a=Sh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +nh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Sh;null!==b&&null!==b.$b&&this.mayDragIn()&&(a.jc="copy",Si(this,b.$b.Jj(),!1),Ei(this,this.ec,!1),Ji(this,a.R.da))}}; +nh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Sh;if(null!==b){var c=b.g;b.yr=!0;ci(this);this.mayDragIn()&&(this.Hb("Drop"),Si(this,b.$b.Jj(),!0),Ei(this,this.ec,!1),null!==this.ec&&a.nG(this.ec.Jj()),Pi(this,a.R.da),a.Fc(),b=a.selection,null!==this.ec?this.Lf="ExternalCopy":b=new I(R),this.ec=null,a.doFocus(),a.Aa("ExternalObjectsDropped",b,c),this.Sk())}}}; +function Si(a,b,c){if(null===a.ec){var d=a.g;if(null!==d&&!d.hb&&!d.Df){d.cb=!c;d.Mq=!c;a.Rk=d.R.da;c=d.Mp(b,d,!0);var e=w.Kf();Ci(b,e);var d=e.x+e.width/2,f=e.y+e.height/2;w.Eb(e);var e=a.Mw,h=new ma(R),k=w.K();for(b=b.i;b.next();){var l=b.value,m=c.ka(l);l.fe()&&l.canCopy()?(l=l.location,k.m(e.x-(d-l.x),e.y-(f-l.y)),m.location=k,m.cf(),h.add(m,Wh(a,k))):l instanceof W&&l.canCopy()&&(m.Ok(e.x-d,e.y-f),h.add(m,Wh(a)))}w.v(k);a.ec=h;Qh(a,h.Jj());null!==a.ld&&(c=a.ld,d=c.Wn,c.Ok(a.Rk.x-(d.x+d.width/ +2),a.Rk.y-(d.y+d.height/2)))}}}nh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.jc="":a.jc="no-drop")};function Xh(a){this.point=a;this.sG=cd}w.ga("DraggingInfo",Xh);function Fi(a,b,c){this.Qc=a;this.info=b;this.iI=c} +function Ti(){0=d&&(d=.1);for(var e=this,f=b.wn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var h=f.value,k=h.U;if(k instanceof T){var l=h.Wa(Jb,w.K()),m=c.x-l.x,n=c.y-l.y;w.v(l);l=m*m+n*n;lc){if(null!==this.mc&&a===this.Qg&&b===this.Rg)return!0;var d=b.Vd;null===d&&(d="");if(a.zx(d).count>=c)return!1}return!0}; +Ti.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.eq;if(null!==this.g&&this.g.$a===this&&(null!==a.layer&&!a.layer.Lt||!0!==b.AG))return!1;var c=b.VJ;if(Infinity>c){if(null!==this.mc&&a===this.Sg&&b===this.Tg)return!0;var d=b.Vd;null===d&&(d="");if(a.Mg(d).count>=c)return!1}return!0};Ti.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.U,d=b.U;return null!==c&&c===d}; +Ti.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.U;if(!(c instanceof T))return!1;var d=a.Vd;null===d&&(d="");var e=b.U;if(!(e instanceof T))return!1;var f=b.Vd;null===f&&(f="");for(e=e.Mg(f);e.next();)if(f=e.value,f.W===c&&f.Ng===d)return!0;return!1}; +Ti.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.ZH&&d.UJ||!this.isInSameNode(b,d))&&(b.YH&&d.TJ||!this.isLinked(b,d)))||null!==this.mc&&(null!==a&&this.isLabelDependentOnLink(a,this.mc)||null!==c&&this.isLabelDependentOnLink(c,this.mc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.mc))return!1;if(null!==a){var e=a.Sx;if(null!==e&&!e(a,b,c,d,this.mc))return!1}if(null!== +c&&(e=c.Sx,null!==e&&!e(a,b,c,d,this.mc)))return!1;e=this.Sx;return null!==e?e(a,b,c,d,this.mc):!0};Ti.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Xb;if(null===c)return!1;if(c===b)return!0;var d=new I(T);d.add(a);return Ui(this,c,b,d)};function Ui(a,b,c,d){if(b===c)return!0;var e=b.W;if(null!==e&&e.Cf&&(d.add(e),Ui(a,e.Xb,c,d)))return!0;b=b.Z;return null!==b&&b.Cf&&(d.add(b),Ui(a,b.Xb,c,d))?!0:!1} +Ti.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.eq;var d=null!==this.g?this.g.aK:Vi;if(d!==Vi){if(d===Wi){d=c||this.wf;if(null!==d&&!d.bc)return!0;for(d=b.he;d.next();){var e=d.value;if(e!==c&&e.bc&&e.Z===b)return!1}return!Xi(this,a,b,c,!0)}if(d===Yi){d=c||this.wf;if(null!==d&&!d.bc)return!0;for(d=a.he;d.next();)if(e=d.value,e!==c&&e.bc&&e.W===a)return!1;return!Xi(this,a,b,c,!0)}if(d===Zi)return a===b?a=!0:(d=new I(T),d.add(b),a=$i(this,d,a,b,c)),!a; +if(d===aj)return!Xi(this,a,b,c,!1);if(d===bj)return a===b?a=!0:(d=new I(T),d.add(b),a=cj(this,d,a,b,c)),!a}return!0};function Xi(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.he;f.next();){var h=f.value;if(h!==d&&(!e||h.bc)&&h.Z===b&&(h=h.W,h!==b&&Xi(a,h,c,d,e)))return!0}return!1} +function $i(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.he;f.next();){var h=f.value;if(h!==e&&h.Z===c&&(h=h.W,h!==c&&$i(a,b,h,d,e)))return!0}return!1}function cj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.he;f.next();){var h=f.value;if(h!==e){var k=h.W,h=h.Z,k=k===c?h:k;if(k!==c&&cj(a,b,k,d,e))return!0}}return!1} +w.defineProperty(Ti,{Sx:"linkValidation"},function(){return this.vl},function(a){null!==a&&w.j(a,"function",Ti,"linkValidation");this.vl=a});w.defineProperty(Ti,{ey:"portTargeted"},function(){return this.LD},function(a){null!==a&&w.j(a,"function",Ti,"portTargeted");this.LD=a});function dj(){0b.Zt+1&&c=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? -"ne-resize":"e-resize"}else if(a instanceof C)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};w.defineProperty(Nj,{ju:"handleArchetype"},function(){return this.ll},function(a){null!==a&&w.G(a,G,Nj,"handleArchetype");this.ll=a});w.u(Nj,{handle:"handle"},function(){return this.gc});w.defineProperty(Nj,{tb:"adornedObject"},function(){return this.Jc},function(a){null!==a&&w.G(a,G,Nj,"adornedObject");this.Jc=a}); -Nj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.hb&&a.Mt&&a.R.left?null!==this.findToolHandleAt(a.Ec.da,this.name):!1}; -Nj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.gc=this.findToolHandleAt(a.Ec.da,this.name),null!==this.gc&&(this.Jc=this.gc.U.tb,this.cp.set(this.tb.Wa(this.handle.alignment.VF())),this.GD.set(this.Jc.U.location),this.BD.set(this.Jc.Ca),this.jz=this.computeCellSize(),this.lz=this.computeMinSize(),this.kz=this.computeMaxSize(),a.gf=!0,this.yD=a.Ka.isEnabled,a.Ka.isEnabled=!1,this.Hb(this.name),this.sa=!0))}; -Nj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.Sk(),this.Jc=this.gc=null,this.sa=a.gf=!1,a.Ka.isEnabled=this.yD)};Nj.prototype.doCancel=function(){null!==this.tb&&(this.tb.Ca=this.WF,this.tb.U.location=this.iJ);this.stopTool()};Nj.prototype.doMouseMove=function(){var a=this.g;if(this.sa&&null!==a){var b=this.lz,c=this.kz,d=this.jz,e=this.tb.iF(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.cg();w.v(e)}}; -Nj.prototype.doMouseUp=function(){var a=this.g;if(this.sa&&null!==a){var b=this.lz,c=this.kz,d=this.jz,e=this.tb.iF(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);w.v(e);a.Fc();this.Lf=this.name;a.Aa("PartResized",this.tb,this.WF)}this.stopTool()}; -Nj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.tb,d=c.U;c.Ca=a.size;d.cf();a=this.tb.Wa(this.handle.alignment.VF());d instanceof V?(c=new H(R),c.add(d),b.moveParts(c,this.cp.copy().Hj(a),!0)):d.location=d.location.copy().Hj(a).add(this.cp)}}; -Nj.prototype.computeResize=function(a,b,c,d,e,f){b.Td()&&(b=Jb);var h=this.tb.Ja,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!f){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=w.K();Na(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? +"ne-resize":"e-resize"}else if(a instanceof C)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};w.defineProperty(Mj,{ju:"handleArchetype"},function(){return this.ll},function(a){null!==a&&w.G(a,G,Mj,"handleArchetype");this.ll=a});w.u(Mj,{handle:"handle"},function(){return this.gc});w.defineProperty(Mj,{tb:"adornedObject"},function(){return this.Jc},function(a){null!==a&&w.G(a,G,Mj,"adornedObject");this.Jc=a}); +Mj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.hb&&a.Mt&&a.R.left?null!==this.findToolHandleAt(a.Ec.da,this.name):!1}; +Mj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.gc=this.findToolHandleAt(a.Ec.da,this.name),null!==this.gc&&(this.Jc=this.gc.U.tb,this.cp.set(this.tb.Wa(this.handle.alignment.VF())),this.GD.set(this.Jc.U.location),this.BD.set(this.Jc.Ca),this.jz=this.computeCellSize(),this.lz=this.computeMinSize(),this.kz=this.computeMaxSize(),a.gf=!0,this.yD=a.Ka.isEnabled,a.Ka.isEnabled=!1,this.Hb(this.name),this.sa=!0))}; +Mj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.Sk(),this.Jc=this.gc=null,this.sa=a.gf=!1,a.Ka.isEnabled=this.yD)};Mj.prototype.doCancel=function(){null!==this.tb&&(this.tb.Ca=this.WF,this.tb.U.location=this.iJ);this.stopTool()};Mj.prototype.doMouseMove=function(){var a=this.g;if(this.sa&&null!==a){var b=this.lz,c=this.kz,d=this.jz,e=this.tb.iF(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.cg();w.v(e)}}; +Mj.prototype.doMouseUp=function(){var a=this.g;if(this.sa&&null!==a){var b=this.lz,c=this.kz,d=this.jz,e=this.tb.iF(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);w.v(e);a.Fc();this.Lf=this.name;a.Aa("PartResized",this.tb,this.WF)}this.stopTool()}; +Mj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.tb,d=c.U;c.Ca=a.size;d.cf();a=this.tb.Wa(this.handle.alignment.VF());d instanceof V?(c=new H(R),c.add(d),b.moveParts(c,this.cp.copy().Hj(a),!0)):d.location=d.location.copy().Hj(a).add(this.cp)}}; +Mj.prototype.computeResize=function(a,b,c,d,e,f){b.Td()&&(b=Jb);var h=this.tb.Ja,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!f){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=w.K();Na(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height), a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,f||(a.width=a.height/p,a.x= -k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),f||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));w.v(q);return a};Nj.prototype.computeReshape=function(){var a=Qj;this.tb instanceof X&&(a=Rj(this.tb));return!(a===Sj||a===Tj||null!==this.g&&this.g.R.shift)};Nj.prototype.computeMinSize=function(){var a=this.tb.qi.copy(),b=this.qi;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; -Nj.prototype.computeMaxSize=function(){var a=this.tb.Gf.copy(),b=this.Gf;!isNaN(b.width)&&b.widtha.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; +Mj.prototype.computeMaxSize=function(){var a=this.tb.Gf.copy(),b=this.Gf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.LJ),180),c=Math.min(Math.abs(this.KJ),b/2);(null===this.g||!this.g.R.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.defineProperty(Uj,{LJ:"snapAngleMultiple"},function(){return this.SD},function(a){w.j(a,"number",Uj,"snapAngleMultiple");this.SD=a}); -w.defineProperty(Uj,{KJ:"snapAngleEpsilon"},function(){return this.RD},function(a){w.j(a,"number",Uj,"snapAngleEpsilon");this.RD=a});w.u(Uj,{DL:"originalAngle"},function(){return this.tw});function Wj(){rg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.R.re?!1:!0};ik.prototype.doStart=function(){this.sa||null===this.Xg||this.doActivate()}; -ik.prototype.doActivate=function(){if(!this.sa){var a=this.g;if(null!==a){var b=this.Xg;null===b&&(b=a.Ne(a.R.da));if(null!==b&&b instanceof Mh&&(this.Xg=b,null!==b.U)){this.sa=!0;this.Ta=rk;var c=this.LH;null!==b.zG&&(c=b.zG);this.rk=this.Xg.copy();var d=new B(this.Xg.Wa(zb),this.Xg.Wa(Sb));a.kG(d);if(c instanceof Zj)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.qj.appendChild(c);"function"===typeof c.focus&& -c.focus();"function"===typeof c.select&&this.qy&&(c.select(),c.setSelectionRange(0,9999))}this.oj=c}}}};ik.prototype.doCancel=function(){null!==this.Hs&&this.oj instanceof HTMLElement&&(this.oj.style.border=this.Hs,this.Hs=null);this.stopTool()};ik.prototype.doMouseUp=function(){!this.sa&&this.canStart()&&this.doActivate()};ik.prototype.doMouseDown=function(){this.sa&&this.acceptText(nk)}; -ik.prototype.acceptText=function(a){switch(a){case nk:if(this.Ta===vk)this.oj instanceof HTMLElement&&this.oj.focus();else if(this.Ta===rk||this.Ta===uk||this.Ta===sk)this.Ta=tk,yk(this);break;case mk:case pk:case ok:if(pk===a&&!0===this.Uz.Jx)break;if(this.Ta===rk||this.Ta===uk||this.Ta===sk)this.Ta=tk,yk(this)}}; -function yk(a){var b=a.Xg,c=a.g,d=a.oj;if(null!==b&&null!==d){var e=b.text,f="";d instanceof Zj?null!==d.SB&&(f=d.SB()):(f=d.value,f="function"===typeof f?f():f);a.isValidText(b,e,f)?(a.Hb(a.name),a.Ta=vk,a.Lf=a.name,b.text=f,null!==b.yG&&b.yG(b,e,f),null!==c&&c.Aa("TextEdited",b,e),a.Sk(),a.stopTool(),null!==c&&c.doFocus()):(a.Ta=uk,null!==b.wA&&b.wA(a,e,f),d instanceof Zj?d.show(b,c,a):(null===a.Hs&&(a.Hs=d.style.border,d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}} -ik.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.Ta=kk;this.Xg=null;if(null!==this.oj){var b=this.oj;if(b instanceof Zj)b.Dn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.qj.removeChild(b)}}this.sa=!1}};ik.prototype.doFocus=function(){wk(this)};ik.prototype.doBlur=function(){xk(this)};function wk(a){if(null!==a.oj&&a.state!==kk){var b=a.Zy;a.Ta===rk&&(a.Ta=sk);"function"===typeof b.select&&a.qy&&(b.select(),b.setSelectionRange(0,9999))}} -function xk(a){if(null!==a.oj&&a.state!==kk){var b=a.Zy;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.qy&&(b.select(),b.setSelectionRange(0,9999))}}ik.prototype.isValidText=function(a,b,c){w.G(a,Mh,ik,"isValidText:textblock");var d=this.IB;if(null!==d&&!d(a,b,c))return!1;d=a.IB;return null===d||d(a,b,c)?!0:!1};w.defineProperty(ik,{IB:"textValidation"},function(){return this.El},function(a){null!==a&&w.j(a,"function",ik,"textValidation");this.El=a}); -w.defineProperty(ik,{QF:"minimumEditorScale"},function(){return this.tD},function(a){null!==a&&w.j(a,"number",ik,"minimumEditorScale");this.tD=a});w.defineProperty(ik,{qy:"selectsTextOnActivate"},function(){return this.PD},function(a){null!==a&&w.j(a,"boolean",ik,"selectsTextOnActivate");this.PD=a});w.defineProperty(ik,{state:"state"},function(){return this.Ta},function(a){this.Ta!==a&&(w.ob(a,ik,ik,"starting"),this.Ta=a)}); -ik.prototype.measureTemporaryTextBlock=ik.prototype.VI=function(a){var b=this.rk;b.text=a;zk(b,this.Xg.To,Infinity);return b};function ih(){rg.call(this);this.name="ToolManager";this.UG=new H(rg);this.VG=new H(rg);this.WG=new H(rg);this.ZC=this.$C=850;this.PC=(new ia(2,2)).Ha();this.hE=5E3;this.xD=Qh;this.XC=Ak;this.Cv=this.DC=null;this.gn=-1}w.La(ih,rg);w.ga("ToolManager",ih);var Qh;ih.WheelScroll=Qh=w.p(ih,"WheelScroll",0);var Ph;ih.WheelZoom=Ph=w.p(ih,"WheelZoom",1); -ih.WheelNone=w.p(ih,"WheelNone",2);var Ak;ih.GestureZoom=Ak=w.p(ih,"GestureZoom",3);var Bk;ih.GestureCancel=Bk=w.p(ih,"GestureCancel",4);var Ck;ih.GestureNone=Ck=w.p(ih,"GestureNone",5);w.defineProperty(ih,{Gu:"mouseWheelBehavior"},function(){return this.xD},function(a){w.ob(a,ih,ih,"mouseWheelBehavior");this.xD=a});w.defineProperty(ih,{Wp:"gestureBehavior"},function(){return this.XC},function(a){w.ob(a,ih,ih,"gestureBehavior");this.XC=a}); -ih.prototype.initializeStandardTools=function(){this.gH=new Xj;this.ZF=new Vh;this.MI=new oj;this.iG=new Nj;this.yJ=new Uj;this.MF=new ej;this.ue=new oh;this.QH=new gk;this.jJ=new hk;this.mA=new bk;this.HB=new ik;this.tH=new Yj;this.uH=new Wj};ih.prototype.updateAdornments=function(a){var b=this.Rl;if(b instanceof kh&&this.Cv===a){var c=b.tb;(null!==a?c.U===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -ih.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.R;b.yj&&this.Wp===Bk&&(b.bubbles=!1);if(b.uu){this.cancelWaitAfter();if(this.Wp===Ck){b.bubbles=!0;return}if(this.Wp===Bk)return;if(a.$a.canStartMultiTouch()){a.$a.standardPinchZoomStart();return}}var c=a.ja;c.hA&&0!==c.ti&&w.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.jf.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}w.u(Xg,{CK:"animationReasons"},function(){return this.pv}); -Xg.prototype.canStart=function(){return!0};Xg.prototype.prepareAutomaticAnimation=Xg.prototype.Un=function(a){this.lf&&(this.ql||this.aa.Gn)&&(this.pv.add(a),this.canStart(a)&&(this.ak&&this.Gh(),this.rc=!0))};function Hk(a){if(a.lf&&(a.pv.clear(),a.rc))if(!a.ko)a.rc=!1;else if(0===a.um){var b=+new Date;a.um=b;requestAnimationFrame(function(){if(!1!==a.rc&&!a.ak&&a.um===b){var c=a.aa;c.tj("temporaryPixelRatio")&&(c.qk=1);Uk(c);a.rc=!1;c.Aa("AnimationStarting");Vk(a,b)}})}} -function Wk(a,b,c,d,e,f){if(!(!a.rc||"position"===c&&d.L(e)||b instanceof R&&!b.xF)){var h=a.Sm;if(h.contains(b)){var h=h.ka(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=Xk(d));h.nx&&void 0!==l[c]?h.Ut[c]=Xk(e):(f||(h.Ut[c]=Xk(e)),l[c]=Xk(e));f&&0===c.indexOf("position:")&&b instanceof R&&(h.Ut.location=Xk(b.location))}else k=new ra,l=new ra,k[c]=Xk(d),l[c]=Xk(e),d=l,e=k.position,e instanceof y&&!e.I()&&a.pv.contains("Expand SubGraph")&&e.assign(d.position),k=new Gk(k,l,f),f&&0===c.indexOf("position:")&& -b instanceof R&&(k.Ut.location=Xk(b.location)),h.add(b,k);a.ko=!0}}function Xk(a){return a instanceof y?a.copy():a instanceof ia?a.copy():a} -function Vk(a,b){var c;function d(){if(!1!==f.ak&&f.um===b){var a=+new Date,c=a>s?m:a-r;bl(f);cl(f,e,q,h,c,m);f.zv&&f.zv();Si(e);dl(f);a>s?el(f):requestAnimationFrame(d)}}void 0===c&&(c=new ra);var e=a.aa;if(null!==e){var f=a,h=c.cL||a.EC,k=c.BL||null,l=c.CL||null,m=c.duration||a.gz,n=a.XG;for(c=a.Sm.i;c.next();){var p=c.value.start.position;p instanceof y&&(p.I()||p.assign(n))}a.zC=h;a.zv=k;a.Av=l;a.yC=m;a.Bv=a.Sm;var q=a.Bv;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l=c.key.findVisibleNode(), -l instanceof V&&null!==l.placeholder&&(l=l.placeholder,n=l.Wa(zb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n));a.ak=!0;bl(a);cl(a,e,q,h,0,m);Si(a.aa);dl(a);var r=+new Date,s=r+m;f.um===b&&requestAnimationFrame(function(){d()})}}function bl(a){if(!a.Po){var b=a.aa;a.kE=b.cb;a.lC=b.Qe;a.mC=b.Zu;b.cb=!0;b.Qe=!0;b.Zu=!0;a.Po=!0}}function dl(a){var b=a.aa;b.cb=a.kE;b.Qe=a.lC;b.Zu=a.mC;a.Po=!1} -function cl(a,b,c,d,e,f){for(c=c.i;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==fl[m])fl[m](h,l[m],k[m],d,e,f)}d=b.OA;b.OA=!0;m=a.EC;0!==a.ur&&0!==a.tr&&(c=a.ur,b.vb=m(e,c,a.tr-c,f));null!==a.sr&&null!==a.rr&&(c=a.sr,a=a.rr,b.jb=new y(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.OA=d} -Xg.prototype.stopAnimation=Xg.prototype.Gh=function(){!0===this.rc&&(this.rc=!1,this.um=0,this.ko&&this.aa.ye());this.ak&&this.lf&&el(this)}; -function el(a){a.ak=!1;a.ko=!1;bl(a);for(var b=a.aa,c=a.zC,d=a.yC,e=a.Bv.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.Ut,n;for(n in l)if(void 0!==fl[n]){var p=n;!h.nx||"position:node"!==p&&"position:placeholder"!==p||(p="position");fl[p](f,k[n],void 0!==m[n]?m[n]:h.nx?k[n]:l[n],c,d,d)}h.nx&&void 0!==m.location&&f instanceof R&&(f.location=m.location);h.iy&&f instanceof R&&f.Dd(!1)}for(c=a.aa.links;c.next();)d=c.value,null!==d.ip&&(d.points=d.ip,d.ip=null);b.Tx.clear();b.qk=null;b.Fc(); -b.oa();b.cg();gl(b);dl(a);a.Av&&a.Av();a.um=0;a.Bv=null;a.Av=null;a.zv=null;a.sr=null;a.rr=null;a.ur=0;a.tr=0;a.Sm=new ma(G,Gk);b.Aa("AnimationFinished");b.ye()} -function hl(a,b,c){var d=b.Y,e=c.Y,f=null;c instanceof V&&(f=c.placeholder);null!==f?(d=f.Wa(zb),d.x+=f.padding.left,d.y+=f.padding.top,Wk(a,b,"position",d,b.position,!1)):Wk(a,b,"position",new y(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Wk(a,b,"scale",.01,b.scale,!1);if(b instanceof V)for(b=b.vc;b.next();)f=b.value,f instanceof T&&hl(a,f,c)} -function il(a,b,c){if(b.isVisible()){var d=null;c instanceof V&&(d=c.placeholder);null!==d?Wk(a,b,"position:placeholder",b.position,d,!0):Wk(a,b,"position:node",b.position,c,!0);Wk(a,b,"scale",b.scale,.01,!0);a.rc&&(d=a.Sm,d.contains(b)&&(d.ka(b).iy=!0));if(b instanceof V)for(b=b.vc;b.next();)d=b.value,d instanceof T&&il(a,d,c)}}function jl(a,b,c){a.rc&&(null===a.sr&&b.I()&&null===a.rr&&(a.sr=b.copy()),a.rr=c.copy(),a.ko=!0)} -function kl(a,b,c){a.rc&&a.aa.Gn&&(0===a.ur&&0===a.tr&&(a.ur=b),a.tr=c,a.ko=!0)}w.defineProperty(Xg,{isEnabled:"isEnabled"},function(){return this.lf},function(a){w.j(a,"boolean",Xg,"isEnabled");this.lf=a});w.defineProperty(Xg,{duration:"duration"},function(){return this.gz},function(a){w.j(a,"number",Xg,"duration");1>a&&w.Fa(a,">= 1",Xg,"duration");this.gz=a});w.u(Xg,{ff:"isAnimating"},function(){return this.ak});w.u(Xg,{EI:"isTicking"},function(){return this.Po}); -w.defineProperty(Xg,{DF:"isInitial"},function(){return this.ql},function(a){w.j(a,"boolean",Xg,"isInitial");this.ql=a});function Gk(a,b,c){this.start=a;this.end=b;this.Ut=new ra;this.nx=c;this.iy=!1} -var fl={opacity:function(a,b,c,d,e,f){a.opacity=d(e,b,c-b,f)},position:function(a,b,c,d,e,f){e!==f?a.vy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new y(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},"position:node":function(a,b,c,d,e,f){var h=a.Y,k=c.Y;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.vy(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f)):a.position=new y(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f))},"position:placeholder":function(a,b,c,d,e,f){e!==f?a.vy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)): -a.position=new y(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},scale:function(a,b,c,d,e,f){a.scale=d(e,b,c-b,f)},visible:function(a,b,c,d,e,f){a.visible=e!==f?b:c}};function qg(){0=a)return b;for(var c=0,d=0,e=0,f=0,h=0,k=this.zb.i;k.next();){var l=k.value;l instanceof V?e++:l instanceof T?d++:l instanceof W?f++:l instanceof kh?h++:c++}k="";0=d.count)a=d.count;else if(d.ea(a)===b)return-1;d.Rd(a,b);b.ku(c);d=this.g;null!==d&&(c?d.oa():d.Zp(b));ql(this,a,b);return a}; +w.defineProperty(Mj,{qi:"minSize"},function(){return this.Yh},function(a){w.G(a,ia,Mj,"minSize");if(!this.Yh.L(a)){var b=a.width;isNaN(b)&&(b=0);a=a.height;isNaN(a)&&(a=0);this.Yh.m(b,a)}});w.defineProperty(Mj,{Gf:"maxSize"},function(){return this.Xh},function(a){w.G(a,ia,Mj,"maxSize");if(!this.Xh.L(a)){var b=a.width;isNaN(b)&&(b=Infinity);a=a.height;isNaN(a)&&(a=Infinity);this.Xh.m(b,a)}}); +w.defineProperty(Mj,{Gp:"cellSize"},function(){return this.Oj},function(a){w.G(a,ia,Mj,"cellSize");this.Oj.L(a)||this.Oj.assign(a)});w.defineProperty(Mj,{ru:"isGridSnapEnabled"},function(){return this.Tr},function(a){w.j(a,"boolean",Mj,"isGridSnapEnabled");this.Tr=a});w.u(Mj,{WF:"originalDesiredSize"},function(){return this.BD});w.u(Mj,{iJ:"originalLocation"},function(){return this.GD}); +function Tj(){0a&&(a+=360));var b=Math.min(Math.abs(this.LJ),180),c=Math.min(Math.abs(this.KJ),b/2);(null===this.g||!this.g.R.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.defineProperty(Tj,{LJ:"snapAngleMultiple"},function(){return this.SD},function(a){w.j(a,"number",Tj,"snapAngleMultiple");this.SD=a}); +w.defineProperty(Tj,{KJ:"snapAngleEpsilon"},function(){return this.RD},function(a){w.j(a,"number",Tj,"snapAngleEpsilon");this.RD=a});w.u(Tj,{DL:"originalAngle"},function(){return this.tw});function Vj(){qg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.R.re?!1:!0};hk.prototype.doStart=function(){this.sa||null===this.Xg||this.doActivate()}; +hk.prototype.doActivate=function(){if(!this.sa){var a=this.g;if(null!==a){var b=this.Xg;null===b&&(b=a.Ne(a.R.da));if(null!==b&&b instanceof Lh&&(this.Xg=b,null!==b.U)){this.sa=!0;this.Ta=qk;var c=this.LH;null!==b.zG&&(c=b.zG);this.rk=this.Xg.copy();var d=new B(this.Xg.Wa(zb),this.Xg.Wa(Sb));a.kG(d);if(c instanceof Yj)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.qj.appendChild(c);"function"===typeof c.focus&& +c.focus();"function"===typeof c.select&&this.qy&&(c.select(),c.setSelectionRange(0,9999))}this.oj=c}}}};hk.prototype.doCancel=function(){null!==this.Hs&&this.oj instanceof HTMLElement&&(this.oj.style.border=this.Hs,this.Hs=null);this.stopTool()};hk.prototype.doMouseUp=function(){!this.sa&&this.canStart()&&this.doActivate()};hk.prototype.doMouseDown=function(){this.sa&&this.acceptText(mk)}; +hk.prototype.acceptText=function(a){switch(a){case mk:if(this.Ta===uk)this.oj instanceof HTMLElement&&this.oj.focus();else if(this.Ta===qk||this.Ta===tk||this.Ta===rk)this.Ta=sk,xk(this);break;case lk:case ok:case nk:if(ok===a&&!0===this.Uz.Jx)break;if(this.Ta===qk||this.Ta===tk||this.Ta===rk)this.Ta=sk,xk(this)}}; +function xk(a){var b=a.Xg,c=a.g,d=a.oj;if(null!==b&&null!==d){var e=b.text,f="";d instanceof Yj?null!==d.SB&&(f=d.SB()):(f=d.value,f="function"===typeof f?f():f);a.isValidText(b,e,f)?(a.Hb(a.name),a.Ta=uk,a.Lf=a.name,b.text=f,null!==b.yG&&b.yG(b,e,f),null!==c&&c.Aa("TextEdited",b,e),a.Sk(),a.stopTool(),null!==c&&c.doFocus()):(a.Ta=tk,null!==b.wA&&b.wA(a,e,f),d instanceof Yj?d.show(b,c,a):(null===a.Hs&&(a.Hs=d.style.border,d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}} +hk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.Ta=jk;this.Xg=null;if(null!==this.oj){var b=this.oj;if(b instanceof Yj)b.Dn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.qj.removeChild(b)}}this.sa=!1}};hk.prototype.doFocus=function(){vk(this)};hk.prototype.doBlur=function(){wk(this)};function vk(a){if(null!==a.oj&&a.state!==jk){var b=a.Zy;a.Ta===qk&&(a.Ta=rk);"function"===typeof b.select&&a.qy&&(b.select(),b.setSelectionRange(0,9999))}} +function wk(a){if(null!==a.oj&&a.state!==jk){var b=a.Zy;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.qy&&(b.select(),b.setSelectionRange(0,9999))}}hk.prototype.isValidText=function(a,b,c){w.G(a,Lh,hk,"isValidText:textblock");var d=this.IB;if(null!==d&&!d(a,b,c))return!1;d=a.IB;return null===d||d(a,b,c)?!0:!1};w.defineProperty(hk,{IB:"textValidation"},function(){return this.El},function(a){null!==a&&w.j(a,"function",hk,"textValidation");this.El=a}); +w.defineProperty(hk,{QF:"minimumEditorScale"},function(){return this.tD},function(a){null!==a&&w.j(a,"number",hk,"minimumEditorScale");this.tD=a});w.defineProperty(hk,{qy:"selectsTextOnActivate"},function(){return this.PD},function(a){null!==a&&w.j(a,"boolean",hk,"selectsTextOnActivate");this.PD=a});w.defineProperty(hk,{state:"state"},function(){return this.Ta},function(a){this.Ta!==a&&(w.ob(a,hk,hk,"starting"),this.Ta=a)}); +hk.prototype.measureTemporaryTextBlock=hk.prototype.VI=function(a){var b=this.rk;b.text=a;yk(b,this.Xg.To,Infinity);return b};function hh(){qg.call(this);this.name="ToolManager";this.UG=new H(qg);this.VG=new H(qg);this.WG=new H(qg);this.ZC=this.$C=850;this.PC=(new ia(2,2)).Ha();this.hE=5E3;this.xD=Ph;this.XC=zk;this.Cv=this.DC=null;this.gn=-1}w.La(hh,qg);w.ga("ToolManager",hh);var Ph;hh.WheelScroll=Ph=w.p(hh,"WheelScroll",0);var Oh;hh.WheelZoom=Oh=w.p(hh,"WheelZoom",1); +hh.WheelNone=w.p(hh,"WheelNone",2);var zk;hh.GestureZoom=zk=w.p(hh,"GestureZoom",3);var Ak;hh.GestureCancel=Ak=w.p(hh,"GestureCancel",4);var Bk;hh.GestureNone=Bk=w.p(hh,"GestureNone",5);w.defineProperty(hh,{Gu:"mouseWheelBehavior"},function(){return this.xD},function(a){w.ob(a,hh,hh,"mouseWheelBehavior");this.xD=a});w.defineProperty(hh,{Wp:"gestureBehavior"},function(){return this.XC},function(a){w.ob(a,hh,hh,"gestureBehavior");this.XC=a}); +hh.prototype.initializeStandardTools=function(){this.gH=new Wj;this.ZF=new Uh;this.MI=new nj;this.iG=new Mj;this.yJ=new Tj;this.MF=new dj;this.ue=new nh;this.QH=new fk;this.jJ=new gk;this.mA=new ak;this.HB=new hk;this.tH=new Xj;this.uH=new Vj};hh.prototype.updateAdornments=function(a){var b=this.Rl;if(b instanceof jh&&this.Cv===a){var c=b.tb;(null!==a?c.U===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +hh.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.R;b.yj&&this.Wp===Ak&&(b.bubbles=!1);if(b.uu){this.cancelWaitAfter();if(this.Wp===Bk){b.bubbles=!0;return}if(this.Wp===Ak)return;if(a.$a.canStartMultiTouch()){a.$a.standardPinchZoomStart();return}}var c=a.ja;c.hA&&0!==c.ti&&w.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.jf.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}w.u(Wg,{CK:"animationReasons"},function(){return this.pv}); +Wg.prototype.canStart=function(){return!0};Wg.prototype.prepareAutomaticAnimation=Wg.prototype.Un=function(a){this.lf&&(this.ql||this.aa.Gn)&&(this.pv.add(a),this.canStart(a)&&(this.ak&&this.Gh(),this.rc=!0))};function Gk(a){if(a.lf&&(a.pv.clear(),a.rc))if(!a.ko)a.rc=!1;else if(0===a.um){var b=+new Date;a.um=b;requestAnimationFrame(function(){if(!1!==a.rc&&!a.ak&&a.um===b){var c=a.aa;c.tj("temporaryPixelRatio")&&(c.qk=1);Hk(c);a.rc=!1;c.Aa("AnimationStarting");Uk(a,b)}})}} +function Vk(a,b,c,d,e,f){if(!(!a.rc||"position"===c&&d.L(e)||b instanceof R&&!b.xF)){var h=a.Sm;if(h.contains(b)){var h=h.ka(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=Wk(d));h.nx&&void 0!==l[c]?h.Ut[c]=Wk(e):(f||(h.Ut[c]=Wk(e)),l[c]=Wk(e));f&&0===c.indexOf("position:")&&b instanceof R&&(h.Ut.location=Wk(b.location))}else k=new ra,l=new ra,k[c]=Wk(d),l[c]=Wk(e),d=l,e=k.position,e instanceof y&&!e.I()&&a.pv.contains("Expand SubGraph")&&e.assign(d.position),k=new Fk(k,l,f),f&&0===c.indexOf("position:")&& +b instanceof R&&(k.Ut.location=Wk(b.location)),h.add(b,k);a.ko=!0}}function Wk(a){return a instanceof y?a.copy():a instanceof ia?a.copy():a} +function Uk(a,b){var c;function d(){if(!1!==f.ak&&f.um===b){var a=+new Date,c=a>s?m:a-r;Xk(f);bl(f,e,q,h,c,m);f.zv&&f.zv();Ri(e);cl(f);a>s?dl(f):requestAnimationFrame(d)}}void 0===c&&(c=new ra);var e=a.aa;if(null!==e){var f=a,h=c.cL||a.EC,k=c.BL||null,l=c.CL||null,m=c.duration||a.gz,n=a.XG;for(c=a.Sm.i;c.next();){var p=c.value.start.position;p instanceof y&&(p.I()||p.assign(n))}a.zC=h;a.zv=k;a.Av=l;a.yC=m;a.Bv=a.Sm;var q=a.Bv;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l=c.key.findVisibleNode(), +l instanceof V&&null!==l.placeholder&&(l=l.placeholder,n=l.Wa(zb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n));a.ak=!0;Xk(a);bl(a,e,q,h,0,m);Ri(a.aa);cl(a);var r=+new Date,s=r+m;f.um===b&&requestAnimationFrame(function(){d()})}}function Xk(a){if(!a.Po){var b=a.aa;a.kE=b.cb;a.lC=b.Qe;a.mC=b.Zu;b.cb=!0;b.Qe=!0;b.Zu=!0;a.Po=!0}}function cl(a){var b=a.aa;b.cb=a.kE;b.Qe=a.lC;b.Zu=a.mC;a.Po=!1} +function bl(a,b,c,d,e,f){for(c=c.i;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==el[m])el[m](h,l[m],k[m],d,e,f)}d=b.OA;b.OA=!0;m=a.EC;0!==a.ur&&0!==a.tr&&(c=a.ur,b.vb=m(e,c,a.tr-c,f));null!==a.sr&&null!==a.rr&&(c=a.sr,a=a.rr,b.jb=new y(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.OA=d} +Wg.prototype.stopAnimation=Wg.prototype.Gh=function(){!0===this.rc&&(this.rc=!1,this.um=0,this.ko&&this.aa.ye());this.ak&&this.lf&&dl(this)}; +function dl(a){a.ak=!1;a.ko=!1;Xk(a);for(var b=a.aa,c=a.zC,d=a.yC,e=a.Bv.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.Ut,n;for(n in l)if(void 0!==el[n]){var p=n;!h.nx||"position:node"!==p&&"position:placeholder"!==p||(p="position");el[p](f,k[n],void 0!==m[n]?m[n]:h.nx?k[n]:l[n],c,d,d)}h.nx&&void 0!==m.location&&f instanceof R&&(f.location=m.location);h.iy&&f instanceof R&&f.Dd(!1)}for(c=a.aa.links;c.next();)d=c.value,null!==d.ip&&(d.points=d.ip,d.ip=null);b.Tx.clear();b.qk=null;b.Fc(); +b.oa();b.cg();fl(b);cl(a);a.Av&&a.Av();a.um=0;a.Bv=null;a.Av=null;a.zv=null;a.sr=null;a.rr=null;a.ur=0;a.tr=0;a.Sm=new ma(G,Fk);b.Aa("AnimationFinished");b.ye()} +function gl(a,b,c){var d=b.Y,e=c.Y,f=null;c instanceof V&&(f=c.placeholder);null!==f?(d=f.Wa(zb),d.x+=f.padding.left,d.y+=f.padding.top,Vk(a,b,"position",d,b.position,!1)):Vk(a,b,"position",new y(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Vk(a,b,"scale",.01,b.scale,!1);if(b instanceof V)for(b=b.vc;b.next();)f=b.value,f instanceof T&&gl(a,f,c)} +function hl(a,b,c){if(b.isVisible()){var d=null;c instanceof V&&(d=c.placeholder);null!==d?Vk(a,b,"position:placeholder",b.position,d,!0):Vk(a,b,"position:node",b.position,c,!0);Vk(a,b,"scale",b.scale,.01,!0);a.rc&&(d=a.Sm,d.contains(b)&&(d.ka(b).iy=!0));if(b instanceof V)for(b=b.vc;b.next();)d=b.value,d instanceof T&&hl(a,d,c)}}function il(a,b,c){a.rc&&(null===a.sr&&b.I()&&null===a.rr&&(a.sr=b.copy()),a.rr=c.copy(),a.ko=!0)} +function jl(a,b,c){a.rc&&a.aa.Gn&&(0===a.ur&&0===a.tr&&(a.ur=b),a.tr=c,a.ko=!0)}w.defineProperty(Wg,{isEnabled:"isEnabled"},function(){return this.lf},function(a){w.j(a,"boolean",Wg,"isEnabled");this.lf=a});w.defineProperty(Wg,{duration:"duration"},function(){return this.gz},function(a){w.j(a,"number",Wg,"duration");1>a&&w.Fa(a,">= 1",Wg,"duration");this.gz=a});w.u(Wg,{ff:"isAnimating"},function(){return this.ak});w.u(Wg,{EI:"isTicking"},function(){return this.Po}); +w.defineProperty(Wg,{DF:"isInitial"},function(){return this.ql},function(a){w.j(a,"boolean",Wg,"isInitial");this.ql=a});function Fk(a,b,c){this.start=a;this.end=b;this.Ut=new ra;this.nx=c;this.iy=!1} +var el={opacity:function(a,b,c,d,e,f){a.opacity=d(e,b,c-b,f)},position:function(a,b,c,d,e,f){e!==f?a.vy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new y(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},"position:node":function(a,b,c,d,e,f){var h=a.Y,k=c.Y;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.vy(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f)):a.position=new y(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f))},"position:placeholder":function(a,b,c,d,e,f){e!==f?a.vy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)): +a.position=new y(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},scale:function(a,b,c,d,e,f){a.scale=d(e,b,c-b,f)},visible:function(a,b,c,d,e,f){a.visible=e!==f?b:c}};function pg(){0=a)return b;for(var c=0,d=0,e=0,f=0,h=0,k=this.zb.i;k.next();){var l=k.value;l instanceof V?e++:l instanceof T?d++:l instanceof W?f++:l instanceof jh?h++:c++}k="";0=d.count)a=d.count;else if(d.ea(a)===b)return-1;d.Rd(a,b);b.ku(c);d=this.g;null!==d&&(c?d.oa():d.Zp(b));pl(this,a,b);return a}; g.sf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.sf(a,b,c);var d=this.zb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.ea(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.lu(c);d.dd(a);d=this.g;null!==d&&(c?d.oa():d.sf(b));b.ew=null;return a}; -function ql(a,b,c){b=rl(a,b,c);if(c instanceof V&&null!==c&&isNaN(c.fo)){if(0!==c.vc.count){for(var d=-1,e=a.zb.n,f=e.length,h=0;hd&&k.Da===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,h=NaN;0<=f;){h=a.ea(f).fo;if(!isNaN(h))break;f--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===f||h<=d){f++;if(f===b)break;a.dd(b);a.Rd(f,c);return f}for(h=NaN;0<=--f&&(h=a.ea(f).fo,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.dd(b);a.Rd(k,c);return k}for(l=NaN;++ka||1d&&k.Da===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,h=NaN;0<=f;){h=a.ea(f).fo;if(!isNaN(h))break;f--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===f||h<=d){f++;if(f===b)break;a.dd(b);a.Rd(f,c);return f}for(h=NaN;0<=--f&&(h=a.ea(f).fo,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.dd(b);a.Rd(k,c);return k}for(l=NaN;++ka||1parseInt(e[1],10)&&(w.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+w.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),w.tx.licenseKey=!0);this.Uh=1;this.fk=0;this.dw=new y;this.Xz=500;this.qv=new y;this.mt=null;this.ck=!1;this.preventDefault=this.hy=this.oq=this.pq=this.nq=this.mq=this.Pn=this.Rn=this.Qn=this.Nn=this.On=this.TB=this.LB=this.MB=this.NB=this.Bl=this.$s= -this.Al=this.Zs=null;this.Yv=!1;this.nl=new El;void 0!==a&&Fl(this,a);this.Vc=!1}w.ga("Diagram",D); -D.prototype.clear=D.prototype.clear=function(){var a=null;null!==this.td&&(a=this.td.U);this.$.clear();for(var b=this.dc.length,c=0;c=a)return b;for(var c=this.dc.i;c.next();)b+="\n "+c.value.toString(a-1);return b};D.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.aa instanceof D?b.aa:null}; -w.defineProperty(D,{qj:"div"},function(){return this.Nb},function(a){null!==a&&w.G(a,HTMLDivElement,D,"div");if(this.Nb!==a){tl=[];var b=this.Nb;null!==b?(b.aa=void 0,b.innerHTML="",null!==this.Cb&&(this.Cb.removeEventListener("touchstart",this.NB,!1),this.Cb.removeEventListener("touchmove",this.MB,!1),this.Cb.removeEventListener("touchend",this.LB,!1),this.Cb.Od.aa=null),b=this.fb,null!==b&&(b.jf.each(function(a){a.cancelWaitAfter()}),b.dg.each(function(a){a.cancelWaitAfter()}),b.eg.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.$a.doCancel(),this.kf=this.Cb=null,window.removeEventListener("resize",this.TB,!1),window.removeEventListener("mousemove",this.On,!0),window.removeEventListener("mousedown",this.Nn,!0),window.removeEventListener("mouseup",this.Qn,!0),window.removeEventListener("wheel",this.Rn,!0),window.removeEventListener("mouseout",this.Pn,!0)):this.dh=!1;this.Nb=null;if(null!==a){if(b=a.aa)b.qj=null;Fl(this,a);this.Nu()}}}); -function Il(a){var b=a.Cb;a.Py?(b.addEventListener("pointerdown",a.mq,!1),b.addEventListener("pointermove",a.nq,!1),b.addEventListener("pointerup",a.pq,!1),b.addEventListener("pointerout",a.oq,!1)):(b.addEventListener("touchstart",a.NB,!1),b.addEventListener("touchmove",a.MB,!1),b.addEventListener("touchend",a.LB,!1),b.addEventListener("mousemove",a.On,!1),b.addEventListener("mousedown",a.Nn,!1),b.addEventListener("mouseup",a.Qn,!1),b.addEventListener("mouseout",a.Pn,!1));b.addEventListener("wheel", -a.Rn,!1);b.addEventListener("keydown",a.GI,!1);b.addEventListener("keyup",a.HI,!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.fb.Wp===Bk&&b.preventDefault()},!1);window.addEventListener("resize",a.TB,!1)} +w.defineProperty(D,{qj:"div"},function(){return this.Nb},function(a){null!==a&&w.G(a,HTMLDivElement,D,"div");if(this.Nb!==a){sl=[];var b=this.Nb;null!==b?(b.aa=void 0,b.innerHTML="",null!==this.Cb&&(this.Cb.removeEventListener("touchstart",this.NB,!1),this.Cb.removeEventListener("touchmove",this.MB,!1),this.Cb.removeEventListener("touchend",this.LB,!1),this.Cb.Od.aa=null),b=this.fb,null!==b&&(b.jf.each(function(a){a.cancelWaitAfter()}),b.dg.each(function(a){a.cancelWaitAfter()}),b.eg.each(function(a){a.cancelWaitAfter()})), +b.cancelWaitAfter(),this.$a.doCancel(),this.kf=this.Cb=null,window.removeEventListener("resize",this.TB,!1),window.removeEventListener("mousemove",this.On,!0),window.removeEventListener("mousedown",this.Nn,!0),window.removeEventListener("mouseup",this.Qn,!0),window.removeEventListener("wheel",this.Rn,!0),window.removeEventListener("mouseout",this.Pn,!0)):this.dh=!1;this.Nb=null;if(null!==a){if(b=a.aa)b.qj=null;El(this,a);this.Nu()}}}); +function Hl(a){var b=a.Cb;a.Py?(b.addEventListener("pointerdown",a.mq,!1),b.addEventListener("pointermove",a.nq,!1),b.addEventListener("pointerup",a.pq,!1),b.addEventListener("pointerout",a.oq,!1)):(b.addEventListener("touchstart",a.NB,!1),b.addEventListener("touchmove",a.MB,!1),b.addEventListener("touchend",a.LB,!1),b.addEventListener("mousemove",a.On,!1),b.addEventListener("mousedown",a.Nn,!1),b.addEventListener("mouseup",a.Qn,!1),b.addEventListener("mouseout",a.Pn,!1));b.addEventListener("wheel", +a.Rn,!1);b.addEventListener("keydown",a.GI,!1);b.addEventListener("keyup",a.HI,!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.fb.Wp===Ak&&b.preventDefault()},!1);window.addEventListener("resize",a.TB,!1)} D.prototype.computePixelRatio=function(){if(null!==this.qk)return this.qk;var a=this.kf;return(window.devicePixelRatio||1)/(a.ua.webkitBackingStorePixelRatio||a.ua.mozBackingStorePixelRatio||a.ua.msBackingStorePixelRatio||a.ua.oBackingStorePixelRatio||a.ua.backingStorePixelRatio||1)};D.prototype.doMouseMove=function(){this.$a.doMouseMove()};D.prototype.doMouseDown=function(){this.$a.doMouseDown()};D.prototype.doMouseUp=function(){this.$a.doMouseUp()};D.prototype.doMouseWheel=function(){this.$a.doMouseWheel()}; D.prototype.doKeyDown=function(){this.$a.doKeyDown()};D.prototype.doKeyUp=function(){this.$a.doKeyUp()};D.prototype.doFocus=function(){this.focus()};D.prototype.focus=D.prototype.focus=function(){if(this.Cb)if(this.CJ)this.Cb.focus();else{var a=window.scrollX||window.pageXOffset,b=window.scrollY||window.pageYOffset;this.Cb.focus();window.scrollTo(a,b)}}; -function Uk(a){if(null!==a.Cb){var b=a.Nb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.ml?a.yd:0,d=a.Zj?a.yd:0,e=a.Jd;a.Jd=a.computePixelRatio();a.Jd!==e&&(a.Rr=!0,a.ye());if(b.clientWidth!==a.Kb+c||b.clientHeight!==a.Jb+d)a.Fm=!0,a.Fe=!0,b=a.Tb,null!==b&&b.Lx&&a.Nl===ph&&(a.vr=!0,b.J()),a.$d||a.ye()}}} -function Cl(a){var b=new qg;b.name="Background";a.Gt(b);b=new qg;b.name="";a.Gt(b);b=new qg;b.name="Foreground";a.Gt(b);b=new qg;b.name="Adornment";b.Pc=!0;a.Gt(b);b=new qg;b.name="Tool";b.Pc=!0;b.yF=!0;a.Gt(b);b=new qg;b.name="Grid";b.Af=!1;b.Ug=!1;b.Pc=!0;a.jH(b,a.Wt("Background"))} -function Jl(a){a.td=new C(Kl);a.td.name="GRID";var b=new X;b.Db="LineH";b.stroke="lightgray";b.mb=.5;b.interval=1;a.td.add(b);b=new X;b.Db="LineH";b.stroke="gray";b.mb=.5;b.interval=5;a.td.add(b);b=new X;b.Db="LineH";b.stroke="gray";b.mb=1;b.interval=10;a.td.add(b);b=new X;b.Db="LineV";b.stroke="lightgray";b.mb=.5;b.interval=1;a.td.add(b);b=new X;b.Db="LineV";b.stroke="gray";b.mb=.5;b.interval=5;a.td.add(b);b=new X;b.Db="LineV";b.stroke="gray";b.mb=1;b.interval=10;a.td.add(b);b=new R;b.add(a.td); -b.ag="Grid";b.fo=0;b.RA=!1;b.xF=!1;b.Ug=!1;b.WA="GRID";a.add(b);a.zb.remove(b);a.td.visible=!1}function Ll(){this.aa.Mz?this.aa.Mz=!1:this.aa.isEnabled?this.aa.PH(this):Ml(this.aa)}function Nl(a){this.aa.isEnabled?(this.aa.Oz=a.target.scrollTop,this.aa.Nz=a.target.scrollLeft):Ml(this.aa)} +function Hk(a){if(null!==a.Cb){var b=a.Nb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.ml?a.yd:0,d=a.Zj?a.yd:0,e=a.Jd;a.Jd=a.computePixelRatio();a.Jd!==e&&(a.Rr=!0,a.ye());if(b.clientWidth!==a.Kb+c||b.clientHeight!==a.Jb+d)a.Fm=!0,a.Fe=!0,b=a.Tb,null!==b&&b.Lx&&a.Nl===oh&&(a.vr=!0,b.J()),a.$d||a.ye()}}} +function Bl(a){var b=new pg;b.name="Background";a.Gt(b);b=new pg;b.name="";a.Gt(b);b=new pg;b.name="Foreground";a.Gt(b);b=new pg;b.name="Adornment";b.Pc=!0;a.Gt(b);b=new pg;b.name="Tool";b.Pc=!0;b.yF=!0;a.Gt(b);b=new pg;b.name="Grid";b.Af=!1;b.Ug=!1;b.Pc=!0;a.jH(b,a.Wt("Background"))} +function Il(a){a.td=new C(Jl);a.td.name="GRID";var b=new X;b.Db="LineH";b.stroke="lightgray";b.mb=.5;b.interval=1;a.td.add(b);b=new X;b.Db="LineH";b.stroke="gray";b.mb=.5;b.interval=5;a.td.add(b);b=new X;b.Db="LineH";b.stroke="gray";b.mb=1;b.interval=10;a.td.add(b);b=new X;b.Db="LineV";b.stroke="lightgray";b.mb=.5;b.interval=1;a.td.add(b);b=new X;b.Db="LineV";b.stroke="gray";b.mb=.5;b.interval=5;a.td.add(b);b=new X;b.Db="LineV";b.stroke="gray";b.mb=1;b.interval=10;a.td.add(b);b=new R;b.add(a.td); +b.ag="Grid";b.fo=0;b.RA=!1;b.xF=!1;b.Ug=!1;b.WA="GRID";a.add(b);a.zb.remove(b);a.td.visible=!1}function Kl(){this.aa.Mz?this.aa.Mz=!1:this.aa.isEnabled?this.aa.PH(this):Ll(this.aa)}function Ml(a){this.aa.isEnabled?(this.aa.Oz=a.target.scrollTop,this.aa.Nz=a.target.scrollLeft):Ll(this.aa)} D.prototype.diagramScroll=D.prototype.PH=function(a){if(null!==this.Cb){this.Cw=!0;var b=this.te,c=this.rb,d=this.oy,e=b.x-d.left,f=b.y-d.top,h=b.width+d.left+d.right,k=b.height+d.top+d.bottom,l=b.right+d.right,d=b.bottom+d.bottom,m=c.x,b=c.y,n=c.width,p=c.height,q=c.right,r=c.bottom,c=this.scale,s;s=a.scrollLeft;if(this.Wr)switch(this.Kz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;nq&&(this.position=s.m(-(this.Gw.scrollWidth-this.Kb)+u-this.Kb/c+l,this.position.y))),a.aH&&this.qe&&(fr&&(this.position=s.m(this.position.x,-(this.Gw.scrollHeight-this.Jb)+a.scrollTop-this.Jb/c+d))),w.v(s),Ol(this), -this.Fm=this.Cw=!1,b=this.te,c=this.rb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,f=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.dt.style.width="1px"),p>=k&&f>=b&&d<=r&&(this.dt.style.height="1px"))}};D.prototype.computeBounds=D.prototype.sh=function(){0q&&(this.position=s.m(-(this.Gw.scrollWidth-this.Kb)+u-this.Kb/c+l,this.position.y))),a.aH&&this.qe&&(fr&&(this.position=s.m(this.position.x,-(this.Gw.scrollHeight-this.Jb)+a.scrollTop-this.Jb/c+d))),w.v(s),Nl(this), +this.Fm=this.Cw=!1,b=this.te,c=this.rb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,f=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.dt.style.width="1px"),p>=k&&f>=b&&d<=r&&(this.dt.style.height="1px"))}};D.prototype.computeBounds=D.prototype.sh=function(){0c&&(e=c),ea.zh&&(e=a.zh),e):b===Vl?(e=l>k?(h-a.yd)/d:(f-a.yd)/e,e>c&&(e=c),ea.zh&&(e=a.zh),e):a.scale}D.prototype.zoomToFit=D.prototype.zoomToFit=function(){this.scale=Rl(this,Ul)}; -D.prototype.zoomToRect=function(a,b){void 0===b&&(b=Ul);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Ul||b===Vl)if(isNaN(c))e=this.rb.height*this.scale/d;else if(isNaN(d))e=this.rb.width*this.scale/c;else var e=this.Kb,f=this.Jb,e=b===Vl?f/d>e/c?(f-(this.Zj?this.yd:0))/d:(e-(this.ml?this.yd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new y(a.x,a.y)}};w.defineProperty(D,{OA:null},function(){return this.Vc},function(a){this.Vc=a}); -D.prototype.alignDocument=function(a,b){this.$j&&Tl(this,this.sh());var c=this.te,d=this.rb;this.position=new y(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; -function Sl(a,b,c,d,e,f,h){var k=b.x,l=b.y;if(h||a.sB===ul)f.$c()&&(d>c.width&&(k=c.x+(f.x*c.width+f.offsetX)-(f.x*d-f.offsetX)),e>c.height&&(l=c.y+(f.y*c.height+f.offsetY)-(f.y*e-f.offsetY))),f=a.oy,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.ep[0])e=a.ep[c];else return;c=a.Cb;b=a.Kb;a=a.Jb;var f=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),f=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.m(f,h)}D.prototype.invalidateDocumentBounds=D.prototype.Fc=function(){this.$j||(this.$j=!0,this.ye(!0))};function gl(a){a.$d||Ii(a);a.$j&&Tl(a,a.sh())} -D.prototype.redraw=D.prototype.Nu=function(){this.Vc||this.$d||(this.oa(),bm(this),Ol(this),this.Fc(),this.cg())};D.prototype.isUpdateRequested=function(){return this.Tf};D.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Ka,c=b.isEnabled;b.Gh();b.isEnabled=!1;Si(this);this.dh=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)}; -D.prototype.requestUpdate=D.prototype.ye=function(a){void 0===a&&(a=!1);if(!0!==this.Tf&&!(this.Vc||!1===a&&this.$d)){this.Tf=!0;var b=this;requestAnimationFrame(function(){b.Tf&&b.cg()})}};D.prototype.maybeUpdate=D.prototype.cg=function(){if(!this.Eo||this.Tf)this.Eo&&(this.Eo=!1),Si(this)};function cm(a,b){a.Ka.ff||a.Vc||!a.Fm||Ml(a)||(b&&Ii(a),Ql(a,!1))} -function Si(a){if(!a.$d&&(a.Tf=!1,null!==a.Nb)){a.$d=!0;var b=a.Ka,c=a.Hz;if(!b.Po&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.vg.i;if(null===c||0===a.vg.count)break;a.vg=new I(R);a.RB(c,a.vg)}a.ig.each(function(a){a instanceof V&&0!==(a.ya&65536)!==!1&&(a.ya^=65536)})}} -D.prototype.RB=function(a,b){for(a.reset();a.next();){var c=a.value;!c.fe()||c instanceof V||(c.cm()?(zk(c,Infinity,Infinity),c.ic()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof V&&c.isVisible()&&rm(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.cm()?(zk(c,Infinity,Infinity),c.ic()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof kh&&c.isVisible()&&(c.cm()?(zk(c,Infinity,Infinity),c.ic()):b.add(c))}; -function rm(a,b){for(var c=w.eb(),d=w.eb(),e=b.vc;e.next();){var f=e.value;f.isVisible()&&(f instanceof V?(Fm(f)||Gm(f)||Hm(f))&&rm(a,f):f instanceof W?f.W===b||f.Z===b?d.push(f):c.push(f):(zk(f,Infinity,Infinity),f.ic()))}for(var e=c.length,h=0;hc&&(e=c),ea.zh&&(e=a.zh),e):b===Ul?(e=l>k?(h-a.yd)/d:(f-a.yd)/e,e>c&&(e=c),ea.zh&&(e=a.zh),e):a.scale}D.prototype.zoomToFit=D.prototype.zoomToFit=function(){this.scale=Ql(this,Tl)}; +D.prototype.zoomToRect=function(a,b){void 0===b&&(b=Tl);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Tl||b===Ul)if(isNaN(c))e=this.rb.height*this.scale/d;else if(isNaN(d))e=this.rb.width*this.scale/c;else var e=this.Kb,f=this.Jb,e=b===Ul?f/d>e/c?(f-(this.Zj?this.yd:0))/d:(e-(this.ml?this.yd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new y(a.x,a.y)}};w.defineProperty(D,{OA:null},function(){return this.Vc},function(a){this.Vc=a}); +D.prototype.alignDocument=function(a,b){this.$j&&Sl(this,this.sh());var c=this.te,d=this.rb;this.position=new y(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; +function Rl(a,b,c,d,e,f,h){var k=b.x,l=b.y;if(h||a.sB===tl)f.$c()&&(d>c.width&&(k=c.x+(f.x*c.width+f.offsetX)-(f.x*d-f.offsetX)),e>c.height&&(l=c.y+(f.y*c.height+f.offsetY)-(f.y*e-f.offsetY))),f=a.oy,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.ep[0])e=a.ep[c];else return;c=a.Cb;b=a.Kb;a=a.Jb;var f=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),f=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.m(f,h)}D.prototype.invalidateDocumentBounds=D.prototype.Fc=function(){this.$j||(this.$j=!0,this.ye(!0))};function fl(a){a.$d||Hi(a);a.$j&&Sl(a,a.sh())} +D.prototype.redraw=D.prototype.Nu=function(){this.Vc||this.$d||(this.oa(),am(this),Nl(this),this.Fc(),this.cg())};D.prototype.isUpdateRequested=function(){return this.Tf};D.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Ka,c=b.isEnabled;b.Gh();b.isEnabled=!1;Ri(this);this.dh=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)}; +D.prototype.requestUpdate=D.prototype.ye=function(a){void 0===a&&(a=!1);if(!0!==this.Tf&&!(this.Vc||!1===a&&this.$d)){this.Tf=!0;var b=this;requestAnimationFrame(function(){b.Tf&&b.cg()})}};D.prototype.maybeUpdate=D.prototype.cg=function(){if(!this.Eo||this.Tf)this.Eo&&(this.Eo=!1),Ri(this)};function bm(a,b){a.Ka.ff||a.Vc||!a.Fm||Ll(a)||(b&&Hi(a),Pl(a,!1))} +function Ri(a){if(!a.$d&&(a.Tf=!1,null!==a.Nb)){a.$d=!0;var b=a.Ka,c=a.Hz;if(!b.Po&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.vg.i;if(null===c||0===a.vg.count)break;a.vg=new I(R);a.RB(c,a.vg)}a.ig.each(function(a){a instanceof V&&0!==(a.ya&65536)!==!1&&(a.ya^=65536)})}} +D.prototype.RB=function(a,b){for(a.reset();a.next();){var c=a.value;!c.fe()||c instanceof V||(c.cm()?(yk(c,Infinity,Infinity),c.ic()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof V&&c.isVisible()&&jm(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.cm()?(yk(c,Infinity,Infinity),c.ic()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof jh&&c.isVisible()&&(c.cm()?(yk(c,Infinity,Infinity),c.ic()):b.add(c))}; +function jm(a,b){for(var c=w.eb(),d=w.eb(),e=b.vc;e.next();){var f=e.value;f.isVisible()&&(f instanceof V?(rm(f)||Fm(f)||Gm(f))&&jm(a,f):f instanceof W?f.W===b||f.Z===b?d.push(f):c.push(f):(yk(f,Infinity,Infinity),f.ic()))}for(var e=c.length,h=0;hm&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,x=p.height+s+u,q=p.x-q,v=n.x,r=p.right+r,z=n.right+ -k,s=p.y-s,A=n.y,u=p.bottom+u,n=n.bottom+l,L="1px",E="1px",p=a.scale,P=!(tz+1&&(L=Math.max((r-z)*p+a.Kb,L)),m+k+1n+1&&(E=Math.max((u-n)*p+a.Jb,E)),c+l+1m&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,x=p.height+s+u,q=p.x-q,v=n.x,r=p.right+r,z=n.right+ +k,s=p.y-s,A=n.y,u=p.bottom+u,n=n.bottom+l,L="1px",E="1px",p=a.scale,P=!(tz+1&&(L=Math.max((r-z)*p+a.Kb,L)),m+k+1n+1&&(E=Math.max((u-n)*p+a.Jb,E)),c+l+1z+1&&(L=Math.max((r-z)*p+a.Kb,L)),m+1n+1&&(E=Math.max((u-n)*p+k,E)),c+1z+1&&(k=a.position.x*p));if(a.Wr)switch(a.Kz){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth- k-b.clientWidth}b.scrollLeft=k;a.IA&&a.qe&&(c+1n+1&&(b.scrollTop=a.position.y*p));m=a.Kb;c=a.Jb;b.style.width=m+(a.ml?a.yd:0)+"px";b.style.height=c+(a.Zj?a.yd:0)+"px";return d!==m||e!==c||a.Ka.rc?(n=a.rb,a.Ku(f,n,p,a.scale,h),!1):!0} -D.prototype.add=D.prototype.add=function(a){w.G(a,R,D,"add:part");var b=a.g;if(b!==this){null!==b&&w.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Mq&&(a.tl="Tool");var c=a.ag,b=this.Wt(c);null===b&&(b=this.Wt(""));null===b&&w.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.Zp(99999999,a,a.g===this),0<=c&&this.cd(Ff,"parts",b,null,a,null,c),b.Pc||this.Fc(),a.J(Om),c=a.Ox,null!== +D.prototype.add=D.prototype.add=function(a){w.G(a,R,D,"add:part");var b=a.g;if(b!==this){null!==b&&w.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Mq&&(a.tl="Tool");var c=a.ag,b=this.Wt(c);null===b&&(b=this.Wt(""));null===b&&w.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.Zp(99999999,a,a.g===this),0<=c&&this.cd(Ef,"parts",b,null,a,null,c),b.Pc||this.Fc(),a.J(Nm),c=a.Ox,null!== c&&c(a,null,b))}}; -D.prototype.Zp=function(a){if(a instanceof T){if(this.bp.add(a),a instanceof V){var b=a.Da;null===b?this.Fl.add(a):b.Zo.add(a);b=a.Tb;null!==b&&(b.g=this)}}else a instanceof W?this.Vo.add(a):a instanceof kh||this.zb.add(a);var c=this;Pm(a,function(a){Qm(c,a)});(a instanceof kh||a instanceof V&&null!==a.Mb)&&a.H();b=a.data;null!==b&&(a instanceof kh||(a instanceof W?this.Pj.add(b,a):this.Ei.add(b,a)),Pm(a,function(a){Rm(c,a)}));!0!==Gm(a)&&!0!==Hm(a)||this.vg.add(a);Sm(a,!0,this);Tm(a)?(a.Y.I()&&this.oa(pl(a, -a.Y)),this.Fc()):a.isVisible()&&a.Y.I()&&this.oa(pl(a,a.Y));this.ye()}; -D.prototype.sf=function(a){a.Nt();if(a instanceof T){if(this.bp.remove(a),a instanceof V){var b=a.Da;null===b?this.Fl.remove(a):b.Zo.remove(a);b=a.Tb;null!==b&&(b.g=null)}}else a instanceof W?this.Vo.remove(a):a instanceof kh||this.zb.remove(a);var c=this;Pm(a,function(a){Um(c,a)});b=a.data;null!==b&&(a instanceof kh||(a instanceof W?this.Pj.remove(b):this.Ei.remove(b)),Pm(a,function(a){Vm(c,a)}));this.vg.remove(a);Tm(a)?(a.Y.I()&&this.oa(pl(a,a.Y)),this.Fc()):a.isVisible()&&a.Y.I()&&this.oa(pl(a, -a.Y));this.ye()};D.prototype.remove=D.prototype.remove=function(a){w.G(a,R,D,"remove:part");Wm(this,a,!0)};function Wm(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.ib=!1,b.Og=!1,b.J(Xm),c&&b.vn(),c=d.sf(-1,b,!1),0<=c&&a.cd(Qf,"parts",d,b,null,c,null),a=b.Ox,null!==a&&a(b,d,null))} +D.prototype.Zp=function(a){if(a instanceof T){if(this.bp.add(a),a instanceof V){var b=a.Da;null===b?this.Fl.add(a):b.Zo.add(a);b=a.Tb;null!==b&&(b.g=this)}}else a instanceof W?this.Vo.add(a):a instanceof jh||this.zb.add(a);var c=this;Om(a,function(a){Pm(c,a)});(a instanceof jh||a instanceof V&&null!==a.Mb)&&a.H();b=a.data;null!==b&&(a instanceof jh||(a instanceof W?this.Pj.add(b,a):this.Ei.add(b,a)),Om(a,function(a){Qm(c,a)}));!0!==Fm(a)&&!0!==Gm(a)||this.vg.add(a);Rm(a,!0,this);Sm(a)?(a.Y.I()&&this.oa(ol(a, +a.Y)),this.Fc()):a.isVisible()&&a.Y.I()&&this.oa(ol(a,a.Y));this.ye()}; +D.prototype.sf=function(a){a.Nt();if(a instanceof T){if(this.bp.remove(a),a instanceof V){var b=a.Da;null===b?this.Fl.remove(a):b.Zo.remove(a);b=a.Tb;null!==b&&(b.g=null)}}else a instanceof W?this.Vo.remove(a):a instanceof jh||this.zb.remove(a);var c=this;Om(a,function(a){Tm(c,a)});b=a.data;null!==b&&(a instanceof jh||(a instanceof W?this.Pj.remove(b):this.Ei.remove(b)),Om(a,function(a){Um(c,a)}));this.vg.remove(a);Sm(a)?(a.Y.I()&&this.oa(ol(a,a.Y)),this.Fc()):a.isVisible()&&a.Y.I()&&this.oa(ol(a, +a.Y));this.ye()};D.prototype.remove=D.prototype.remove=function(a){w.G(a,R,D,"remove:part");Vm(this,a,!0)};function Vm(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.ib=!1,b.Og=!1,b.J(Wm),c&&b.vn(),c=d.sf(-1,b,!1),0<=c&&a.cd(Ff,"parts",d,b,null,c,null),a=b.Ox,null!==a&&a(b,d,null))} D.prototype.removeParts=D.prototype.oB=function(a,b){if(w.isArray(a))for(var c=w.Za(a),d=0;dd&&this.Fc()}; -D.prototype.addLayerAfter=function(a,b){Ym(this,a,b);a.Sc(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ne&&this.cd(Qf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.Fc()}; -D.prototype.removeLayer=function(a){w.G(a,qg,D,"removeLayer:layer");a.g!==this&&w.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.zb.copy().i;b.next();){var d=b.value,e=d.ag;d.ag=e!==a.name?e:""}null!==this.ne&&this.cd(Qf,"layers",this,a,null,c,null);this.oa();this.Fc()}}};D.prototype.findLayer=D.prototype.Wt=function(a){for(var b=this.Px;b.next();){var c=b.value;if(c.name===a)return c}return null}; +D.prototype.moveParts=D.prototype.moveParts=function(a,b,c){w.G(b,y,D,"moveParts:offset");var d=this.fb;if(null!==d){d=d.ue;null===d&&(d=new nh,d.Sc(this));var e=new ma(R);if(null!==a)a=a.i;else{for(a=this.Qk;a.next();)Vh(d,e,a.value,c);for(a=this.ig;a.next();)Vh(d,e,a.value,c);a=this.links}for(;a.next();)Vh(d,e,a.value,c);d.moveParts(e,b,c)}}; +function Xm(a,b,c){w.G(b,pg,D,"addLayer:layer");null!==b.g&&b.g!==a&&w.k("Cannot share a Layer with another Diagram: "+b+" of "+b.g);null===c?null!==b.g&&w.k("Cannot add an existing Layer to this Diagram again: "+b):(w.G(c,pg,D,"addLayer:existingLayer"),c.g!==a&&w.k("Existing Layer must be in this Diagram: "+c+" not in "+c.g),b===c&&w.k("Cannot move a Layer before or after itself: "+b));if(b.g!==a){b=b.name;a=a.dc;c=a.count;for(var d=0;dd&&this.Fc()}; +D.prototype.addLayerAfter=function(a,b){Xm(this,a,b);a.Sc(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ne&&this.cd(Ff,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.Fc()}; +D.prototype.removeLayer=function(a){w.G(a,pg,D,"removeLayer:layer");a.g!==this&&w.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.zb.copy().i;b.next();){var d=b.value,e=d.ag;d.ag=e!==a.name?e:""}null!==this.ne&&this.cd(Ff,"layers",this,a,null,c,null);this.oa();this.Fc()}}};D.prototype.findLayer=D.prototype.Wt=function(a){for(var b=this.Px;b.next();){var c=b.value;if(c.name===a)return c}return null}; D.prototype.addModelChangedListener=D.prototype.lH=function(a){w.j(a,"function",D,"addModelChangedListener:listener");null===this.hh&&(this.hh=new H("function"));this.hh.add(a);this.$.hn(a)};D.prototype.removeModelChangedListener=function(a){w.j(a,"function",D,"removeModelChangedListener:listener");null!==this.hh&&(this.hh.remove(a),0===this.hh.count&&(this.hh=null));this.$.Ou(a)}; -D.prototype.addChangedListener=D.prototype.hn=function(a){w.j(a,"function",D,"addChangedListener:listener");null===this.zi&&(this.zi=new H("function"));this.zi.add(a)};D.prototype.removeChangedListener=D.prototype.Ou=function(a){w.j(a,"function",D,"removeChangedListener:listener");null!==this.zi&&(this.zi.remove(a),0===this.zi.count&&(this.zi=null))};D.prototype.jx=function(a){this.cb||this.ja.rF(a);a.Dc!==Ef&&(this.pi=!0);if(null!==this.zi)for(var b=this.zi,c=b.length,d=0;da.zh&&(c=a.zh);e=w.xb(a.jb.x+h/b-h/c,a.jb.y+k/b-k/c);a.position=e;w.v(e);a.vb=c;a.Ku(d,a.rb,b,c,!1);a.Vc=!1;Ql(a, -!1);c=a.Ka;c.rc&&kl(c,b,a.vb);a.oa();bm(a)}} -D.prototype.Ku=function(a,b,c,d,e){a.L(b)||(void 0===e&&(e=!1),e||bm(this),Ol(this),d=this.Tb,null===d||!d.Lx||this.Nl!==ph||e||a.width===b.width&&a.height===b.height||d.J(),d=this.$a,!0===this.eh&&d instanceof ih&&(this.R.da=this.OB(this.R.Ce),Dk(d,this)),this.Vc||this.wF(a,b),em(this),this.nh.scale=c,this.nh.position.x=a.x,this.nh.position.y=a.y,this.nh.bounds.set(a),this.nh.isScroll=e,this.Aa("ViewportBoundsChanged",this.nh,a),this.TA&&this.links.each(function(a){a.$l&&a.Y.Zf(b)&&a.Wb()}))}; -function em(a,b){void 0===b&&(b=null);var c=a.td;if(null!==c&&c.visible){for(var d=w.nm(),e=1,f=1,h=c.xa.n,k=h.length,l=0;ln||($m(m.Db)?f=f*n/Ae(f,n):e=e*n/Ae(e,n))}h=c.Ex;d.m(f*h.width,e*h.height);h=f=l=k=0;if(null!==b)k=b.width,l=b.height,f=b.x,h=b.y;else{e=w.Kf();f=a.rb;e.m(f.x,f.y,f.width,f.height);for(h=a.ww.i;h.next();)f=h.value.rb,f.I()&&ab(e,f.x,f.y,f.width,f.height);if(!e.I()){w.Eb(e);return}k=e.width;l=e.height;f=e.x;h=e.y;w.Eb(e)}c.width=k+2*d.width;c.height= -l+2*d.height;e=w.K();Na(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.Ik(d);c.U.location=e;w.v(e)}}D.prototype.clearSelection=D.prototype.kx=function(){var a=0a.zh&&(c=a.zh);e=w.xb(a.jb.x+h/b-h/c,a.jb.y+k/b-k/c);a.position=e;w.v(e);a.vb=c;a.Ku(d,a.rb,b,c,!1);a.Vc=!1;Pl(a, +!1);c=a.Ka;c.rc&&jl(c,b,a.vb);a.oa();am(a)}} +D.prototype.Ku=function(a,b,c,d,e){a.L(b)||(void 0===e&&(e=!1),e||am(this),Nl(this),d=this.Tb,null===d||!d.Lx||this.Nl!==oh||e||a.width===b.width&&a.height===b.height||d.J(),d=this.$a,!0===this.eh&&d instanceof hh&&(this.R.da=this.OB(this.R.Ce),Ck(d,this)),this.Vc||this.wF(a,b),dm(this),this.nh.scale=c,this.nh.position.x=a.x,this.nh.position.y=a.y,this.nh.bounds.set(a),this.nh.isScroll=e,this.Aa("ViewportBoundsChanged",this.nh,a),this.TA&&this.links.each(function(a){a.$l&&a.Y.Zf(b)&&a.Wb()}))}; +function dm(a,b){void 0===b&&(b=null);var c=a.td;if(null!==c&&c.visible){for(var d=w.nm(),e=1,f=1,h=c.xa.n,k=h.length,l=0;ln||(Zm(m.Db)?f=f*n/ze(f,n):e=e*n/ze(e,n))}h=c.Ex;d.m(f*h.width,e*h.height);h=f=l=k=0;if(null!==b)k=b.width,l=b.height,f=b.x,h=b.y;else{e=w.Kf();f=a.rb;e.m(f.x,f.y,f.width,f.height);for(h=a.ww.i;h.next();)f=h.value.rb,f.I()&&ab(e,f.x,f.y,f.width,f.height);if(!e.I()){w.Eb(e);return}k=e.width;l=e.height;f=e.x;h=e.y;w.Eb(e)}c.width=k+2*d.width;c.height= +l+2*d.height;e=w.K();Na(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.Ik(d);c.U.location=e;w.v(e)}}D.prototype.clearSelection=D.prototype.kx=function(){var a=0a&&w.Fa(a,">= 0",D,"scrollHorizontalLineChange"),this.Dw=a,this.h("scrollHorizontalLineChange",b,a))}); w.defineProperty(D,{Uu:"scrollVerticalLineChange"},function(){return this.Hw},function(a){var b=this.Hw;b!==a&&(w.j(a,"number",D,"scrollVerticalLineChange"),0>a&&w.Fa(a,">= 0",D,"scrollVerticalLineChange"),this.Hw=a,this.h("scrollVerticalLineChange",b,a))});w.defineProperty(D,{R:"lastInput"},function(){return this.Rb},function(a){this.Rb=a});w.defineProperty(D,{Ec:"firstInput"},function(){return this.Li},function(a){this.Li=a}); w.defineProperty(D,{jc:"currentCursor"},function(){return this.yv},function(a){""===a&&(a=this.qr);var b=this.yv;if(b!==a){w.j(a,"string",D,"currentCursor");var c=this.Cb,d=this.Nb;null!==c&&(this.yv=a,c.style.cursor=a,d.style.cursor=a,c.style.cursor===b&&(c.style.cursor="-webkit-"+a,d.style.cursor="-webkit-"+a,c.style.cursor===b&&(c.style.cursor="-moz-"+a,d.style.cursor="-moz-"+a,c.style.cursor===b&&(c.style.cursor=a,d.style.cursor=a))))}}); @@ -872,41 +872,41 @@ w.defineProperty(D,{St:"doubleClick"},function(){return this.Ii},function(a){var w.defineProperty(D,{dB:"mouseOver"},function(){return this.Yi},function(a){var b=this.Yi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseOver"),this.Yi=a,this.h("mouseOver",b,a))});w.defineProperty(D,{cB:"mouseHover"},function(){return this.Xi},function(a){var b=this.Xi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHover"),this.Xi=a,this.h("mouseHover",b,a))}); w.defineProperty(D,{bB:"mouseHold"},function(){return this.Wi},function(a){var b=this.Wi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHold"),this.Wi=a,this.h("mouseHold",b,a))});w.defineProperty(D,{cJ:"mouseDragOver"},function(){return this.pw},function(a){var b=this.pw;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDragOver"),this.pw=a,this.h("mouseDragOver",b,a))}); w.defineProperty(D,{aB:"mouseDrop"},function(){return this.Vi},function(a){var b=this.Vi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDrop"),this.Vi=a,this.h("mouseDrop",b,a))});w.defineProperty(D,{KB:"toolTip"},function(){return this.gj},function(a){var b=this.gj;b!==a&&(this.gj=a,this.h("toolTip",b,a))});w.defineProperty(D,{contextMenu:"contextMenu"},function(){return this.Di},function(a){var b=this.Di;b!==a&&(this.Di=a,this.h("contextMenu",b,a))}); -w.defineProperty(D,{pb:"commandHandler"},function(){return this.Uy},function(a){var b=this.Uy;b!==a&&(w.G(a,sg,D,"commandHandler"),null!==a.g&&w.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Sc(null),this.Uy=a,a.Sc(this))});w.defineProperty(D,{fb:"toolManager"},function(){return this.Vz},function(a){var b=this.Vz;b!==a&&(w.G(a,ih,D,"toolManager"),null!==a.g&&w.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Sc(null),this.Vz=a,a.Sc(this))}); -w.defineProperty(D,{Qt:"defaultTool"},function(){return this.$y},function(a){var b=this.$y;b!==a&&(w.G(a,rg,D,"defaultTool"),this.$y=a,this.$a===b&&(this.$a=a))});w.defineProperty(D,{$a:"currentTool"},function(){return this.Xy},function(a){var b=this.Xy;null!==b&&(b.sa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.Qt);null!==a&&(w.G(a,rg,D,"currentTool"),this.Xy=a,a.Sc(this),a.doStart())});w.u(D,{selection:"selection"},function(){return this.Kw}); +w.defineProperty(D,{pb:"commandHandler"},function(){return this.Uy},function(a){var b=this.Uy;b!==a&&(w.G(a,rg,D,"commandHandler"),null!==a.g&&w.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Sc(null),this.Uy=a,a.Sc(this))});w.defineProperty(D,{fb:"toolManager"},function(){return this.Vz},function(a){var b=this.Vz;b!==a&&(w.G(a,hh,D,"toolManager"),null!==a.g&&w.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Sc(null),this.Vz=a,a.Sc(this))}); +w.defineProperty(D,{Qt:"defaultTool"},function(){return this.$y},function(a){var b=this.$y;b!==a&&(w.G(a,qg,D,"defaultTool"),this.$y=a,this.$a===b&&(this.$a=a))});w.defineProperty(D,{$a:"currentTool"},function(){return this.Xy},function(a){var b=this.Xy;null!==b&&(b.sa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.Qt);null!==a&&(w.G(a,qg,D,"currentTool"),this.Xy=a,a.Sc(this),a.doStart())});w.u(D,{selection:"selection"},function(){return this.Kw}); w.defineProperty(D,{UI:"maxSelectionCount"},function(){return this.lw},function(a){var b=this.lw;if(b!==a)if(w.j(a,"number",D,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.lw=a,this.h("maxSelectionCount",b,a),!this.ja.lb&&(a=this.selection.count-a,0= 0",D,"maxSelectionCount")}); -w.defineProperty(D,{gJ:"nodeSelectionAdornmentTemplate"},function(){return this.qw},function(a){var b=this.qw;b!==a&&(w.G(a,kh,D,"nodeSelectionAdornmentTemplate"),this.qw=a,this.h("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(D,{jI:"groupSelectionAdornmentTemplate"},function(){return this.Ov},function(a){var b=this.Ov;b!==a&&(w.G(a,kh,D,"groupSelectionAdornmentTemplate"),this.Ov=a,this.h("groupSelectionAdornmentTemplate",b,a))}); -w.defineProperty(D,{NI:"linkSelectionAdornmentTemplate"},function(){return this.gw},function(a){var b=this.gw;b!==a&&(w.G(a,kh,D,"linkSelectionAdornmentTemplate"),this.gw=a,this.h("linkSelectionAdornmentTemplate",b,a))});w.u(D,{Zl:"highlighteds"},function(){return this.Sv}); -w.defineProperty(D,{pi:"isModified"},function(){var a=this.ja;return a.isEnabled?null!==a.pj?!0:this.Yv&&this.bh!==a.uj:this.Yv},function(a){if(this.Yv!==a){w.j(a,"boolean",D,"isModified");this.Yv=a;var b=this.ja;!a&&b.isEnabled&&(this.bh=b.uj);a||cn(this)}});function cn(a){var b=a.pi;a.nE!==b&&(a.nE=b,a.Aa("Modified"))} -w.defineProperty(D,{$:"model"},function(){return this.ne},function(a){var b=this.ne;if(b!==a){w.G(a,F,D,"model");this.$a.doCancel();null!==b&&b.ja!==a.ja&&b.ja.CF&&w.k("Do not replace a Diagram.model while a transaction is in progress.");this.Ka.Gh();this.kx();this.dh=!1;this.Eo=!0;this.bh=-2;this.Tf=!1;var c=this.$d;this.$d=!0;this.Ka.Un("Model");null!==b&&(null!==this.hh&&this.hh.each(function(a){b.Ou(a)}),b.Ou(this.vD),b instanceof Q&&dn(this,b.Pg),dn(this,b.hg));this.ne=a;a.hn(this.uD);en(this, -a.hg);a instanceof Q&&fn(this,a.Pg);a.Ou(this.uD);a.hn(this.vD);null!==this.hh&&this.hh.each(function(b){a.hn(b)});this.$d=c;this.Vc||this.oa();null!==b&&(a.ja.isEnabled=b.ja.isEnabled)}});w.defineProperty(D,{Ua:null},function(){return this.nD},function(a){this.nD=a});w.u(D,{Tx:null},function(){return this.TG}); -function yl(a,b){if(b.$===a.$){var c=b.Dc,d=b.propertyName;if(c===Ef&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.fb,c.jf.each(function(b){b.Sc(a)}),c.dg.each(function(b){b.Sc(a)}),c.eg.each(function(b){b.Sc(a)}),a.$d||a.dh||(a.vr=!0,a.Eo&&(a.Tf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Ka;e.ff&&!a.cb&&e.Gh();a.Aa("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Ka,e.ff&&!a.cb&&e.Gh());else if(a.Ua){a.Ua=!1;try{var f=b.uf;if(""!==f)if(c===Df){if("linkFromKey"===f){var h= +w.defineProperty(D,{gJ:"nodeSelectionAdornmentTemplate"},function(){return this.qw},function(a){var b=this.qw;b!==a&&(w.G(a,jh,D,"nodeSelectionAdornmentTemplate"),this.qw=a,this.h("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(D,{jI:"groupSelectionAdornmentTemplate"},function(){return this.Ov},function(a){var b=this.Ov;b!==a&&(w.G(a,jh,D,"groupSelectionAdornmentTemplate"),this.Ov=a,this.h("groupSelectionAdornmentTemplate",b,a))}); +w.defineProperty(D,{NI:"linkSelectionAdornmentTemplate"},function(){return this.gw},function(a){var b=this.gw;b!==a&&(w.G(a,jh,D,"linkSelectionAdornmentTemplate"),this.gw=a,this.h("linkSelectionAdornmentTemplate",b,a))});w.u(D,{Zl:"highlighteds"},function(){return this.Sv}); +w.defineProperty(D,{pi:"isModified"},function(){var a=this.ja;return a.isEnabled?null!==a.pj?!0:this.Yv&&this.bh!==a.uj:this.Yv},function(a){if(this.Yv!==a){w.j(a,"boolean",D,"isModified");this.Yv=a;var b=this.ja;!a&&b.isEnabled&&(this.bh=b.uj);a||bn(this)}});function bn(a){var b=a.pi;a.nE!==b&&(a.nE=b,a.Aa("Modified"))} +w.defineProperty(D,{$:"model"},function(){return this.ne},function(a){var b=this.ne;if(b!==a){w.G(a,F,D,"model");this.$a.doCancel();null!==b&&b.ja!==a.ja&&b.ja.CF&&w.k("Do not replace a Diagram.model while a transaction is in progress.");this.Ka.Gh();this.kx();this.dh=!1;this.Eo=!0;this.bh=-2;this.Tf=!1;var c=this.$d;this.$d=!0;this.Ka.Un("Model");null!==b&&(null!==this.hh&&this.hh.each(function(a){b.Ou(a)}),b.Ou(this.vD),b instanceof Q&&cn(this,b.Pg),cn(this,b.hg));this.ne=a;a.hn(this.uD);dn(this, +a.hg);a instanceof Q&&en(this,a.Pg);a.Ou(this.uD);a.hn(this.vD);null!==this.hh&&this.hh.each(function(b){a.hn(b)});this.$d=c;this.Vc||this.oa();null!==b&&(a.ja.isEnabled=b.ja.isEnabled)}});w.defineProperty(D,{Ua:null},function(){return this.nD},function(a){this.nD=a});w.u(D,{Tx:null},function(){return this.TG}); +function xl(a,b){if(b.$===a.$){var c=b.Dc,d=b.propertyName;if(c===Df&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.fb,c.jf.each(function(b){b.Sc(a)}),c.dg.each(function(b){b.Sc(a)}),c.eg.each(function(b){b.Sc(a)}),a.$d||a.dh||(a.vr=!0,a.Eo&&(a.Tf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Ka;e.ff&&!a.cb&&e.Gh();a.Aa("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Ka,e.ff&&!a.cb&&e.Gh());else if(a.Ua){a.Ua=!1;try{var f=b.uf;if(""!==f)if(c===Cf){if("linkFromKey"===f){var h= b.object,k=a.Xf(h);if(null!==k){var l=b.newValue,m=a.Me(l);k.W=m}}else if("linkToKey"===f)h=b.object,k=a.Xf(h),null!==k&&(l=b.newValue,m=a.Me(l),k.Z=m);else if("linkFromPortId"===f){if(h=b.object,k=a.Xf(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Ng=n)}}else if("linkToPortId"===f)h=b.object,k=a.Xf(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.Hh=n));else if("nodeGroupKey"===f){var h=b.object,p=a.vh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Me(q);p.Da=r instanceof V?r: -null}else p.Da=null}}else if("linkLabelKeys"===f){if(h=b.object,k=a.Xf(h),null!==k){var s=b.oldValue,u=b.newValue;if(w.isArray(s))for(var t=w.Za(s),x=0;xl)){var m=l;nn(k)&&m++;k.sf(m,!0);on(k,m,l)}}}}function Rm(a,b){var c=b.ek;if(w.isArray(c)){var d=a.Im.ka(c);if(null===d)d=[],d.push(b),a.Im.add(c,d);else{for(c=0;cl)){var m=l;mn(k)&&m++;k.sf(m,!0);nn(k,m,l)}}}}function Qm(a,b){var c=b.ek;if(w.isArray(c)){var d=a.Im.ka(c);if(null===d)d=[],d.push(b),a.Im.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):w.Fa(a,"> 0",D,"minScale"))}); w.defineProperty(D,{zh:"maxScale"},function(){return this.kw},function(a){w.Ad(a,D,"maxScale");var b=this.kw;b!==a&&(0 0",D,"maxScale"))});w.defineProperty(D,{qm:"zoomPoint"},function(){return this.Xw},function(a){this.Xw.L(a)||(w.G(a,y,D,"zoomPoint"),this.Xw=a=a.S())}); -w.defineProperty(D,{kA:"contentAlignment"},function(){return this.qo},function(a){var b=this.qo;b.L(a)||(w.G(a,K,D,"contentAlignment"),this.qo=a=a.S(),this.h("contentAlignment",b,a),Ql(this,!1))});w.defineProperty(D,{iL:"initialContentAlignment"},function(){return this.Jo},function(a){var b=this.Jo;b.L(a)||(w.G(a,K,D,"initialContentAlignment"),this.Jo=a=a.S(),this.h("initialContentAlignment",b,a))}); +w.defineProperty(D,{kA:"contentAlignment"},function(){return this.qo},function(a){var b=this.qo;b.L(a)||(w.G(a,K,D,"contentAlignment"),this.qo=a=a.S(),this.h("contentAlignment",b,a),Pl(this,!1))});w.defineProperty(D,{iL:"initialContentAlignment"},function(){return this.Jo},function(a){var b=this.Jo;b.L(a)||(w.G(a,K,D,"initialContentAlignment"),this.Jo=a=a.S(),this.h("initialContentAlignment",b,a))}); w.defineProperty(D,{padding:"padding"},function(){return this.nf},function(a){"number"===typeof a?a=new hb(a):w.G(a,hb,D,"padding");var b=this.nf;b.L(a)||(this.nf=a=a.S(),this.Fc(),this.h("padding",b,a))});w.u(D,{ig:"nodes"},function(){return this.bp.i});w.u(D,{links:"links"},function(){return this.Vo.i});w.u(D,{Qk:"parts"},function(){return this.zb.i}); -D.prototype.findTopLevelNodesAndLinks=function(){for(var a=new I(R),b=this.bp.i;b.next();){var c=b.value;c.dq&&a.add(c)}for(b=this.Vo.i;b.next();)c=b.value,c.dq&&a.add(c);return a.i};D.prototype.findTopLevelGroups=function(){return this.Fl.i};w.defineProperty(D,{Tb:"layout"},function(){return this.le},function(a){var b=this.le;b!==a&&(w.G(a,tg,D,"layout"),null!==b&&(b.g=null,b.group=null),this.le=a,a.g=this,a.group=null,this.Mj=!0,this.h("layout",b,a),this.ye())}); -D.prototype.layoutDiagram=function(a){Ii(this);a&&tn(this,!0);fm(this,!1)};function tn(a,b){for(var c=a.Fl.i;c.next();)An(a,c.value,b);null!==a.Tb&&(b?a.Tb.tf=!1:a.Tb.J())}function An(a,b,c){if(null!==b){for(var d=b.Zo.i;d.next();)An(a,d.value,c);null!==b.Tb&&(c?b.Tb.tf=!1:b.Tb.J())}} -function fm(a,b){if(a.Mj&&!a.az){var c=a.Ua;a.Ua=!0;try{var d=a.ja.ti;0===d&&a.Hb("Layout");var e=a.Ka;1>=d&&!e.ff&&!e.rc&&(b||e.Un("Layout"));a.Mj=!1;for(var f=a.Fl.i;f.next();)Bn(a,f.value,b,d);var h=a.Tb;h.tf||(!b||h.GF||0===d?(h.doLayout(a),Ii(a),h.tf=!0):a.Mj=!0)}finally{0===d&&a.Yc("Layout"),a.Mj=!h.tf,a.Ua=c}}} -function Bn(a,b,c,d){if(null!==b){for(var e=b.Zo.i;e.next();)Bn(a,e.value,c,d);e=b.Tb;null===e||e.tf||(!c||e.GF||0===d?(b.Sn=!b.location.I(),e.doLayout(b),b.J(Cn),rm(a,b),e.tf=!0):a.Mj=!0)}}w.defineProperty(D,{Ud:"isTreePathToChildren"},function(){return this.aw},function(a){var b=this.aw;if(b!==a&&(w.j(a,"boolean",D,"isTreePathToChildren"),this.aw=a,this.h("isTreePathToChildren",b,a),!this.ja.lb))for(a=this.ig;a.next();)Dn(a.value)}); -D.prototype.findTreeRoots=function(){for(var a=new H(T),b=this.ig;b.next();){var c=b.value;c.dq&&null===c.xn()&&a.add(c)}return a.i};w.defineProperty(D,{PB:"treeCollapsePolicy"},function(){return this.Sw},function(a){var b=this.Sw;b!==a&&(a!==wl&&a!==an&&a!==bn&&w.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Sw=a,this.h("treeCollapsePolicy",b,a))});w.defineProperty(D,{xh:null},function(){return this.cD},function(a){this.cD=a}); -function vl(a){function b(a){var b=a.toLowerCase(),h=new H("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ma("string",H),d=new ma("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); +D.prototype.findTopLevelNodesAndLinks=function(){for(var a=new I(R),b=this.bp.i;b.next();){var c=b.value;c.dq&&a.add(c)}for(b=this.Vo.i;b.next();)c=b.value,c.dq&&a.add(c);return a.i};D.prototype.findTopLevelGroups=function(){return this.Fl.i};w.defineProperty(D,{Tb:"layout"},function(){return this.le},function(a){var b=this.le;b!==a&&(w.G(a,sg,D,"layout"),null!==b&&(b.g=null,b.group=null),this.le=a,a.g=this,a.group=null,this.Mj=!0,this.h("layout",b,a),this.ye())}); +D.prototype.layoutDiagram=function(a){Hi(this);a&&sn(this,!0);em(this,!1)};function sn(a,b){for(var c=a.Fl.i;c.next();)zn(a,c.value,b);null!==a.Tb&&(b?a.Tb.tf=!1:a.Tb.J())}function zn(a,b,c){if(null!==b){for(var d=b.Zo.i;d.next();)zn(a,d.value,c);null!==b.Tb&&(c?b.Tb.tf=!1:b.Tb.J())}} +function em(a,b){if(a.Mj&&!a.az){var c=a.Ua;a.Ua=!0;try{var d=a.ja.ti;0===d&&a.Hb("Layout");var e=a.Ka;1>=d&&!e.ff&&!e.rc&&(b||e.Un("Layout"));a.Mj=!1;for(var f=a.Fl.i;f.next();)An(a,f.value,b,d);var h=a.Tb;h.tf||(!b||h.GF||0===d?(h.doLayout(a),Hi(a),h.tf=!0):a.Mj=!0)}finally{0===d&&a.Yc("Layout"),a.Mj=!h.tf,a.Ua=c}}} +function An(a,b,c,d){if(null!==b){for(var e=b.Zo.i;e.next();)An(a,e.value,c,d);e=b.Tb;null===e||e.tf||(!c||e.GF||0===d?(b.Sn=!b.location.I(),e.doLayout(b),b.J(Bn),jm(a,b),e.tf=!0):a.Mj=!0)}}w.defineProperty(D,{Ud:"isTreePathToChildren"},function(){return this.aw},function(a){var b=this.aw;if(b!==a&&(w.j(a,"boolean",D,"isTreePathToChildren"),this.aw=a,this.h("isTreePathToChildren",b,a),!this.ja.lb))for(a=this.ig;a.next();)Cn(a.value)}); +D.prototype.findTreeRoots=function(){for(var a=new H(T),b=this.ig;b.next();){var c=b.value;c.dq&&null===c.xn()&&a.add(c)}return a.i};w.defineProperty(D,{PB:"treeCollapsePolicy"},function(){return this.Sw},function(a){var b=this.Sw;b!==a&&(a!==vl&&a!==$m&&a!==an&&w.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Sw=a,this.h("treeCollapsePolicy",b,a))});w.defineProperty(D,{xh:null},function(){return this.cD},function(a){this.cD=a}); +function ul(a){function b(a){var b=a.toLowerCase(),h=new H("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ma("string",H),d=new ma("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.cz=c;a.bz=d} -function oa(a,b){var c=a.bz.ka(b);return null!==c?c:a.bz.ka(b.toLowerCase())}function En(a,b){var c=a.cz.ka(b);if(null!==c)return c;c=a.cz.ka(b.toLowerCase());if(null!==c)return c;w.k("Unknown DiagramEvent name: "+b);return null}D.prototype.addDiagramListener=D.prototype.Yw=function(a,b){w.j(a,"string",D,"addDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=En(this,a);null!==c&&c.add(b)}; -D.prototype.removeDiagramListener=D.prototype.nB=function(a,b){w.j(a,"string",D,"removeDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=En(this,a);null!==c&&c.remove(b)};D.prototype.raiseDiagramEvent=D.prototype.Aa=function(a,b,c){var d=En(this,a),e=new Bf;e.g=this;a=oa(this,a);null!==a&&(e.name=a);void 0!==b&&(e.GB=b);void 0!==c&&(e.iB=c);b=d.length;if(1===b)d=d.ea(0),d(e);else if(0!==b)for(c=d.xc(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.rb,f=a.scale,e=w.lg(0,0,e.width*f,e.height*f),h=w.xb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Tu,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.Uu,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Oc(dd)||(c=new y(c.x+h.x/f,c.y+h.y/f));w.Eb(e);w.v(h);return c}D.prototype.makeSvg=D.prototype.makeSVG=function(a){void 0===a&&(a=new ra);a.context="svg";a=Mn(this,a);return null!==a?a.lm:null}; +D.prototype.doAutoScroll=D.prototype.tA=function(a){this.qv.assign(a);Jn(this,this.qv).Oc(this.position)?Yh(this):Kn(this)};function Kn(a){-1===a.lo&&(a.lo=w.setTimeout(function(){if(-1!==a.lo){Yh(a);var b=a.R.event;if(null!==b){var c=Jn(a,a.qv);c.Oc(a.position)||(a.position=c,a.R.da=a.OB(a.qv),c=Xl(b),a.simulatedMouseMove(b,null,c)||a.doMouseMove(),a.$j=!0,Sl(a,a.sh()),a.Fe=!0,a.cg(),Kn(a))}}},a.Uq))}function Yh(a){-1!==a.lo&&(w.clearTimeout(a.lo),a.lo=-1)} +function Jn(a,b){var c=a.position,d=a.EE;if(0>=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.rb,f=a.scale,e=w.lg(0,0,e.width*f,e.height*f),h=w.xb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Tu,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.Uu,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Oc(cd)||(c=new y(c.x+h.x/f,c.y+h.y/f));w.Eb(e);w.v(h);return c}D.prototype.makeSvg=D.prototype.makeSVG=function(a){void 0===a&&(a=new ra);a.context="svg";a=Ln(this,a);return null!==a?a.lm:null}; D.prototype.makeImage=function(a){void 0===a&&(a=new ra);var b=(a.document||document).createElement("img");b.src=this.OI(a);return b}; -D.prototype.makeImageData=D.prototype.OI=function(a){void 0===a&&(a=new ra);var b=Mn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Ck.getImageData(0,0,b.width,b.height);case "blob":b=b.Od;c=a.callback;if("function"!==typeof c){w.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== -typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Nn=!1; -function Mn(a,b){a.Ka.Gh();a.cg();if(null===a.Cb)return null;"object"!==typeof b&&w.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var f=b.maxSize;void 0===b.maxSize&&(c=!0,f="svg"===b.context?new ia(Infinity,Infinity):new ia(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= -b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new hb(l):l instanceof hb||w.k("MakeImage padding must be a Margin or a number.");l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.kf.Je(!0);var s=new Wc(null,p),u=s.Ck;if(!(d||e||k||h)){s.width=a.Kb+Math.ceil(l.left+l.right);s.height=a.Jb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new Oc(s.Od, -p,q),Lm(a,u,l,new ia(s.width,s.height),a.vb,a.jb,k,m,r,n),u;a.xr=!1;Lm(a,u,l,new ia(s.width,s.height),a.vb,a.jb,k,m,r,n);a.xr=!0;return s}var t=a.pb.qx,x=new y(0,0),v=a.te.copy();v.PJ(a.padding);if(r)for(var z=!0,z=a.dc.n,A=z.length,L=0;Lt?(e=t,h=v.width,ba=v.height):(h=f.width,ba=f.height)):(h=v.width*e,ba=v.height*e):(e=t,h=v.width,ba=v.height);null!==l?(h+=S,ba+=z):l=new hb(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!Nn&&(h>d||ba>f)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ba)+ -" vs 2000x2000) Consider increasing the max size."),Nn=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&(ba=Math.min(ba,f)));s.width=Math.ceil(h);s.height=Math.ceil(ba);if("svg"===b.context)return u=new Oc(s.Od,p,q),Lm(a,u,l,new ia(Math.ceil(h),Math.ceil(ba)),e,x,k,m,r,n),u;a.xr=!1;Lm(a,u,l,new ia(Math.ceil(h),Math.ceil(ba)),e,x,k,m,r,n);a.xr=!0;return s} -D.inherit=function(a,b){w.j(a,"function",D,"inherit");w.j(b,"function",D,"inherit");b.bH&&w.k("Cannot inherit from "+w.qf(b));w.La(a,b)};function El(){this.XD=null;this.dH="63ad05bbe23a1786468a4c741b6d2";this.Ji=this.dH===this._tk?!0:null} -El.prototype.pm=function(a){a.kf.setTransform(a.Jd,0,0,a.Jd,0,0);if(null===this.Ji){var b="f",c=window[w.Kg("76a715b2f73f148a")][w.Kg("72ba13b5")];a=w.Kg;this.Ji=!0;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9"));if(!(6>d.length)){var e=a(d[1]).split(".");if("7da71ca0"===d[4]){var f=a(w[a("6cae19")]).split(".");if(e[0]>f[0]||e[0]===f[0]&&e[1]>=f[1]){f=c[a("76ad18b4f73e")];for(e=c[a("73a612b6fb191d")](a("35e7"))+ +h=A,ba=L):isNaN(L)?(e=A/v.width,h=A,ba=v.height*e):(e=L/v.height,h=v.width*e,ba=L):null!==e?"NaN"===e&&f.I()?(e=Math.min((f.width-S)/v.width,(f.height-z)/v.height),e>t?(e=t,h=v.width,ba=v.height):(h=f.width,ba=f.height)):(h=v.width*e,ba=v.height*e):(e=t,h=v.width,ba=v.height);null!==l?(h+=S,ba+=z):l=new hb(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!Mn&&(h>d||ba>f)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ba)+ +" vs 2000x2000) Consider increasing the max size."),Mn=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&(ba=Math.min(ba,f)));s.width=Math.ceil(h);s.height=Math.ceil(ba);if("svg"===b.context)return u=new Oc(s.Od,p,q),Km(a,u,l,new ia(Math.ceil(h),Math.ceil(ba)),e,x,k,m,r,n),u;a.xr=!1;Km(a,u,l,new ia(Math.ceil(h),Math.ceil(ba)),e,x,k,m,r,n);a.xr=!0;return s} +D.inherit=function(a,b){w.j(a,"function",D,"inherit");w.j(b,"function",D,"inherit");b.bH&&w.k("Cannot inherit from "+w.qf(b));w.La(a,b)};function Dl(){this.XD=null;this.dH="63ad05bbe23a1786468a4c741b6d2";this.Ji=this.dH===this._tk?!0:null} +Dl.prototype.pm=function(a){a.kf.setTransform(a.Jd,0,0,a.Jd,0,0);if(null===this.Ji){var b="f",c=window[w.Kg("76a715b2f73f148a")][w.Kg("72ba13b5")];a=w.Kg;this.Ji=!0;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9"));if(!(6>d.length)){var e=a(d[1]).split(".");if("7da71ca0"===d[4]){var f=a(w[a("6cae19")]).split(".");if(e[0]>f[0]||e[0]===f[0]&&e[1]>=f[1]){f=c[a("76ad18b4f73e")];for(e=c[a("73a612b6fb191d")](a("35e7"))+ 2;ec&&a(d[2])!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));0>c&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));if(this.Ji=!(0<=c&&ce.length;)e+="9";e=e.substr(e.length-4);d=""+["gsh","gsf"][parseInt(e.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(e.substr(0, 1),10)%4];c[a("79a417a0f0181a8946")]=d;if(window.document[a("78a712aa")]){if(window.document[a("78a712aa")][a("7bb806b6ed32388c4a875b")](c),e=window[a("7dad0290ec3b0b91578e5b40007031bf")](c)[a("7dad0283f1390b81519f4645156528bf")](a("78a704b7e62456904c9b12701b6532a8")),window.document[a("78a712aa")][a("68ad1bbcf533388c4a875b")](c),e)if(-1!==e.indexOf(parseInt(b[1]+b[2],16))&&-1!==e.indexOf(parseInt(b[3]+b[4],16)))this.Ji=!1;else if(w.su||w.bq||w.cq||w.PA)for(d="."+d,e=0;eb.timeStamp-a.fk)b.preventDefault();else if(a.ck)b.preventDefault();else{a.wd=a.Rb;a.Rb=c;Wl(a,a,b,c,!0);c.Ek=!0;c.re=b.detail;if(w.bq||w.cq)b.timeStamp-a.fkb.timeStamp-a.fk){b.preventDefault();return}a.fk=b.timeStamp}if(w.En&&null!==a.mt)a.mt=null,b.preventDefault();else{a.wd=a.Rb;a.Rb=c;Wl(a,a,b,c,!0);c.up=!0;c.re=b.detail;if(w.bq||w.cq)c.re=a.Uh;c.bubbles=b.bubbles;c.If=Yl(b);a.simulatedMouseUp(b,null,new y,c.If)||(a.doMouseUp(),Zh(a),am(c,b))}}};a.Rn=function(b){if(a.isEnabled){var c= -a.wd;a.wd=a.Rb;a.Rb=c;Wl(a,a,b,c,!0);c.bubbles=!0;var d=0,e=0;void 0!==b.wheelDelta&&(e=0n||Math.abs(m.y-b.screenY)>n)?a.Uh++:a.Uh=1;d.re=a.Uh;a.fk=b.timeStamp;a.dw.m(b.screenX,b.screenY);m=0;b.ctrlKey&&(m+=1);b.altKey&&(m+=2);b.shiftKey&&(m+=4);b.metaKey&&(m+=8);d.md=m;d.button=b.button;void 0===b.buttons||w.su||(d.buttons=b.buttons);w.yh&&0===b.button&&b.ctrlKey&&(d.button=2);d.Ek=!1;d.up=!0;d.Dk=0;d.tc=!1;d.bubbles=!0;d.event=b;d.timestamp=Date.now();d.If=null===e?Yl(b):e.aa?e.aa:null; -d.Be=null;a.simulatedMouseUp(b,null,new y,d.If)||(a.doMouseUp(),Zh(a),am(d,b),c&&(a.ck=!1))}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.oq=function(b){if(a.isEnabled){a.eh=!1;var c=a.Iz;c[b.pointerId]&&delete c[b.pointerId];c=a.ep;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.$a,b.cancelWaitAfter(),b.standardMouseOver())}};d.Je(!0);Il(a)} -function On(a){1b.timeStamp-a.fk)b.preventDefault();else if(a.ck)b.preventDefault();else{a.wd=a.Rb;a.Rb=c;Vl(a,a,b,c,!0);c.Ek=!0;c.re=b.detail;if(w.bq||w.cq)b.timeStamp-a.fkb.timeStamp-a.fk){b.preventDefault();return}a.fk=b.timeStamp}if(w.En&&null!==a.mt)a.mt=null,b.preventDefault();else{a.wd=a.Rb;a.Rb=c;Vl(a,a,b,c,!0);c.up=!0;c.re=b.detail;if(w.bq||w.cq)c.re=a.Uh;c.bubbles=b.bubbles;c.If=Xl(b);a.simulatedMouseUp(b,null,new y,c.If)||(a.doMouseUp(),Yh(a),$l(c,b))}}};a.Rn=function(b){if(a.isEnabled){var c= +a.wd;a.wd=a.Rb;a.Rb=c;Vl(a,a,b,c,!0);c.bubbles=!0;var d=0,e=0;void 0!==b.wheelDelta&&(e=0n||Math.abs(m.y-b.screenY)>n)?a.Uh++:a.Uh=1;d.re=a.Uh;a.fk=b.timeStamp;a.dw.m(b.screenX,b.screenY);m=0;b.ctrlKey&&(m+=1);b.altKey&&(m+=2);b.shiftKey&&(m+=4);b.metaKey&&(m+=8);d.md=m;d.button=b.button;void 0===b.buttons||w.su||(d.buttons=b.buttons);w.yh&&0===b.button&&b.ctrlKey&&(d.button=2);d.Ek=!1;d.up=!0;d.Dk=0;d.tc=!1;d.bubbles=!0;d.event=b;d.timestamp=Date.now();d.If=null===e?Xl(b):e.aa?e.aa:null; +d.Be=null;a.simulatedMouseUp(b,null,new y,d.If)||(a.doMouseUp(),Yh(a),$l(d,b),c&&(a.ck=!1))}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.oq=function(b){if(a.isEnabled){a.eh=!1;var c=a.Iz;c[b.pointerId]&&delete c[b.pointerId];c=a.ep;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.$a,b.cancelWaitAfter(),b.standardMouseOver())}};d.Je(!0);Hl(a)} +function Nn(a){1a)&&w.Fa(a,"0 <= loc <= 1",ga,"addColorStop:loc");w.j(b,"string",ga,"addColorStop:color");null===this.$g&&(this.$g=new ma("number","string"));this.$g.add(a,b);this.na===og&&(this.type=pg);this.ah=null}; -w.defineProperty(ga,{type:"type"},function(){return this.na},function(a){this.P&&w.ma(this,a);w.ob(a,ga,ga,"type");this.na=a;this.start.Td()&&(a===pg?this.start=Bb:a===bd&&(this.start=Jb));this.end.Td()&&(a===pg?this.end=Rb:a===bd&&(this.end=Jb));this.ah=null});w.defineProperty(ga,{color:"color"},function(){return this.oo},function(a){this.P&&w.ma(this,a);this.oo=a;this.ah=null}); +g.toString=function(){var a="Brush(";if(this.type===cg)a+=this.color;else if(a=this.type===og?a+"Linear ":this.type===Xc?a+"Radial ":this.type===Un?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.zk)for(var b=this.zk.i;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; +ga.prototype.addColorStop=ga.prototype.addColorStop=function(a,b){this.P&&w.ma(this);("number"!==typeof a||!isFinite(a)||1a)&&w.Fa(a,"0 <= loc <= 1",ga,"addColorStop:loc");w.j(b,"string",ga,"addColorStop:color");null===this.$g&&(this.$g=new ma("number","string"));this.$g.add(a,b);this.na===cg&&(this.type=og);this.ah=null}; +w.defineProperty(ga,{type:"type"},function(){return this.na},function(a){this.P&&w.ma(this,a);w.ob(a,ga,ga,"type");this.na=a;this.start.Td()&&(a===og?this.start=Bb:a===Xc&&(this.start=Jb));this.end.Td()&&(a===og?this.end=Rb:a===Xc&&(this.end=Jb));this.ah=null});w.defineProperty(ga,{color:"color"},function(){return this.oo},function(a){this.P&&w.ma(this,a);this.oo=a;this.ah=null}); w.defineProperty(ga,{start:"start"},function(){return this.np},function(a){this.P&&w.ma(this,a);w.G(a,K,ga,"start");this.np=a.S();this.ah=null});w.defineProperty(ga,{end:"end"},function(){return this.Co},function(a){this.P&&w.ma(this,a);w.G(a,K,ga,"end");this.Co=a.S();this.ah=null});w.defineProperty(ga,{$u:"startRadius"},function(){return this.Nw},function(a){this.P&&w.ma(this,a);w.Ad(a,ga,"startRadius");0>a&&w.Fa(a,">= zero",ga,"startRadius");this.Nw=a;this.ah=null}); w.defineProperty(ga,{Tt:"endRadius"},function(){return this.Jv},function(a){this.P&&w.ma(this,a);w.Ad(a,ga,"endRadius");0>a&&w.Fa(a,">= zero",ga,"endRadius");this.Jv=a;this.ah=null});w.defineProperty(ga,{zk:"colorStops"},function(){return this.$g},function(a){this.P&&w.ma(this,a);this.$g=a;this.ah=null});w.defineProperty(ga,{pattern:"pattern"},function(){return this.yw},function(a){this.P&&w.ma(this,a);this.yw=a;this.ah=null}); -ga.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),e=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+d+e+c};var Yn=(new Wc(null)).Ck,fa; -ga.isValidColor=fa=function(a){if("black"===a)return!0;if(""===a)return!1;Yn.fillStyle="#000000";var b=Yn.fillStyle;Yn.fillStyle=a;if(Yn.fillStyle!==b)return!0;Yn.fillStyle="#FFFFFF";b=Yn.fillStyle;Yn.fillStyle=a;return Yn.fillStyle!==b};var Zn=new Un,$n=new Un,ao=new Un,bo=new Un;ga.lighten=function(a){return co(a)}; -ga.prototype.lightenBy=function(a,b){this.P&&w.ma(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Wn:b;if(this.type===og)eo(this.color),this.color=fo(c,d);else if((this.type===pg||this.type===bd)&&null!==this.zk)for(var e=this.zk.i;e.next();)eo(e.value),this.addColorStop(e.key,fo(c,d));return this};var co;ga.lightenBy=co=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Wn:c;eo(a);return fo(b,c)};ga.darken=function(a){return ho(a)}; -ga.prototype.darkenBy=function(a,b){this.P&&w.ma(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Wn:b;if(this.type===og)eo(this.color),this.color=fo(-c,d);else if((this.type===pg||this.type===bd)&&null!==this.zk)for(var e=this.zk.i;e.next();)eo(e.value),this.addColorStop(e.key,fo(-c,d));return this};var ho;ga.darkenBy=ho=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Wn:c;eo(a);return fo(-b,c)}; -function fo(a,b){switch(b){case Wn:var c=100*io(Zn.Gc),d=100*io(Zn.Ed),e=100*io(Zn.bd);ao.Gc=.4124564*c+.3575761*d+.1804375*e;ao.Ed=.2126729*c+.7151522*d+.072175*e;ao.bd=.0193339*c+.119192*d+.9503041*e;ao.gg=Zn.gg;c=jo(ao.Gc/ko[0]);d=jo(ao.Ed/ko[1]);e=jo(ao.bd/ko[2]);bo.Gc=116*d-16;bo.Ed=500*(c-d);bo.bd=200*(d-e);bo.gg=ao.gg;bo.Gc=Math.min(100,Math.max(0,bo.Gc+100*a));c=(bo.Gc+16)/116;d=c-bo.bd/200;ao.Gc=ko[0]*lo(bo.Ed/500+c);ao.Ed=ko[1]*(bo.Gc>mo*no?Math.pow(c,3):bo.Gc/mo);ao.bd=ko[2]*lo(d);ao.gg= -bo.gg;c=-.969266*ao.Gc+1.8760108*ao.Ed+.041556*ao.bd;d=.0556434*ao.Gc+-.2040259*ao.Ed+1.0572252*ao.bd;Zn.Gc=255*oo((3.2404542*ao.Gc+-1.5371385*ao.Ed+-.4985314*ao.bd)/100);Zn.Ed=255*oo(c/100);Zn.bd=255*oo(d/100);Zn.gg=ao.gg;Zn.Gc=Math.round(Zn.Gc);255Zn.Gc&&(Zn.Gc=0);Zn.Ed=Math.round(Zn.Ed);255Zn.Ed&&(Zn.Ed=0);Zn.bd=Math.round(Zn.bd);255Zn.bd&&(Zn.bd=0);return"rgba("+Zn.Gc+", "+Zn.Ed+", "+Zn.bd+", "+Zn.gg+")";case Xn:var e=Zn.Gc/255,f=Zn.Ed/ -255,h=Zn.bd/255,k=Math.max(e,f,h),d=Math.min(e,f,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(f-h)/l%6;break;case f:c=(h-e)/l+2;break;case h:c=(e-f)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}$n.Gc=Math.round(c);$n.Ed=Math.round(100*e);$n.bd=Math.round(100*d);$n.gg=Zn.gg;$n.bd=Math.min(100,Math.max(0,$n.bd+100*a));return"hsla("+$n.Gc+", "+$n.Ed+"%, "+$n.bd+"%, "+$n.gg+")";default:return w.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} -function eo(a){Yn.clearRect(0,0,1,1);Yn.fillStyle="#000000";var b=Yn.fillStyle;Yn.fillStyle=a;Yn.fillStyle!==b?(Yn.fillRect(0,0,1,1),a=Yn.getImageData(0,0,1,1).data,Zn.Gc=a[0],Zn.Ed=a[1],Zn.bd=a[2],Zn.gg=a[3]/255):(Yn.fillStyle="#FFFFFF",Yn.fillStyle=a,Zn.Gc=0,Zn.Ed=0,Zn.bd=0,Zn.gg=1)}function io(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function oo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var no=216/24389,mo=24389/27,ko=[95.047,100,108.883]; -function jo(a){return a>no?Math.pow(a,1/3):(mo*a+16)/116}function lo(a){var b=a*a*a;return b>no?b:(116*a-16)/mo} -function G(){w.oc(this);this.N=4225027;this.Bc=1;this.bj=null;this.Sb="";this.cc=this.Fb=null;this.jb=(new y(NaN,NaN)).freeze();this.Te=Gd;this.Yh=rd;this.Xh=Ed;this.kd=new ka;this.tm=new ka;this.Ti=new ka;this.vb=this.Ao=1;this.mg=0;this.Fg=po;this.Om=fd;this.ud=(new B(NaN,NaN,NaN,NaN)).freeze();this.pc=(new B(NaN,NaN,NaN,NaN)).freeze();this.Wc=(new B(0,0,NaN,NaN)).freeze();this.V=this.Os=this.Ps=null;this.sm=this.je=qc;this.at=0;this.dj=1;this.ar=0;this.Bi=1;this.qt=null;this.et=-Infinity;this.Zm= -0;this.$m=dd;this.an=mj;this.jr="";this.yc=this.ia=null;this.mo=-1;this.en=this.og=this.hl=this.mp=null;this.Jz=pj;this.Vm=null}w.mi(G);w.ga("GraphObject",G); +ga.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),e=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+d+e+c};var Xn=(new Vc(null)).Ck,fa; +ga.isValidColor=fa=function(a){if("black"===a)return!0;if(""===a)return!1;Xn.fillStyle="#000000";var b=Xn.fillStyle;Xn.fillStyle=a;if(Xn.fillStyle!==b)return!0;Xn.fillStyle="#FFFFFF";b=Xn.fillStyle;Xn.fillStyle=a;return Xn.fillStyle!==b};var Yn=new Tn,Zn=new Tn,$n=new Tn,ao=new Tn;ga.lighten=function(a){return bo(a)}; +ga.prototype.lightenBy=function(a,b){this.P&&w.ma(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Vn:b;if(this.type===cg)co(this.color),this.color=eo(c,d);else if((this.type===og||this.type===Xc)&&null!==this.zk)for(var e=this.zk.i;e.next();)co(e.value),this.addColorStop(e.key,eo(c,d));return this};var bo;ga.lightenBy=bo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Vn:c;co(a);return eo(b,c)};ga.darken=function(a){return fo(a)}; +ga.prototype.darkenBy=function(a,b){this.P&&w.ma(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Vn:b;if(this.type===cg)co(this.color),this.color=eo(-c,d);else if((this.type===og||this.type===Xc)&&null!==this.zk)for(var e=this.zk.i;e.next();)co(e.value),this.addColorStop(e.key,eo(-c,d));return this};var fo;ga.darkenBy=fo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Vn:c;co(a);return eo(-b,c)}; +function eo(a,b){switch(b){case Vn:var c=100*ho(Yn.Gc),d=100*ho(Yn.Ed),e=100*ho(Yn.bd);$n.Gc=.4124564*c+.3575761*d+.1804375*e;$n.Ed=.2126729*c+.7151522*d+.072175*e;$n.bd=.0193339*c+.119192*d+.9503041*e;$n.gg=Yn.gg;c=io($n.Gc/jo[0]);d=io($n.Ed/jo[1]);e=io($n.bd/jo[2]);ao.Gc=116*d-16;ao.Ed=500*(c-d);ao.bd=200*(d-e);ao.gg=$n.gg;ao.Gc=Math.min(100,Math.max(0,ao.Gc+100*a));c=(ao.Gc+16)/116;d=c-ao.bd/200;$n.Gc=jo[0]*ko(ao.Ed/500+c);$n.Ed=jo[1]*(ao.Gc>lo*mo?Math.pow(c,3):ao.Gc/lo);$n.bd=jo[2]*ko(d);$n.gg= +ao.gg;c=-.969266*$n.Gc+1.8760108*$n.Ed+.041556*$n.bd;d=.0556434*$n.Gc+-.2040259*$n.Ed+1.0572252*$n.bd;Yn.Gc=255*no((3.2404542*$n.Gc+-1.5371385*$n.Ed+-.4985314*$n.bd)/100);Yn.Ed=255*no(c/100);Yn.bd=255*no(d/100);Yn.gg=$n.gg;Yn.Gc=Math.round(Yn.Gc);255Yn.Gc&&(Yn.Gc=0);Yn.Ed=Math.round(Yn.Ed);255Yn.Ed&&(Yn.Ed=0);Yn.bd=Math.round(Yn.bd);255Yn.bd&&(Yn.bd=0);return"rgba("+Yn.Gc+", "+Yn.Ed+", "+Yn.bd+", "+Yn.gg+")";case Wn:var e=Yn.Gc/255,f=Yn.Ed/ +255,h=Yn.bd/255,k=Math.max(e,f,h),d=Math.min(e,f,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(f-h)/l%6;break;case f:c=(h-e)/l+2;break;case h:c=(e-f)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}Zn.Gc=Math.round(c);Zn.Ed=Math.round(100*e);Zn.bd=Math.round(100*d);Zn.gg=Yn.gg;Zn.bd=Math.min(100,Math.max(0,Zn.bd+100*a));return"hsla("+Zn.Gc+", "+Zn.Ed+"%, "+Zn.bd+"%, "+Zn.gg+")";default:return w.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} +function co(a){Xn.clearRect(0,0,1,1);Xn.fillStyle="#000000";var b=Xn.fillStyle;Xn.fillStyle=a;Xn.fillStyle!==b?(Xn.fillRect(0,0,1,1),a=Xn.getImageData(0,0,1,1).data,Yn.Gc=a[0],Yn.Ed=a[1],Yn.bd=a[2],Yn.gg=a[3]/255):(Xn.fillStyle="#FFFFFF",Xn.fillStyle=a,Yn.Gc=0,Yn.Ed=0,Yn.bd=0,Yn.gg=1)}function ho(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function no(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var mo=216/24389,lo=24389/27,jo=[95.047,100,108.883]; +function io(a){return a>mo?Math.pow(a,1/3):(lo*a+16)/116}function ko(a){var b=a*a*a;return b>mo?b:(116*a-16)/lo} +function G(){w.oc(this);this.N=4225027;this.Bc=1;this.bj=null;this.Sb="";this.cc=this.Fb=null;this.jb=(new y(NaN,NaN)).freeze();this.Te=Fd;this.Yh=qd;this.Xh=Dd;this.kd=new ka;this.tm=new ka;this.Ti=new ka;this.vb=this.Ao=1;this.mg=0;this.Fg=oo;this.Om=ed;this.ud=(new B(NaN,NaN,NaN,NaN)).freeze();this.pc=(new B(NaN,NaN,NaN,NaN)).freeze();this.Wc=(new B(0,0,NaN,NaN)).freeze();this.V=this.Os=this.Ps=null;this.sm=this.je=qc;this.at=0;this.dj=1;this.ar=0;this.Bi=1;this.qt=null;this.et=-Infinity;this.Zm= +0;this.$m=cd;this.an=lj;this.jr="";this.yc=this.ia=null;this.mo=-1;this.en=this.og=this.hl=this.mp=null;this.Jz=oj;this.Vm=null}w.mi(G);w.ga("GraphObject",G); G.prototype.cloneProtected=function(a){a.N=this.N|6144;a.Bc=this.Bc;a.Sb=this.Sb;a.Fb=this.Fb;a.cc=this.cc;a.jb.assign(this.jb);a.Te=this.Te.S();a.Yh=this.Yh.S();a.Xh=this.Xh.S();a.Ti=this.Ti.copy();a.vb=this.vb;a.mg=this.mg;a.Fg=this.Fg;a.Om=this.Om.S();a.ud.assign(this.ud);a.pc.assign(this.pc);a.Wc.assign(this.Wc);a.Os=this.Os;null!==this.V&&(a.V=this.V.copy());a.je=this.je.S();a.sm=this.sm.S();a.at=this.at;a.dj=this.dj;a.ar=this.ar;a.Bi=this.Bi;a.qt=this.qt;a.et=this.et;a.Zm=this.Zm;a.$m=this.$m.S(); a.an=this.an;a.jr=this.jr;null!==this.ia&&(a.ia=this.ia.copy());a.yc=this.yc;a.mo=this.mo;null!==this.hl&&(a.hl=w.Pl(this.hl));null!==this.og&&(a.og=this.og.copy());a.en=this.en};G.prototype.addCopyProperty=G.prototype.iH=function(a){var b=this.hl;if(w.isArray(b))for(var c=0;ck;)k+=f[n++%l],p=!p;q=!1}else k=f[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} -G.prototype.raiseChangedEvent=G.prototype.cd=function(a,b,c,d,e,f,h){var k=this.U;if(null!==k&&(k.Vn(a,b,c,d,e,f,h),Ao(this)&&c===this&&a===Df&&Bo(this,k,b),c===k&&0!==(k.N&16777216)&&null!==k.data))for(a=this.xa.n,c=a.length,d=0;dk;)k+=f[n++%l],p=!p;q=!1}else k=f[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} +G.prototype.raiseChangedEvent=G.prototype.cd=function(a,b,c,d,e,f,h){var k=this.U;if(null!==k&&(k.Vn(a,b,c,d,e,f,h),zo(this)&&c===this&&a===Cf&&Ao(this,k,b),c===k&&0!==(k.N&16777216)&&null!==k.data))for(a=this.xa.n,c=a.length,d=0;da&&(a+=360));return a};G.prototype.getDocumentScale=G.prototype.sj=function(){if(0!==(this.N&4096)===!1)return this.Ao;var a=this.vb;return null!==this.Q?a*this.Q.sj():a};G.prototype.getLocalPoint=G.prototype.iF=function(a,b){void 0===b&&(b=new y);b.assign(a);this.ph.wh(b);return b}; -G.prototype.getNearestIntersectionPoint=G.prototype.jF=function(a,b,c){return this.An(a.x,a.y,b.x,b.y,c)};g=G.prototype;g.An=function(a,b,c,d,e){var f=this.transform,h=1/(f.m11*f.m22-f.m12*f.m21),k=f.m22*h,l=-f.m12*h,m=-f.m21*h,n=f.m11*h,p=h*(f.m21*f.dy-f.m22*f.dx),q=h*(f.m12*f.dx-f.m11*f.dy);if(null!==this.ln)return f=this.Y,le(f.left,f.top,f.right,f.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.m(0,0);d=this.Ja;c=le(0,0,d.width,d.height,h,a,b,c,e);e.transform(f);return c}; -function zk(a,b,c,d,e){if(!1!==Fm(a)){var f=a.margin,h=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-h,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-f,0);var h=a.angle,f=0,f=a.Ca,k=0;a instanceof X&&(k=a.mb);90===h||270===h?(b=isFinite(f.height)?f.height+k:b,c=isFinite(f.width)?f.width+k:c):(b=isFinite(f.width)?f.width+k:b,c=isFinite(f.height)?f.height+k:c);var f=d||0,k=e||0,l=a instanceof C;switch(Fo(a,!0)){case Qj:k=f=0;l&&(c=b=Infinity);break;case Fe:isFinite(b)&&b>d&&(f=b);isFinite(c)&& -c>e&&(k=c);break;case ro:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case qo:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.Gf,m=a.qi;f>l.width&&m.widthl.height&&m.heighta.height||this.zf.Ge>a.width))&&(c=!0);this.N=c?this.N|256:this.N&-257;this.pc.I()|| -w.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.pc.toString());this.Yx(f,this.pc);Go(this,!1);w.Eb(f)};g.mj=function(){}; -function Ho(a,b,c,d,e){var f=a.Y;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.Ca.I()){f=a.ud;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=f.width+b;f=f.height+h;d+=b;e+=h;b=Fo(a,!0);c===d&&f===e&&(b=Qj);switch(b){case Qj:if(c>d||f>e)dm(a,!0),zk(a,c>d?d:c,f>e?e:f);break;case Fe:dm(a,!0);zk(a,d,e,0,0);break;case ro:dm(a,!0);zk(a,d,f,0,0);break;case qo:dm(a,!0),zk(a,c,e,0,0)}}} -g.Yx=function(a,b){var c=this.U;null!==c&&null!==c.g&&(c.yq!==this&&c.gG!==this&&c.qB!==this||Io(c,!0),this.oa(),Va(a,b)||(c.Mk(),this.Fs(c)))};g.Fs=function(a){null!==this.Vd&&(Io(a,!0),a instanceof T&&Jo(a,this))};w.defineProperty(G,{Yn:"shadowVisible"},function(){return this.en},function(a){var b=this.en;b!==a&&(this.en=a,this.oa(),this.h("shadowVisible",b,a))}); -G.prototype.ve=function(a,b){if(this.visible){var c=this.pc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof Oc)a:{if(this.visible){var f=null,h=a.Mx;if(this instanceof C&&(this.type===Ko||this.type===Lo))Mo(this,a,b);else{var k=this.pc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.Q;0!==(this.N&4096)===!0&&No(this);var c=0!==(this.N&256),n=!1;this instanceof -Mh&&(a.font=this.font);if(c){n=m.Yg()?m.Ja:m.Y;if(null!==this.og)var p=this.og,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;Qc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.wj()){var u=this;if(!u.isVisible())break a}a.uh.Ub=[1,0,0,1,0,0];this instanceof Mh&&1c.width+c.x||c.x>n.width+n.x){1!==d&&(a.globalAlpha=e);return}a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.wj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.dm&&b.tj("drawShadows")&& -(n=this.dn,a.EB(n.x*b.scale*b.Jd,n.y*b.scale*b.Jd,this.Eg),a.Zn(),a.shadowColor=this.cn)}n=!1;this.U&&b.tj("drawShadows")&&(n=this.U.dm);!0===this.Yn?a.Zn():!1===this.Yn&&a.jm();null!==this.cc&&(Oo(this,a,this.cc,!0,!0),this.cc instanceof ga&&this.cc.type===bd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Lg(this.cc)):a.fillRect(c.x,c.y,c.width,c.height));f.tu()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);n&&(null!==h&&0!==(h.N&512)||null!==h&&(h.type===Hl||h.type===Oj)&&h.Bd()!==this)&&null=== -this.Yn&&a.jm();null!==this.Fb&&(u=this.Ja,k=c=0,l=u.width,u=u.height,q=0,this instanceof X&&(u=this.Sa.ab,c=u.x,k=u.y,l=u.width,u=u.height,q=this.ii),Oo(this,a,this.Fb,!0,!1),this.Fb instanceof ga&&this.Fb.type===bd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Lg(this.Fb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));n&&(null!==this.Fb||null!==this.cc||null!==h&&0!==(h.N&512)||null!==h&&(h.type===Hl||h.type===Oj)&&h.Bd()!==this)?(Po(this,!0),null===this.Yn&&a.jm()):Po(this,!1);this.Fk(a,b);n&&0!==(this.N&512)=== +G.prototype.getNearestIntersectionPoint=G.prototype.jF=function(a,b,c){return this.An(a.x,a.y,b.x,b.y,c)};g=G.prototype;g.An=function(a,b,c,d,e){var f=this.transform,h=1/(f.m11*f.m22-f.m12*f.m21),k=f.m22*h,l=-f.m12*h,m=-f.m21*h,n=f.m11*h,p=h*(f.m21*f.dy-f.m22*f.dx),q=h*(f.m12*f.dx-f.m11*f.dy);if(null!==this.ln)return f=this.Y,ke(f.left,f.top,f.right,f.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.m(0,0);d=this.Ja;c=ke(0,0,d.width,d.height,h,a,b,c,e);e.transform(f);return c}; +function yk(a,b,c,d,e){if(!1!==rm(a)){var f=a.margin,h=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-h,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-f,0);var h=a.angle,f=0,f=a.Ca,k=0;a instanceof X&&(k=a.mb);90===h||270===h?(b=isFinite(f.height)?f.height+k:b,c=isFinite(f.width)?f.width+k:c):(b=isFinite(f.width)?f.width+k:b,c=isFinite(f.height)?f.height+k:c);var f=d||0,k=e||0,l=a instanceof C;switch(Eo(a,!0)){case Pj:k=f=0;l&&(c=b=Infinity);break;case Ee:isFinite(b)&&b>d&&(f=b);isFinite(c)&& +c>e&&(k=c);break;case qo:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case po:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.Gf,m=a.qi;f>l.width&&m.widthl.height&&m.heighta.height||this.zf.Ge>a.width))&&(c=!0);this.N=c?this.N|256:this.N&-257;this.pc.I()|| +w.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.pc.toString());this.Yx(f,this.pc);Fo(this,!1);w.Eb(f)};g.mj=function(){}; +function Go(a,b,c,d,e){var f=a.Y;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.Ca.I()){f=a.ud;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=f.width+b;f=f.height+h;d+=b;e+=h;b=Eo(a,!0);c===d&&f===e&&(b=Pj);switch(b){case Pj:if(c>d||f>e)cm(a,!0),yk(a,c>d?d:c,f>e?e:f);break;case Ee:cm(a,!0);yk(a,d,e,0,0);break;case qo:cm(a,!0);yk(a,d,f,0,0);break;case po:cm(a,!0),yk(a,c,e,0,0)}}} +g.Yx=function(a,b){var c=this.U;null!==c&&null!==c.g&&(c.yq!==this&&c.gG!==this&&c.qB!==this||Ho(c,!0),this.oa(),Va(a,b)||(c.Mk(),this.Fs(c)))};g.Fs=function(a){null!==this.Vd&&(Ho(a,!0),a instanceof T&&Io(a,this))};w.defineProperty(G,{Yn:"shadowVisible"},function(){return this.en},function(a){var b=this.en;b!==a&&(this.en=a,this.oa(),this.h("shadowVisible",b,a))}); +G.prototype.ve=function(a,b){if(this.visible){var c=this.pc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof Oc)a:{if(this.visible){var f=null,h=a.Mx;if(this instanceof C&&(this.type===Jo||this.type===Ko))Lo(this,a,b);else{var k=this.pc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.Q;0!==(this.N&4096)===!0&&Mo(this);var c=0!==(this.N&256),n=!1;this instanceof +Lh&&(a.font=this.font);if(c){n=m.Yg()?m.Ja:m.Y;if(null!==this.og)var p=this.og,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;Qc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.wj()){var u=this;if(!u.isVisible())break a}a.uh.Ub=[1,0,0,1,0,0];this instanceof Lh&&1c.width+c.x||c.x>n.width+n.x){1!==d&&(a.globalAlpha=e);return}a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.wj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.dm&&b.tj("drawShadows")&& +(n=this.dn,a.EB(n.x*b.scale*b.Jd,n.y*b.scale*b.Jd,this.Eg),a.Zn(),a.shadowColor=this.cn)}n=!1;this.U&&b.tj("drawShadows")&&(n=this.U.dm);!0===this.Yn?a.Zn():!1===this.Yn&&a.jm();null!==this.cc&&(No(this,a,this.cc,!0,!0),this.cc instanceof ga&&this.cc.type===Xc?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Lg(this.cc)):a.fillRect(c.x,c.y,c.width,c.height));f.tu()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);n&&(null!==h&&0!==(h.N&512)||null!==h&&(h.type===Gl||h.type===Nj)&&h.Bd()!==this)&&null=== +this.Yn&&a.jm();null!==this.Fb&&(u=this.Ja,k=c=0,l=u.width,u=u.height,q=0,this instanceof X&&(u=this.Sa.ab,c=u.x,k=u.y,l=u.width,u=u.height,q=this.ii),No(this,a,this.Fb,!0,!1),this.Fb instanceof ga&&this.Fb.type===Xc?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Lg(this.Fb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));n&&(null!==this.Fb||null!==this.cc||null!==h&&0!==(h.N&512)||null!==h&&(h.type===Gl||h.type===Nj)&&h.Bd()!==this)?(Oo(this,!0),null===this.Yn&&a.jm()):Oo(this,!1);this.Fk(a,b);n&&0!==(this.N&512)=== !0&&a.Zn();this.wj()&&n&&a.jm();m?(a.restore(),this instanceof C?a.Je(!0):a.Je(!1)):f.tu()||(h=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*h,-f.m12*h,-f.m21*h,f.m11*h,h*(f.m21*f.dy-f.m22*f.dx),h*(f.m12*f.dx-f.m11*f.dy)))}1!==d&&(a.globalAlpha=e)}}}; -function Mo(a,b,c){var d=a.pc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.cc&&(Oo(a,b,a.cc,!0,!0),a.cc instanceof ga&&a.cc.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Lg(a.cc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Fb&&(Oo(a,b,a.Fb,!0,!1),a.Fb instanceof ga&&a.Fb.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Lg(a.Fb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Fk(b,c))}G.prototype.Fk=function(){}; -function Oo(a,b,c,d,e){if(null!==c){var f=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===og)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ja,f=h.width,h=h.height;if(e)var l=a.Y,f=l.width,h=l.height;var m=b instanceof Xc;if(m&&c.ah&&(c.type===Vn||c.po===f&&c.Vy===h))k=c.ah;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.Y,f=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*f+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*f+c.end.offsetX;q=c.end.y*h+c.end.offsetY; -l+=r;p+=r;n+=s;q+=s;if(c.type===pg)k=b.createLinearGradient(l,n,p,q);else if(c.type===bd)s=isNaN(c.Tt)?Math.max(f,h)/2:c.Tt,isNaN(c.$u)?(r=0,s=Math.max(f,h)/2):r=c.$u,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===Vn)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else w.Fd(c.type,"Brush type");if(c.type!==Vn&&(e=c.zk,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.ah=k,null!==k&&(c.po=f,c.Vy=h),null===k&&c.type===Vn&&-1!==c.po)){c.po=-1;var t=a.g;null!==t&& +function Lo(a,b,c){var d=a.pc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.cc&&(No(a,b,a.cc,!0,!0),a.cc instanceof ga&&a.cc.type===Xc?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Lg(a.cc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Fb&&(No(a,b,a.Fb,!0,!1),a.Fb instanceof ga&&a.Fb.type===Xc?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Lg(a.Fb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Fk(b,c))}G.prototype.Fk=function(){}; +function No(a,b,c,d,e){if(null!==c){var f=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===cg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ja,f=h.width,h=h.height;if(e)var l=a.Y,f=l.width,h=l.height;var m=b instanceof Wc;if(m&&c.ah&&(c.type===Un||c.po===f&&c.Vy===h))k=c.ah;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.Y,f=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*f+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*f+c.end.offsetX;q=c.end.y*h+c.end.offsetY; +l+=r;p+=r;n+=s;q+=s;if(c.type===og)k=b.createLinearGradient(l,n,p,q);else if(c.type===Xc)s=isNaN(c.Tt)?Math.max(f,h)/2:c.Tt,isNaN(c.$u)?(r=0,s=Math.max(f,h)/2):r=c.$u,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===Un)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else w.Fd(c.type,"Brush type");if(c.type!==Un&&(e=c.zk,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.ah=k,null!==k&&(c.po=f,c.Vy=h),null===k&&c.type===Un&&-1!==c.po)){c.po=-1;var t=a.g;null!==t&& -1===c.po&&w.setTimeout(function(){t.Nu()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.bm=function(a){if(a instanceof C)a:{if(this!==a&&null!==a)for(var b=this.Q;null!==b;){if(b===a){a=!0;break a}b=b.Q}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.Aj=function(){if(!this.visible)return!1;var a=this.Q;return null!==a?a.Aj():!0}; -G.prototype.isEnabledObject=G.prototype.pu=function(){for(var a=this instanceof C?this:this.Q;null!==a&&a.isEnabled;)a=a.Q;return null===a};w.defineProperty(G,{WE:"enabledChanged"},function(){return null!==this.ia?this.ia.Br:null},function(a){vo(this);var b=this.ia.Br;b!==a&&(null!==a&&w.j(a,"function",G,"enabledChanged"),this.ia.Br=a,this.h("enabledChanged",b,a))}); -function No(a){if(0!==(a.N&2048)===!0){var b=a.kd;b.reset();if(!a.pc.I()||!a.ud.I()){Qo(a,!1);return}b.translate(a.pc.x,a.pc.y);b.translate(-a.za.x,-a.za.y);var c=a.Ja;Do(a,b,c.x,c.y,c.width,c.height);Qo(a,!1);Ro(a,!0)}0!==(a.N&4096)===!0&&(b=a.Q,null===b?(a.tm.set(a.kd),a.Ao=a.scale,Ro(a,!1)):null!==b.ph&&(c=a.tm,c.reset(),b.Yg()?c.multiply(b.tm):null!==b.Q&&c.multiply(b.Q.tm),c.multiply(a.kd),a.Ao=a.scale*b.Ao,Ro(a,!1)))} -function Do(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Jb;a.wj()&&a.Ff.$c()&&(h=a.Ff);var k=w.K();if(a instanceof R&&a.bg!==a)for(c=a.bg,d=c.Ja,k.Xu(d.x,d.y,d.width,d.height,h),c.Ti.nb(k),k.offset(-c.za.x,-c.za.y),h=c.Q;null!==h&&h!==a;)h.Ti.nb(k),k.offset(-h.za.x,-h.za.y),h=h.Q;else k.Xu(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);w.v(k)}}g=G.prototype;g.H=function(a){void 0===a&&(a=!1);if(!0!==Fm(this)){dm(this,!0);Go(this,!0);var b=this.Q;null===b||a||b.H()}}; -g.aq=function(){!0!==Fm(this)&&(dm(this,!0),Go(this,!0))};function So(a){if(!1===Gm(a)){var b=a.Q;null!==b?b.H():a.wj()&&(b=a.g,null!==b&&(b.vg.add(a),a instanceof T&&a.$f(),b.ye()));Go(a,!0)}}g.Ni=function(){0!==(this.N&2048)===!1&&(Qo(this,!0),Ro(this,!0))};g.LA=function(){Ro(this,!0)};g.oa=function(){var a=this.U;null!==a&&a.oa()}; -function Fo(a,b){var c=a.stretch,d=a.Q;if(null!==d&&d.na===To)return Uo(a,d.de(a.Vb),d.ce(a.column),b);if(null!==d&&d.na===Hl&&d.Bd()===a)return Vo(a,Fe,b);if(c===po){if(null!==d){if(d.na===Oj&&d.Bd()===a)return Vo(a,Fe,b);c=d.ae;return c===po?Vo(a,Qj,b):Vo(a,c,b)}return Vo(a,Qj,b)}return Vo(a,c,b)} -function Uo(a,b,c,d){var e=a.stretch;if(e!==po)return Vo(a,e,d);var f=e=null;switch(b.stretch){case qo:f=!0;break;case Fe:f=!0}switch(c.stretch){case ro:e=!0;break;case Fe:e=!0}b=a.Q.ae;null===e&&(e=b===ro||b===Fe);null===f&&(f=b===qo||b===Fe);return!0===e&&!0===f?Vo(a,Fe,d):!0===e?Vo(a,ro,d):!0===f?Vo(a,qo,d):Vo(a,Qj,d)} -function Vo(a,b,c){if(c)return b;if(b===Qj)return Qj;c=a.Ca;if(c.I())return Qj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===ro)return Qj;if(b===Fe)return qo}else{if(b===qo)return Qj;if(b===Fe)return ro}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===qo)return Qj;if(b===Fe)return ro}else{if(b===ro)return Qj;if(b===Fe)return qo}return b} -w.defineProperty(G,{xq:"segmentOrientation"},function(){return this.an},function(a){var b=this.an;b!==a&&(this.an=a,this.H(),this.h("segmentOrientation",b,a),a===mj&&(this.angle=0))});w.defineProperty(G,{Pe:"segmentIndex"},function(){return this.et},function(a){a=Math.round(a);var b=this.et;b!==a&&(this.et=a,this.H(),this.h("segmentIndex",b,a))}); +G.prototype.isEnabledObject=G.prototype.pu=function(){for(var a=this instanceof C?this:this.Q;null!==a&&a.isEnabled;)a=a.Q;return null===a};w.defineProperty(G,{WE:"enabledChanged"},function(){return null!==this.ia?this.ia.Br:null},function(a){uo(this);var b=this.ia.Br;b!==a&&(null!==a&&w.j(a,"function",G,"enabledChanged"),this.ia.Br=a,this.h("enabledChanged",b,a))}); +function Mo(a){if(0!==(a.N&2048)===!0){var b=a.kd;b.reset();if(!a.pc.I()||!a.ud.I()){Po(a,!1);return}b.translate(a.pc.x,a.pc.y);b.translate(-a.za.x,-a.za.y);var c=a.Ja;Co(a,b,c.x,c.y,c.width,c.height);Po(a,!1);Qo(a,!0)}0!==(a.N&4096)===!0&&(b=a.Q,null===b?(a.tm.set(a.kd),a.Ao=a.scale,Qo(a,!1)):null!==b.ph&&(c=a.tm,c.reset(),b.Yg()?c.multiply(b.tm):null!==b.Q&&c.multiply(b.Q.tm),c.multiply(a.kd),a.Ao=a.scale*b.Ao,Qo(a,!1)))} +function Co(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Jb;a.wj()&&a.Ff.$c()&&(h=a.Ff);var k=w.K();if(a instanceof R&&a.bg!==a)for(c=a.bg,d=c.Ja,k.Xu(d.x,d.y,d.width,d.height,h),c.Ti.nb(k),k.offset(-c.za.x,-c.za.y),h=c.Q;null!==h&&h!==a;)h.Ti.nb(k),k.offset(-h.za.x,-h.za.y),h=h.Q;else k.Xu(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);w.v(k)}}g=G.prototype;g.H=function(a){void 0===a&&(a=!1);if(!0!==rm(this)){cm(this,!0);Fo(this,!0);var b=this.Q;null===b||a||b.H()}}; +g.aq=function(){!0!==rm(this)&&(cm(this,!0),Fo(this,!0))};function Ro(a){if(!1===Fm(a)){var b=a.Q;null!==b?b.H():a.wj()&&(b=a.g,null!==b&&(b.vg.add(a),a instanceof T&&a.$f(),b.ye()));Fo(a,!0)}}g.Ni=function(){0!==(this.N&2048)===!1&&(Po(this,!0),Qo(this,!0))};g.LA=function(){Qo(this,!0)};g.oa=function(){var a=this.U;null!==a&&a.oa()}; +function Eo(a,b){var c=a.stretch,d=a.Q;if(null!==d&&d.na===So)return To(a,d.de(a.Vb),d.ce(a.column),b);if(null!==d&&d.na===Gl&&d.Bd()===a)return Uo(a,Ee,b);if(c===oo){if(null!==d){if(d.na===Nj&&d.Bd()===a)return Uo(a,Ee,b);c=d.ae;return c===oo?Uo(a,Pj,b):Uo(a,c,b)}return Uo(a,Pj,b)}return Uo(a,c,b)} +function To(a,b,c,d){var e=a.stretch;if(e!==oo)return Uo(a,e,d);var f=e=null;switch(b.stretch){case po:f=!0;break;case Ee:f=!0}switch(c.stretch){case qo:e=!0;break;case Ee:e=!0}b=a.Q.ae;null===e&&(e=b===qo||b===Ee);null===f&&(f=b===po||b===Ee);return!0===e&&!0===f?Uo(a,Ee,d):!0===e?Uo(a,qo,d):!0===f?Uo(a,po,d):Uo(a,Pj,d)} +function Uo(a,b,c){if(c)return b;if(b===Pj)return Pj;c=a.Ca;if(c.I())return Pj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===qo)return Pj;if(b===Ee)return po}else{if(b===po)return Pj;if(b===Ee)return qo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===po)return Pj;if(b===Ee)return qo}else{if(b===qo)return Pj;if(b===Ee)return po}return b} +w.defineProperty(G,{xq:"segmentOrientation"},function(){return this.an},function(a){var b=this.an;b!==a&&(this.an=a,this.H(),this.h("segmentOrientation",b,a),a===lj&&(this.angle=0))});w.defineProperty(G,{Pe:"segmentIndex"},function(){return this.et},function(a){a=Math.round(a);var b=this.et;b!==a&&(this.et=a,this.H(),this.h("segmentIndex",b,a))}); w.defineProperty(G,{tB:"segmentFraction"},function(){return this.Zm},function(a){isNaN(a)?a=0:0>a?a=0:1a||1a||1=a&&w.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.vb=a,this.Ni(),this.H(),this.h("scale",b,a))});w.defineProperty(G,{angle:"angle"},function(){return this.mg},function(a){var b=this.mg;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.mg=a,Wo(this),this.H(),this.Ni(),this.h("angle",b,a)))}); -w.defineProperty(G,{Ca:"desiredSize"},function(){return this.Te},function(a){var b=a.width,c=a.height,d=this.Te,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Te=a=a.S(),this.H(),this instanceof X&&this.Oe(),this.h("desiredSize",d,a),Ao(this)&&(a=this.U,null!==a&&(Bo(this,a,"width"),Bo(this,a,"height"))))}); -w.defineProperty(G,{width:"width"},function(){return this.Te.width},function(a){var b=this.Te.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Te,this.Te=a=(new ia(a,this.Te.height)).freeze(),this.H(),this instanceof X&&this.Oe(),this.h("desiredSize",b,a),Ao(this)&&(a=this.U,null!==a&&Bo(this,a,"width")))}); -w.defineProperty(G,{height:"height"},function(){return this.Te.height},function(a){var b=this.Te.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Te,this.Te=a=(new ia(this.Te.width,a)).freeze(),this.H(),this instanceof X&&this.Oe(),this.h("desiredSize",b,a),Ao(this)&&(a=this.U,null!==a&&Bo(this,a,"height")))}); +w.defineProperty(G,{background:"background"},function(){return this.Fb},function(a){var b=this.Fb;b!==a&&(a instanceof ga&&a.freeze(),this.Fb=a,this.oa(),this.h("background",b,a))});function Oo(a,b){a.N=b?a.N|512:a.N&-513}function zo(a){return 0!==(a.N&1024)}function Wo(a,b){a.N=b?a.N|1024:a.N&-1025}function Po(a,b){a.N=b?a.N|2048:a.N&-2049}function Qo(a,b){a.N=b?a.N|4096:a.N&-4097}function rm(a){return 0!==(a.N&8192)}function cm(a,b){a.N=b?a.N|8192:a.N&-8193} +function Fm(a){return 0!==(a.N&16384)}function Fo(a,b){a.N=b?a.N|16384:a.N&-16385}w.u(G,{U:"part"},function(){if(this.wj())return this;if(null!==this.Vm)return this.Vm;var a;for(a=this.Q;a;){if(a instanceof R)return this.Vm=a;a=a.Q}return null});w.u(G,{Q:"panel"},function(){return this.bj});G.prototype.im=function(a){this.bj=a};w.u(G,{layer:"layer"},function(){var a=this.U;return null!==a?a.layer:null},{configurable:!0});w.u(G,{g:"diagram"},function(){var a=this.U;return null!==a?a.g:null},{configurable:!0}); +w.defineProperty(G,{position:"position"},function(){return this.jb},function(a){var b=a.x,c=a.y,d=this.jb,e=d.x,f=d.y;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))?this.BB():(a=a.S(),this.AB(a,d)&&this.h("position",d,a))});G.prototype.BB=function(){};G.prototype.AB=function(a){this.jb=a;Ro(this);this.Ni();return!0};G.prototype.vy=function(a,b){this.jb.m(a,b);this.Ni()};w.u(G,{Y:"actualBounds"},function(){return this.pc}); +w.defineProperty(G,{scale:"scale"},function(){return this.vb},function(a){var b=this.vb;b!==a&&(0>=a&&w.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.vb=a,this.Ni(),this.H(),this.h("scale",b,a))});w.defineProperty(G,{angle:"angle"},function(){return this.mg},function(a){var b=this.mg;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.mg=a,Vo(this),this.H(),this.Ni(),this.h("angle",b,a)))}); +w.defineProperty(G,{Ca:"desiredSize"},function(){return this.Te},function(a){var b=a.width,c=a.height,d=this.Te,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Te=a=a.S(),this.H(),this instanceof X&&this.Oe(),this.h("desiredSize",d,a),zo(this)&&(a=this.U,null!==a&&(Ao(this,a,"width"),Ao(this,a,"height"))))}); +w.defineProperty(G,{width:"width"},function(){return this.Te.width},function(a){var b=this.Te.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Te,this.Te=a=(new ia(a,this.Te.height)).freeze(),this.H(),this instanceof X&&this.Oe(),this.h("desiredSize",b,a),zo(this)&&(a=this.U,null!==a&&Ao(this,a,"width")))}); +w.defineProperty(G,{height:"height"},function(){return this.Te.height},function(a){var b=this.Te.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Te,this.Te=a=(new ia(this.Te.width,a)).freeze(),this.H(),this instanceof X&&this.Oe(),this.h("desiredSize",b,a),zo(this)&&(a=this.U,null!==a&&Ao(this,a,"height")))}); w.defineProperty(G,{qi:"minSize"},function(){return this.Yh},function(a){var b=this.Yh;b.L(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Yh=a,this.H(),this.h("minSize",b,a))});w.defineProperty(G,{Gf:"maxSize"},function(){return this.Xh},function(a){var b=this.Xh;b.L(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Xh=a,this.H(),this.h("maxSize",b,a))});w.u(G,{za:"measuredBounds"},function(){return this.ud}); -w.u(G,{Ja:"naturalBounds"},function(){return this.Wc},{configurable:!0});w.defineProperty(G,{margin:"margin"},function(){return this.Om},function(a){"number"===typeof a&&(a=new hb(a));var b=this.Om;b.L(a)||(this.Om=a=a.S(),this.H(),this.h("margin",b,a))});w.u(G,{transform:null},function(){0!==(this.N&2048)===!0&&No(this);return this.kd});w.u(G,{ph:null},function(){0!==(this.N&4096)===!0&&No(this);return this.tm}); -w.defineProperty(G,{alignment:"alignment"},function(){return this.je},function(a){var b=this.je;b.L(a)||(a.Td()&&!a.Zc()&&w.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.je=a=a.S(),So(this),this.h("alignment",b,a))});w.defineProperty(G,{column:"column"},function(){return this.ar},function(a){a=Math.round(a);var b=this.ar;b!==a&&(0>a&&w.Fa(a,">= 0",G,"column"),this.ar=a,this.H(),this.h("column",b,a))}); +w.u(G,{Ja:"naturalBounds"},function(){return this.Wc},{configurable:!0});w.defineProperty(G,{margin:"margin"},function(){return this.Om},function(a){"number"===typeof a&&(a=new hb(a));var b=this.Om;b.L(a)||(this.Om=a=a.S(),this.H(),this.h("margin",b,a))});w.u(G,{transform:null},function(){0!==(this.N&2048)===!0&&Mo(this);return this.kd});w.u(G,{ph:null},function(){0!==(this.N&4096)===!0&&Mo(this);return this.tm}); +w.defineProperty(G,{alignment:"alignment"},function(){return this.je},function(a){var b=this.je;b.L(a)||(a.Td()&&!a.Zc()&&w.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.je=a=a.S(),Ro(this),this.h("alignment",b,a))});w.defineProperty(G,{column:"column"},function(){return this.ar},function(a){a=Math.round(a);var b=this.ar;b!==a&&(0>a&&w.Fa(a,">= 0",G,"column"),this.ar=a,this.H(),this.h("column",b,a))}); w.defineProperty(G,{xH:"columnSpan"},function(){return this.Bi},function(a){a=Math.round(a);var b=this.Bi;b!==a&&(1>a&&w.Fa(a,">= 1",G,"columnSpan"),this.Bi=a,this.H(),this.h("columnSpan",b,a))});w.defineProperty(G,{Vb:"row"},function(){return this.at},function(a){a=Math.round(a);var b=this.at;b!==a&&(0>a&&w.Fa(a,">= 0",G,"row"),this.at=a,this.H(),this.h("row",b,a))}); w.defineProperty(G,{rowSpan:"rowSpan"},function(){return this.dj},function(a){a=Math.round(a);var b=this.dj;b!==a&&(1>a&&w.Fa(a,">= 1",G,"rowSpan"),this.dj=a,this.H(),this.h("rowSpan",b,a))});w.defineProperty(G,{wy:"spanAllocation"},function(){return this.qt},function(a){var b=this.qt;b!==a&&(null!==a&&w.j(a,"function",G,"spanAllocation"),this.qt=a,this.H(),this.h("spanAllocation",b,a))}); w.defineProperty(G,{oh:"alignmentFocus"},function(){return this.sm},function(a){var b=this.sm;b.L(a)||(!a.Td()||a.Zc()||a.L(yb)&&this instanceof T||w.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.sm=a=a.S(),this.H(),this.h("alignmentFocus",b,a))}); -w.defineProperty(G,{Vd:"portId"},function(){return this.Os},function(a){var b=this.Os;if(b!==a){var c=this.U;null===c||c instanceof T||(w.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Yo(c,this);this.Os=a;if(null!==a&&c){c.Lk=!0;null===c.oe&&Zo(c);var d=this.Vd;null!==d&&c.oe.add(d,this)}this.h("portId",b,a)}});function $o(a){var b=a.U;if(b instanceof T&&(null!==a.Vd||a===b.port)){var c=b.g;null===c||c.ja.lb||Jo(b,a)}} -function Wo(a){var b=a.g;null===b||b.ja.lb||(a instanceof C?a instanceof T?a.$f():ap(a,a,function(a){$o(a)}):$o(a))}w.defineProperty(G,{Bb:"toSpot"},function(){return null!==this.V?this.V.vk:yb},function(a){this.Qd();var b=this.V.vk;b.L(a)||(a=a.S(),this.V.vk=a,this.h("toSpot",b,a),$o(this))}); -w.defineProperty(G,{om:"toEndSegmentLength"},function(){return null!==this.V?this.V.tk:10},function(a){this.Qd();var b=this.V.tk;b!==a&&(0>a&&w.Fa(a,">= 0",G,"toEndSegmentLength"),this.V.tk=a,this.h("toEndSegmentLength",b,a),$o(this))});w.defineProperty(G,{av:"toEndSegmentDirection"},function(){return null!==this.V?this.V.sk:yo},function(a){this.Qd();var b=this.V.sk;b!==a&&(w.Rt("GraphObject.toEndSegmentDirection","2.0"),this.V.sk=a,this.h("toEndSegmentDirection",b,a),$o(this))}); -w.defineProperty(G,{bv:"toShortLength"},function(){return null!==this.V?this.V.uk:0},function(a){this.Qd();var b=this.V.uk;b!==a&&(this.V.uk=a,this.h("toShortLength",b,a),$o(this))});w.defineProperty(G,{AG:"toLinkable"},function(){return null!==this.V?this.V.xt:null},function(a){this.Qd();var b=this.V.xt;b!==a&&(this.V.xt=a,this.h("toLinkable",b,a))}); -w.defineProperty(G,{VJ:"toMaxLinks"},function(){return null!==this.V?this.V.yt:Infinity},function(a){this.Qd();var b=this.V.yt;b!==a&&(0>a&&w.Fa(a,">= 0",G,"toMaxLinks"),this.V.yt=a,this.h("toMaxLinks",b,a))});w.defineProperty(G,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Xj:yb},function(a){this.Qd();var b=this.V.Xj;b.L(a)||(a=a.S(),this.V.Xj=a,this.h("fromSpot",b,a),$o(this))}); -w.defineProperty(G,{Vl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Vj:10},function(a){this.Qd();var b=this.V.Vj;b!==a&&(0>a&&w.Fa(a,">= 0",G,"fromEndSegmentLength"),this.V.Vj=a,this.h("fromEndSegmentLength",b,a),$o(this))});w.defineProperty(G,{eu:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Uj:yo},function(a){this.Qd();var b=this.V.Uj;b!==a&&(w.Rt("GraphObject.fromEndSegmentDirection","2.0"),this.V.Uj=a,this.h("fromEndSegmentDirection",b,a),$o(this))}); -w.defineProperty(G,{fu:"fromShortLength"},function(){return null!==this.V?this.V.Wj:0},function(a){this.Qd();var b=this.V.Wj;b!==a&&(this.V.Wj=a,this.h("fromShortLength",b,a),$o(this))});w.defineProperty(G,{fF:"fromLinkable"},function(){return null!==this.V?this.V.Er:null},function(a){this.Qd();var b=this.V.Er;b!==a&&(this.V.Er=a,this.h("fromLinkable",b,a))}); +w.defineProperty(G,{Vd:"portId"},function(){return this.Os},function(a){var b=this.Os;if(b!==a){var c=this.U;null===c||c instanceof T||(w.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xo(c,this);this.Os=a;if(null!==a&&c){c.Lk=!0;null===c.oe&&Yo(c);var d=this.Vd;null!==d&&c.oe.add(d,this)}this.h("portId",b,a)}});function Zo(a){var b=a.U;if(b instanceof T&&(null!==a.Vd||a===b.port)){var c=b.g;null===c||c.ja.lb||Io(b,a)}} +function Vo(a){var b=a.g;null===b||b.ja.lb||(a instanceof C?a instanceof T?a.$f():$o(a,a,function(a){Zo(a)}):Zo(a))}w.defineProperty(G,{Bb:"toSpot"},function(){return null!==this.V?this.V.vk:yb},function(a){this.Qd();var b=this.V.vk;b.L(a)||(a=a.S(),this.V.vk=a,this.h("toSpot",b,a),Zo(this))}); +w.defineProperty(G,{om:"toEndSegmentLength"},function(){return null!==this.V?this.V.tk:10},function(a){this.Qd();var b=this.V.tk;b!==a&&(0>a&&w.Fa(a,">= 0",G,"toEndSegmentLength"),this.V.tk=a,this.h("toEndSegmentLength",b,a),Zo(this))});w.defineProperty(G,{av:"toEndSegmentDirection"},function(){return null!==this.V?this.V.sk:xo},function(a){this.Qd();var b=this.V.sk;b!==a&&(w.Rt("GraphObject.toEndSegmentDirection","2.0"),this.V.sk=a,this.h("toEndSegmentDirection",b,a),Zo(this))}); +w.defineProperty(G,{bv:"toShortLength"},function(){return null!==this.V?this.V.uk:0},function(a){this.Qd();var b=this.V.uk;b!==a&&(this.V.uk=a,this.h("toShortLength",b,a),Zo(this))});w.defineProperty(G,{AG:"toLinkable"},function(){return null!==this.V?this.V.xt:null},function(a){this.Qd();var b=this.V.xt;b!==a&&(this.V.xt=a,this.h("toLinkable",b,a))}); +w.defineProperty(G,{VJ:"toMaxLinks"},function(){return null!==this.V?this.V.yt:Infinity},function(a){this.Qd();var b=this.V.yt;b!==a&&(0>a&&w.Fa(a,">= 0",G,"toMaxLinks"),this.V.yt=a,this.h("toMaxLinks",b,a))});w.defineProperty(G,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Xj:yb},function(a){this.Qd();var b=this.V.Xj;b.L(a)||(a=a.S(),this.V.Xj=a,this.h("fromSpot",b,a),Zo(this))}); +w.defineProperty(G,{Vl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Vj:10},function(a){this.Qd();var b=this.V.Vj;b!==a&&(0>a&&w.Fa(a,">= 0",G,"fromEndSegmentLength"),this.V.Vj=a,this.h("fromEndSegmentLength",b,a),Zo(this))});w.defineProperty(G,{eu:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Uj:xo},function(a){this.Qd();var b=this.V.Uj;b!==a&&(w.Rt("GraphObject.fromEndSegmentDirection","2.0"),this.V.Uj=a,this.h("fromEndSegmentDirection",b,a),Zo(this))}); +w.defineProperty(G,{fu:"fromShortLength"},function(){return null!==this.V?this.V.Wj:0},function(a){this.Qd();var b=this.V.Wj;b!==a&&(this.V.Wj=a,this.h("fromShortLength",b,a),Zo(this))});w.defineProperty(G,{fF:"fromLinkable"},function(){return null!==this.V?this.V.Er:null},function(a){this.Qd();var b=this.V.Er;b!==a&&(this.V.Er=a,this.h("fromLinkable",b,a))}); w.defineProperty(G,{AA:"fromMaxLinks"},function(){return null!==this.V?this.V.Fr:Infinity},function(a){this.Qd();var b=this.V.Fr;b!==a&&(0>a&&w.Fa(a,">= 0",G,"fromMaxLinks"),this.V.Fr=a,this.h("fromMaxLinks",b,a))});w.defineProperty(G,{cursor:"cursor"},function(){return this.jr},function(a){var b=this.jr;b!==a&&(w.j(a,"string",G,"cursor"),this.jr=a,this.h("cursor",b,a))}); -w.defineProperty(G,{click:"click"},function(){return null!==this.ia?this.ia.Ai:null},function(a){vo(this);var b=this.ia.Ai;b!==a&&(null!==a&&w.j(a,"function",G,"click"),this.ia.Ai=a,this.h("click",b,a))});w.defineProperty(G,{St:"doubleClick"},function(){return null!==this.ia?this.ia.Ii:null},function(a){vo(this);var b=this.ia.Ii;b!==a&&(null!==a&&w.j(a,"function",G,"doubleClick"),this.ia.Ii=a,this.h("doubleClick",b,a))}); -w.defineProperty(G,{lA:"contextClick"},function(){return null!==this.ia?this.ia.Ci:null},function(a){vo(this);var b=this.ia.Ci;b!==a&&(null!==a&&w.j(a,"function",G,"contextClick"),this.ia.Ci=a,this.h("contextClick",b,a))});w.defineProperty(G,{Eu:"mouseEnter"},function(){return null!==this.ia?this.ia.ws:null},function(a){vo(this);var b=this.ia.ws;b!==a&&(null!==a&&w.j(a,"function",G,"mouseEnter"),this.ia.ws=a,this.h("mouseEnter",b,a))}); -w.defineProperty(G,{Fu:"mouseLeave"},function(){return null!==this.ia?this.ia.xs:null},function(a){vo(this);var b=this.ia.xs;b!==a&&(null!==a&&w.j(a,"function",G,"mouseLeave"),this.ia.xs=a,this.h("mouseLeave",b,a))});w.defineProperty(G,{dB:"mouseOver"},function(){return null!==this.ia?this.ia.Yi:null},function(a){vo(this);var b=this.ia.Yi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseOver"),this.ia.Yi=a,this.h("mouseOver",b,a))}); -w.defineProperty(G,{cB:"mouseHover"},function(){return null!==this.ia?this.ia.Xi:null},function(a){vo(this);var b=this.ia.Xi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHover"),this.ia.Xi=a,this.h("mouseHover",b,a))});w.defineProperty(G,{bB:"mouseHold"},function(){return null!==this.ia?this.ia.Wi:null},function(a){vo(this);var b=this.ia.Wi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHold"),this.ia.Wi=a,this.h("mouseHold",b,a))}); -w.defineProperty(G,{aJ:"mouseDragEnter"},function(){return null!==this.ia?this.ia.us:null},function(a){vo(this);var b=this.ia.us;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragEnter"),this.ia.us=a,this.h("mouseDragEnter",b,a))});w.defineProperty(G,{bJ:"mouseDragLeave"},function(){return null!==this.ia?this.ia.vs:null},function(a){vo(this);var b=this.ia.vs;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragLeave"),this.ia.vs=a,this.h("mouseDragLeave",b,a))}); -w.defineProperty(G,{aB:"mouseDrop"},function(){return null!==this.ia?this.ia.Vi:null},function(a){vo(this);var b=this.ia.Vi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDrop"),this.ia.Vi=a,this.h("mouseDrop",b,a))});w.defineProperty(G,{rE:"actionDown"},function(){return null!==this.ia?this.ia.Jq:null},function(a){vo(this);var b=this.ia.Jq;b!==a&&(null!==a&&w.j(a,"function",G,"actionDown"),this.ia.Jq=a,this.h("actionDown",b,a))}); -w.defineProperty(G,{sE:"actionMove"},function(){return null!==this.ia?this.ia.Kq:null},function(a){vo(this);var b=this.ia.Kq;b!==a&&(null!==a&&w.j(a,"function",G,"actionMove"),this.ia.Kq=a,this.h("actionMove",b,a))});w.defineProperty(G,{tE:"actionUp"},function(){return null!==this.ia?this.ia.Lq:null},function(a){vo(this);var b=this.ia.Lq;b!==a&&(null!==a&&w.j(a,"function",G,"actionUp"),this.ia.Lq=a,this.h("actionUp",b,a))}); -w.defineProperty(G,{qE:"actionCancel"},function(){return null!==this.ia?this.ia.Iq:null},function(a){vo(this);var b=this.ia.Iq;b!==a&&(null!==a&&w.j(a,"function",G,"actionCancel"),this.ia.Iq=a,this.h("actionCancel",b,a))});w.defineProperty(G,{KB:"toolTip"},function(){return null!==this.ia?this.ia.gj:null},function(a){vo(this);var b=this.ia.gj;b!==a&&(this.ia.gj=a,this.h("toolTip",b,a))}); -w.defineProperty(G,{contextMenu:"contextMenu"},function(){return null!==this.ia?this.ia.Di:null},function(a){vo(this);var b=this.ia.Di;b!==a&&(this.ia.Di=a,this.h("contextMenu",b,a))});G.prototype.bind=G.prototype.bind=function(a){a.Gg=this;var b=this.Ul();null!==b&&bp(b)&&w.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.yc&&(this.yc=new H(bh));this.yc.add(a)}; -G.prototype.findTemplateBinder=G.prototype.Ul=function(){for(var a=this instanceof C?this:this.Q;null!==a;){if(null!==a.fl)return a;a=a.Q}return null};G.prototype.setProperties=function(a){w.Vu(this,a)};var cp; -G.make=cp=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=dp.ka(a);"function"===typeof f?(c=w.Pl(arguments),d=f(c),w.Pa(d)||w.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ca[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||w.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);f=1;if(d instanceof D&&1e)&&w.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.xe=!0, -a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.xe=!1,a.index=e);e=new ra;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.Vu(a,e)}else w.Vu(a,b);else w.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var dp=new ma("string","function"); -G.getBuilders=function(){var a=new ma("string","function"),b;for(b in dp)if(b!==b.toLowerCase()){var c=dp.ka(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var fp;G.defineBuilder=fp=function(a,b){w.j(a,"string",G,"defineBuilder:name");w.j(b,"function",G,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);dp.add(a,b)};var gp; -G.takeBuilderArgument=gp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; -fp("Button",function(){var a=new ga(pg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ga(pg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=cp(C,Hl,{Fx:!0,WE:function(a,b){var e=a.Cd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},cp(X,{name:"ButtonBorder",Db:"Rectangle",A:new K(0,0,2.761423749153968,2.761423749153968), +w.defineProperty(G,{click:"click"},function(){return null!==this.ia?this.ia.Ai:null},function(a){uo(this);var b=this.ia.Ai;b!==a&&(null!==a&&w.j(a,"function",G,"click"),this.ia.Ai=a,this.h("click",b,a))});w.defineProperty(G,{St:"doubleClick"},function(){return null!==this.ia?this.ia.Ii:null},function(a){uo(this);var b=this.ia.Ii;b!==a&&(null!==a&&w.j(a,"function",G,"doubleClick"),this.ia.Ii=a,this.h("doubleClick",b,a))}); +w.defineProperty(G,{lA:"contextClick"},function(){return null!==this.ia?this.ia.Ci:null},function(a){uo(this);var b=this.ia.Ci;b!==a&&(null!==a&&w.j(a,"function",G,"contextClick"),this.ia.Ci=a,this.h("contextClick",b,a))});w.defineProperty(G,{Eu:"mouseEnter"},function(){return null!==this.ia?this.ia.ws:null},function(a){uo(this);var b=this.ia.ws;b!==a&&(null!==a&&w.j(a,"function",G,"mouseEnter"),this.ia.ws=a,this.h("mouseEnter",b,a))}); +w.defineProperty(G,{Fu:"mouseLeave"},function(){return null!==this.ia?this.ia.xs:null},function(a){uo(this);var b=this.ia.xs;b!==a&&(null!==a&&w.j(a,"function",G,"mouseLeave"),this.ia.xs=a,this.h("mouseLeave",b,a))});w.defineProperty(G,{dB:"mouseOver"},function(){return null!==this.ia?this.ia.Yi:null},function(a){uo(this);var b=this.ia.Yi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseOver"),this.ia.Yi=a,this.h("mouseOver",b,a))}); +w.defineProperty(G,{cB:"mouseHover"},function(){return null!==this.ia?this.ia.Xi:null},function(a){uo(this);var b=this.ia.Xi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHover"),this.ia.Xi=a,this.h("mouseHover",b,a))});w.defineProperty(G,{bB:"mouseHold"},function(){return null!==this.ia?this.ia.Wi:null},function(a){uo(this);var b=this.ia.Wi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHold"),this.ia.Wi=a,this.h("mouseHold",b,a))}); +w.defineProperty(G,{aJ:"mouseDragEnter"},function(){return null!==this.ia?this.ia.us:null},function(a){uo(this);var b=this.ia.us;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragEnter"),this.ia.us=a,this.h("mouseDragEnter",b,a))});w.defineProperty(G,{bJ:"mouseDragLeave"},function(){return null!==this.ia?this.ia.vs:null},function(a){uo(this);var b=this.ia.vs;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragLeave"),this.ia.vs=a,this.h("mouseDragLeave",b,a))}); +w.defineProperty(G,{aB:"mouseDrop"},function(){return null!==this.ia?this.ia.Vi:null},function(a){uo(this);var b=this.ia.Vi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDrop"),this.ia.Vi=a,this.h("mouseDrop",b,a))});w.defineProperty(G,{rE:"actionDown"},function(){return null!==this.ia?this.ia.Jq:null},function(a){uo(this);var b=this.ia.Jq;b!==a&&(null!==a&&w.j(a,"function",G,"actionDown"),this.ia.Jq=a,this.h("actionDown",b,a))}); +w.defineProperty(G,{sE:"actionMove"},function(){return null!==this.ia?this.ia.Kq:null},function(a){uo(this);var b=this.ia.Kq;b!==a&&(null!==a&&w.j(a,"function",G,"actionMove"),this.ia.Kq=a,this.h("actionMove",b,a))});w.defineProperty(G,{tE:"actionUp"},function(){return null!==this.ia?this.ia.Lq:null},function(a){uo(this);var b=this.ia.Lq;b!==a&&(null!==a&&w.j(a,"function",G,"actionUp"),this.ia.Lq=a,this.h("actionUp",b,a))}); +w.defineProperty(G,{qE:"actionCancel"},function(){return null!==this.ia?this.ia.Iq:null},function(a){uo(this);var b=this.ia.Iq;b!==a&&(null!==a&&w.j(a,"function",G,"actionCancel"),this.ia.Iq=a,this.h("actionCancel",b,a))});w.defineProperty(G,{KB:"toolTip"},function(){return null!==this.ia?this.ia.gj:null},function(a){uo(this);var b=this.ia.gj;b!==a&&(this.ia.gj=a,this.h("toolTip",b,a))}); +w.defineProperty(G,{contextMenu:"contextMenu"},function(){return null!==this.ia?this.ia.Di:null},function(a){uo(this);var b=this.ia.Di;b!==a&&(this.ia.Di=a,this.h("contextMenu",b,a))});G.prototype.bind=G.prototype.bind=function(a){a.Gg=this;var b=this.Ul();null!==b&&ap(b)&&w.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.yc&&(this.yc=new H(ah));this.yc.add(a)}; +G.prototype.findTemplateBinder=G.prototype.Ul=function(){for(var a=this instanceof C?this:this.Q;null!==a;){if(null!==a.fl)return a;a=a.Q}return null};G.prototype.setProperties=function(a){w.Vu(this,a)};var bp; +G.make=bp=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=cp.ka(a);"function"===typeof f?(c=w.Pl(arguments),d=f(c),w.Pa(d)||w.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ca[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||w.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);f=1;if(d instanceof D&&1e)&&w.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.xe=!0, +a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.xe=!1,a.index=e);e=new ra;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.Vu(a,e)}else w.Vu(a,b);else w.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var cp=new ma("string","function"); +G.getBuilders=function(){var a=new ma("string","function"),b;for(b in cp)if(b!==b.toLowerCase()){var c=cp.ka(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var ep;G.defineBuilder=ep=function(a,b){w.j(a,"string",G,"defineBuilder:name");w.j(b,"function",G,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);cp.add(a,b)};var fp; +G.takeBuilderArgument=fp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; +ep("Button",function(){var a=new ga(og);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ga(og);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=bp(C,Gl,{Fx:!0,WE:function(a,b){var e=a.Cd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},bp(X,{name:"ButtonBorder",Db:"Rectangle",A:new K(0,0,2.761423749153968,2.761423749153968), B:new K(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Eu=function(a,b){if(b.pu()){var e=b.Cd("ButtonBorder");if(e instanceof X){var f=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=f;f=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=f}}};a.Fu=function(a,b){if(b.pu()){var e=b.Cd("ButtonBorder");e instanceof X&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); -fp("TreeExpanderButton",function(){var a=cp("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},cp(X,{name:"ButtonIcon",Db:"MinusLine",Ca:Bd},(new bh("figure","isTreeExpanded",function(a,c){var d=c.Q;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Xx()),{visible:!1},(new bh("visible","isTreeLeaf",function(a){return!a})).Xx());a.click=function(a,c){var d=c.U;d instanceof kh&&(d=d.Ze);if(d instanceof T){var e=d.g;if(null!==e){e=e.pb;if(d.uc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +ep("TreeExpanderButton",function(){var a=bp("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},bp(X,{name:"ButtonIcon",Db:"MinusLine",Ca:sd},(new ah("figure","isTreeExpanded",function(a,c){var d=c.Q;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Xx()),{visible:!1},(new ah("visible","isTreeLeaf",function(a){return!a})).Xx());a.click=function(a,c){var d=c.U;d instanceof jh&&(d=d.Ze);if(d instanceof T){var e=d.g;if(null!==e){e=e.pb;if(d.uc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; a.tc=!0;d.uc?e.collapseTree(d):e.expandTree(d)}}};return a}); -fp("SubGraphExpanderButton",function(){var a=cp("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},cp(X,{name:"ButtonIcon",Db:"MinusLine",Ca:Bd},(new bh("figure","isSubGraphExpanded",function(a,c){var d=c.Q;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Xx()));a.click=function(a,c){var d=c.U;d instanceof kh&&(d=d.Ze);if(d instanceof V){var e=d.g;if(null!==e){e=e.pb;if(d.ad){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.tc= -!0;d.ad?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});fp("ToolTip",function(){var a=new kh(Hl),b=new X;b.name="Border";b.fill="#FFFFE0";b.stroke="#CCCCCC";a.add(b);return a});fp("ContextMenu",function(){return new kh(Gl)});fp("ContextMenuButton",function(){var a=cp("Button");a.stretch=ro;var b=a.Cd("ButtonBorder");b instanceof X&&(b.Db="Rectangle",b.A=new K(0,0,2,3),b.B=new K(1,1,-2,-2));return a}); -fp("PanelExpanderButton",function(a){var b=gp(a,"COLLAPSIBLE"),c=cp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},cp(X,"TriangleUp",{name:"ButtonIcon",Ca:new ia(6,4)},(new bh("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Xx(b)));a=c.Cd("ButtonBorder");a instanceof X&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var f=c.g;if(null!==f&&!f.hb){var h=c.Ul();null===h&&(h=c.U);null!==h&&(h=h.Cd(b),null!==h&& +ep("SubGraphExpanderButton",function(){var a=bp("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},bp(X,{name:"ButtonIcon",Db:"MinusLine",Ca:sd},(new ah("figure","isSubGraphExpanded",function(a,c){var d=c.Q;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Xx()));a.click=function(a,c){var d=c.U;d instanceof jh&&(d=d.Ze);if(d instanceof V){var e=d.g;if(null!==e){e=e.pb;if(d.ad){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.tc= +!0;d.ad?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});ep("ToolTip",function(){var a=new jh(Gl),b=new X;b.name="Border";b.fill="#FFFFE0";b.stroke="#CCCCCC";a.add(b);return a});ep("ContextMenu",function(){return new jh(Fl)});ep("ContextMenuButton",function(){var a=bp("Button");a.stretch=qo;var b=a.Cd("ButtonBorder");b instanceof X&&(b.Db="Rectangle",b.A=new K(0,0,2,3),b.B=new K(1,1,-2,-2));return a}); +ep("PanelExpanderButton",function(a){var b=fp(a,"COLLAPSIBLE"),c=bp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},bp(X,"TriangleUp",{name:"ButtonIcon",Ca:new ia(6,4)},(new ah("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Xx(b)));a=c.Cd("ButtonBorder");a instanceof X&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var f=c.g;if(null!==f&&!f.hb){var h=c.Ul();null===h&&(h=c.U);null!==h&&(h=h.Cd(b),null!==h&& (f.Hb("Collapse/Expand Panel"),h.visible=!h.visible,f.Yc("Collapse/Expand Panel")))}};return c}); -fp("CheckBoxButton",function(a){var b=gp(a);a=cp("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},cp(X,{name:"ButtonIcon",$H:"M0 4 L3 9 9 0",mb:2,stretch:Fe,BA:Sj,visible:!1},""!==b?(new bh("visible",b)).QI():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.hb||""!==b&&e.$.hb)){a.tc=!0;var f=d.Cd("ButtonIcon");e.Hb("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Yc("checkbox")}};return a}); -fp("CheckBox",function(a){a=gp(a);a=cp("CheckBoxButton",a,{name:"Button",margin:new hb(0,1,0,0)});var b=cp(C,"Horizontal",a,{Fx:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Eu:a.Eu,Fu:a.Fu,click:a.click,_buttonClick:a.click});a.Eu=null;a.Fu=null;a.click=null;return b}); -function wo(){this.Br=this.Di=this.gj=this.Iq=this.Lq=this.Kq=this.Jq=this.Vi=this.vs=this.us=this.Wi=this.Xi=this.Yi=this.xs=this.ws=this.Ci=this.Ii=this.Ai=null}wo.prototype.copy=function(){var a=new wo;a.Ai=this.Ai;a.Ii=this.Ii;a.Ci=this.Ci;a.ws=this.ws;a.xs=this.xs;a.Yi=this.Yi;a.Xi=this.Xi;a.Wi=this.Wi;a.us=this.us;a.vs=this.vs;a.Vi=this.Vi;a.Jq=this.Jq;a.Kq=this.Kq;a.Lq=this.Lq;a.Iq=this.Iq;a.gj=this.gj;a.Di=this.Di;a.Br=this.Br;return a}; -function C(a){G.call(this);void 0===a?this.na=Vj:(w.ob(a,C,C,"type"),this.na=a);this.xa=new H(G);this.nf=fd;this.na===Kl&&(this.Fn=!0);this.nr=qc;this.Gi=po;this.na===To&&hp(this);this.Ap=Sj;this.Nr=Dd;this.Pr=dd;this.Kr=0;this.Jr=100;this.Mr=10;this.Lr=0;this.fl=this.Zd=this.Yj=this.Cm=this.Em=null;this.bs=NaN;this.xg=this.ek=null;this.Qo="category";this.wg=null;this.ij=new B(NaN,NaN,NaN,NaN);this.rk=this.bt=this.Cl=null;this.Lj=""}w.La(C,G);w.mi(C);w.ga("Panel",C); -function hp(a){a.Qj=fd;a.Ph=1;a.Fi=null;a.Am=null;a.Oh=1;a.Nh=null;a.zm=null;a.Xc=[];a.Uc=[];a.Ym=ip;a.ym=ip;a.hj=0;a.Ri=0} -C.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.na=this.na;a.nf=this.nf.S();a.nr=this.nr.S();a.Gi=this.Gi;if(a.na===To){a.Qj=this.Qj.S();a.Ph=this.Ph;a.Fi=this.Fi;a.Am=this.Am;a.Oh=this.Oh;a.Nh=this.Nh;a.zm=this.zm;var b=[];if(0a&&w.Fa(a,">= 0",C,"padding"),a=new hb(a)):(w.G(a,hb,C,"padding"),0>a.left&&w.Fa(a.left,">= 0",C,"padding:value.left"),0>a.right&&w.Fa(a.right,">= 0",C,"padding:value.right"),0>a.top&&w.Fa(a.top,">= 0",C,"padding:value.top"),0>a.bottom&&w.Fa(a.bottom,">= 0",C,"padding:value.bottom"));var b=this.nf;b.L(a)||(this.nf=a=a.S(),this.H(),this.h("padding",b,a))}); w.defineProperty(C,{Tl:"defaultAlignment"},function(){return this.nr},function(a){var b=this.nr;b.L(a)||(this.nr=a=a.S(),this.H(),this.h("defaultAlignment",b,a))});w.defineProperty(C,{ae:"defaultStretch"},function(){return this.Gi},function(a){var b=this.Gi;b!==a&&(w.ob(a,G,C,"defaultStretch"),this.Gi=a,this.H(),this.h("defaultStretch",b,a))}); -w.defineProperty(C,{XK:"defaultSeparatorPadding"},function(){return void 0===this.Qj?fd:this.Qj},function(a){if(void 0!==this.Qj){"number"===typeof a&&(a=new hb(a));var b=this.Qj;b.L(a)||(this.Qj=a=a.S(),this.H(),this.h("defaultSeparatorPadding",b,a))}}); +w.defineProperty(C,{XK:"defaultSeparatorPadding"},function(){return void 0===this.Qj?ed:this.Qj},function(a){if(void 0!==this.Qj){"number"===typeof a&&(a=new hb(a));var b=this.Qj;b.L(a)||(this.Qj=a=a.S(),this.H(),this.h("defaultSeparatorPadding",b,a))}}); w.defineProperty(C,{VK:"defaultRowSeparatorStroke"},function(){return void 0===this.Fi?null:this.Fi},function(a){var b=this.Fi;b!==a&&(null===a||"string"===typeof a||a instanceof ga)&&(a instanceof ga&&a.freeze(),this.Fi=a,this.oa(),this.h("defaultRowSeparatorStroke",b,a))}); w.defineProperty(C,{WK:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.Ph?1:this.Ph},function(a){if(void 0!==this.Ph){var b=this.Ph;b!==a&&isFinite(a)&&0<=a&&(this.Ph=a,this.H(),this.h("defaultRowSeparatorStrokeWidth",b,a))}}); w.defineProperty(C,{UK:"defaultRowSeparatorDashArray"},function(){return void 0===this.Am?null:this.Am},function(a){if(void 0!==this.Am){var b=this.Am;if(b!==a){null===a||Array.isArray(a)||w.Fd(a,"Array",C,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.Ex,e=d.width,d=d.height,f=this.Ja,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.pF;a.save();a.beginPath();a.rect(0,0,h,f);a.clip();for(var n=[],p=this.xa.n,q=p.length,r=0;r -e*u*c))){s=v.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var x=n[r],z=!1,A=!0,L=v.xG;null!==L&&(z=!0,A=a.vA(L,v.Ye));if("LineV"===v.Db&&null!==v.stroke){a.lineWidth=v.mb;Oo(this,a,v.stroke,!1,!1);a.beginPath();for(var E=Math.floor(-m.x/e),P=E;P<=E+k;P++){var $=P*e+m.x;0<=$&&$<=h&&kp(P,u,x)&&(z&&!A?zo(a,$,0,$,f,L,v.Ye):(a.moveTo($,0),a.lineTo($,f)))}a.stroke()}else if("LineH"===v.Db&&null!==v.stroke){a.lineWidth=v.mb;Oo(this,a,v.stroke,!1,!1);a.beginPath();for(P=E=Math.floor(-m.y/ -d);P<=E+l;P++)$=P*d+m.y,0<=$&&$<=f&&kp(P,u,x)&&(z&&!A?zo(a,0,$,h,$,L,v.Ye):(a.moveTo(0,$),a.lineTo(h,$)));a.stroke()}else if("BarV"===v.Db&&null!==v.fill)for(Oo(this,a,v.fill,!0,!1),v=v.width,isNaN(v)&&(v=e),P=E=Math.floor(-m.x/e);P<=E+k;P++)$=P*e+m.x,0<=$&&$<=h&&kp(P,u,x)&&a.fillRect($,0,v,f);else if("BarH"===v.Db&&null!==v.fill)for(Oo(this,a,v.fill,!0,!1),v=v.height,isNaN(v)&&(v=d),P=E=Math.floor(-m.y/d);P<=E+l;P++)$=P*d+m.y,0<=$&&$<=f&&kp(P,u,x)&&a.fillRect(0,$,h,v);z&&a.sA();1!==s&&(a.globalAlpha= -t)}}a.restore();a.Je(!1)}else if(this.na===jp){e=this.Ja;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Bd();c.ve(a,b);e=this.sj()*b.scale;0>=e&&(e=1);d=c.Y;h=this.xa.n;f=this.Em;k=h.length;for(l=0;lthis.FA*q.interval*c.pf.au/this.iu*e))for(r=q.za,u=q.mb*q.scale,s=q.oh,s.Td()&&(s=Bb),p=0;pf.height)continue}else if(l.position>f.width)continue;var m=l.Aq;isNaN(m)&&(m=c?a.Ph:a.Oh);var n=l.zq;null===n&&(n=c?a.Fi:a.Nh);if(0!==m&&null!==n){Oo(a,b,n,!1,!1);var n=!1,p=!0,q=l.GJ;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.Ye):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.Ye):p=!1);b.beginPath();var r= -l.position+m;c?r>f.height&&(m-=r-f.height):r>f.width&&(m-=r-f.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=f.width-r.right,n&&!p?zo(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=f.height-r.bottom,n&&!p?zo(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(w.Tk),b.lineDashOffset=0):void 0!==b.webkitLineDash&&(b.webkitLineDash=w.Tk,b.webkitLineDashOffset=0))}}}} -function mp(a,b,c,d,e){for(var f=d.length,h=a.Y,k=0;km)){var n=l.af(),p=l.Aq;isNaN(p)&&(p=c?a.Ph:a.Oh);var q=l.zq;null===q&&(q=c?a.Fi:a.Nh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ya;p+n>m&&(n=m-p);0>=n||(m=a.padding,Oo(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} -function kp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;d=c&&(c=1);var d=this.Ex,e=d.width,d=d.height,f=this.Ja,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.pF;a.save();a.beginPath();a.rect(0,0,h,f);a.clip();for(var n=[],p=this.xa.n,q=p.length,r=0;r +e*u*c))){s=v.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var x=n[r],z=!1,A=!0,L=v.xG;null!==L&&(z=!0,A=a.vA(L,v.Ye));if("LineV"===v.Db&&null!==v.stroke){a.lineWidth=v.mb;No(this,a,v.stroke,!1,!1);a.beginPath();for(var E=Math.floor(-m.x/e),P=E;P<=E+k;P++){var $=P*e+m.x;0<=$&&$<=h&&jp(P,u,x)&&(z&&!A?yo(a,$,0,$,f,L,v.Ye):(a.moveTo($,0),a.lineTo($,f)))}a.stroke()}else if("LineH"===v.Db&&null!==v.stroke){a.lineWidth=v.mb;No(this,a,v.stroke,!1,!1);a.beginPath();for(P=E=Math.floor(-m.y/ +d);P<=E+l;P++)$=P*d+m.y,0<=$&&$<=f&&jp(P,u,x)&&(z&&!A?yo(a,0,$,h,$,L,v.Ye):(a.moveTo(0,$),a.lineTo(h,$)));a.stroke()}else if("BarV"===v.Db&&null!==v.fill)for(No(this,a,v.fill,!0,!1),v=v.width,isNaN(v)&&(v=e),P=E=Math.floor(-m.x/e);P<=E+k;P++)$=P*e+m.x,0<=$&&$<=h&&jp(P,u,x)&&a.fillRect($,0,v,f);else if("BarH"===v.Db&&null!==v.fill)for(No(this,a,v.fill,!0,!1),v=v.height,isNaN(v)&&(v=d),P=E=Math.floor(-m.y/d);P<=E+l;P++)$=P*d+m.y,0<=$&&$<=f&&jp(P,u,x)&&a.fillRect(0,$,h,v);z&&a.sA();1!==s&&(a.globalAlpha= +t)}}a.restore();a.Je(!1)}else if(this.na===ip){e=this.Ja;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Bd();c.ve(a,b);e=this.sj()*b.scale;0>=e&&(e=1);d=c.Y;h=this.xa.n;f=this.Em;k=h.length;for(l=0;lthis.FA*q.interval*c.pf.au/this.iu*e))for(r=q.za,u=q.mb*q.scale,s=q.oh,s.Td()&&(s=Bb),p=0;pf.height)continue}else if(l.position>f.width)continue;var m=l.Aq;isNaN(m)&&(m=c?a.Ph:a.Oh);var n=l.zq;null===n&&(n=c?a.Fi:a.Nh);if(0!==m&&null!==n){No(a,b,n,!1,!1);var n=!1,p=!0,q=l.GJ;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.Ye):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.Ye):p=!1);b.beginPath();var r= +l.position+m;c?r>f.height&&(m-=r-f.height):r>f.width&&(m-=r-f.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=f.width-r.right,n&&!p?yo(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=f.height-r.bottom,n&&!p?yo(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(w.Tk),b.lineDashOffset=0):void 0!==b.webkitLineDash&&(b.webkitLineDash=w.Tk,b.webkitLineDashOffset=0))}}}} +function lp(a,b,c,d,e){for(var f=d.length,h=a.Y,k=0;km)){var n=l.af(),p=l.Aq;isNaN(p)&&(p=c?a.Ph:a.Oh);var q=l.zq;null===q&&(q=c?a.Fi:a.Nh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ya;p+n>m&&(n=m-p);0>=n||(m=a.padding,No(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} +function jp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dm&&e.set(s),w.v(s));w.v(n);f&&e.transform(h)}return c}; -g.H=function(a){G.prototype.H.call(this,a);a=null;if(this.na===Hl||this.na===jj)a=this.Bd();for(var b=this.xa.n,c=b.length,d=0;dJd&&(lc=Math.max(Jd-mc,0));var kg=0===Y.Ya;Y.Ya+=lc;Jd=Math.max(Jd-(lc+(kg?mc:0)),0)}1!==aa.Bi||Pb!==Qj&&Pb!==qo||(Y=this.ce(Gb),mc=Y.af(),lc=Math.max(df-Y.Ya,0),lc+mc>$c&&(lc=Math.max($c-mc,0)),kg=0===Y.Ya,Y.Ya+=lc,$c=Math.max($c-(lc+(kg?mc:0)),0));mi&&aa.aq()}}}w.ta($e);for(var Dc=0,Ab=0,Fb=this.Kp,ea=0;eaJd&&(lc=Math.max(Jd-mc,0));var kg=0===Y.Ya;Y.Ya+=lc;Jd=Math.max(Jd-(lc+(kg?mc:0)),0)}1!==aa.Bi||Pb!==Pj&&Pb!==po||(Y=this.ce(Gb),mc=Y.af(),lc=Math.max(df-Y.Ya,0),lc+mc>$c&&(lc=Math.max($c-mc,0)),kg=0===Y.Ya,Y.Ya+=lc,$c=Math.max($c-(lc+(kg?mc:0)),0));mi&&aa.aq()}}}w.ta($e);for(var Dc=0,Ab=0,Fb=this.Kp,ea=0;ea=this.wq);cb++)Y=this.de(aa.Vb+cb),lc=Pb===Fe||Pb=== -qo?Math.max(Y.Bh,0===xd[aa.Vb+cb]?Y.ie:Math.min(xd[aa.Vb+cb],Y.ie)):Math.max(Y.Bh,isNaN(Y.of)?Y.ie:Math.min(Y.of,Y.ie)),Kd.height+=lc;for(cb=1;cb=this.Kp);cb++)Y=this.ce(aa.column+cb),lc=Pb===Fe||Pb===ro?Math.max(Y.Bh,0===gf[aa.column+cb]?Y.ie:Math.min(gf[aa.column+cb],Y.ie)):Math.max(Y.Bh,isNaN(Y.of)?Y.ie:Math.min(Y.of,Y.ie)),Kd.width+=lc;ob.width+=Kd.width;ob.height+=Kd.height;xc=aa.margin;Kf=xc.right+xc.left;jg=xc.top+xc.bottom;zk(aa,ob.width,ob.height,vj,wj);for(var Lf= +mb.ie)));Pb=To(aa,mb,nb,!1);switch(Pb){case Ee:0!==gf[nb.index]&&(ob.width=Math.min(ob.width,gf[nb.index]));0!==xd[mb.index]&&(ob.height=Math.min(ob.height,xd[mb.index]));break;case qo:0!==gf[nb.index]&&(ob.width=Math.min(ob.width,gf[nb.index]));break;case po:0!==xd[mb.index]&&(ob.height=Math.min(ob.height,xd[mb.index]))}isFinite(nb.width)&&(ob.width=nb.width);isFinite(mb.height)&&(ob.height=mb.height);Kd.m(0,0);for(var cb=1;cb=this.wq);cb++)Y=this.de(aa.Vb+cb),lc=Pb===Ee||Pb=== +po?Math.max(Y.Bh,0===xd[aa.Vb+cb]?Y.ie:Math.min(xd[aa.Vb+cb],Y.ie)):Math.max(Y.Bh,isNaN(Y.of)?Y.ie:Math.min(Y.of,Y.ie)),Kd.height+=lc;for(cb=1;cb=this.Kp);cb++)Y=this.ce(aa.column+cb),lc=Pb===Ee||Pb===qo?Math.max(Y.Bh,0===gf[aa.column+cb]?Y.ie:Math.min(gf[aa.column+cb],Y.ie)):Math.max(Y.Bh,isNaN(Y.of)?Y.ie:Math.min(Y.of,Y.ie)),Kd.width+=lc;ob.width+=Kd.width;ob.height+=Kd.height;xc=aa.margin;Kf=xc.right+xc.left;jg=xc.top+xc.bottom;yk(aa,ob.width,ob.height,vj,wj);for(var Lf= aa.za,df=Math.max(Lf.width+Kf,0),ef=Math.max(Lf.height+jg,0),hf=0,cb=0;cb=this.wq);cb++)Y=this.de(aa.Vb+cb),hf+=Y.total||0;if(hf=ld)&&!(aa.Vb+cb>=this.wq);cb++){var Y=this.de(aa.Vb+cb),Fc=Y.Ra||0,oi=jf(aa,Y,Lg);Y.Ya=Math.min(Y.ie,Fc+oi);Y.Ra!==Fc&&(ld-=Y.Ra-Fc)}for(;0Fc&&(Y.Ya=Math.min(Y.ie,Fc+ld),Y.Ra!==Fc&&(ld-=Y.Ra-Fc));if(0===Y.index)break;Y=this.de(Y.index- 1)}}for(var Le=0,cb=0;cb=this.Kp);cb++)Y=this.ce(aa.column+cb),Le+=Y.total||0;if(Le=ld)&&!(aa.column+cb>=this.Kp);cb++)Y=this.ce(aa.column+cb),Fc=Y.Ra||0,oi=jf(aa,Y,Lg),Y.Ya=Math.min(Y.ie,Fc+oi),Y.Ra!==Fc&&(ld-=Y.Ra-Fc);for(;0Fc&&(Y.Ya=Math.min(Y.ie,Fc+ld),Y.Ra!==Fc&&(ld-=Y.Ra-Fc));if(0===Y.index)break;Y=this.ce(Y.index-1)}}}w.ta(Ke);w.Ik(Kd);w.Ik(ob);void 0!==xd&&w.ta(xd); -void 0!==gf&&w.ta(gf);for(var Mg=0,Ng=0,Pb=Fo(this,!0),yj=this.Ca,Lk=this.Gf,we=Ab=Dc=0,ad=0,Fb=this.Kp,ea=0;eari)zk(Ub,Infinity,Infinity),xe=Ub.za,lf.Ih(xe),this.Zg.add(xe);else{var yd=Ub.Pe,wt=Ub.tB,rp=Ub.oh;rp.Td()&&(rp=Jb);var lg=Ub.xq,dw=Ub.uB,Rk=0,Sk=0,qm=0;if(yd<-ri||yd>=ri){var xt=Pk.PF,Nf=Pk.OF;lg!==mj&&(qm=Pk.computeAngle(Ub,lg,Nf),Ub.mg=qm);Rk=xt.x-Og.x;Sk=xt.y-Og.y}else{var Ld, -mf;if(0<=yd)Ld=Dh.ea(yd),mf=ydzt+10?0<=yd?ti.Pb(Ld):Ld.Pb(ti):zt>yt+10?0<=yd?mf.Pb(ui):ui.Pb(mf):0<=yd?ti.Pb(ui):ui.Pb(ti)}else Nf=0<=yd?Ld.Pb(mf):mf.Pb(Ld);lg!==mj&&(qm=Pk.computeAngle(Ub,lg,Nf),Ub.mg=qm);Rk=Ld.x+(mf.x-Ld.x)*wt-Og.x;Sk=Ld.y+(mf.y-Ld.y)*wt-Og.y}zk(Ub, -Infinity,Infinity);var xe=Ub.za,om=Ub.Ja,Tk=0;Ub instanceof X&&(Tk=Ub.mb);var vi=om.width+Tk,Aj=om.height+Tk;Pg.reset();Pg.translate(-xe.x,-xe.y);Pg.scale(Ub.scale,Ub.scale);Pg.rotate(lg===mj?Ub.angle:Nf,vi/2,Aj/2);lg!==Rp&&lg!==Sp||Pg.rotate(90,vi/2,Aj/2);lg!==Tp&&lg!==Up||Pg.rotate(-90,vi/2,Aj/2);lg===Vp&&(45Nf||225Nf)&&Pg.rotate(-Nf,vi/2,Aj/2);var Bj=new B(0,0,vi,Aj);Qk.Xn(Bj,rp);Pg.nb(Qk);var ew=-Qk.x+Tk/2*Ub.scale,fw=-Qk.y+Tk/2*Ub.scale;Qg.assign(dw);isNaN(Qg.x)&&(Qg.x=0<=yd? -vi/2+3:-(vi/2+3));isNaN(Qg.y)&&(Qg.y=-(Aj/2+3));Qg.rotate(Nf);Rk+=Qg.x;Sk+=Qg.y;Bj.set(xe);Bj.x=Rk+ew;Bj.y=Sk+fw;this.Zg.add(Bj);lf.Ih(Bj)}}if(this instanceof W)for(var At=this.Ef;At.next();)zk(At.value,Infinity,Infinity);this.ij=lf;var sp=this.Ui;sp.m(sp.x+lf.x,sp.y+lf.y);Ua(e,lf.width||0,lf.height||0);w.df(Pg);w.v(Qk);w.v(Qg)}}}break;case "Grid":break;case "Graduated":var gw=a,hw=b,iw=c,jw=d,Rg=this.Bd();this.Cm=[];var Cj=Rg.margin,kw=Cj.right+Cj.left,lw=Cj.top+Cj.bottom;zk(Rg,gw,hw,iw,jw);var Bt= -Rg.za,mw=Bt.height,nw=Math.max(Bt.width+kw,0),ow=Math.max(mw+lw,0),Ct=new B(-Cj.left,-Cj.top,nw,ow);this.Cm.push(Ct);e.assign(Ct);for(var Yk=Rg.pf,Dt=Rg.mb,tp=Yk.Cx,Dj=Yk.$t,wi=Yk.au,pw=tp.length,up=0,vp=0,Ej=w.eb(),wp=0;wpzd&&(zd+=360);Et.push(zd)}up=Ft;vp=Gt}Ej.push(Et)}var Ht;if(null===this.Yj){for(var It=[],yp=this.xa.n,Jt=yp.length,zp=0;zp< -Jt;zp++){var Zk=yp[zp],Kt=[];It.push(Kt);if(Zk.visible)for(var rw=Zk.interval,Ap=0;Aprw&&Kt.push(Lt)}}}this.Yj=It}Ht=this.Yj;var Mt=this.xa.n,sw=Mt.length,Eh=0,Nt=0,Ot=wi;this.Em=[];for(var sm=[],tm=0;tmQt*Pt*wi/this.iu)){var ce=this.oF,Rt=Ht[tm],xi=Dj[0][0],Of= -0,Ad=0,Nt=wi*Fh.nF-1E-4,Ot=wi*Fh.lF+1E-4,Gj=Qt*Pt;if(cethis.Kk+Gj&&(yi=Math.floor((ce-this.Kk)/Gj),ce-=yi*Gj);for(;ce<=this.EA;){var Bp;a:{for(var tw=Rt.length,Cp=0;Cpwi&&(Eh=wi),Nt<=Eh&&Eh<=Ot)){for(var zd=Ej[Of][Ad],Hj=Dj[Of][Ad];Ofxi&&Adum?0zm;zm++){switch(zm){case 0:de.m(wm,xm);break;case 1:de.m(wm+Gp,xm);break;case 2:de.m(wm,xm+Hp);break;case 3:de.m(wm+Gp,xm+Hp)}de.rotate(Zt+Hh.angle);de.offset(Xt,Yt);0===ym&&0===zm?Ai.m(de.x,de.y,0,0):Ai.vi(de);de.offset(-Xt,-Yt);de.rotate(-Zt-Hh.angle)}w.v(de);this.Cm.push(Ai);ab(ww,Ai.x,Ai.y,Ai.width,Ai.height)}else if(zi instanceof -Mh){var Am=zi,$t=Ep,zw=e;null===this.rk&&(this.rk=new Mh);var Pf=this.rk;lp(Am,Pf);var Jp=Am.oh;Jp.Td()&&(Jp=Bb);for(var Ih=Am.xq,Aw=Am.uB,Bi=null,Bm=0,Cm=0,Sg=0,Kp=0,Bw=$t.length,Dm=0;DmSg||225Sg)&&Tg.rotate(-Sg,Kj/2,Lj/2);var au=w.lg(0,0,Kj,Lj),al=w.K();al.Xn(au,Jp);Tg.nb(al);var Cw=-al.x,Dw=-al.y,Ug=w.K();Ug.assign(Aw);isNaN(Ug.x)&&(Ug.x=Kj/2+3);isNaN(Ug.y)&&(Ug.y=-(Lj/2+3));Ug.rotate(Sg);var Bm=Bm+(Ug.x+Cw),Cm=Cm+(Ug.y+Dw),Lp=new B(Bm,Cm,Jh.width,Jh.height),Ew=new B(Jh.x,Jh.y,Jh.width,Jh.height),Fw=new B(Jj.x,Jj.y,Jj.width,Jj.height),bu=new Wp;bu.Lp(Pf.zf);ng.push(Kp);ng.push(Pf.me); -ng.push(bu);ng.push(Lp);ng.push(Ew);ng.push(Fw);0===Dm?Bi=Lp.copy():Bi.Ih(Lp);w.v(Ug);w.v(al);w.Eb(au);w.df(Tg)}this.Cm.push(Bi);ab(zw,Bi.x,Bi.y,Bi.width,Bi.height)}dm(zi,!1)}}break;case "TableRow":case "TableColumn":w.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:w.k("Unknown panel type: "+n)}}var nf=e.width,of=e.height,Em=this.padding,Gw=Em.top+Em.bottom,nf=nf+(Em.left+Em.right),of=of+Gw;isFinite(f.width)&& -(nf=f.width);isFinite(f.height)&&(of=f.height);nf=Math.min(k.width,nf);of=Math.min(k.height,of);nf=Math.max(h.width,nf);of=Math.max(h.height,of);nf=Math.max(c,nf);of=Math.max(d,of);e.width=nf;e.height=of;Ua(this.Wc,nf,of);Co(this,0,0,nf,of)};C.prototype.findMainElement=C.prototype.Bd=function(){if(null===this.Cl){var a=this.xa.n,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.H(),zk(this,n>c?c:n,p>d?d:p);break;case Fe:this.H(!0);zk(this,c+r,d+s,0,0);break;case ro:this.H(!0);zk(this,c+r,p+s,0,0);break;case qo:this.H(!0),zk(this,n+r,d+s,0,0)}}k=this.Y;k.x=a;k.y=b; +void 0!==gf&&w.ta(gf);for(var Mg=0,Ng=0,Pb=Eo(this,!0),yj=this.Ca,Lk=this.Gf,we=Ab=Dc=0,ad=0,Fb=this.Kp,ea=0;eari)yk(Ub,Infinity,Infinity),xe=Ub.za,lf.Ih(xe),this.Zg.add(xe);else{var yd=Ub.Pe,vt=Ub.tB,qp=Ub.oh;qp.Td()&&(qp=Jb);var lg=Ub.xq,cw=Ub.uB,Rk=0,Sk=0,qm=0;if(yd<-ri||yd>=ri){var wt=Pk.PF,Nf=Pk.OF;lg!==lj&&(qm=Pk.computeAngle(Ub,lg,Nf),Ub.mg=qm);Rk=wt.x-Og.x;Sk=wt.y-Og.y}else{var Ld, +mf;if(0<=yd)Ld=Dh.ea(yd),mf=ydyt+10?0<=yd?ti.Pb(Ld):Ld.Pb(ti):yt>xt+10?0<=yd?mf.Pb(ui):ui.Pb(mf):0<=yd?ti.Pb(ui):ui.Pb(ti)}else Nf=0<=yd?Ld.Pb(mf):mf.Pb(Ld);lg!==lj&&(qm=Pk.computeAngle(Ub,lg,Nf),Ub.mg=qm);Rk=Ld.x+(mf.x-Ld.x)*vt-Og.x;Sk=Ld.y+(mf.y-Ld.y)*vt-Og.y}yk(Ub, +Infinity,Infinity);var xe=Ub.za,om=Ub.Ja,Tk=0;Ub instanceof X&&(Tk=Ub.mb);var vi=om.width+Tk,Aj=om.height+Tk;Pg.reset();Pg.translate(-xe.x,-xe.y);Pg.scale(Ub.scale,Ub.scale);Pg.rotate(lg===lj?Ub.angle:Nf,vi/2,Aj/2);lg!==Qp&&lg!==Rp||Pg.rotate(90,vi/2,Aj/2);lg!==Sp&&lg!==Tp||Pg.rotate(-90,vi/2,Aj/2);lg===Up&&(45Nf||225Nf)&&Pg.rotate(-Nf,vi/2,Aj/2);var Bj=new B(0,0,vi,Aj);Qk.Xn(Bj,qp);Pg.nb(Qk);var dw=-Qk.x+Tk/2*Ub.scale,ew=-Qk.y+Tk/2*Ub.scale;Qg.assign(cw);isNaN(Qg.x)&&(Qg.x=0<=yd? +vi/2+3:-(vi/2+3));isNaN(Qg.y)&&(Qg.y=-(Aj/2+3));Qg.rotate(Nf);Rk+=Qg.x;Sk+=Qg.y;Bj.set(xe);Bj.x=Rk+dw;Bj.y=Sk+ew;this.Zg.add(Bj);lf.Ih(Bj)}}if(this instanceof W)for(var zt=this.Ef;zt.next();)yk(zt.value,Infinity,Infinity);this.ij=lf;var rp=this.Ui;rp.m(rp.x+lf.x,rp.y+lf.y);Ua(e,lf.width||0,lf.height||0);w.df(Pg);w.v(Qk);w.v(Qg)}}}break;case "Grid":break;case "Graduated":var fw=a,gw=b,hw=c,iw=d,Rg=this.Bd();this.Cm=[];var Cj=Rg.margin,jw=Cj.right+Cj.left,kw=Cj.top+Cj.bottom;yk(Rg,fw,gw,hw,iw);var At= +Rg.za,lw=At.height,mw=Math.max(At.width+jw,0),nw=Math.max(lw+kw,0),Bt=new B(-Cj.left,-Cj.top,mw,nw);this.Cm.push(Bt);e.assign(Bt);for(var Yk=Rg.pf,Ct=Rg.mb,sp=Yk.Cx,Dj=Yk.$t,wi=Yk.au,ow=sp.length,tp=0,up=0,Ej=w.eb(),vp=0;vpzd&&(zd+=360);Dt.push(zd)}tp=Et;up=Ft}Ej.push(Dt)}var Gt;if(null===this.Yj){for(var Ht=[],xp=this.xa.n,It=xp.length,yp=0;yp< +It;yp++){var Zk=xp[yp],Jt=[];Ht.push(Jt);if(Zk.visible)for(var qw=Zk.interval,zp=0;zpqw&&Jt.push(Kt)}}}this.Yj=Ht}Gt=this.Yj;var Lt=this.xa.n,rw=Lt.length,Eh=0,Mt=0,Nt=wi;this.Em=[];for(var sm=[],tm=0;tmPt*Ot*wi/this.iu)){var ce=this.oF,Qt=Gt[tm],xi=Dj[0][0],Of= +0,Ad=0,Mt=wi*Fh.nF-1E-4,Nt=wi*Fh.lF+1E-4,Gj=Pt*Ot;if(cethis.Kk+Gj&&(yi=Math.floor((ce-this.Kk)/Gj),ce-=yi*Gj);for(;ce<=this.EA;){var Ap;a:{for(var sw=Qt.length,Bp=0;Bpwi&&(Eh=wi),Mt<=Eh&&Eh<=Nt)){for(var zd=Ej[Of][Ad],Hj=Dj[Of][Ad];Ofxi&&Adum?0zm;zm++){switch(zm){case 0:de.m(wm,xm);break;case 1:de.m(wm+Fp,xm);break;case 2:de.m(wm,xm+Gp);break;case 3:de.m(wm+Fp,xm+Gp)}de.rotate(Yt+Hh.angle);de.offset(Wt,Xt);0===ym&&0===zm?Ai.m(de.x,de.y,0,0):Ai.vi(de);de.offset(-Wt,-Xt);de.rotate(-Yt-Hh.angle)}w.v(de);this.Cm.push(Ai);ab(vw,Ai.x,Ai.y,Ai.width,Ai.height)}else if(zi instanceof +Lh){var Am=zi,Zt=Dp,yw=e;null===this.rk&&(this.rk=new Lh);var Pf=this.rk;kp(Am,Pf);var Ip=Am.oh;Ip.Td()&&(Ip=Bb);for(var Ih=Am.xq,zw=Am.uB,Bi=null,Bm=0,Cm=0,Sg=0,Jp=0,Aw=Zt.length,Dm=0;DmSg||225Sg)&&Tg.rotate(-Sg,Kj/2,Lj/2);var $t=w.lg(0,0,Kj,Lj),al=w.K();al.Xn($t,Ip);Tg.nb(al);var Bw=-al.x,Cw=-al.y,Ug=w.K();Ug.assign(zw);isNaN(Ug.x)&&(Ug.x=Kj/2+3);isNaN(Ug.y)&&(Ug.y=-(Lj/2+3));Ug.rotate(Sg);var Bm=Bm+(Ug.x+Bw),Cm=Cm+(Ug.y+Cw),Kp=new B(Bm,Cm,Jh.width,Jh.height),Dw=new B(Jh.x,Jh.y,Jh.width,Jh.height),Ew=new B(Jj.x,Jj.y,Jj.width,Jj.height),au=new Vp;au.Lp(Pf.zf);ng.push(Jp);ng.push(Pf.me); +ng.push(au);ng.push(Kp);ng.push(Dw);ng.push(Ew);0===Dm?Bi=Kp.copy():Bi.Ih(Kp);w.v(Ug);w.v(al);w.Eb($t);w.df(Tg)}this.Cm.push(Bi);ab(yw,Bi.x,Bi.y,Bi.width,Bi.height)}cm(zi,!1)}}break;case "TableRow":case "TableColumn":w.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:w.k("Unknown panel type: "+n)}}var nf=e.width,of=e.height,Em=this.padding,Fw=Em.top+Em.bottom,nf=nf+(Em.left+Em.right),of=of+Fw;isFinite(f.width)&& +(nf=f.width);isFinite(f.height)&&(of=f.height);nf=Math.min(k.width,nf);of=Math.min(k.height,of);nf=Math.max(h.width,nf);of=Math.max(h.height,of);nf=Math.max(c,nf);of=Math.max(d,of);e.width=nf;e.height=of;Ua(this.Wc,nf,of);Bo(this,0,0,nf,of)};C.prototype.findMainElement=C.prototype.Bd=function(){if(null===this.Cl){var a=this.xa.n,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.H(),yk(this,n>c?c:n,p>d?d:p);break;case Ee:this.H(!0);yk(this,c+r,d+s,0,0);break;case qo:this.H(!0);yk(this,c+r,p+s,0,0);break;case po:this.H(!0),yk(this,n+r,d+s,0,0)}}k=this.Y;k.x=a;k.y=b; k.width=c;k.height=d;var u=this.na.Sb;switch(u){case "Position":for(var t=f.length,x=e.x-this.padding.left,v=e.y-this.padding.top,z=0;z=this.wq);Je++){var hi=this.de(jb+Je);te.height+=hi.total}for(Je=1;Je=this.Kp);Je++){var ii=this.ce(Zc+Je);te.width+=ii.total}var vj=Jf.Ra+te.width,wj=Ze.Ra+te.height;h.x=Id;h.y=cc;h.width=vj;h.height=wj;var Fb=Id,xh=cc,yh=vj,ea=wj;Id+vj>e.width&&(yh=Math.max(e.width-Id,0));cc+wj>e.height&&(ea=Math.max(e.height-cc,0));var aa=wb.alignment,be=0,hg=0,ji=0,Gb=0;if(aa.Zc()){aa=this.Tl;aa.$c()||(aa=Jb);var be=aa.x,hg=aa.y,ji=aa.offsetX,Gb=aa.offsetY,ki=Jf.alignment, -Tb=Ze.alignment;ki.$c()&&(be=ki.x,ji=ki.offsetX);Tb.$c()&&(hg=Tb.y,Gb=Tb.offsetY)}else be=aa.x,hg=aa.y,ji=aa.offsetX,Gb=aa.offsetY;if(isNaN(be)||isNaN(hg))hg=be=.5,Gb=ji=0;var $e=ae.width,Ke=ae.height,af=wb.margin,ue=af.left+af.right,ve=af.top+af.bottom,$c=Uo(wb,Ze,Jf,!1);!isNaN(wb.Ca.width)||$c!==Fe&&$c!==ro||($e=Math.max(vj-ue,0));!isNaN(wb.Ca.height)||$c!==Fe&&$c!==qo||(Ke=Math.max(wj-ve,0));var Jd=wb.Gf,zh=wb.qi,$e=Math.min(Jd.width,$e),Ke=Math.min(Jd.height,Ke),$e=Math.max(zh.width,$e),Ke=Math.max(zh.height, -Ke),Y=Ke+ve;h.x+=h.width*be-($e+ue)*be+ji+af.left;h.y+=h.height*hg-Y*hg+Gb+af.top;wb.visible&&(db(Fb,xh,yh,ea,h.x,h.y,ae.width,ae.height)?wb.ic(h.x,h.y,$e,Ke):wb.ic(h.x,h.y,$e,Ke,new B(Fb,xh,yh,ea)))}else{wb.Ni();wb.pc.Qa();var kd=wb.pc,ig=w.lg(kd.x,kd.y,kd.width,kd.height);kd.x=jd.type===Ko?vh:Id;kd.y=jd.type===Lo?Fg:cc;kd.width=ae.width;kd.height=ae.height;wb.pc.freeze();Go(wb,!1);if(!Va(ig,kd)){var li=wb.U;null!==li&&(li.Mk(),wb.Fs(li))}w.Eb(ig)}}}}w.Ik(te);for(jb=0;jb<$d;jb++)wb=f[jb],jd=wb instanceof -C?wb:null,null===jd||jd.type!==Ko&&jd.type!==Lo||(kd=wb.pc,wb.Wc.Qa(),wb.Wc.m(0,0,kd.width,kd.height),wb.Wc.freeze());break;case "Viewbox":var Ah=f[0],lc=Ah.za,Bh=Ah.margin,mb=Bh.top+Bh.bottom,nb=Math.max(lc.width+(Bh.right+Bh.left),0),hm=Math.max(lc.height+mb,0),bf=Ah.alignment;bf.Zc()&&(bf=this.Tl);bf.$c()||(bf=Jb);h.x=e.width*bf.x-nb*bf.x+bf.offsetX;h.y=e.height*bf.y-hm*bf.y+bf.offsetY;h.width=lc.width;h.height=lc.height;Ah.ic(h.x,h.y,h.width,h.height);break;case "Link":var Jk=f.length;if(this instanceof -kh||this instanceof W){var mi=null;this instanceof W&&(mi=this);this instanceof kh&&(mi=this.Ze);var xc=mi,Kf=this instanceof kh?null:xc.path;if(null!==this.Zg){var jg=this.Zg.n,Pb=0;if(null!==Kf&&Pb=kg){var Kg=this.PF,ob=this.OF;xj!==mj&&(Jg=this.computeAngle(mc,xj,ob),mc.angle=Jg);Ig=Kg.x;Mf=Kg.y}else{var Wb=void 0,Ec=void 0;if(0<=Ab)Wb=Dc.n[Ab],Ec=Ab -cb+10?0<=Ab?Kd.Pb(Wb):Wb.Pb(Kd):cb>gf+10?0<=Ab?Ec.Pb(xd):xd.Pb(Ec):0<=Ab?Kd.Pb(xd):xd.Pb(Kd)}else ob=0<=Ab?Wb.Pb(Ec):Ec.Pb(Wb);xj!==mj&&(Jg=this.computeAngle(mc,xj,ob),mc.angle=Jg);Ig=Wb.x+(Ec.x-Wb.x)*ni;Mf=Wb.y+(Ec.y-Wb.y)*ni}if(Hg.L(yb))mc.location=new y(Ig,Mf);else{Hg.Td()&&(Hg=Jb);var hf=w.Wg();hf.reset();hf.scale(mc.scale,mc.scale);hf.rotate(mc.angle,0,0);var ld=mc.Ja,Lg=w.lg(0,0,ld.width,ld.height),jf=w.K();jf.Xn(Lg,Hg);hf.nb(jf);var Fc=-jf.x,oi=-jf.y,Le=pp.copy();isNaN(Le.x)&&(Le.x=0<=Ab?jf.x+ +Tb=Ze.alignment;ki.$c()&&(be=ki.x,ji=ki.offsetX);Tb.$c()&&(hg=Tb.y,Gb=Tb.offsetY)}else be=aa.x,hg=aa.y,ji=aa.offsetX,Gb=aa.offsetY;if(isNaN(be)||isNaN(hg))hg=be=.5,Gb=ji=0;var $e=ae.width,Ke=ae.height,af=wb.margin,ue=af.left+af.right,ve=af.top+af.bottom,$c=To(wb,Ze,Jf,!1);!isNaN(wb.Ca.width)||$c!==Ee&&$c!==qo||($e=Math.max(vj-ue,0));!isNaN(wb.Ca.height)||$c!==Ee&&$c!==po||(Ke=Math.max(wj-ve,0));var Jd=wb.Gf,zh=wb.qi,$e=Math.min(Jd.width,$e),Ke=Math.min(Jd.height,Ke),$e=Math.max(zh.width,$e),Ke=Math.max(zh.height, +Ke),Y=Ke+ve;h.x+=h.width*be-($e+ue)*be+ji+af.left;h.y+=h.height*hg-Y*hg+Gb+af.top;wb.visible&&(db(Fb,xh,yh,ea,h.x,h.y,ae.width,ae.height)?wb.ic(h.x,h.y,$e,Ke):wb.ic(h.x,h.y,$e,Ke,new B(Fb,xh,yh,ea)))}else{wb.Ni();wb.pc.Qa();var kd=wb.pc,ig=w.lg(kd.x,kd.y,kd.width,kd.height);kd.x=jd.type===Jo?vh:Id;kd.y=jd.type===Ko?Fg:cc;kd.width=ae.width;kd.height=ae.height;wb.pc.freeze();Fo(wb,!1);if(!Va(ig,kd)){var li=wb.U;null!==li&&(li.Mk(),wb.Fs(li))}w.Eb(ig)}}}}w.Ik(te);for(jb=0;jb<$d;jb++)wb=f[jb],jd=wb instanceof +C?wb:null,null===jd||jd.type!==Jo&&jd.type!==Ko||(kd=wb.pc,wb.Wc.Qa(),wb.Wc.m(0,0,kd.width,kd.height),wb.Wc.freeze());break;case "Viewbox":var Ah=f[0],lc=Ah.za,Bh=Ah.margin,mb=Bh.top+Bh.bottom,nb=Math.max(lc.width+(Bh.right+Bh.left),0),hm=Math.max(lc.height+mb,0),bf=Ah.alignment;bf.Zc()&&(bf=this.Tl);bf.$c()||(bf=Jb);h.x=e.width*bf.x-nb*bf.x+bf.offsetX;h.y=e.height*bf.y-hm*bf.y+bf.offsetY;h.width=lc.width;h.height=lc.height;Ah.ic(h.x,h.y,h.width,h.height);break;case "Link":var Jk=f.length;if(this instanceof +jh||this instanceof W){var mi=null;this instanceof W&&(mi=this);this instanceof jh&&(mi=this.Ze);var xc=mi,Kf=this instanceof jh?null:xc.path;if(null!==this.Zg){var jg=this.Zg.n,Pb=0;if(null!==Kf&&Pb=kg){var Kg=this.PF,ob=this.OF;xj!==lj&&(Jg=this.computeAngle(mc,xj,ob),mc.angle=Jg);Ig=Kg.x;Mf=Kg.y}else{var Wb=void 0,Ec=void 0;if(0<=Ab)Wb=Dc.n[Ab],Ec=Ab +cb+10?0<=Ab?Kd.Pb(Wb):Wb.Pb(Kd):cb>gf+10?0<=Ab?Ec.Pb(xd):xd.Pb(Ec):0<=Ab?Kd.Pb(xd):xd.Pb(Kd)}else ob=0<=Ab?Wb.Pb(Ec):Ec.Pb(Wb);xj!==lj&&(Jg=this.computeAngle(mc,xj,ob),mc.angle=Jg);Ig=Wb.x+(Ec.x-Wb.x)*ni;Mf=Wb.y+(Ec.y-Wb.y)*ni}if(Hg.L(yb))mc.location=new y(Ig,Mf);else{Hg.Td()&&(Hg=Jb);var hf=w.Wg();hf.reset();hf.scale(mc.scale,mc.scale);hf.rotate(mc.angle,0,0);var ld=mc.Ja,Lg=w.lg(0,0,ld.width,ld.height),jf=w.K();jf.Xn(Lg,Hg);hf.nb(jf);var Fc=-jf.x,oi=-jf.y,Le=op.copy();isNaN(Le.x)&&(Le.x=0<=Ab?jf.x+ 3:-(jf.x+3));isNaN(Le.y)&&(Le.y=-(jf.y+3));Le.rotate(ob);Ig+=Le.x;Mf+=Le.y;hf.FG(Lg);var Fc=Fc+Lg.x,oi=oi+Lg.y,Mg=w.xb(Ig+Fc,Mf+oi);mc.move(Mg);w.v(Mg);w.v(jf);w.Eb(Lg);w.df(hf)}}this.Cu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Cm){var Ng=this.Bd(),yj=this.Em,Lk=this.Cm,we=0,ad=Lk[we];we++;Ng.ic(ad.x-e.x,ad.y-e.y,ad.width,ad.height);for(var Mk=f.length,Ch=0;Chq.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof C?n:null;q=w.Wg();q.set(h);if(null!==n?n.Gk(a,b,c,d,e,q):Eo(p,a,d, -q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);w.df(q)}}}void 0===f&&w.df(h);return d}void 0===f&&w.df(h);return!1};function aq(a,b,c,d){for(var e=a.xa.n,f=e.length;f--;){var h=e[f];if(h.visible){var k=h.Y,l=a.Ja;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof C&&aq(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} +g.Gk=function(a,b,c,d,e,f){if(!1===this.Ug)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Wg(),h.reset());h.multiply(this.transform);if(this.qn(a,h))return $p(this,b,c,e),void 0===f&&w.df(h),!0;if(this.Zf(a,h)){if(!this.Fn)for(var k=np(this),l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===k){var p=n.Y,q=this.Ja;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof C?n:null;q=w.Wg();q.set(h);if(null!==n?n.Gk(a,b,c,d,e,q):Do(p,a,d, +q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);w.df(q)}}}void 0===f&&w.df(h);return d}void 0===f&&w.df(h);return!1};function $p(a,b,c,d){for(var e=a.xa.n,f=e.length;f--;){var h=e[f];if(h.visible){var k=h.Y,l=a.Ja;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof C&&$p(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} g.wn=function(a,b,c,d,e,f){if(!1===this.Ug)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ja,k=this.Yg(),l=k?a:Pa(w.xb(a.x,a.y),this.transform),m=k?b:Pa(w.xb(b.x,b.y),this.transform),n=l.Bf(m),p=0t.width||u.y>t.height||0>u.x+u.width||0>u.y+u.height))if(s.Yg()?(u=s.transform,Pa(l.set(a),u),Pa(m.set(b),u)):(l.set(a),m.set(b)),u=s,s=s instanceof C?s:null,null!==s?s.wn(l,m,c,d,e,f):u.cF(l,m,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}w.v(l);w.v(m)}return e? -p:h}return!1};function Mp(a){var b=null;a instanceof X&&(b=a.A,b===qc&&(b=null),a=a.pf,null!==a&&null===b&&(b=a.A));null===b&&(b=zb);return b}function Np(a){var b=null;a instanceof X&&(b=a.B,b===qc&&(b=null),a=a.pf,null!==a&&null===b&&(b=a.B));null===b&&(b=Sb);return b}C.prototype.add=C.prototype.add=function(a){w.G(a,G,C,"add:element");this.Rd(this.xa.count,a)};C.prototype.elt=C.prototype.ea=function(a){return this.xa.ea(a)}; +n&&Ra(l.x,l.y,h.width,h.height,h.width,0)t.width||u.y>t.height||0>u.x+u.width||0>u.y+u.height))if(s.Yg()?(u=s.transform,Pa(l.set(a),u),Pa(m.set(b),u)):(l.set(a),m.set(b)),u=s,s=s instanceof C?s:null,null!==s?s.wn(l,m,c,d,e,f):u.cF(l,m,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}w.v(l);w.v(m)}return e? +p:h}return!1};function Lp(a){var b=null;a instanceof X&&(b=a.A,b===qc&&(b=null),a=a.pf,null!==a&&null===b&&(b=a.A));null===b&&(b=zb);return b}function Mp(a){var b=null;a instanceof X&&(b=a.B,b===qc&&(b=null),a=a.pf,null!==a&&null===b&&(b=a.B));null===b&&(b=Sb);return b}C.prototype.add=C.prototype.add=function(a){w.G(a,G,C,"add:element");this.Rd(this.xa.count,a)};C.prototype.elt=C.prototype.ea=function(a){return this.xa.ea(a)}; C.prototype.insertAt=C.prototype.Rd=function(a,b){b instanceof R&&w.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.bm(b))this===b&&w.k("Cannot make a Panel contain itself: "+this.toString()),w.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.Q;null!==c&&c!==this&&w.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ -this.toString());this.na!==Kl||b instanceof X||w.k("Can only add Shapes to a Grid Panel, not: "+b);this.na!==jp||b instanceof X||b instanceof Mh||w.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.im(this);b.Vm=null;if(null!==this.gq){var d=b.data;null!==d&&"object"===typeof d&&(null===this.wg&&(this.wg=new ma(Object,C)),this.wg.add(d,b))}var e=this.xa,d=-1;if(c===this){for(var f=-1,h=this.xa.n,k=h.length,l=0;l=e.count&& -a>=e.count)return;e.dd(f);d=f}else w.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Rd(a,b);if(0===a||b.hf)this.Cl=null;this.H();b.H();null!==b.Vd?this.Lk=!0:b instanceof C&&!0===b.Lk&&(this.Lk=!0);this.Yj=null;c=this.U;null!==c&&(c.Qm=null,c.ik=NaN,this.Lk&&c instanceof T&&(c.Lk=!0),c.Lk&&c instanceof T&&(c.oe=null),e=this.g,null!==e&&e.ja.lb||(-1!==d&&c.cd(Qf,"elements",this,b,null,d,null),c.cd(Ff,"elements",this,null,b,null,a), -this.pu()||bq(this,b,!1)))};w.defineProperty(C,{Lk:null},function(){return 0!==(this.N&8388608)},function(a){0!==(this.N&8388608)!==a&&(this.N^=8388608)});function cq(a,b){a.N=b?a.N|16777216:a.N&-16777217}C.prototype.remove=C.prototype.remove=function(a){w.G(a,G,C,"remove:element");for(var b=this.xa.n,c=b.length,d=-1,e=0;ea&&w.Fa(a,">= 0",C,"getRowDefinition:idx");a=Math.round(a);var b=this.Xc;if(void 0===b[a]){var c=new Wg;c.im(this);c.xe=!0;c.index=a;b[a]=c}return b[a]};C.prototype.removeRowDefinition=C.prototype.cG=function(a){0>a&&w.Fa(a,">= 0",C,"removeRowDefinition:idx");a=Math.round(a);var b=this.Xc;this.cd(Qf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()};w.u(C,{Kp:"columnCount"},function(){return void 0===this.Uc?0:this.Uc.length}); -C.prototype.getColumnDefinition=C.prototype.ce=function(a){0>a&&w.Fa(a,">= 0",C,"getColumnDefinition:idx");a=Math.round(a);var b=this.Uc;if(void 0===b[a]){var c=new Wg;c.im(this);c.xe=!1;c.index=a;b[a]=c}return b[a]};C.prototype.removeColumnDefinition=C.prototype.aG=function(a){0>a&&w.Fa(a,">= 0",C,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Uc;this.cd(Qf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()}; -w.defineProperty(C,{AJ:"rowSizing"},function(){return void 0===this.Ym?ip:this.Ym},function(a){if(void 0!==this.Ym){var b=this.Ym;b!==a&&(a!==ip&&a!==Pp&&w.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Ym=a,this.H(),this.h("rowSizing",b,a))}}); -w.defineProperty(C,{wH:"columnSizing"},function(){return void 0===this.ym?ip:this.ym},function(a){if(void 0!==this.ym){var b=this.ym;b!==a&&(a!==ip&&a!==Pp&&w.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.ym=a,this.H(),this.h("columnSizing",b,a))}}); +this.toString());this.na!==Jl||b instanceof X||w.k("Can only add Shapes to a Grid Panel, not: "+b);this.na!==ip||b instanceof X||b instanceof Lh||w.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.im(this);b.Vm=null;if(null!==this.gq){var d=b.data;null!==d&&"object"===typeof d&&(null===this.wg&&(this.wg=new ma(Object,C)),this.wg.add(d,b))}var e=this.xa,d=-1;if(c===this){for(var f=-1,h=this.xa.n,k=h.length,l=0;l=e.count&& +a>=e.count)return;e.dd(f);d=f}else w.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Rd(a,b);if(0===a||b.hf)this.Cl=null;this.H();b.H();null!==b.Vd?this.Lk=!0:b instanceof C&&!0===b.Lk&&(this.Lk=!0);this.Yj=null;c=this.U;null!==c&&(c.Qm=null,c.ik=NaN,this.Lk&&c instanceof T&&(c.Lk=!0),c.Lk&&c instanceof T&&(c.oe=null),e=this.g,null!==e&&e.ja.lb||(-1!==d&&c.cd(Ff,"elements",this,b,null,d,null),c.cd(Ef,"elements",this,null,b,null,a), +this.pu()||aq(this,b,!1)))};w.defineProperty(C,{Lk:null},function(){return 0!==(this.N&8388608)},function(a){0!==(this.N&8388608)!==a&&(this.N^=8388608)});function bq(a,b){a.N=b?a.N|16777216:a.N&-16777217}C.prototype.remove=C.prototype.remove=function(a){w.G(a,G,C,"remove:element");for(var b=this.xa.n,c=b.length,d=-1,e=0;ea&&w.Fa(a,">= 0",C,"getRowDefinition:idx");a=Math.round(a);var b=this.Xc;if(void 0===b[a]){var c=new Vg;c.im(this);c.xe=!0;c.index=a;b[a]=c}return b[a]};C.prototype.removeRowDefinition=C.prototype.cG=function(a){0>a&&w.Fa(a,">= 0",C,"removeRowDefinition:idx");a=Math.round(a);var b=this.Xc;this.cd(Ff,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()};w.u(C,{Kp:"columnCount"},function(){return void 0===this.Uc?0:this.Uc.length}); +C.prototype.getColumnDefinition=C.prototype.ce=function(a){0>a&&w.Fa(a,">= 0",C,"getColumnDefinition:idx");a=Math.round(a);var b=this.Uc;if(void 0===b[a]){var c=new Vg;c.im(this);c.xe=!1;c.index=a;b[a]=c}return b[a]};C.prototype.removeColumnDefinition=C.prototype.aG=function(a){0>a&&w.Fa(a,">= 0",C,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Uc;this.cd(Ff,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()}; +w.defineProperty(C,{AJ:"rowSizing"},function(){return void 0===this.Ym?hp:this.Ym},function(a){if(void 0!==this.Ym){var b=this.Ym;b!==a&&(a!==hp&&a!==Op&&w.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Ym=a,this.H(),this.h("rowSizing",b,a))}}); +w.defineProperty(C,{wH:"columnSizing"},function(){return void 0===this.ym?hp:this.ym},function(a){if(void 0!==this.ym){var b=this.ym;b!==a&&(a!==hp&&a!==Op&&w.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.ym=a,this.H(),this.h("columnSizing",b,a))}}); w.defineProperty(C,{$L:"topIndex"},function(){return void 0===this.hj?0:this.hj},function(a){if(void 0!==this.hj){var b=this.hj;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.hj=a,this.H(),this.h("topIndex",b,a))}}); -w.defineProperty(C,{oL:"leftIndex"},function(){return void 0===this.Ri?0:this.Ri},function(a){if(void 0!==this.Ri){var b=this.Ri;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Ri=a,this.H(),this.h("leftIndex",b,a))}});C.prototype.findRowForLocalY=function(a){if(0>a||this.type!==To)return-1;for(var b=0,c=this.Xc,d=c.length,e=this.hj;ea||this.type!==To)return-1;for(var b=0,c=this.Uc,d=c.length,e=this.Ri;ea)&&w.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Ri=a,this.H(),this.h("leftIndex",b,a))}});C.prototype.findRowForLocalY=function(a){if(0>a||this.type!==So)return-1;for(var b=0,c=this.Xc,d=c.length,e=this.hj;ea||this.type!==So)return-1;for(var b=0,c=this.Uc,d=c.length,e=this.Ri;ea;)this.sf(this.xa.length-1,!1);a=this.gq;if(null!==a)for(var b=w.Za(a),c=0;ca;)this.sf(this.xa.length-1,!1);a=this.gq;if(null!==a)for(var b=w.Za(a),c=0;cc)){var d;d=dq(a,b);var e=a.FI,f=null;null!==e&&(f=e.ka(d));null===f&&(eq||(eq=!0,w.trace('No item template Panel found for category "'+d+'" on '+a),w.trace(" Using default item template."),d=new C,e=new Mh,e.bind(new bh("text","",Rf)),d.add(e),fq=d),f=fq);d=f;null!==d&&(mh(d),d=d.copy(),0!==(d.N&16777216)&&(e=a.Ul(),null!==e&&cq(e,!0)),"object"===typeof b&&(null===a.wg&&(a.wg=new ma(Object,C)),a.wg.add(b,d)),e=c,nn(a)&&e++,a.Rd(e,d),d.Zd=b,on(a,e, -c),d.Zd=null,d.data=b)}}function on(a,b,c){for(a=a.xa;bc)){var d;d=cq(a,b);var e=a.FI,f=null;null!==e&&(f=e.ka(d));null===f&&(dq||(dq=!0,w.trace('No item template Panel found for category "'+d+'" on '+a),w.trace(" Using default item template."),d=new C,e=new Lh,e.bind(new ah("text","",Qf)),d.add(e),eq=d),f=eq);d=f;null!==d&&(lh(d),d=d.copy(),0!==(d.N&16777216)&&(e=a.Ul(),null!==e&&bq(e,!0)),"object"===typeof b&&(null===a.wg&&(a.wg=new ma(Object,C)),a.wg.add(b,d)),e=c,mn(a)&&e++,a.Rd(e,d),d.Zd=b,nn(a,e, +c),d.Zd=null,d.data=b)}}function nn(a,b,c){for(a=a.xa;ba&&w.Fa(a,">= 0",Wg,"height"),this.of=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("height",b,a))});w.defineProperty(Wg,{width:"width"},function(){return this.of},function(a){var b=this.of;b!==a&&(0>a&&w.Fa(a,">= 0",Wg,"width"),this.of=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("width",b,a))}); -w.defineProperty(Wg,{Bh:"minimum"},function(){return this.kk},function(a){var b=this.kk;b!==a&&((0>a||!isFinite(a))&&w.Fa(a,">= 0",Wg,"minimum"),this.kk=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("minimum",b,a))});w.defineProperty(Wg,{ie:"maximum"},function(){return this.jk},function(a){var b=this.jk;b!==a&&(0>a&&w.Fa(a,">= 0",Wg,"maximum"),this.jk=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("maximum",b,a))}); -w.defineProperty(Wg,{alignment:"alignment"},function(){return this.je},function(a){var b=this.je;b.L(a)||(this.je=a.S(),null!==this.Q&&this.Q.H(),this.jd("alignment",b,a))});w.defineProperty(Wg,{stretch:"stretch"},function(){return this.Fg},function(a){var b=this.Fg;b!==a&&(this.Fg=a,null!==this.Q&&this.Q.H(),this.jd("stretch",b,a))}); -w.defineProperty(Wg,{oG:"separatorPadding"},function(){return this.ok},function(a){"number"===typeof a&&(a=new hb(a));var b=this.ok;null!==a&&null!==b&&b.L(a)||(null!==a&&(a=a.S()),this.ok=a,null!==this.Q&&this.Q.H(),this.jd("separatorPadding",b,a))});w.defineProperty(Wg,{zq:"separatorStroke"},function(){return this.it},function(a){var b=this.it;b!==a&&(null===a||"string"===typeof a||a instanceof ga)&&(a instanceof ga&&a.freeze(),this.it=a,null!==this.Q&&this.Q.H(),this.jd("separatorStroke",b,a))}); -w.defineProperty(Wg,{Aq:"separatorStrokeWidth"},function(){return this.jt},function(a){var b=this.jt;b!==a&&(this.jt=a,null!==this.Q&&this.Q.H(),this.jd("separatorStrokeWidth",b,a))}); -w.defineProperty(Wg,{GJ:"separatorDashArray"},function(){return this.$h},function(a){var b=this.$h;if(b!==a){null===a||Array.isArray(a)||w.Fd(a,"Array",Wg,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea&&w.Fa(a,">= 0",Vg,"height"),this.of=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("height",b,a))});w.defineProperty(Vg,{width:"width"},function(){return this.of},function(a){var b=this.of;b!==a&&(0>a&&w.Fa(a,">= 0",Vg,"width"),this.of=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("width",b,a))}); +w.defineProperty(Vg,{Bh:"minimum"},function(){return this.kk},function(a){var b=this.kk;b!==a&&((0>a||!isFinite(a))&&w.Fa(a,">= 0",Vg,"minimum"),this.kk=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("minimum",b,a))});w.defineProperty(Vg,{ie:"maximum"},function(){return this.jk},function(a){var b=this.jk;b!==a&&(0>a&&w.Fa(a,">= 0",Vg,"maximum"),this.jk=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.jd("maximum",b,a))}); +w.defineProperty(Vg,{alignment:"alignment"},function(){return this.je},function(a){var b=this.je;b.L(a)||(this.je=a.S(),null!==this.Q&&this.Q.H(),this.jd("alignment",b,a))});w.defineProperty(Vg,{stretch:"stretch"},function(){return this.Fg},function(a){var b=this.Fg;b!==a&&(this.Fg=a,null!==this.Q&&this.Q.H(),this.jd("stretch",b,a))}); +w.defineProperty(Vg,{oG:"separatorPadding"},function(){return this.ok},function(a){"number"===typeof a&&(a=new hb(a));var b=this.ok;null!==a&&null!==b&&b.L(a)||(null!==a&&(a=a.S()),this.ok=a,null!==this.Q&&this.Q.H(),this.jd("separatorPadding",b,a))});w.defineProperty(Vg,{zq:"separatorStroke"},function(){return this.it},function(a){var b=this.it;b!==a&&(null===a||"string"===typeof a||a instanceof ga)&&(a instanceof ga&&a.freeze(),this.it=a,null!==this.Q&&this.Q.H(),this.jd("separatorStroke",b,a))}); +w.defineProperty(Vg,{Aq:"separatorStrokeWidth"},function(){return this.jt},function(a){var b=this.jt;b!==a&&(this.jt=a,null!==this.Q&&this.Q.H(),this.jd("separatorStrokeWidth",b,a))}); +w.defineProperty(Vg,{GJ:"separatorDashArray"},function(){return this.$h},function(a){var b=this.$h;if(b!==a){null===a||Array.isArray(a)||w.Fd(a,"Array",Vg,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var f=d.za,h=Math.max(1,f.width),f=f.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=w.eb(),x=2;xp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,x=0,q=t[x],p=q[0],s=q[1],r=q[2],q=q[3],v=0;.1<=u;){0===v&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){w.ta(t);return}e> +X.prototype.hc=function(a){a===Pj||a===Rj||a===Sj||a===oo?this.BA=a:G.prototype.hc.call(this,a)};X.prototype.toString=function(){return"Shape("+("None"!==this.Db?this.Db:"None"!==this.Fq?this.Fq:this.zA)+")#"+w.Pd(this)}; +function gq(a,b,c,d){var e=c.length;if(!(4>e)){for(var f=d.za,h=Math.max(1,f.width),f=f.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=w.eb(),x=2;xp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,x=0,q=t[x],p=q[0],s=q[1],r=q[2],q=q[3],v=0;.1<=u;){0===v&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){w.ta(t);return}e> q?(v=e-q,e=q):v=0;var z=Math.sqrt(e*e/(1+r*r));0>p&&(z=-z);k+=z;l+=r*z;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(f/2));0===v&&d.Fk(a,b);a.translate(h/2,f/2);a.rotate(-s);a.translate(-k,-l);u-=e;q-=e;if(0!==v){x++;if(x===t.length){w.ta(t);return}q=t[x];p=q[0];s=q[1];r=q[2];q=q[3];e=v}}w.ta(t)}} -X.prototype.Fk=function(a,b){if(null!==this.sc||null!==this.Hd){null!==this.Hd&&Oo(this,a,this.Hd,!0,!1);null!==this.sc&&Oo(this,a,this.sc,!1,!1);var c=this.ii;if(0===c){var d=this.U;d instanceof kh&&d.type===jj&&"Selection"===d.zd&&d.tb instanceof X&&d.Ze.Bd()===d.tb&&(c=d.tb.mb)}a.lineWidth=c;a.lineJoin=this.rp;a.lineCap=this.pp;a.miterLimit=this.fn;var e=!1;this.U&&b.tj("drawShadows")&&(e=this.U.dm);var f=!0;null!==this.sc&&null===this.Hd&&(f=!1);var d=!1,h=!0,k=this.xG;null!==k&&(d=!0,h=a.vA(k, -this.Ye));var l=this.Sa;if(null!==l){if(l.na===Ge)a.beginPath(),d&&!h?zo(a,l.Cc,l.Mc,l.yb,l.Gb,k,this.Ye):(a.moveTo(l.Cc,l.Mc),a.lineTo(l.yb,l.Gb)),null!==this.Hd&&a.Lg(this.Hd),0!==c&&null!==this.sc&&a.Gj();else if(l.na===He){var m=l.Cc,n=l.Mc,p=l.yb,q=l.Gb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.Hd&&(a.beginPath(),a.rect(l,r,m,n),a.Lg(this.Hd));if(null!==this.sc){var s=p=0,u=0;f&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0);d&&!h?(h=w.eb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),iq(a,h,k,this.Ye),a.Gj(),w.ta(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Gj());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.na===Ie)m=l.Cc,n=l.Mc,p=l.yb,q=l.Gb,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+cd*l,n-r,m+l,n-cd*r,m+l,n),a.bezierCurveTo(m+ -l,n+cd*r,m+cd*l,n+r,m,n+r),a.bezierCurveTo(m-cd*l,n+r,m-l,n+cd*r,m-l,n),a.bezierCurveTo(m-l,n-cd*r,m-cd*l,n-r,m,n-r),a.closePath(),null!==this.Hd&&a.Lg(this.Hd),d&&!h&&(h=w.eb(),Xd(m,n-r,m+cd*l,n-r,m+l,n-cd*r,m+l,n,.5,h),Xd(m+l,n,m+l,n+cd*r,m+cd*l,n+r,m,n+r,.5,h),Xd(m,n+r,m-cd*l,n+r,m-l,n+cd*r,m-l,n,.5,h),Xd(m-l,n,m-l,n-cd*r,m-cd*l,n-r,m,n-r,.5,h),a.beginPath(),iq(a,h,k,this.Ye),w.ta(h)),0!==c&&null!==this.sc&&(f&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0,a.Gj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Gj());else if(l.na===De){r=l.Sj;n=r.length;for(q=0;qx.vf);else{var t=sf(x,m),v=t.length;if(0===v){a.lineTo(x.la,x.ra);break}for(var z=0;zx.vf);else{var t=rf(x,m),v=t.length;if(0===v){a.lineTo(x.la,x.ra);break}for(var z=0;ze)){var f=.001,h=c.length,k=b[0],l=b[1];if(4===e)zo(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=f=0,n=0,p=0,q=0,r=p=0,s=w.eb(),u=2;ur&&(f=r);f>p?(t=f-p,f=p):t=0;var x=Math.sqrt(f*f/(1+q*q));0>n&&(x=-x);k+=x;l+= +a.Lg(this.Hd),0!==c&&null!==this.sc&&(d&&!h||a.Gj()),f&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u))):(!0===m.Gm&&null!==this.Hd&&a.Lg(this.Hd),0===c||null===this.sc||d&&!h||a.Gj())}if(d&&!h)for(c=f,f=l.Sj,h=f.length,l=0;le)){var f=.001,h=c.length,k=b[0],l=b[1];if(4===e)yo(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=f=0,n=0,p=0,q=0,r=p=0,s=w.eb(),u=2;ur&&(f=r);f>p?(t=f-p,f=p):t=0;var x=Math.sqrt(f*f/(1+q*q));0>n&&(x=-x);k+=x;l+= q*x;e?a.lineTo(k,l):a.moveTo(k,l);r-=f;p-=f;if(0!==t){u++;if(u===s.length){w.ta(s);return}p=s[u];n=p[0];q=p[1];p=p[2];f=t}else e=!e}w.ta(s)}}}X.prototype.getDocumentPoint=X.prototype.Wa=function(a,b){void 0===b&&(b=new y);if(a instanceof K){a.Td()&&w.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ja,d=this.mb;b.m(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY)}else b.set(a);this.ph.nb(b);return b}; -X.prototype.Ak=function(a,b){var c=this.pf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.ab,e=this.mb/2;c.type!==Ge||b||(e+=2);var f=w.Kf();f.assign(d);f.Yf(e+2,e+2);if(!f.Ia(a))return w.Eb(f),!1;d=e+1E-4;if(c.type===Ge){if(null===this.stroke)return!1;d=(c.C-c.ha)*(a.x-c.ha)+(c.D-c.fa)*(a.y-c.fa);if(0>(c.ha-c.C)*(a.x-c.C)+(c.fa-c.D)*(a.y-c.D)||0>d)return!1;w.Eb(f);return Ud(c.ha,c.fa,c.C,c.D,e,a.x,a.y)}if(c.type===He){var h=c.ha,k=c.fa,l=c.C,c=c.D;f.x=Math.min(h,l);f.y=Math.min(k, -c);f.width=Math.abs(l-h);f.height=Math.abs(c-k);if(null===this.fill){f.Yf(-d,-d);if(f.Ia(a))return w.Eb(f),!1;f.Yf(d,d)}null!==this.stroke&&f.Yf(e,e);d=f.Ia(a);w.Eb(f);return d}if(c.type===Ie){var h=c.ha,k=c.fa,l=c.C,c=c.D,e=Math.min(h,l),m=Math.min(k,c),h=Math.abs(l-h)/2,k=Math.abs(c-k)/2,e=a.x-(e+h),m=a.y-(m+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=e*e/(h*h)+m*m/(k*k))return w.Eb(f),!1;h+=d;k+=d}null!==this.stroke&&(h+=d,k+=d);w.Eb(f);return 0>=h||0>=k?!1:1>=e*e/(h*h)+m*m/(k*k)}if(c.type=== -De)return w.Eb(f),null===this.fill?vf(c,a.x,a.y,e):c.Ia(a,e,1=this.mb)n=ke(p.Cc,p.Mc,p.yb,p.Gb,f,h,k,l,e);else{var r=0,s=0;p.Cc===p.yb?(r=m,s=0):(b=(p.Gb-p.Mc)/(p.yb-p.Cc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.eb();b=new y;ke(p.Cc+ -r,p.Mc+s,p.yb+r,p.Gb+s,f,h,k,l,b)&&d.push(b);b=new y;ke(p.Cc-r,p.Mc-s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=new y;ke(p.Cc+r,p.Mc+s,p.Cc-r,p.Mc-s,f,h,k,l,b)&&d.push(b);b=new y;ke(p.yb+r,p.Gb+s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return w.ta(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(f-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((f-k)*(f-k))+Math.abs((h-l)*(h-l));h=Math.abs((f-a)*(f-a))+Math.abs((h-b)*(h- -b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Wa(l.y,e))&&(l.ye||Wa(l.x,e))&&(l.x(c.ha-c.C)*(a.x-c.C)+(c.fa-c.D)*(a.y-c.D)||0>d)return!1;w.Eb(f);return Td(c.ha,c.fa,c.C,c.D,e,a.x,a.y)}if(c.type===Ge){var h=c.ha,k=c.fa,l=c.C,c=c.D;f.x=Math.min(h,l);f.y=Math.min(k, +c);f.width=Math.abs(l-h);f.height=Math.abs(c-k);if(null===this.fill){f.Yf(-d,-d);if(f.Ia(a))return w.Eb(f),!1;f.Yf(d,d)}null!==this.stroke&&f.Yf(e,e);d=f.Ia(a);w.Eb(f);return d}if(c.type===He){var h=c.ha,k=c.fa,l=c.C,c=c.D,e=Math.min(h,l),m=Math.min(k,c),h=Math.abs(l-h)/2,k=Math.abs(c-k)/2,e=a.x-(e+h),m=a.y-(m+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=e*e/(h*h)+m*m/(k*k))return w.Eb(f),!1;h+=d;k+=d}null!==this.stroke&&(h+=d,k+=d);w.Eb(f);return 0>=h||0>=k?!1:1>=e*e/(h*h)+m*m/(k*k)}if(c.type=== +Ce)return w.Eb(f),null===this.fill?uf(c,a.x,a.y,e):c.Ia(a,e,1=this.mb)n=je(p.Cc,p.Mc,p.yb,p.Gb,f,h,k,l,e);else{var r=0,s=0;p.Cc===p.yb?(r=m,s=0):(b=(p.Gb-p.Mc)/(p.yb-p.Cc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.eb();b=new y;je(p.Cc+ +r,p.Mc+s,p.yb+r,p.Gb+s,f,h,k,l,b)&&d.push(b);b=new y;je(p.Cc-r,p.Mc-s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=new y;je(p.Cc+r,p.Mc+s,p.Cc-r,p.Mc-s,f,h,k,l,b)&&d.push(b);b=new y;je(p.yb+r,p.Gb+s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return w.ta(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(f-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((f-k)*(f-k))+Math.abs((h-l)*(h-l));h=Math.abs((f-a)*(f-a))+Math.abs((h-b)*(h- +b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Wa(l.y,e))&&(l.ye||Wa(l.x,e))&&(l.x=h&&d<=a}a=h&&f<=a} -X.prototype.cF=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Ak(a,!0))return!0;var e=a.Bf(b);b=e;1.5=e||Sa(b,f,0,-p)>=e||Sa(b,f,0,p)>=e||Sa(b,f,n,0)>= -e?!1:!0}else if(f.type===De){h=f.ab;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Ra(a.x,a.y,k,l,m,l)>e&&Ra(a.x,a.y,m,h,k,h)>e&&Ra(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?vf(f,a.x,a.y,b):f.Ia(a,b,!0))return!0}else{c=f.fc;for(b=0;be)return!1;l=k.wb.n;m=l.length;for(h=0;he)return!1;break;case We:f=w.eb(); -Xd(n,p,q.wc,q.Rc,q.Ch,q.Dh,q.C,q.D,.8,f);n=d(f,a);w.ta(f);if(n)return!1;n=q.C;p=q.D;if(a.Rp(n,p)>e)return!1;break;case pf:f=w.eb();he(n,p,q.wc,q.Rc,q.C,q.D,.8,f);n=d(f,a);w.ta(f);if(n)return!1;n=q.C;p=q.D;if(a.Rp(n,p)>e)return!1;break;case qf:case rf:var r=q.type===qf?sf(q,k):tf(q,k,n,p),s=r.length;if(0===s){n=q.la;p=q.ra;if(a.Rp(n,p)>e)return!1;break}q=null;f=w.eb();for(b=0;b=h&&d<=a}a=h&&f<=a} +X.prototype.cF=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Ak(a,!0))return!0;var e=a.Bf(b);b=e;1.5=e||Sa(b,f,0,-p)>=e||Sa(b,f,0,p)>=e||Sa(b,f,n,0)>= +e?!1:!0}else if(f.type===Ce){h=f.ab;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Ra(a.x,a.y,k,l,m,l)>e&&Ra(a.x,a.y,m,h,k,h)>e&&Ra(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?uf(f,a.x,a.y,b):f.Ia(a,b,!0))return!0}else{c=f.fc;for(b=0;be)return!1;l=k.wb.n;m=l.length;for(h=0;he)return!1;break;case Ve:f=w.eb(); +Wd(n,p,q.wc,q.Rc,q.Ch,q.Dh,q.C,q.D,.8,f);n=d(f,a);w.ta(f);if(n)return!1;n=q.C;p=q.D;if(a.Rp(n,p)>e)return!1;break;case We:f=w.eb();ge(n,p,q.wc,q.Rc,q.C,q.D,.8,f);n=d(f,a);w.ta(f);if(n)return!1;n=q.C;p=q.D;if(a.Rp(n,p)>e)return!1;break;case pf:case qf:var r=q.type===pf?rf(q,k):sf(q,k,n,p),s=r.length;if(0===s){n=q.la;p=q.ra;if(a.Rp(n,p)>e)return!1;break}q=null;f=w.eb();for(b=0;b= 0",X,"strokeWidth:value")});w.defineProperty(X,{TL:"strokeCap"},function(){return this.pp},function(a){var b=this.pp;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.Fa(a,'"butt", "round", or "square"',X,"strokeCap"):(this.pp=a,this.oa(),this.h("strokeCap",b,a)))}); w.defineProperty(X,{VL:"strokeJoin"},function(){return this.rp},function(a){var b=this.rp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.Fa(a,'"miter", "bevel", or "round"',X,"strokeJoin"):(this.rp=a,this.oa(),this.h("strokeJoin",b,a)))});w.defineProperty(X,{WL:"strokeMiterLimit"},function(){return this.fn},function(a){var b=this.fn;if(b!==a)if(1<=a){this.fn=a;this.oa();var c=this.U;null!==c&&(c.ik=NaN);this.h("strokeMiterLimit",b,a)}else w.Fa(a,"value >= 1",X,"strokeWidth:value")}); w.defineProperty(X,{xG:"strokeDashArray"},function(){return this.qp},function(a){var b=this.qp;if(b!==a){null===a||Array.isArray(a)||w.Fd(a,"Array",X,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1n*l*l&&(h=!0);b.kf!==a&&(h=!1);!1===b.tj("textGreeking")&&(h=!1);n=this.ei;l=this.fi;switch(this.bu){case to:a.translate(c, -0);a.scale(-1,1);break;case so:a.translate(0,d);a.scale(1,-1);break;case uo:a.translate(c,d),a.scale(-1,-1)}var m=this.me,p=(n+e+l)*m;d>p&&(k=this.Hl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.zf,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,x=c,v=e,z=f,A=0;h?("left"===z?A=0:"right"===z?A=x-r:"center"===z&&(A=(x-r)/2),s.fillRect(0+A,t+.25*v,r,1)):("left"===z?A=0:"right"===z?A=x:"center"===z&&(A=x/2),s.fillText(u,0+A,t+v-.25*v),u=v/20|0,0===u&&(u=1),"right"===z?A-=r:"center"=== -z&&(A-=r/2),this.dk&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+A,t+v-.2*v),s.lineTo(0+A+r,t+v-.2*v),s.stroke()),this.bk&&(s.beginPath(),s.lineWidth=u,t=t+v-v/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+A,t),s.lineTo(0+A+r,t),s.stroke()));k+=e+l}switch(this.bu){case to:a.scale(-1,1);a.translate(-c,0);break;case so:a.scale(1,-1);a.translate(0,-d);break;case uo:a.scale(-1,-1),a.translate(-c,-d)}}}; -Mh.prototype.Mn=function(a,b,c,d){this.To=a;var e=this.zf;e.reset();var f=0,h=0;if(isNaN(this.Ca.width)){f=this.Md.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.Jx){for(var k=h=0,l=!1;!l;){var m=f.indexOf("\n",k);-1===m&&(m=f.length,l=!0);k=Iq(f.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.qg);k>h&&(h=k);k=m+1}f=h}else h=f.indexOf("\n",0),0<=h&&(f=f.substr(0,h)),f=k=Iq(f,this.qg);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.Ca.width;null!==this.Q&&(f=Math.min(f, -this.Q.Gf.width));h=Gq(this,f,e);m=h=isNaN(this.Ca.height)?Math.min(h,b/this.scale):this.Ca.height;if(0!==e.Ge&&1!==e.Se.length&&this.$i===Eq&&(b=this.qg,l=this.$i===Eq?Jq(b):0,k=this.ei+this.fi,k=Math.max(0,Hq(this)+k),m=Math.min(this.SI-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Se.length))){k=e.Se[m];for(l=Math.max(1,a-l);Iq(k,b)>l&&1=a.gh)return new ia(0,l);if(a.kj===Bq){c.jj=1;f=Iq(b,k);if(0===h||f<=d)return c.Ge=Math.max(c.Ge,f),c.xf.push(c.Ge),c.Se.push(b),new ia(f,l);var m=Kq(a,b);b=b.substr(m.length);for(var n=Kq(a,b),f=Iq(m+n,k);0d&&1d;){n=1;f=Iq(m.substr(0,n),k);for(h=0;f<=d;)n++,h=f,f=Iq(m.substr(0,n),k);1===n?(c.xf[a.me+p]=f,e=Math.max(e,f)):(c.xf[a.me+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Se[a.me+p]=m.substr(0,n);p++;m=m.substr(n);if(a.me+p>a.gh)break}n=Kq(a,b);for(f=Iq(m+n,k);0a.gh))break}c.jj=Math.min(a.gh,p);c.Ge=Math.max(c.Ge,e);return new ia(c.Ge,l*c.jj)} -function Kq(a,b){if(a.kj===Dq)return b.substr(0,1);for(var c=b.length,d=0;d=c?b:b.substr(0,d)}function Iq(a,b){zq!==b&&(zq=Aq.font=b);return Aq.measureText(a).width}function Hq(a){if(null!==a.zf.Tj)return a.zf.Tj;var b=a.qg;zq!==b&&(zq=Aq.font=b);var c=0;void 0!==uq[b]&&5E3>vq?c=uq[b]:(c=1.3*Aq.measureText("M").width,uq[b]=c,vq++);return a.zf.Tj=c} -function Jq(a){zq!==a&&(zq=Aq.font=a);var b=0;void 0!==wq[a]&&5E3>xq?b=wq[a]:(b=Aq.measureText(yq).width,wq[a]=b,xq++);return b} -function Gq(a,b,c){var d=a.Md.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.ei+a.fi,e=Math.max(0,Hq(a)+e);if(0===d.length)return c.Ge=0,a.me=1,e;if(!a.Jx){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.me=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.kj!==Bq?(c.jj=0,h=Fq(a,h,c,b),f+=h.height,a.me+=c.jj):(Fq(a,h,c,b),f+=e,a.me++),a.me===a.gh&&(l=!0)),h=k+1;return a.jw=f} -w.defineProperty(Mh,{IB:"textValidation"},function(){return this.El},function(a){var b=this.El;b!==a&&(null!==a&&w.j(a,"function",Mh,"textValidation"),this.El=a,this.h("textValidation",b,a))});w.defineProperty(Mh,{yG:"textEdited"},function(){return this.vt},function(a){var b=this.vt;b!==a&&(null!==a&&w.j(a,"function",Mh,"textEdited"),this.vt=a,this.h("textEdited",b,a))}); -w.defineProperty(Mh,{QL:"spacingAbove"},function(){return this.ei},function(a){var b=this.ei;b!==a&&(this.ei=a,this.h("spacingAbove",b,a))});w.defineProperty(Mh,{RL:"spacingBelow"},function(){return this.fi},function(a){var b=this.fi;b!==a&&(this.fi=a,this.h("spacingBelow",b,a))});w.defineProperty(Mh,{SI:"maxLines"},function(){return this.gh},function(a){var b=this.gh;b!==a&&(a=Math.floor(a),0>=a&&w.Fa(a,"> 0",Mh,"maxLines"),this.gh=a,this.h("maxLines",b,a),this.H())});w.u(Mh,{wL:"metrics"},function(){return this.zf}); -w.defineProperty(Mh,{HK:"choices"},function(){return this.Zq},function(a){var b=this.Zq;b!==a&&(null===a||Array.isArray(a)||w.Fd(a,"Array",Mh,"choices:value"),this.Zq=a,this.h("choices",b,a))});function Wp(){this.Ge=this.jj=0;this.xf=[];this.Se=[];this.Tj=null}Wp.prototype.reset=function(){this.Ge=this.jj=0;this.Tj=null;this.xf=[];this.Se=[]};Wp.prototype.Lp=function(a){this.jj=a.jj;this.Tj=a.Tj;this.Ge=a.Ge;this.xf=w.Pl(a.xf);this.Se=w.Pl(a.Se)};w.u(Wp,{DK:"arrSize"},function(){return this.xf}); -w.u(Wp,{EK:"arrText"},function(){return this.Se});w.u(Wp,{vL:"maxLineWidth"},function(){return this.Ge});w.u(Wp,{dL:"fontHeight"},function(){return this.Tj});function zl(){G.call(this);this.Ue=null;this.pt="";this.pk=Nd;this.Io=Fe;this.ji=this.Ve=null;this.Ho=Jb;this.pg=Qj;this.sp=null;this.vz=!1;this.Lv=!0;this.hw=!1;this.kp=null}w.La(zl,G);w.ga("Picture",zl); -zl.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Ue;a.pt=this.pt;a.pk=this.pk.S();a.Io=this.Io;a.pg=this.pg;a.Ve=this.Ve;a.ji=this.ji;a.Ho=this.Ho.S();a.Lv=this.Lv;a.kp=this.kp};zl.prototype.hc=function(a){a===Qj||a===Sj||a===Tj?this.pI=a:G.prototype.hc.call(this,a)};zl.prototype.toString=function(){return"Picture("+this.source+")#"+w.Pd(this)};var Lq=new ra,Mq=0,tl=[]; -function Nq(){var a=tl;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(f=f+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Fe:n=d.width;p=d.height;break;case Sj:case Tj:var s=0;q===Sj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===Tj&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(f=(f+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), -n=d.width,p=d.height)}var q=this.sj()*b.scale,u=k*h/(n*q*p*q),s=Lq[this.source],q=null;if(c.Ur&&void 0!==s&&16s.Ep.length&&(Sq(s,4,l,m),Sq(s,16,l,m));for(var l=s.Ep,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.2,.22);b.B=new K(.8, -.9);w.q(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=Wq(6);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.07,.25);b.B=new K(.93,.75);w.q(a);return b},Heptagon:function(a,b,c){var d=Wq(7);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.2,.15);b.B=new K(.8,.85);w.q(a);return b},Octagon:function(a,b,c){var d=Wq(8);a=w.s();M(a,d[0].x*b,d[0].y*c,!0); -for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.15,.15);b.B=new K(.85,.85);w.q(a);return b},Nonagon:function(a,b,c){var d=Wq(9);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.17,.13);b.B=new K(.82,.82);w.q(a);return b},Decagon:function(a,b,c){var d=Wq(10);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.16,.16);b.B=new K(.84,.84);w.q(a);return b}, -Dodecagon:function(a,b,c){var d=Wq(12);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.16,.16);b.B=new K(.84,.84);w.q(a);return b},FivePointedStar:function(a,b,c){var d=Vq(5);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.312,.383);b.B=new K(.693,.765);w.q(a);return b},SixPointedStar:function(a,b,c){var d=Vq(6);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x* -b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.17,.251);b.B=new K(.833,.755);w.q(a);return b},SevenPointedStar:function(a,b,c){var d=Vq(7);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.363,.361);b.B=new K(.641,.709);w.q(a);return b},EightPointedStar:function(a,b,c){var d=Vq(8);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.252,.255);b.B=new K(.75,.75);w.q(a);return b},NinePointedStar:function(a, -b,c){var d=Vq(9);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.355,.361);b.B=new K(.645,.651);w.q(a);return b},TenPointedStar:function(a,b,c){var d=Vq(10);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.281,.261);b.B=new K(.723,.748);w.q(a);return b},FivePointedBurst:function(a,b,c){var d=Uq(5);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1n*l*l&&(h=!0);b.kf!==a&&(h=!1);!1===b.tj("textGreeking")&&(h=!1);n=this.ei;l=this.fi;switch(this.bu){case so:a.translate(c, +0);a.scale(-1,1);break;case ro:a.translate(0,d);a.scale(1,-1);break;case to:a.translate(c,d),a.scale(-1,-1)}var m=this.me,p=(n+e+l)*m;d>p&&(k=this.Hl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.zf,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,x=c,v=e,z=f,A=0;h?("left"===z?A=0:"right"===z?A=x-r:"center"===z&&(A=(x-r)/2),s.fillRect(0+A,t+.25*v,r,1)):("left"===z?A=0:"right"===z?A=x:"center"===z&&(A=x/2),s.fillText(u,0+A,t+v-.25*v),u=v/20|0,0===u&&(u=1),"right"===z?A-=r:"center"=== +z&&(A-=r/2),this.dk&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+A,t+v-.2*v),s.lineTo(0+A+r,t+v-.2*v),s.stroke()),this.bk&&(s.beginPath(),s.lineWidth=u,t=t+v-v/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+A,t),s.lineTo(0+A+r,t),s.stroke()));k+=e+l}switch(this.bu){case so:a.scale(-1,1);a.translate(-c,0);break;case ro:a.scale(1,-1);a.translate(0,-d);break;case to:a.scale(-1,-1),a.translate(-c,-d)}}}; +Lh.prototype.Mn=function(a,b,c,d){this.To=a;var e=this.zf;e.reset();var f=0,h=0;if(isNaN(this.Ca.width)){f=this.Md.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.Jx){for(var k=h=0,l=!1;!l;){var m=f.indexOf("\n",k);-1===m&&(m=f.length,l=!0);k=Hq(f.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.qg);k>h&&(h=k);k=m+1}f=h}else h=f.indexOf("\n",0),0<=h&&(f=f.substr(0,h)),f=k=Hq(f,this.qg);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.Ca.width;null!==this.Q&&(f=Math.min(f, +this.Q.Gf.width));h=Fq(this,f,e);m=h=isNaN(this.Ca.height)?Math.min(h,b/this.scale):this.Ca.height;if(0!==e.Ge&&1!==e.Se.length&&this.$i===Dq&&(b=this.qg,l=this.$i===Dq?Iq(b):0,k=this.ei+this.fi,k=Math.max(0,Gq(this)+k),m=Math.min(this.SI-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Se.length))){k=e.Se[m];for(l=Math.max(1,a-l);Hq(k,b)>l&&1=a.gh)return new ia(0,l);if(a.kj===Aq){c.jj=1;f=Hq(b,k);if(0===h||f<=d)return c.Ge=Math.max(c.Ge,f),c.xf.push(c.Ge),c.Se.push(b),new ia(f,l);var m=Jq(a,b);b=b.substr(m.length);for(var n=Jq(a,b),f=Hq(m+n,k);0d&&1d;){n=1;f=Hq(m.substr(0,n),k);for(h=0;f<=d;)n++,h=f,f=Hq(m.substr(0,n),k);1===n?(c.xf[a.me+p]=f,e=Math.max(e,f)):(c.xf[a.me+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Se[a.me+p]=m.substr(0,n);p++;m=m.substr(n);if(a.me+p>a.gh)break}n=Jq(a,b);for(f=Hq(m+n,k);0a.gh))break}c.jj=Math.min(a.gh,p);c.Ge=Math.max(c.Ge,e);return new ia(c.Ge,l*c.jj)} +function Jq(a,b){if(a.kj===Cq)return b.substr(0,1);for(var c=b.length,d=0;d=c?b:b.substr(0,d)}function Hq(a,b){yq!==b&&(yq=zq.font=b);return zq.measureText(a).width}function Gq(a){if(null!==a.zf.Tj)return a.zf.Tj;var b=a.qg;yq!==b&&(yq=zq.font=b);var c=0;void 0!==tq[b]&&5E3>uq?c=tq[b]:(c=1.3*zq.measureText("M").width,tq[b]=c,uq++);return a.zf.Tj=c} +function Iq(a){yq!==a&&(yq=zq.font=a);var b=0;void 0!==vq[a]&&5E3>wq?b=vq[a]:(b=zq.measureText(xq).width,vq[a]=b,wq++);return b} +function Fq(a,b,c){var d=a.Md.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.ei+a.fi,e=Math.max(0,Gq(a)+e);if(0===d.length)return c.Ge=0,a.me=1,e;if(!a.Jx){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.me=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.kj!==Aq?(c.jj=0,h=Eq(a,h,c,b),f+=h.height,a.me+=c.jj):(Eq(a,h,c,b),f+=e,a.me++),a.me===a.gh&&(l=!0)),h=k+1;return a.jw=f} +w.defineProperty(Lh,{IB:"textValidation"},function(){return this.El},function(a){var b=this.El;b!==a&&(null!==a&&w.j(a,"function",Lh,"textValidation"),this.El=a,this.h("textValidation",b,a))});w.defineProperty(Lh,{yG:"textEdited"},function(){return this.vt},function(a){var b=this.vt;b!==a&&(null!==a&&w.j(a,"function",Lh,"textEdited"),this.vt=a,this.h("textEdited",b,a))}); +w.defineProperty(Lh,{QL:"spacingAbove"},function(){return this.ei},function(a){var b=this.ei;b!==a&&(this.ei=a,this.h("spacingAbove",b,a))});w.defineProperty(Lh,{RL:"spacingBelow"},function(){return this.fi},function(a){var b=this.fi;b!==a&&(this.fi=a,this.h("spacingBelow",b,a))});w.defineProperty(Lh,{SI:"maxLines"},function(){return this.gh},function(a){var b=this.gh;b!==a&&(a=Math.floor(a),0>=a&&w.Fa(a,"> 0",Lh,"maxLines"),this.gh=a,this.h("maxLines",b,a),this.H())});w.u(Lh,{wL:"metrics"},function(){return this.zf}); +w.defineProperty(Lh,{HK:"choices"},function(){return this.Zq},function(a){var b=this.Zq;b!==a&&(null===a||Array.isArray(a)||w.Fd(a,"Array",Lh,"choices:value"),this.Zq=a,this.h("choices",b,a))});function Vp(){this.Ge=this.jj=0;this.xf=[];this.Se=[];this.Tj=null}Vp.prototype.reset=function(){this.Ge=this.jj=0;this.Tj=null;this.xf=[];this.Se=[]};Vp.prototype.Lp=function(a){this.jj=a.jj;this.Tj=a.Tj;this.Ge=a.Ge;this.xf=w.Pl(a.xf);this.Se=w.Pl(a.Se)};w.u(Vp,{DK:"arrSize"},function(){return this.xf}); +w.u(Vp,{EK:"arrText"},function(){return this.Se});w.u(Vp,{vL:"maxLineWidth"},function(){return this.Ge});w.u(Vp,{dL:"fontHeight"},function(){return this.Tj});function yl(){G.call(this);this.Ue=null;this.pt="";this.pk=Gd;this.Io=Ee;this.ji=this.Ve=null;this.Ho=Jb;this.pg=Pj;this.sp=null;this.vz=!1;this.Lv=!0;this.hw=!1;this.kp=null}w.La(yl,G);w.ga("Picture",yl); +yl.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Ue;a.pt=this.pt;a.pk=this.pk.S();a.Io=this.Io;a.pg=this.pg;a.Ve=this.Ve;a.ji=this.ji;a.Ho=this.Ho.S();a.Lv=this.Lv;a.kp=this.kp};yl.prototype.hc=function(a){a===Pj||a===Rj||a===Sj?this.pI=a:G.prototype.hc.call(this,a)};yl.prototype.toString=function(){return"Picture("+this.source+")#"+w.Pd(this)};var Kq=new ra,Lq=0,sl=[]; +function Mq(){var a=sl;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(f=f+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ee:n=d.width;p=d.height;break;case Rj:case Sj:var s=0;q===Rj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===Sj&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(f=(f+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), +n=d.width,p=d.height)}var q=this.sj()*b.scale,u=k*h/(n*q*p*q),s=Kq[this.source],q=null;if(c.Ur&&void 0!==s&&16s.Ep.length&&(Rq(s,4,l,m),Rq(s,16,l,m));for(var l=s.Ep,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.2,.22);b.B=new K(.8, +.9);w.q(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=Vq(6);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.07,.25);b.B=new K(.93,.75);w.q(a);return b},Heptagon:function(a,b,c){var d=Vq(7);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.2,.15);b.B=new K(.8,.85);w.q(a);return b},Octagon:function(a,b,c){var d=Vq(8);a=w.s();M(a,d[0].x*b,d[0].y*c,!0); +for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.15,.15);b.B=new K(.85,.85);w.q(a);return b},Nonagon:function(a,b,c){var d=Vq(9);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.17,.13);b.B=new K(.82,.82);w.q(a);return b},Decagon:function(a,b,c){var d=Vq(10);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.16,.16);b.B=new K(.84,.84);w.q(a);return b}, +Dodecagon:function(a,b,c){var d=Vq(12);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.16,.16);b.B=new K(.84,.84);w.q(a);return b},FivePointedStar:function(a,b,c){var d=Uq(5);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.312,.383);b.B=new K(.693,.765);w.q(a);return b},SixPointedStar:function(a,b,c){var d=Uq(6);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x* +b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.17,.251);b.B=new K(.833,.755);w.q(a);return b},SevenPointedStar:function(a,b,c){var d=Uq(7);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.363,.361);b.B=new K(.641,.709);w.q(a);return b},EightPointedStar:function(a,b,c){var d=Uq(8);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.252,.255);b.B=new K(.75,.75);w.q(a);return b},NinePointedStar:function(a, +b,c){var d=Uq(9);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.355,.361);b.B=new K(.645,.651);w.q(a);return b},TenPointedStar:function(a,b,c){var d=Uq(10);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new K(.281,.261);b.B=new K(.723,.748);w.q(a);return b},FivePointedBurst:function(a,b,c){var d=Tq(5);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=w.s(),e=.2*cd;M(d,0,.2*c,!0);N(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);N(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);N(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);N(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c); +w.s();var d=.5*bd,e=.1*bd;M(a,1*b,.1*c,!0);a.lineTo(1*b,.9*c);N(a,1*b,(.9+e)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.9+e)*c,0,.9*c);a.lineTo(0,.1*c);N(a,0,(.1-e)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.1-e)*c,1*b,.1*c);M(a,1*b,.1*c,!1);N(a,1*b,(.1+e)*c,(.5+d)*b,.2*c,.5*b,.2*c);N(a,(.5-d)*b,.2*c,0,(.1+e)*c,0,.1*c);a.moveTo(1*b,.2*c);N(a,1*b,(.2+e)*c,(.5+d)*b,.3*c,.5*b,.3*c);N(a,(.5-d)*b,.3*c,0,(.2+e)*c,0,.2*c);a.bb(!1);b=a.o;b.A=new K(0,.3);b.B=new K(1,.9);w.q(a);return b},Display:function(a, +b,c){a=w.s();M(a,.25*b,0,!0);a.lineTo(.75*b,0);N(a,1*b,0,1*b,1*c,.75*b,1*c);a.lineTo(.25*b,1*c);a.lineTo(0,.5*c);O(a);b=a.o;b.A=new K(.25,0);b.B=new K(.75,1);w.q(a);return b},DividedEvent:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)?a=.2:.15>a&&(a=.15);var d=w.s(),e=.2*bd;M(d,0,.2*c,!0);N(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);N(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);N(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);N(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c); M(d,0,a*c,!1);d.lineTo(1*b,a*c);d.bb(!1);b=d.o;b.A=new K(0,a);b.B=new K(1,1-a);w.q(d);return b},DividedProcess:function(a,b,c){a=a?a.Hc:NaN;if(isNaN(a)||.1>a)a=.1;var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);M(d,0,a*c,!1);d.lineTo(1*b,a*c);d.bb(!1);b=d.o;b.A=new K(0,a);b.B=Sb;w.q(d);return b},Document:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);b=a.o;b.A=zb;b.B=new K(1,.6);w.q(a); return b},ExternalOrganization:function(a,b,c){a=a?a.Hc:NaN;if(isNaN(a)||.2>a)a=.2;var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);M(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.bb(!1);b=d.o;b.A=new K(a/2,a/2);b.B=new K(1-a/2,1-a/2);w.q(d);return b},ExternalProcess:function(a,b,c){a=w.s();M(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);O(a); M(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.bb(!1);b=a.o;b.A=new K(.25,.25);b.B=new K(.75,.75);w.q(a);return b},File:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);O(a);M(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.bb(!1);b=a.o;b.A=new K(0,.25);b.B=Sb;w.q(a);return b},Interrupt:function(a,b,c){a=w.s();M(a,1*b, .5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);M(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.o;b.A=new K(0,.25);b.B=new K(.5,.75);w.q(a);return b},InternalStorage:function(a,b,c){var d=a?a.Hc:NaN;a=a?a.Lu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=w.s();M(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);O(e);M(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.bb(!1);b=e.o;b.A=new K(d,a);b.B=Sb;w.q(e);return b},Junction:function(a,b, -c){a=w.s();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,f=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+f)*c,(.5+f)*b,1*c,.5*b,1*c);N(a,(.5-f)*b,1*c,0,(.5+f)*c,0,.5*c);N(a,0,(.5-f)*c,(.5-f)*b,0,.5*b,0);N(a,(.5+f)*b,0,1*b,(.5-f)*c,1*b,.5*c);M(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.bb(!1);b=a.o;b.ae=Sj;w.q(a);return b},LinedDocument:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);M(a,.1* -b,0,!1);a.lineTo(.1*b,.75*c);a.bb(!1);b=a.o;b.A=new K(.1,0);b.B=new K(1,.6);w.q(a);return b},LoopLimit:function(a,b,c){a=w.s();M(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);O(a);b=a.o;b.A=new K(0,.25);b.B=Sb;w.q(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=w.s();var d=.5*cd;M(a,.5*b,1*c,!0);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+ +c){a=w.s();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,f=.5*bd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+f)*c,(.5+f)*b,1*c,.5*b,1*c);N(a,(.5-f)*b,1*c,0,(.5+f)*c,0,.5*c);N(a,0,(.5-f)*c,(.5-f)*b,0,.5*b,0);N(a,(.5+f)*b,0,1*b,(.5-f)*c,1*b,.5*c);M(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.bb(!1);b=a.o;b.ae=Rj;w.q(a);return b},LinedDocument:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);M(a,.1* +b,0,!1);a.lineTo(.1*b,.75*c);a.bb(!1);b=a.o;b.A=new K(.1,0);b.B=new K(1,.6);w.q(a);return b},LoopLimit:function(a,b,c){a=w.s();M(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);O(a);b=a.o;b.A=new K(0,.25);b.B=Sb;w.q(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=w.s();var d=.5*bd;M(a,.5*b,1*c,!0);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+ d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.o;b.A=new K(.15,.15);b.B=new K(.85,.8);w.q(a);return b},ManualInput:function(a,b,c){a=w.s();M(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);O(a);b=a.o;b.A=new K(0,.25);b.B=Sb;w.q(a);return b},MessageFromUser:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.7);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);b=d.o;b.A=zb;b.B=new K(a,1);w.q(d);return b}, MicroformProcessing:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.25);var d=w.s();M(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);O(d);b=d.o;b.A=new K(0,a);b.B=new K(1,1-a);w.q(d);return b},MicroformRecording:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=new K(0,.25);b.B=new K(1,.75);w.q(a);return b},MultiDocument:function(a,b,c){c/=.8;a=w.s(); M(a,b,0,!0);a.lineTo(b,.5*c);N(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);N(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);N(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);O(a);M(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.bb(!1);b=a.o;b.A=new K(0,.25);b.B=new K(.8,.77);w.q(a);return b},MultiProcess:function(a,b,c){a=w.s(); M(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);O(a);M(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.bb(!1);b=a.o;b.A=new K(0,.2);b.B=new K(.8,1);w.q(a);return b},OfflineStorage:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=1-a,e=w.s();M(e,0,0,!0);e.lineTo(1* -b,0);e.lineTo(.5*b,1*c);O(e);M(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.bb(!1);b=e.o;b.A=new K(d/4+.5*a,a);b.B=new K(3*d/4+.5*a,a+.5*d);w.q(e);return b},OffPageConnector:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=zb;b.B=new K(.75,1);w.q(a);return b},Or:function(a,b,c){a=w.s();var d=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a, -(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.bb(!1);b=a.o;b.ae=Sj;w.q(a);return b},PaperTape:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,.3*c);N(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);b=a.o;b.A=new K(0,.49);b.B=new K(1,.75);w.q(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Hc:NaN;a=a?a.Lu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.s();M(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1- +b,0);e.lineTo(.5*b,1*c);O(e);M(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.bb(!1);b=e.o;b.A=new K(d/4+.5*a,a);b.B=new K(3*d/4+.5*a,a+.5*d);w.q(e);return b},OffPageConnector:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=zb;b.B=new K(.75,1);w.q(a);return b},Or:function(a,b,c){a=w.s();var d=.5*bd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a, +(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.bb(!1);b=a.o;b.ae=Rj;w.q(a);return b},PaperTape:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,.3*c);N(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);b=a.o;b.A=new K(0,.49);b.B=new K(1,.75);w.q(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Hc:NaN;a=a?a.Lu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.s();M(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1- a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);O(e);b=e.o;b.A=new K(d,0);b.B=new K(1-a,1);w.q(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Hc:NaN;a=a?a.Lu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.s();M(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);O(e);b=e.o;b.A=new K(d,0);b.B=new K(1-a,1);w.q(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0, 1*c);O(d);M(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.bb(!1);b=d.o;b.A=new K(a,0);b.B=new K(1-a,1);w.q(d);return b},Process:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);M(d,a*b,0,!1);d.lineTo(a*b,1*c);d.bb(!1);b=d.o;b.A=new K(a,0);b.B=Sb;w.q(d);return b},Sort:function(a,b,c){a=w.s();M(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);O(a);M(a,0,.5*c,!1);a.lineTo(1*b,.5* c);a.bb(!1);b=a.o;b.A=new K(.25,.25);b.B=new K(.75,.5);w.q(a);return b},Start:function(a,b,c){a=w.s();M(a,.25*b,0,!0);M(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);M(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.bb(!1);b=a.o;b.A=new K(.25,0);b.B=new K(.75,1);w.q(a);return b},Terminator:function(a,b,c){a=w.s();M(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.o;b.A=new K(.23,0); -b.B=new K(.77,1);w.q(a);return b},TransmittalTape:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);O(d);b=d.o;b.A=zb;b.B=new K(1,1-a);w.q(d);return b},AndGate:function(a,b,c){a=w.s();var d=.5*cd;M(a,0,0,!0);a.lineTo(.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=zb;b.B=new K(.55,1);w.q(a);return b},Buffer:function(a,b,c){a=w.s();M(a, -0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=new K(0,.25);b.B=new K(.5,.75);w.q(a);return b},Clock:function(a,b,c){a=w.s();var d=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);M(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2* -b,.75*c);a.bb(!1);b=a.o;b.ae=Sj;w.q(a);return b},Ground:function(a,b,c){a=w.s();M(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.o;w.q(a);return b},Inverter:function(a,b,c){a=w.s();var d=.1*cd;M(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);N(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);N(a,.8*b,(.5-d)*c,(.9-d)*b,.4* -c,.9*b,.4*c);N(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.o;b.A=new K(0,.25);b.B=new K(.4,.75);w.q(a);return b},NandGate:function(a,b,c){a=w.s();var d=.5*cd,e=.4*cd,f=.1*cd;M(a,.8*b,.5*c,!0);N(a,.8*b,(.5+e)*c,(.4+d)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);N(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);M(a,1*b,.5*c,!0);N(a,1*b,(.5+f)*c,(.9+f)*b,.6*c,.9*b,.6*c);N(a,(.9-f)*b,.6*c,.8*b,(.5+f)*c,.8*b,.5*c);N(a,.8*b,(.5-f)*c,(.9-f)*b,.4*c,.9*b,.4*c);N(a,(.9+f)*b,.4*c,1*b,(.5-f)*c,1*b,.5* -c);b=a.o;b.A=new K(0,.05);b.B=new K(.55,.95);w.q(a);return b},NorGate:function(a,b,c){a=w.s();var d=.5,e=cd*d,f=0,h=.5;M(a,.8*b,.5*c,!0);N(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);N(a,(f+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*cd;f=.9;h=.5;M(a,(f-d)*b,h*c,!0);N(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);N(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);N(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);N(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.A= -new K(.2,.25);b.B=new K(.6,.75);w.q(a);return b},OrGate:function(a,b,c){a=w.s();var d=.5*cd;M(a,0,0,!0);N(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);N(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);O(a);b=a.o;b.A=new K(.2,.25);b.B=new K(.75,.75);w.q(a);return b},XnorGate:function(a,b,c){a=w.s();var d=.5,e=cd*d,f=.2,h=.5;M(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);M(a,.8*b,.5*c,!0);N(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);N(a,(f+e)* -b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*cd;f=.9;h=.5;M(a,(f-d)*b,h*c,!0);N(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);N(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);N(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);N(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.A=new K(.4,.25);b.B=new K(.65,.75);w.q(a);return b},XorGate:function(a,b,c){a=w.s();var d=.5*cd;M(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);M(a,.2*b,0,!0);N(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);N(a,.9*b,(.5+d)* -c,(.2+d)*b,1*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);O(a);b=a.o;b.A=new K(.4,.25);b.B=new K(.8,.75);w.q(a);return b},Capacitor:function(a,b,c){a=w.s();M(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},Resistor:function(a,b,c){a=w.s();M(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.o;w.q(a);return b},Inductor:function(a,b,c){a=w.s();var d=.1*cd,e=.1;M(a,(e-.5* -d)*b,c,!1);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;N(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.o;w.q(a);return b},ACvoltageSource:function(a,b,c){a=w.s();var d=.5*cd;M(a,0*b,.5*c,!1);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)* -c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);N(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.o;b.ae=Sj;w.q(a);return b},DCvoltageSource:function(a,b,c){a=w.s();M(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},Diode:function(a,b,c){a=w.s();M(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.o;b.A=new K(0,.25);b.B=new K(.5,.75);w.q(a);return b},Wifi:function(a,b,c){var d=b,e=c; -b*=.38;c*=.6;a=w.s();var f=.8*cd,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;M(a,k*b+d,(l+h)*c+e,!0);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);N(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);N(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a);f=.4*cd;h=.4;k=.2;l=.5;M(a,k*b+d,(l+h)*c+e,!0);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k* -b+d,(l-h)*c+e);N(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);N(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a);f=.2*cd;h=.2;l=k=.5;M(a,(k-h)*b+d,l*c+e,!0);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);N(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);f=.4*cd;h=.4;k=.8;l=.5;M(a,k*b+d,(l-h)*c+e,!0);N(a,(k+f)*b+d,(l- -h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);N(a,(k+h-.5*f)*b+d,(l-f)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a);f=.8*cd;h=.8;k=1;l=.5;M(a,k*b+d,(l-h)*c+e,!0);N(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);N(a,(k+h-.5*f)*b+d,(l-f)*c+ +b.B=new K(.77,1);w.q(a);return b},TransmittalTape:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);O(d);b=d.o;b.A=zb;b.B=new K(1,1-a);w.q(d);return b},AndGate:function(a,b,c){a=w.s();var d=.5*bd;M(a,0,0,!0);a.lineTo(.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=zb;b.B=new K(.55,1);w.q(a);return b},Buffer:function(a,b,c){a=w.s();M(a, +0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=new K(0,.25);b.B=new K(.5,.75);w.q(a);return b},Clock:function(a,b,c){a=w.s();var d=.5*bd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);M(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2* +b,.75*c);a.bb(!1);b=a.o;b.ae=Rj;w.q(a);return b},Ground:function(a,b,c){a=w.s();M(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.o;w.q(a);return b},Inverter:function(a,b,c){a=w.s();var d=.1*bd;M(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);N(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);N(a,.8*b,(.5-d)*c,(.9-d)*b,.4* +c,.9*b,.4*c);N(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.o;b.A=new K(0,.25);b.B=new K(.4,.75);w.q(a);return b},NandGate:function(a,b,c){a=w.s();var d=.5*bd,e=.4*bd,f=.1*bd;M(a,.8*b,.5*c,!0);N(a,.8*b,(.5+e)*c,(.4+d)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);N(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);M(a,1*b,.5*c,!0);N(a,1*b,(.5+f)*c,(.9+f)*b,.6*c,.9*b,.6*c);N(a,(.9-f)*b,.6*c,.8*b,(.5+f)*c,.8*b,.5*c);N(a,.8*b,(.5-f)*c,(.9-f)*b,.4*c,.9*b,.4*c);N(a,(.9+f)*b,.4*c,1*b,(.5-f)*c,1*b,.5* +c);b=a.o;b.A=new K(0,.05);b.B=new K(.55,.95);w.q(a);return b},NorGate:function(a,b,c){a=w.s();var d=.5,e=bd*d,f=0,h=.5;M(a,.8*b,.5*c,!0);N(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);N(a,(f+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*bd;f=.9;h=.5;M(a,(f-d)*b,h*c,!0);N(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);N(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);N(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);N(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.A= +new K(.2,.25);b.B=new K(.6,.75);w.q(a);return b},OrGate:function(a,b,c){a=w.s();var d=.5*bd;M(a,0,0,!0);N(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);N(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);O(a);b=a.o;b.A=new K(.2,.25);b.B=new K(.75,.75);w.q(a);return b},XnorGate:function(a,b,c){a=w.s();var d=.5,e=bd*d,f=.2,h=.5;M(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);M(a,.8*b,.5*c,!0);N(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);N(a,(f+e)* +b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*bd;f=.9;h=.5;M(a,(f-d)*b,h*c,!0);N(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);N(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);N(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);N(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.A=new K(.4,.25);b.B=new K(.65,.75);w.q(a);return b},XorGate:function(a,b,c){a=w.s();var d=.5*bd;M(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);M(a,.2*b,0,!0);N(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);N(a,.9*b,(.5+d)* +c,(.2+d)*b,1*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);O(a);b=a.o;b.A=new K(.4,.25);b.B=new K(.8,.75);w.q(a);return b},Capacitor:function(a,b,c){a=w.s();M(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},Resistor:function(a,b,c){a=w.s();M(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.o;w.q(a);return b},Inductor:function(a,b,c){a=w.s();var d=.1*bd,e=.1;M(a,(e-.5* +d)*b,c,!1);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;N(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.o;w.q(a);return b},ACvoltageSource:function(a,b,c){a=w.s();var d=.5*bd;M(a,0*b,.5*c,!1);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)* +c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);N(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.o;b.ae=Rj;w.q(a);return b},DCvoltageSource:function(a,b,c){a=w.s();M(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},Diode:function(a,b,c){a=w.s();M(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.o;b.A=new K(0,.25);b.B=new K(.5,.75);w.q(a);return b},Wifi:function(a,b,c){var d=b,e=c; +b*=.38;c*=.6;a=w.s();var f=.8*bd,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;M(a,k*b+d,(l+h)*c+e,!0);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);N(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);N(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a);f=.4*bd;h=.4;k=.2;l=.5;M(a,k*b+d,(l+h)*c+e,!0);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k* +b+d,(l-h)*c+e);N(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);N(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a);f=.2*bd;h=.2;l=k=.5;M(a,(k-h)*b+d,l*c+e,!0);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);N(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);f=.4*bd;h=.4;k=.8;l=.5;M(a,k*b+d,(l-h)*c+e,!0);N(a,(k+f)*b+d,(l- +h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);N(a,(k+h-.5*f)*b+d,(l-f)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a);f=.8*bd;h=.8;k=1;l=.5;M(a,k*b+d,(l-h)*c+e,!0);N(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);N(a,(k+h-.5*f)*b+d,(l-f)*c+ e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a);b=a.o;w.q(a);return b},Email:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);O(a);M(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.bb(!1);b=a.o;w.q(a);return b},Ethernet:function(a,b,c){a=w.s();M(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);O(a);M(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c); -a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);O(a);M(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);O(a);M(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.bb(!1);b=a.o;w.q(a);return b},Power:function(a,b,c){a=w.s();var d=.4*cd,e=.4,f=w.K(),h=w.K(),k=w.K(),l=w.K();ee(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);var m=w.xb(h.x, -h.y);M(a,h.x*b,h.y*c,!0);N(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);N(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);N(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);ee(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);N(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*cd;e=.3;ee(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);a.lineTo(h.x*b,h.y*c);N(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);N(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);N(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+ -e)*b,.5*c);ee(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);N(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);O(a);M(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);O(a);w.v(f);w.v(h);w.v(k);w.v(l);w.v(m);b=a.o;b.A=new K(.25,.55);b.B=new K(.75,.8);w.q(a);return b},Fallout:function(a,b,c){a=w.s();var d=.5*cd;M(a,0*b,.5*c,!0);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b, -.5*c);var e=d=0;M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;O(a);M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;O(a);M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);O(a);b=a.o;b.ae=Sj;w.q(a);return b},IrritationHazard:function(a,b,c){a=w.s();M(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8* +a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);O(a);M(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);O(a);M(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.bb(!1);b=a.o;w.q(a);return b},Power:function(a,b,c){a=w.s();var d=.4*bd,e=.4,f=w.K(),h=w.K(),k=w.K(),l=w.K();Xd(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);var m=w.xb(h.x, +h.y);M(a,h.x*b,h.y*c,!0);N(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);N(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);N(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);Xd(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);N(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*bd;e=.3;Xd(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);a.lineTo(h.x*b,h.y*c);N(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);N(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);N(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+ +e)*b,.5*c);Xd(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);N(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);O(a);M(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);O(a);w.v(f);w.v(h);w.v(k);w.v(l);w.v(m);b=a.o;b.A=new K(.25,.55);b.B=new K(.75,.8);w.q(a);return b},Fallout:function(a,b,c){a=w.s();var d=.5*bd;M(a,0*b,.5*c,!0);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b, +.5*c);var e=d=0;M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;O(a);M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;O(a);M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);O(a);b=a.o;b.ae=Rj;w.q(a);return b},IrritationHazard:function(a,b,c){a=w.s();M(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8* b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);O(a);b=a.o;b.A=new K(.3,.3);b.B=new K(.7,.7);w.q(a);return b},ElectricalHazard:function(a,b,c){a=w.s();M(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65* b,.56*c);a.lineTo(0*b,.68*c);O(a);b=a.o;w.q(a);return b},FireHazard:function(a,b,c){a=w.s();M(a,.1*b,1*c,!0);N(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);N(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);N(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);N(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);N(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);N(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);O(a);b=a.o;b.A=new K(.05,.645);b.B=new K(.884,.908);w.q(a);return b},BpmnActivityLoop:function(a,b,c){a=w.s();var d=4*(Math.SQRT2-1)/3*.5;M(a,.65*b,1*c, !1);N(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);N(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);N(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);N(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.o;w.q(a);return b},BpmnActivityParallel:function(a,b,c){a=w.s();M(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},BpmnActivitySequential:function(a,b,c){a=w.s();M(a,0,0,!1);a.lineTo(1* @@ -1486,8 +1486,8 @@ b,c){a=w.s();M(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8* BpmnTaskUser:function(a,b,c){a=w.s();M(a,0,0,!1);M(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);N(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);N(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,f=4*(1-Math.cos(e))/(3*Math.sin(e)),e=f*d,f=f*d;N(a,(.5-(e+d)/2)*b,(d+(d+f)/2)*c,(.5-d)*b,(d+f)*c,(.5-d)*b,d*c);N(a,(.5-d)*b,(d-f)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c); N(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-f)*c,(.5+d)*b,d*c);N(a,(.5+d)*b,(d+f)*c,(.5+(e+d)/2)*b,(d+(d+f)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);M(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);M(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.o;w.q(a);return b},BpmnEventConditional:function(a,b,c){a=w.s();M(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);O(a);M(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8* b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.bb(!1);b=a.o;w.q(a);return b},BpmnEventError:function(a,b,c){a=w.s();M(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);O(a);b=a.o;w.q(a);return b},BpmnEventEscalation:function(a,b,c){a=w.s();M(a,0,0,!1);M(a,1*b,1*c,!1);M(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);O(a);b=a.o;w.q(a);return b},BpmnEventTimer:function(a,b,c){a= -w.s();var d=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.bb(!1);b=a.o;b.ae=Sj;w.q(a);return b}},Xq;for(Xq in jq)jq[Xq.toLowerCase()]=Xq; -var qq={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", +w.s();var d=.5*bd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.bb(!1);b=a.o;b.ae=Rj;w.q(a);return b}},Wq;for(Wq in iq)iq[Wq.toLowerCase()]=Wq; +var pq={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4", BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8", TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", @@ -1496,39 +1496,39 @@ DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z", OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8", OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"}; -function nq(a){var b=Rd[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=Rd[c];if(void 0===b){var d=null,e;for(e in qq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=Pe(qq[d],!1),Rd[d]=a,c!==d&&(Rd[c]=d),d}}return"string"===typeof b?b:b instanceof Ce?a:null} -function R(a){C.call(this,a);this.O=2408959;this.tl=this.yi="";this.Xs=this.Us=this.ft=this.ds=null;this.ht="";this.wi=this.Qr=this.gt=this.bn=null;this.Ws="";this.gp=null;this.Vs=Gd;this.Ys="";this.hp=null;this.Md="";this.ew=this.br=this.gl=null;this.Ui=(new y(NaN,NaN)).freeze();this.js="";this.wl=null;this.ks=zb;this.ss=pd;this.ls=qd;this.wr=null;this.es=Yq;this.dn=od;this.cn="gray";this.Eg=4;this.pD=-1;this.Ft=NaN;this.QG=new B;this.Qm=null;this.ik=NaN}w.La(R,C);w.ga("Part",R); +function mq(a){var b=Qd[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=Qd[c];if(void 0===b){var d=null,e;for(e in pq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=Oe(pq[d],!1),Qd[d]=a,c!==d&&(Qd[c]=d),d}}return"string"===typeof b?b:b instanceof Be?a:null} +function R(a){C.call(this,a);this.O=2408959;this.tl=this.yi="";this.Xs=this.Us=this.ft=this.ds=null;this.ht="";this.wi=this.Qr=this.gt=this.bn=null;this.Ws="";this.gp=null;this.Vs=Fd;this.Ys="";this.hp=null;this.Md="";this.ew=this.br=this.gl=null;this.Ui=(new y(NaN,NaN)).freeze();this.js="";this.wl=null;this.ks=zb;this.ss=od;this.ls=pd;this.wr=null;this.es=Xq;this.dn=nd;this.cn="gray";this.Eg=4;this.pD=-1;this.Ft=NaN;this.QG=new B;this.Qm=null;this.ik=NaN}w.La(R,C);w.ga("Part",R); R.prototype.cloneProtected=function(a){C.prototype.cloneProtected.call(this,a);a.O=this.O&-4097|49152;a.yi=this.yi;a.tl=this.tl;a.ds=this.ds;a.ft=this.ft;a.Us=this.Us;a.Xs=this.Xs;a.ht=this.ht;a.gt=this.gt;a.Qr=this.Qr;a.wi=null;a.Ws=this.Ws;a.Vs=this.Vs.S();a.Ys=this.Ys;a.Md=this.Md;a.br=this.br;a.Ui.assign(this.Ui);a.js=this.js;a.ks=this.ks.S();a.ss=this.ss.S();a.ls=this.ls.S();a.wr=this.wr;a.es=this.es;a.dn=this.dn.S();a.cn=this.cn;a.Eg=this.Eg;a.Ft=this.Ft}; -R.prototype.ni=function(a){C.prototype.ni.call(this,a);a.Mk();a.bn=null;a.gp=null;a.hp=null;a.wl=null;a.Qm=null};R.prototype.toString=function(){var a=w.qf(Object.getPrototypeOf(this))+"#"+w.Pd(this);null!==this.data&&(a+="("+Rf(this.data)+")");return a};R.LayoutNone=0;var Om;R.LayoutAdded=Om=1;var Xm;R.LayoutRemoved=Xm=2;R.LayoutShown=4;R.LayoutHidden=8;R.LayoutNodeSized=16;var Cn;R.LayoutGroupLayout=Cn=32;R.LayoutNodeReplaced=64;var Yq;R.LayoutStandard=Yq=Om|Xm|28|Cn|64;R.LayoutAll=16777215; -R.prototype.Vn=function(a,b,c,d,e,f,h){var k=this.g;null!==k&&(a===Ff&&"elements"===b?e instanceof C?Pm(e,function(a){Rm(k,a);Qm(k,a)}):e instanceof zl&&pn(k,e):a===Qf&&"elements"===b&&(e instanceof C?Pm(e,function(a){Vm(k,a);Um(k,a)}):e instanceof zl&&qn(k,e)),k.cd(a,b,c,d,e,f,h))};R.prototype.updateTargetBindings=R.prototype.Ib=function(a){C.prototype.Ib.call(this,a);if(null!==this.data){a=this.xa.n;for(var b=a.length,c=0;ch&&a.y>k&&a.righth&&b.y>k&&b.righth&&a.y>k&&a.righth&&b.y>k&&b.right=c.UI)){this.O^=4096;var d=!1;if(null!==c){d=c.cb;c.cb=!0;var e=c.selection;e.Qa();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.ee();a=this.FJ;null!==a&&a(this);null!==c&&(c.ye(),c.cb=d)}}}); -w.defineProperty(R,{Og:"isHighlighted"},function(){return 0!==(this.O&524288)},function(a){var b=0!==(this.O&524288);if(b!==a){this.O^=524288;var c=this.g;null!==c&&(c=c.Zl,c.Qa(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.oa();a=this.nI;null!==a&&a(this)}});w.defineProperty(R,{dm:"isShadowed"},function(){return 0!==(this.O&8192)},function(a){var b=0!==(this.O&8192);b!==a&&(this.O^=8192,this.h("isShadowed",b,a),this.oa())});function Hm(a){return 0!==(a.O&32768)} -function ar(a,b){a.O=b?a.O|32768:a.O&-32769}function Io(a,b){a.O=b?a.O|65536:a.O&-65537}function ll(a){return 0!==(a.O&131072)}R.prototype.Hf=function(a){this.O=a?this.O|131072:this.O&-131073};function jr(a,b){a.O=b?a.O|1048576:a.O&-1048577}w.defineProperty(R,{xF:"isAnimated"},function(){return 0!==(this.O&262144)},function(a){var b=0!==(this.O&262144);b!==a&&(this.O^=262144,this.h("isAnimated",b,a))}); +w.defineProperty(R,{Og:"isHighlighted"},function(){return 0!==(this.O&524288)},function(a){var b=0!==(this.O&524288);if(b!==a){this.O^=524288;var c=this.g;null!==c&&(c=c.Zl,c.Qa(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.oa();a=this.nI;null!==a&&a(this)}});w.defineProperty(R,{dm:"isShadowed"},function(){return 0!==(this.O&8192)},function(a){var b=0!==(this.O&8192);b!==a&&(this.O^=8192,this.h("isShadowed",b,a),this.oa())});function Gm(a){return 0!==(a.O&32768)} +function $q(a,b){a.O=b?a.O|32768:a.O&-32769}function Ho(a,b){a.O=b?a.O|65536:a.O&-65537}function kl(a){return 0!==(a.O&131072)}R.prototype.Hf=function(a){this.O=a?this.O|131072:this.O&-131073};function ir(a,b){a.O=b?a.O|1048576:a.O&-1048577}w.defineProperty(R,{xF:"isAnimated"},function(){return 0!==(this.O&262144)},function(a){var b=0!==(this.O&262144);b!==a&&(this.O^=262144,this.h("isAnimated",b,a))}); w.defineProperty(R,{nI:"highlightedChanged"},function(){return this.Qr},function(a){var b=this.Qr;b!==a&&(null!==a&&w.j(a,"function",R,"highlightedChanged"),this.Qr=a,this.h("highlightedChanged",b,a))});w.defineProperty(R,{vB:"selectionObjectName"},function(){return this.ht},function(a){var b=this.ht;b!==a&&(this.ht=a,this.bn=null,this.h("selectionObjectName",b,a))}); w.defineProperty(R,{EJ:"selectionAdornmentTemplate"},function(){return this.ft},function(a){var b=this.ft;b!==a&&(this.ft=a,this.h("selectionAdornmentTemplate",b,a))});w.u(R,{yq:"selectionObject"},function(){if(null===this.bn){var a=this.vB;null!==a&&""!==a?(a=this.Cd(a),this.bn=null!==a?a:this):this instanceof W?(a=this.path,this.bn=null!==a?a:this):this.bn=this}return this.bn}); w.defineProperty(R,{FJ:"selectionChanged"},function(){return this.gt},function(a){var b=this.gt;b!==a&&(null!==a&&w.j(a,"function",R,"selectionChanged"),this.gt=a,this.h("selectionChanged",b,a))});w.defineProperty(R,{fG:"resizeAdornmentTemplate"},function(){return this.Us},function(a){var b=this.Us;b!==a&&(this.Us=a,this.h("resizeAdornmentTemplate",b,a))}); w.defineProperty(R,{hG:"resizeObjectName"},function(){return this.Ws},function(a){var b=this.Ws;b!==a&&(this.Ws=a,this.gp=null,this.h("resizeObjectName",b,a))});w.u(R,{gG:"resizeObject"},function(){if(null===this.gp){var a=this.hG;null!==a&&""!==a?(a=this.Cd(a),this.gp=null!==a?a:this):this.gp=this}return this.gp});w.defineProperty(R,{tJ:"resizeCellSize"},function(){return this.Vs},function(a){var b=this.Vs;b.L(a)||(this.Vs=a=a.S(),this.h("resizeCellSize",b,a))}); w.defineProperty(R,{wJ:"rotateAdornmentTemplate"},function(){return this.Xs},function(a){var b=this.Xs;b!==a&&(this.Xs=a,this.h("rotateAdornmentTemplate",b,a))});w.defineProperty(R,{xJ:"rotateObjectName"},function(){return this.Ys},function(a){var b=this.Ys;b!==a&&(this.Ys=a,this.hp=null,this.h("rotateObjectName",b,a))});w.u(R,{qB:"rotateObject"},function(){if(null===this.hp){var a=this.xJ;null!==a&&""!==a?(a=this.Cd(a),this.hp=null!==a?a:this):this.hp=this}return this.hp}); w.defineProperty(R,{text:"text"},function(){return this.Md},function(a){var b=this.Md;b!==a&&(this.Md=a,this.h("text",b,a))}); -w.defineProperty(R,{Da:"containingGroup"},function(){return this.gl},function(a){if(this.fe()){var b=this.gl;if(b!==a){null===a||this!==a&&!a.oi(this)||(this===a&&w.k("Cannot make a Group a member of itself: "+this.toString()),w.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.J(Xm);var c=this.g;null!==b?kr(b,this):this instanceof V&&null!==c&&c.Fl.remove(this);this.gl=a;null!==a?lr(a,this):this instanceof V&&null!==c&&c.Fl.add(this);this.J(Om); -if(null!==c){var d=this.data,e=c.$;null!==d&&e instanceof Q&&e.yB(d,e.qb(null!==a?a.data:null))}d=this.KE;null!==d&&(e=!0,null!==c&&(e=c.Ua,c.Ua=!0),d(this,b,a),null!==c&&(c.Ua=e));if(this instanceof V)for(c=new I(R),jh(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof T)for(d=d.he;d.next();)sn(d.value);if(this instanceof T){for(d=this.he;d.next();)sn(d.value);c=this.Xb;null!==c&&sn(c)}this.h("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&ql(b,-1,a))}}else w.k("cannot set the Part.containingGroup of a Link or Adornment")}); -g=R.prototype;g.Mk=function(){var a=this.Da;null!==a&&(a.H(),null!==a.Mb&&a.Mb.H(),a.$f())};g.oa=function(){var a=this.g;null!==a&&!Gm(this)&&!Hm(this)&&this.isVisible()&&this.pc.I()&&a.oa(pl(this,this.pc))};g.H=function(){C.prototype.H.call(this);var a=this.g;null!==a&&(a.vg.add(this),this instanceof T&&null!==this.Xb&&So(this.Xb),a.ye(!0))};g.ku=function(a){a||(a=this.gl,null!==a&&lr(a,this))};g.lu=function(a){a||(a=this.gl,null!==a&&kr(a,this))}; -g.vn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.$,null!==b&&b.ly(a))}};w.defineProperty(R,{KE:"containingGroupChanged"},function(){return this.br},function(a){var b=this.br;b!==a&&(null!==a&&w.j(a,"function",R,"containingGroupChanged"),this.br=a,this.h("containingGroupChanged",b,a))});R.prototype.findSubGraphLevel=function(){return mr(this,this)};function mr(a,b){var c=b.Da;return null!==c?1+mr(a,c):b instanceof T&&(c=b.Xb,null!==c)?mr(a,c):0} -R.prototype.findTopLevelPart=function(){return nr(this,this)};function nr(a,b){var c=b.Da;return null!==c?nr(a,c):b instanceof T&&(c=b.Xb,null!==c)?nr(a,c):b}w.u(R,{dq:"isTopLevel"},function(){return null!==this.Da||this instanceof T&&null!==this.Xb?!1:!0});R.prototype.isMemberOf=R.prototype.oi=function(a){return a instanceof V?or(this,this,a):!1};function or(a,b,c){if(b===c||null===c)return!1;var d=b.Da;return null===d||d!==c&&!or(a,d,c)?b instanceof T&&(b=b.Xb,null!==b)?or(a,b,c):!1:!0} -R.prototype.findCommonContainingGroup=R.prototype.UH=function(a){if(null===a)return null;if(this===a)return this.Da;for(var b=this;null!==b;){b instanceof V&&jr(b,!0);if(b instanceof T){var c=b.Xb;null!==c&&(b=c)}b=b.Da}for(var d=null,b=a;null!==b;){if(0!==(b.O&1048576)){d=b;break}b instanceof T&&(c=b.Xb,null!==c&&(b=c));b=b.Da}for(b=this;null!==b;)b instanceof V&&jr(b,!1),b instanceof T&&(c=b.Xb,null!==c&&(b=c)),b=b.Da;return d}; +w.defineProperty(R,{Da:"containingGroup"},function(){return this.gl},function(a){if(this.fe()){var b=this.gl;if(b!==a){null===a||this!==a&&!a.oi(this)||(this===a&&w.k("Cannot make a Group a member of itself: "+this.toString()),w.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.J(Wm);var c=this.g;null!==b?jr(b,this):this instanceof V&&null!==c&&c.Fl.remove(this);this.gl=a;null!==a?kr(a,this):this instanceof V&&null!==c&&c.Fl.add(this);this.J(Nm); +if(null!==c){var d=this.data,e=c.$;null!==d&&e instanceof Q&&e.yB(d,e.qb(null!==a?a.data:null))}d=this.KE;null!==d&&(e=!0,null!==c&&(e=c.Ua,c.Ua=!0),d(this,b,a),null!==c&&(c.Ua=e));if(this instanceof V)for(c=new I(R),ih(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof T)for(d=d.he;d.next();)rn(d.value);if(this instanceof T){for(d=this.he;d.next();)rn(d.value);c=this.Xb;null!==c&&rn(c)}this.h("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&pl(b,-1,a))}}else w.k("cannot set the Part.containingGroup of a Link or Adornment")}); +g=R.prototype;g.Mk=function(){var a=this.Da;null!==a&&(a.H(),null!==a.Mb&&a.Mb.H(),a.$f())};g.oa=function(){var a=this.g;null!==a&&!Fm(this)&&!Gm(this)&&this.isVisible()&&this.pc.I()&&a.oa(ol(this,this.pc))};g.H=function(){C.prototype.H.call(this);var a=this.g;null!==a&&(a.vg.add(this),this instanceof T&&null!==this.Xb&&Ro(this.Xb),a.ye(!0))};g.ku=function(a){a||(a=this.gl,null!==a&&kr(a,this))};g.lu=function(a){a||(a=this.gl,null!==a&&jr(a,this))}; +g.vn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.$,null!==b&&b.ly(a))}};w.defineProperty(R,{KE:"containingGroupChanged"},function(){return this.br},function(a){var b=this.br;b!==a&&(null!==a&&w.j(a,"function",R,"containingGroupChanged"),this.br=a,this.h("containingGroupChanged",b,a))});R.prototype.findSubGraphLevel=function(){return lr(this,this)};function lr(a,b){var c=b.Da;return null!==c?1+lr(a,c):b instanceof T&&(c=b.Xb,null!==c)?lr(a,c):0} +R.prototype.findTopLevelPart=function(){return mr(this,this)};function mr(a,b){var c=b.Da;return null!==c?mr(a,c):b instanceof T&&(c=b.Xb,null!==c)?mr(a,c):b}w.u(R,{dq:"isTopLevel"},function(){return null!==this.Da||this instanceof T&&null!==this.Xb?!1:!0});R.prototype.isMemberOf=R.prototype.oi=function(a){return a instanceof V?nr(this,this,a):!1};function nr(a,b,c){if(b===c||null===c)return!1;var d=b.Da;return null===d||d!==c&&!nr(a,d,c)?b instanceof T&&(b=b.Xb,null!==b)?nr(a,b,c):!1:!0} +R.prototype.findCommonContainingGroup=R.prototype.UH=function(a){if(null===a)return null;if(this===a)return this.Da;for(var b=this;null!==b;){b instanceof V&&ir(b,!0);if(b instanceof T){var c=b.Xb;null!==c&&(b=c)}b=b.Da}for(var d=null,b=a;null!==b;){if(0!==(b.O&1048576)){d=b;break}b instanceof T&&(c=b.Xb,null!==c&&(b=c));b=b.Da}for(b=this;null!==b;)b instanceof V&&ir(b,!1),b instanceof T&&(c=b.Xb,null!==c&&(b=c)),b=b.Da;return d}; w.defineProperty(R,{JI:"layoutConditions"},function(){return this.es},function(a){var b=this.es;b!==a&&(this.es=a,this.h("layoutConditions",b,a))});R.prototype.canLayout=function(){if(!this.EF||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Pc||this instanceof T&&this.Cf?!1:!0}; -R.prototype.invalidateLayout=R.prototype.J=function(a){void 0===a&&(a=16777215);var b;this.EF&&0!==(a&this.JI)?(b=this.layer,null!==b&&b.Pc||this instanceof T&&this.Cf?b=!1:(b=this.g,b=null!==b&&b.ja.lb?!1:!0)):b=!1;if(b)if(b=this.gl,null!==b){var c=b.Tb;null!==c?c.J():b.J(a)}else a=this.g,null!==a&&(c=a.Tb,null!==c&&c.J())};function Tm(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Pc?!1:!0} +R.prototype.invalidateLayout=R.prototype.J=function(a){void 0===a&&(a=16777215);var b;this.EF&&0!==(a&this.JI)?(b=this.layer,null!==b&&b.Pc||this instanceof T&&this.Cf?b=!1:(b=this.g,b=null!==b&&b.ja.lb?!1:!0)):b=!1;if(b)if(b=this.gl,null!==b){var c=b.Tb;null!==c?c.J():b.J(a)}else a=this.g,null!==a&&(c=a.Tb,null!==c&&c.J())};function Sm(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Pc?!1:!0} w.defineProperty(R,{UE:"dragComputation"},function(){return this.wr},function(a){var b=this.wr;b!==a&&(null!==a&&w.j(a,"function",R,"dragComputation"),this.wr=a,this.h("dragComputation",b,a))});w.defineProperty(R,{JJ:"shadowOffset"},function(){return this.dn},function(a){var b=this.dn;b.L(a)||(this.dn=a=a.S(),this.oa(),this.h("shadowOffset",b,a))}); -w.defineProperty(R,{shadowColor:"shadowColor"},function(){return this.cn},function(a){var b=this.cn;b!==a&&(this.cn=a,this.oa(),this.h("shadowColor",b,a))});w.defineProperty(R,{shadowBlur:"shadowBlur"},function(){return this.Eg},function(a){var b=this.Eg;b!==a&&(this.Eg=a,this.oa(),this.h("shadowBlur",b,a))});function kh(a){0===arguments.length?R.call(this,Vj):R.call(this,a);this.O&=-257;this.tl="Adornment";this.Jc=null;this.zD=0;this.oE=!1;this.Mb=this.Zg=null}w.La(kh,R);w.ga("Adornment",kh); -kh.prototype.toString=function(){var a=this.Ze;return"Adornment("+this.zd+")"+(null!==a?a.toString():"")};kh.prototype.updateRelationshipsFromData=function(){};kh.prototype.Cu=function(a){var b=this.tb.U,c=this.tb;if(b instanceof W&&c instanceof X){var d=b.path,c=d.pf;b.Cu(a);c=d.pf;a=this.xa.n;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.xh){b.xh=!0;var c=new I(T);c.add(this);Ar(this,c,b.Ud,a,b.Ka,this,b.PB===wl);b.xh=!1}}; -function Ar(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.xh){b.xh=!0;var c=new I(T);c.add(this);Cr(this,c,b.Ud,a,b.Ka,this,b.PB===wl);b.xh=!1}};function Cr(a,b,c,d,e,f,h){for(var k=f===a?!1:a.uc,l=c?a.zx():a.Mg();l.next();){var m=l.value;m.bc&&(k||m.Mf||m.Wb(),m=m.DA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Dd(!0),m.Mk(),h&&hl(e,m,f)),2a&&(a=1);var b=this.g;if(null!==b&&!b.xh){b.xh=!0;var c=new I(T);c.add(this);zr(this,c,b.Ud,a,b.Ka,this,b.PB===vl);b.xh=!1}}; +function zr(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.xh){b.xh=!0;var c=new I(T);c.add(this);Br(this,c,b.Ud,a,b.Ka,this,b.PB===vl);b.xh=!1}};function Br(a,b,c,d,e,f,h){for(var k=f===a?!1:a.uc,l=c?a.zx():a.Mg();l.next();){var m=l.value;m.bc&&(k||m.Mf||m.Wb(),m=m.DA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Dd(!0),m.Mk(),h&&gl(e,m,f)),2c&&(c-=180);break;case Sp:c=ye(b+90);90c&&(c-=180);break;case Up:c=ye(b-90);90c&&(c-=180);break;case Vp:c=ye(b);if(45c||225c)return 0;90c&&(c-=180)}return ye(c)}; -w.defineProperty(W,{W:"fromNode"},function(){return this.rg},function(a){var b=this.rg;if(b!==a){var c=this.lc;null!==b&&(this.Hg!==b&&xr(b,this,c),Kr(this),this.J(Xm));this.rg=a;null!==a&&this.Dd(a.isVisible());this.Ki=null;this.Wb();var d=this.g;if(null!==d){var e=this.data,f=d.$;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.wB(e,f.qb(h))}else f instanceof $f&&(h=null!==a?a.data:null,d.Ud?f.ri(e,f.qb(h)):(null!==b&&f.ri(b.data,void 0),f.ri(h,f.qb(null!==this.Hg?this.Hg.data:null))))}e= -this.lc;f=this.gF;null!==f&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),f(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.Hg!==a&&wr(a,this,e),Lr(this),this.J(Om));this.h("fromNode",b,a);sn(this)}}); -w.defineProperty(W,{Ng:"fromPortId"},function(){return this.Qh},function(a){var b=this.Qh;if(b!==a){var c=this.W,d=this.lc;null!==d&&vr(c,d);Kr(this);this.Qh=a;var e=this.lc;null!==e&&vr(c,e);c=this.g;if(null!==c){var f=this.data,h=c.$;null!==f&&h instanceof Q&&h.xB(f,a)}d!==e&&(this.Ki=null,this.Wb(),f=this.gF,null!==f&&(h=!0,null!==c&&(h=c.Ua,c.Ua=!0),f(this,d,e),null!==c&&(c.Ua=h)));Lr(this);this.h("fromPortId",b,a)}});w.u(W,{lc:"fromPort"},function(){var a=this.rg;return null===a?null:a.yA(this.Qh)}); +W.prototype.hc=function(a){a.Ie===W?2===(a.value&2)?this.ny=a:a===sj||a===kj||a===jj?this.bf=a:a===Dr||a===Er||a===Fr?this.Cp=a:a!==Cr&&a!==lj&&w.k("Unknown Link enum value for a Link property: "+a):R.prototype.hc.call(this,a)};var Cr;W.Normal=Cr=w.p(W,"Normal",1);W.Orthogonal=w.p(W,"Orthogonal",2);W.AvoidsNodes=w.p(W,"AvoidsNodes",6);var Gr;W.AvoidsNodesStraight=Gr=w.p(W,"AvoidsNodesStraight",7);var lj;W.None=lj=w.p(W,"None",0);var sj;W.Bezier=sj=w.p(W,"Bezier",9);var kj; +W.JumpGap=kj=w.p(W,"JumpGap",10);var jj;W.JumpOver=jj=w.p(W,"JumpOver",11);var Dr;W.End=Dr=w.p(W,"End",17);var Er;W.Scale=Er=w.p(W,"Scale",18);var Fr;W.Stretch=Fr=w.p(W,"Stretch",19);var oq;W.OrientAlong=oq=w.p(W,"OrientAlong",21);var Qp;W.OrientPlus90=Qp=w.p(W,"OrientPlus90",22);var Sp;W.OrientMinus90=Sp=w.p(W,"OrientMinus90",23);var Hr;W.OrientOpposite=Hr=w.p(W,"OrientOpposite",24);var Ir;W.OrientUpright=Ir=w.p(W,"OrientUpright",25);var Rp;W.OrientPlus90Upright=Rp=w.p(W,"OrientPlus90Upright",26); +var Tp;W.OrientMinus90Upright=Tp=w.p(W,"OrientMinus90Upright",27);var Up;W.OrientUpright45=Up=w.p(W,"OrientUpright45",28);g=W.prototype;g.Qd=function(){null===this.V&&(this.V=new wo)};g.cm=function(){var a=this.W;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Fm(a)||Gm(a))return!1}a=this.Z;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Fm(a)||Gm(a))?!1:!0};g.AB=function(){return!1};g.BB=function(){};g.fe=function(){return!1}; +W.prototype.computeAngle=function(a,b,c){return W.computeAngle(b,c)};W.computeAngle=function(a,b){var c=0;switch(a){default:case lj:c=0;break;case oq:c=b;break;case Qp:c=b+90;break;case Sp:c=b-90;break;case Hr:c=b+180;break;case Ir:c=pe(b);90c&&(c-=180);break;case Rp:c=pe(b+90);90c&&(c-=180);break;case Tp:c=pe(b-90);90c&&(c-=180);break;case Up:c=pe(b);if(45c||225c)return 0;90c&&(c-=180)}return pe(c)}; +w.defineProperty(W,{W:"fromNode"},function(){return this.rg},function(a){var b=this.rg;if(b!==a){var c=this.lc;null!==b&&(this.Hg!==b&&wr(b,this,c),Jr(this),this.J(Wm));this.rg=a;null!==a&&this.Dd(a.isVisible());this.Ki=null;this.Wb();var d=this.g;if(null!==d){var e=this.data,f=d.$;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.wB(e,f.qb(h))}else f instanceof Zf&&(h=null!==a?a.data:null,d.Ud?f.ri(e,f.qb(h)):(null!==b&&f.ri(b.data,void 0),f.ri(h,f.qb(null!==this.Hg?this.Hg.data:null))))}e= +this.lc;f=this.gF;null!==f&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),f(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.Hg!==a&&vr(a,this,e),Kr(this),this.J(Nm));this.h("fromNode",b,a);rn(this)}}); +w.defineProperty(W,{Ng:"fromPortId"},function(){return this.Qh},function(a){var b=this.Qh;if(b!==a){var c=this.W,d=this.lc;null!==d&&ur(c,d);Jr(this);this.Qh=a;var e=this.lc;null!==e&&ur(c,e);c=this.g;if(null!==c){var f=this.data,h=c.$;null!==f&&h instanceof Q&&h.xB(f,a)}d!==e&&(this.Ki=null,this.Wb(),f=this.gF,null!==f&&(h=!0,null!==c&&(h=c.Ua,c.Ua=!0),f(this,d,e),null!==c&&(c.Ua=h)));Kr(this);this.h("fromPortId",b,a)}});w.u(W,{lc:"fromPort"},function(){var a=this.rg;return null===a?null:a.yA(this.Qh)}); w.defineProperty(W,{gF:"fromPortChanged"},function(){return this.Gr},function(a){var b=this.Gr;b!==a&&(null!==a&&w.j(a,"function",W,"fromPortChanged"),this.Gr=a,this.h("fromPortChanged",b,a))}); -w.defineProperty(W,{Z:"toNode"},function(){return this.Hg},function(a){var b=this.Hg;if(b!==a){var c=this.Ic;null!==b&&(this.rg!==b&&xr(b,this,c),Kr(this),this.J(Xm));this.Hg=a;null!==a&&this.Dd(a.isVisible());this.Ki=null;this.Wb();var d=this.g;if(null!==d){var e=this.data,f=d.$;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.CB(e,f.qb(h))}else f instanceof $f&&(h=null!==a?a.data:null,d.Ud?(null!==b&&f.ri(b.data,void 0),f.ri(h,f.qb(null!==this.rg?this.rg.data:null))):f.ri(e,f.qb(h)))}e= -this.Ic;f=this.BG;null!==f&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),f(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.rg!==a&&wr(a,this,e),Lr(this),this.J(Om));this.h("toNode",b,a);sn(this)}}); -w.defineProperty(W,{Hh:"toPortId"},function(){return this.ki},function(a){var b=this.ki;if(b!==a){var c=this.Z,d=this.Ic;null!==d&&vr(c,d);Kr(this);this.ki=a;var e=this.Ic;null!==e&&vr(c,e);c=this.g;if(null!==c){var f=this.data,h=c.$;null!==f&&h instanceof Q&&h.DB(f,a)}d!==e&&(this.Ki=null,this.Wb(),f=this.BG,null!==f&&(h=!0,null!==c&&(h=c.Ua,c.Ua=!0),f(this,d,e),null!==c&&(c.Ua=h)));Lr(this);this.h("toPortId",b,a)}});w.u(W,{Ic:"toPort"},function(){var a=this.Hg;return null===a?null:a.yA(this.ki)}); +w.defineProperty(W,{Z:"toNode"},function(){return this.Hg},function(a){var b=this.Hg;if(b!==a){var c=this.Ic;null!==b&&(this.rg!==b&&wr(b,this,c),Jr(this),this.J(Wm));this.Hg=a;null!==a&&this.Dd(a.isVisible());this.Ki=null;this.Wb();var d=this.g;if(null!==d){var e=this.data,f=d.$;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.CB(e,f.qb(h))}else f instanceof Zf&&(h=null!==a?a.data:null,d.Ud?(null!==b&&f.ri(b.data,void 0),f.ri(h,f.qb(null!==this.rg?this.rg.data:null))):f.ri(e,f.qb(h)))}e= +this.Ic;f=this.BG;null!==f&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),f(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.rg!==a&&vr(a,this,e),Kr(this),this.J(Nm));this.h("toNode",b,a);rn(this)}}); +w.defineProperty(W,{Hh:"toPortId"},function(){return this.ki},function(a){var b=this.ki;if(b!==a){var c=this.Z,d=this.Ic;null!==d&&ur(c,d);Jr(this);this.ki=a;var e=this.Ic;null!==e&&ur(c,e);c=this.g;if(null!==c){var f=this.data,h=c.$;null!==f&&h instanceof Q&&h.DB(f,a)}d!==e&&(this.Ki=null,this.Wb(),f=this.BG,null!==f&&(h=!0,null!==c&&(h=c.Ua,c.Ua=!0),f(this,d,e),null!==c&&(c.Ua=h)));Kr(this);this.h("toPortId",b,a)}});w.u(W,{Ic:"toPort"},function(){var a=this.Hg;return null===a?null:a.yA(this.ki)}); w.defineProperty(W,{BG:"toPortChanged"},function(){return this.zt},function(a){var b=this.zt;b!==a&&(null!==a&&w.j(a,"function",W,"toPortChanged"),this.zt=a,this.h("toPortChanged",b,a))});w.defineProperty(W,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Xj:qc},function(a){this.Qd();var b=this.V.Xj;b.L(a)||(a=a.S(),this.V.Xj=a,this.h("fromSpot",b,a),this.Wb())}); -w.defineProperty(W,{Vl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Vj:NaN},function(a){this.Qd();var b=this.V.Vj;b!==a&&(0>a&&w.Fa(a,">= 0",W,"fromEndSegmentLength"),this.V.Vj=a,this.h("fromEndSegmentLength",b,a),this.Wb())});w.defineProperty(W,{eu:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Uj:qr},function(a){this.Qd();var b=this.V.Uj;b!==a&&(w.Rt("Link.fromEndSegmentDirection","2.0"),this.V.Uj=a,this.h("fromEndSegmentDirection",b,a),this.Wb())}); +w.defineProperty(W,{Vl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Vj:NaN},function(a){this.Qd();var b=this.V.Vj;b!==a&&(0>a&&w.Fa(a,">= 0",W,"fromEndSegmentLength"),this.V.Vj=a,this.h("fromEndSegmentLength",b,a),this.Wb())});w.defineProperty(W,{eu:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Uj:pr},function(a){this.Qd();var b=this.V.Uj;b!==a&&(w.Rt("Link.fromEndSegmentDirection","2.0"),this.V.Uj=a,this.h("fromEndSegmentDirection",b,a),this.Wb())}); w.defineProperty(W,{fu:"fromShortLength"},function(){return null!==this.V?this.V.Wj:NaN},function(a){this.Qd();var b=this.V.Wj;b!==a&&(this.V.Wj=a,this.h("fromShortLength",b,a),this.Wb())});w.defineProperty(W,{Bb:"toSpot"},function(){return null!==this.V?this.V.vk:qc},function(a){this.Qd();var b=this.V.vk;b.L(a)||(a=a.S(),this.V.vk=a,this.h("toSpot",b,a),this.Wb())}); -w.defineProperty(W,{om:"toEndSegmentLength"},function(){return null!==this.V?this.V.tk:NaN},function(a){this.Qd();var b=this.V.tk;b!==a&&(0>a&&w.Fa(a,">= 0",W,"toEndSegmentLength"),this.V.tk=a,this.h("toEndSegmentLength",b,a),this.Wb())});w.defineProperty(W,{av:"toEndSegmentDirection"},function(){return null!==this.V?this.V.sk:qr},function(a){this.Qd();var b=this.V.sk;b!==a&&(w.Rt("Link.toEndSegmentDirection","2.0"),this.V.sk=a,this.h("toEndSegmentDirection",b,a),this.Wb())}); +w.defineProperty(W,{om:"toEndSegmentLength"},function(){return null!==this.V?this.V.tk:NaN},function(a){this.Qd();var b=this.V.tk;b!==a&&(0>a&&w.Fa(a,">= 0",W,"toEndSegmentLength"),this.V.tk=a,this.h("toEndSegmentLength",b,a),this.Wb())});w.defineProperty(W,{av:"toEndSegmentDirection"},function(){return null!==this.V?this.V.sk:pr},function(a){this.Qd();var b=this.V.sk;b!==a&&(w.Rt("Link.toEndSegmentDirection","2.0"),this.V.sk=a,this.h("toEndSegmentDirection",b,a),this.Wb())}); w.defineProperty(W,{bv:"toShortLength"},function(){return null!==this.V?this.V.uk:NaN},function(a){this.Qd();var b=this.V.uk;b!==a&&(this.V.uk=a,this.h("toShortLength",b,a),this.Wb())}); -function sn(a){var b=a.W,c=a.Z,d=null,b=d=null!==b?null!==c?b.UH(c):b.Da:null!==c?c.Da:null,c=a.gl;if(c!==b){null!==c&&kr(c,a);a.gl=b;null!==b&&lr(b,a);var e=a.KE;if(null!==e){var f=!0,h=a.g;null!==h&&(f=h.Ua,h.Ua=!0);e(a,c,b);null!==h&&(h.Ua=f)}!a.Mf||a.$D!==c&&a.aE!==c||a.Wb()}if(a.yI)for(a=a.Ef;a.next();)a.value.Da=d}W.prototype.Mk=function(){var a=this.Da;null!==a&&this.W!==a&&this.Z!==a&&a.lx&&R.prototype.Mk.call(this)}; -W.prototype.getOtherNode=W.prototype.DA=function(a){var b=this.W;return a===b?this.Z:b};W.prototype.getOtherPort=function(a){var b=this.lc;return a===b?this.Ic:b};w.u(W,{yI:"isLabeledLink"},function(){return null===this.yf?!1:0=d&&(h=d-1);var l=this.l(h-1),f=this.l(h);Wd(e.x,e.y,k.x,k.y,l.x,l.y,f.x,f.y,.5,a);b=Math.min(f.x,b);c=Math.min(f.y,c);e=f}else for(e=this.l(0),f=this.l(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.m(e.x,e.y,0,0),a.vi(f),h=2;h=d&&(h=d-1);var l=this.l(h-1),f=this.l(h);Vd(e.x,e.y,k.x,k.y,l.x,l.y,f.x,f.y,.5,a);b=Math.min(f.x,b);c=Math.min(f.y,c);e=f}else for(e=this.l(0),f=this.l(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.m(e.x,e.y,0,0),a.vi(f),h=2;hc&&(c=-c)):Wa(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Bf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}w.ta(f);b=this.l(h);f=this.l(h+1);b.x===f.x?b.y>f.y?a.m(b.x,b.y-(e/2-c)):a.m(b.x,b.y+(e/2-c)):b.y===f.y?b.x>f.x?a.m(b.x-(e/2-c),b.y):a.m(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.m(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a};w.u(W,{OF:"midAngle"},function(){this.bo();return this.computeMidAngle()}); -W.prototype.computeMidAngle=function(){var a=this.qa;if(2>a)return NaN;if(this.computeCurve()===tj&&4<=a&&!this.ac){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.l(c),d=this.l(c+1),a=this.l(c+2),c=this.l(c+3),e=d.x,d=d.y,f=a.x,a=a.y,h=(e+f)/2,k=(d+a)/2;return Ta(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(f+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0a)return NaN;if(this.computeCurve()===sj&&4<=a&&!this.ac){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.l(c),d=this.l(c+1),a=this.l(c+2),c=this.l(c+3),e=d.x,d=d.y,f=a.x,a=a.y,h=(e+f)/2,k=(d+a)/2;return Ta(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(f+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0e+10?b.Pb(d):e>c+10?d.Pb(a):b.Pb(a)):null===this.Sa||this.ac?b.Pb(d):this.Sa.hF(.5);if(null!==this.Sa&&!this.ac)return this.Sa.hF(.5);b=this.l(c-1);d=this.l(c);a=this.l(c+1);c=b.Bf(d);e=d.Bf(a);return c>e+10?b.Pb(d):e>c+10?d.Pb(a):b.Pb(a)}; w.defineProperty(W,{points:"points"},function(){return this.hd},function(a){var b=this.hd;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;em&&(p=-p),u=(0> +W.prototype.computePoints=function(){var a=this.g;if(null===a)return!1;var b=this.W,c=null;null===b?(a.Al||(a.Zs=new X,a.Zs.Ca=qd,a.Zs.mb=0,a.Al=new T,a.Al.add(a.Zs),a.Al.cf()),this.Np&&(a.Al.position=a.Al.location=this.Np,a.Al.cf(),b=a.Al,c=a.Zs)):c=this.lc;if(null!==c&&!b.isVisible()){var d=b.findVisibleNode();null!==d&&d!==b?(b=d,c=d.port):b=d}this.$D=b;if(null===b||!b.location.I())return!1;for(;!(null===c||c.Y.I()&&c.Aj());)c=c.Q;if(null===c)return!1;var e=this.Z,f=null;null===e?(a.Bl||(a.$s= +new X,a.$s.Ca=qd,a.$s.mb=0,a.Bl=new T,a.Bl.add(a.$s),a.Bl.cf()),this.Op&&(a.Bl.position=a.Bl.location=this.Op,a.Bl.cf(),e=a.Bl,f=a.$s)):f=this.Ic;null===f||e.isVisible()||(a=e.findVisibleNode(),null!==a&&a!==e?(e=a,f=a.port):e=a);this.aE=e;if(null===e||!e.location.I())return!1;for(;!(null===f||f.Y.I()&&f.Aj());)f=f.Q;if(null===f)return!1;var h=this.qa,d=this.computeSpot(!0,c),a=this.computeSpot(!1,f),k=d===yb,l=a===yb,m=c===f&&null!==c,n=this.ac,p=this.bf===sj;this.Ki=m&&!n?p=!0:!1;var q=this.Cp=== +lj||m;if(!n&&!m&&k&&l){if(k=!1,!q&&3<=h&&(q=this.getLinkPoint(b,c,d,!0,!1,e,f),l=this.getLinkPoint(e,f,a,!1,!1,b,c),k=this.adjustPoints(0,q,h-1,l))&&(q=this.getLinkPoint(b,c,d,!0,!1,e,f),l=this.getLinkPoint(e,f,a,!1,!1,b,c),this.adjustPoints(0,q,h-1,l)),!k)if(this.Ip(),p){var h=this.getLinkPoint(b,c,d,!0,!1,e,f),q=this.getLinkPoint(e,f,a,!1,!1,b,c),k=q.x-h.x,l=q.y-h.y,m=this.computeCurviness(),p=n=0,r=h.x+k/3,s=h.y+l/3,u=r,t=s;J(l,0)?t=0m&&(p=-p),u=(0> l?-1:1)*p+r,t=n*(u-r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,x=r,v=s;J(l,0)?v=0l?-1:1)*p+r,v=n*(x-r)+s);this.Ip();this.li(h);this.lj(u,t);this.lj(x,v);this.li(q);this.Vg(0,this.getLinkPoint(b,c,d,!0,!1,e,f));this.Vg(3,this.getLinkPoint(e,f,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,f),a=this.getLinkPoint(e,f,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,f=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,J(e,0)?k=0f&&(h=-h), h=(0>e?-1:1)*h+b,k=q*(h-b)+c),this.li(d),this.lj(h,k)):this.li(d),this.li(a)}else{p=this.$l;q&&(n&&p||m)&&this.Ip();var z=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,f),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,f),m&&(k||d.L(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>z&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(z)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t* Math.sin(r*Math.PI/180)),d.Td()&&m){var A=c.Wa(Jb,w.K()),L=w.xb(A.x+1E3*s,A.y+1E3*u);this.getLinkPointFromPoint(b,c,A,L,!0,p);w.v(A);w.v(L)}var t=this.getLinkPoint(e,f,a,!1,n,b,c),E=v=x=0;if(n||!l||m)A=this.computeEndSegmentLength(e,f,a,!1),E=this.getLinkDirection(e,f,t,a,!1,n,b,c),m&&(l||d.L(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(E+=n?0:30,0>z&&(E+=180)),0>E?E+=360:360<=E&&(E-=360),m&&(A+=Math.abs(z)*(n?1:2)),0===E?x=A:90===E?v=A:180===E?x=-A:270===E?v=-A:(x=A*Math.cos(E*Math.PI/180),v=A*Math.sin(E* Math.PI/180)),a.Td()&&m&&(A=f.Wa(Jb,w.K()),L=w.xb(A.x+1E3*x,A.y+1E3*v),this.getLinkPointFromPoint(e,f,A,L,!1,t),w.v(A),w.v(L));a=p;if(n||!k||m)a=new y(p.x+s,p.y+u);d=t;if(n||!l||m)d=new y(t.x+x,t.y+v);!q&&!n&&k&&3Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} +function Or(a,b){Math.abs(b.x-a.x)>Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} W.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new y);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.Q;null===e||e.Yg()||(e=e.Q);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.ph;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.An(e,h,k,l, -f);null!==a&&f.transform(a);return f};function Qr(a,b){var c=b.Ps;null===c&&(c=new Rr,c.port=b,c.Qc=b.U,b.Ps=c);return Sr(c,a)} -W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new y);if(c.$c())return b.Wa(c,k),k;if(c.xj()){var l=Qr(this,b);if(null!==l){k.assign(l.hq);if(e&&this.ny===Hr){var m=Qr(this,h);if(null!==m&&l.tn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.vj(Xb)||c.vj($b))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);w.v(l);w.v(m)}}return k}}c=b.Wa(Jb,w.K());l=f=null; -this.qa>(e?6:2)?(l=d?this.l(1):this.l(this.qa-2),e&&(l=Pr(c,l.copy()))):(f=w.K(),l=h.Wa(Jb,f),e&&(l=Pr(c,l)),w.v(f));this.getLinkPointFromPoint(a,b,c,l,d,k);w.v(c);return k}; -W.prototype.getLinkDirection=function(a,b,c,d,e,f,h,k){a:if(d.$c())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(n=e?this.l(1):this.l(this.qa-2),n=f?Pr(l,n.copy()):c):(m=w.K(),n=k.Wa(Jb,m),w.v(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- -l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;w.v(l)}d.Td()&&h.oi(a)&&(c+=180,360<=c&&(c-=360));a=qr;a=e?this.eu:this.av;a===qr&&(a=e?b.eu:b.av);switch(a){case rr:b=b.Wl();c+=b;360<=c&&(c-=360);break;case qr:case yo:if(d.BI())break;b=b.Wl();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; -W.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.xj()&&(a=Qr(this,b),null!==a))return a.vx;a=NaN;a=d?this.Vl:this.om;null!==b&&isNaN(a)&&(a=d?b.Vl:b.om);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a,b){var c;if(a)if(c=b?b:this.lc,null===c)c=Jb;else{var d=this.Ab;d.Zc()&&null!==c&&(d=c.Ab);c=d===qc?yb:d}else c=b?b:this.Ic,null===c?c=Jb:(d=this.Bb,d.Zc()&&null!==c&&(d=c.Bb),c=d===qc?yb:d);return c}; -W.prototype.computeOtherPoint=function(a,b){var c=b.Wa(Jb),d;d=b.Ps;d=null!==d?Sr(d,this):null;null!==d&&(c=d.hq);return c};W.prototype.computeShortLength=function(a){if(a){if(a=this.fu,isNaN(a)){var b=this.lc;null!==b&&(a=b.fu)}}else a=this.bv,isNaN(a)&&(b=this.Ic,null!==b&&(a=b.bv));return isNaN(a)?0:a}; -W.prototype.Gk=function(a,b,c,d,e,f){if(!1===this.Ug)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Wg(),h.reset());h.multiply(this.transform);if(this.qn(a,h))return aq(this,b,c,e),void 0===f&&w.df(h),!0;if(this.Zf(a,h)){var k=!1;if(!this.Fn)for(var l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.bg){var p=n.Y,q=this.Ja;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.Wg();p.set(h);if(n instanceof C)k=n.Gk(a,b,c,d,e,p);else if(this.path=== -n){if(n instanceof X){var k=n,r=a,s=d,q=p;if(!1===k.Ug)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.qn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Bk(k.Y))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,x=w.K(),v=w.K(),z=w.K(),A=w.Wg();A.set(t);A.RF(k.transform);A.NA();v.x=r;v.y=s;v.transform(A);x.x=q;x.y=s;x.transform(A);t=!1;mq(k,x,v,z)?t=!0:(x.x=r,x.y=u,x.transform(A),mq(k,x,v,z)?t=!0:(v.x=q,v.y=u,v.transform(A),mq(k,x,v,z)?t=!0:(x.x=q,x.y=s,x.transform(A),mq(k,x,v,z)&& -(t=!0))));w.df(A);w.v(x);w.v(v);w.v(z);k=t}}else k=k.qn(r,q)}}else k=Eo(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof I&&e.add(n),e instanceof H&&e.add(n)));w.df(p)}}}void 0===f&&w.df(h);return k||null!==this.background||null!==this.ln}void 0===f&&w.df(h);return!1};w.u(W,{ac:"isOrthogonal"},function(){return 2===(this.Xm.value&2)});w.u(W,{$l:"isAvoiding"},function(){return 4===(this.Xm.value&4)}); -W.prototype.computeCurve=function(){if(null===this.Ki){var a=this.lc,b=this.ac;this.Ki=null!==a&&a===this.Ic&&!b}return this.Ki?tj:this.bf};W.prototype.computeCorner=function(){if(this.bf===tj)return 0;var a=this.pA;if(isNaN(a)||0>a)a=10;return a};W.prototype.findMidLabel=function(){for(var a=this.path,b=this.xa.n,c=b.length,d=0;d=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.vj(Xb)||c.vj($b))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);w.v(l);w.v(m)}}return k}}c=b.Wa(Jb,w.K());l=f=null; +this.qa>(e?6:2)?(l=d?this.l(1):this.l(this.qa-2),e&&(l=Or(c,l.copy()))):(f=w.K(),l=h.Wa(Jb,f),e&&(l=Or(c,l)),w.v(f));this.getLinkPointFromPoint(a,b,c,l,d,k);w.v(c);return k}; +W.prototype.getLinkDirection=function(a,b,c,d,e,f,h,k){a:if(d.$c())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(n=e?this.l(1):this.l(this.qa-2),n=f?Or(l,n.copy()):c):(m=w.K(),n=k.Wa(Jb,m),w.v(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- +l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;w.v(l)}d.Td()&&h.oi(a)&&(c+=180,360<=c&&(c-=360));a=pr;a=e?this.eu:this.av;a===pr&&(a=e?b.eu:b.av);switch(a){case qr:b=b.Wl();c+=b;360<=c&&(c-=360);break;case pr:case xo:if(d.BI())break;b=b.Wl();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; +W.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.xj()&&(a=Pr(this,b),null!==a))return a.vx;a=NaN;a=d?this.Vl:this.om;null!==b&&isNaN(a)&&(a=d?b.Vl:b.om);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a,b){var c;if(a)if(c=b?b:this.lc,null===c)c=Jb;else{var d=this.Ab;d.Zc()&&null!==c&&(d=c.Ab);c=d===qc?yb:d}else c=b?b:this.Ic,null===c?c=Jb:(d=this.Bb,d.Zc()&&null!==c&&(d=c.Bb),c=d===qc?yb:d);return c}; +W.prototype.computeOtherPoint=function(a,b){var c=b.Wa(Jb),d;d=b.Ps;d=null!==d?Rr(d,this):null;null!==d&&(c=d.hq);return c};W.prototype.computeShortLength=function(a){if(a){if(a=this.fu,isNaN(a)){var b=this.lc;null!==b&&(a=b.fu)}}else a=this.bv,isNaN(a)&&(b=this.Ic,null!==b&&(a=b.bv));return isNaN(a)?0:a}; +W.prototype.Gk=function(a,b,c,d,e,f){if(!1===this.Ug)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Wg(),h.reset());h.multiply(this.transform);if(this.qn(a,h))return $p(this,b,c,e),void 0===f&&w.df(h),!0;if(this.Zf(a,h)){var k=!1;if(!this.Fn)for(var l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.bg){var p=n.Y,q=this.Ja;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.Wg();p.set(h);if(n instanceof C)k=n.Gk(a,b,c,d,e,p);else if(this.path=== +n){if(n instanceof X){var k=n,r=a,s=d,q=p;if(!1===k.Ug)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.qn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Bk(k.Y))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,x=w.K(),v=w.K(),z=w.K(),A=w.Wg();A.set(t);A.RF(k.transform);A.NA();v.x=r;v.y=s;v.transform(A);x.x=q;x.y=s;x.transform(A);t=!1;lq(k,x,v,z)?t=!0:(x.x=r,x.y=u,x.transform(A),lq(k,x,v,z)?t=!0:(v.x=q,v.y=u,v.transform(A),lq(k,x,v,z)?t=!0:(x.x=q,x.y=s,x.transform(A),lq(k,x,v,z)&& +(t=!0))));w.df(A);w.v(x);w.v(v);w.v(z);k=t}}else k=k.qn(r,q)}}else k=Do(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof I&&e.add(n),e instanceof H&&e.add(n)));w.df(p)}}}void 0===f&&w.df(h);return k||null!==this.background||null!==this.ln}void 0===f&&w.df(h);return!1};w.u(W,{ac:"isOrthogonal"},function(){return 2===(this.Xm.value&2)});w.u(W,{$l:"isAvoiding"},function(){return 4===(this.Xm.value&4)}); +W.prototype.computeCurve=function(){if(null===this.Ki){var a=this.lc,b=this.ac;this.Ki=null!==a&&a===this.Ic&&!b}return this.Ki?sj:this.bf};W.prototype.computeCorner=function(){if(this.bf===sj)return 0;var a=this.pA;if(isNaN(a)||0>a)a=10;return a};W.prototype.findMidLabel=function(){for(var a=this.path,b=this.xa.n,c=b.length,d=0;dl?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Wa(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.Vg(a,b);for(a+= -1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ca(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Vg(c,d)}}return!0;case Gr:f=this.l(a);p=this.l(c);if(!f.Oc(b)||!p.Oc(d)){var e=f.x,f=f.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-f)*(p-f),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.Vg(a,b);for(a+=1;al?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Wa(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.Vg(a,b);for(a+= +1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ca(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Vg(c,d)}}return!0;case Fr:f=this.l(a);p=this.l(c);if(!f.Oc(b)||!p.Oc(d)){var e=f.x,f=f.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-f)*(p-f),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.Vg(a,b);for(a+=1;ab?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.Y.copy(),k=f.Y.copy();if(h.I()&&k.I()){h.Yf(8,8);k.Yf(8,8);h.vi(a);k.vi(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new y(c.x,a.y),m=new y(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.Ia(a)||h.Ia(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new y(Math.max((a.x+c.x)/2,a.x),a.y),m=new y(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.yh.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new y(a.x,Math.max((a.y+c.y)/2,a.y)),m=new y(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.Ia(a)||h.Ia(c))?l.x=this.computeMidOrthoPosition(a.x, c.x,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new y(a.x,Math.min((a.y+c.y)/2,a.y)),m=new y(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==Vr(s,c.x,c.y)){Wr(this,s,c.x,c.y,d,!0);h=this.l(2);if(4>this.qa)0===b||180===b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ca(2,h.x,h.y),this.w(3,h.x,h.y);else if(c= +k.right)),m.x=l.x,m.y=c.y}var n=l,p=m;if(this.$l){var q=this.g,r;(r=null===q)||(q.Ka.ff?r=!1:(r=q.$a,r=r instanceof nh?!r.Pw||r.vI:!0),r=!r);if(r||h.Ia(c)&&!f.oi(e)||k.Ia(a)&&!e.oi(f)||e===f||this.layer.Pc)b=!1;else{var s=En(q,!0,this.Da,null);if(s.fq(Math.min(a.x,n.x),Math.min(a.y,n.y),Math.abs(a.x-n.x),Math.abs(a.y-n.y))&&s.fq(Math.min(n.x,p.x),Math.min(n.y,p.y),Math.abs(n.x-p.x),Math.abs(n.y-p.y))&&s.fq(Math.min(p.x,c.x),Math.min(p.y,c.y),Math.abs(p.x-c.x),Math.abs(p.y-c.y)))b=!1;else{e=a;f=c; +var u=r=null;if(q.TA){q=s.ab.copy();q.Yf(-s.Hp,-s.Fp);var t=w.K();Sr(s,a.x,a.y)||(ke(q.x,q.y,q.x+q.width,q.y+q.height,a.x,a.y,n.x,n.y,t)?(r=a=t.copy(),b=t.Pb(n)):ke(q.x,q.y,q.x+q.width,q.y+q.height,n.x,n.y,p.x,p.y,t)?(r=a=t.copy(),b=t.Pb(p)):ke(q.x,q.y,q.x+q.width,q.y+q.height,p.x,p.y,c.x,c.y,t)&&(r=a=t.copy(),b=t.Pb(c)));Sr(s,c.x,c.y)||(ke(q.x,q.y,q.x+q.width,q.y+q.height,c.x,c.y,p.x,p.y,t)?(u=c=t.copy(),d=p.Pb(t)):ke(q.x,q.y,q.x+q.width,q.y+q.height,p.x,p.y,n.x,n.y,t)?(u=c=t.copy(),d=n.Pb(t)):ke(q.x, +q.y,q.x+q.width,q.y+q.height,n.x,n.y,a.x,a.y,t)&&(u=c=t.copy(),d=a.Pb(t)));w.v(t)}h=h.copy().Ih(k);k=s.tG;h.Yf(s.Hp*k,s.Fp*k);Tr(s,a,b,c,d,h);k=Ur(s,c.x,c.y);!s.abort&&999999<=k&&(Hn(s),k=s.KF,h.Yf(s.Hp*k,s.Fp*k),Tr(s,a,b,c,d,h),k=Ur(s,c.x,c.y));!s.abort&&999999<=k&&s.JG&&(Hn(s),Tr(s,a,b,c,d,s.ab),k=Ur(s,c.x,c.y));if(!s.abort&&999999>k&&0!==Ur(s,c.x,c.y)){Vr(this,s,c.x,c.y,d,!0);h=this.l(2);if(4>this.qa)0===b||180===b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ca(2,h.x,h.y),this.w(3,h.x,h.y);else if(c= this.l(3),0===b||180===b)J(h.x,c.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.ca(2,h,a.y),this.ca(3,h,c.y)):J(h.y,c.y)?(Math.abs(a.y-h.y)<=s.Fp/2&&(this.ca(2,h.x,a.y),this.ca(3,c.x,a.y)),this.w(2,h.x,a.y)):this.ca(2,a.x,h.y);else if(90===b||270===b)J(h.y,c.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.ca(2,a.x,h),this.ca(3,c.x,h)):J(h.x,c.x)?(Math.abs(a.x-h.x)<=s.Hp/2&&(this.ca(2,a.x,h.y),this.ca(3,a.x,c.y)),this.w(2,a.x,h.y)):this.ca(2,h.x,a.y);null!==r&&(a=this.l(1),c=this.l(2), a.x!==c.x&&a.y!==c.y?0===b||180===b?this.w(2,a.x,c.y):this.w(2,c.x,a.y):0===b||180===b?this.w(2,e.x,r.y):this.w(2,r.x,e.y));null!==u&&(0===d||180===d?this.lj(f.x,u.y):this.lj(u.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.li(l),this.li(m))}};W.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2}; -function Ci(a){if(null===a.g||!a.$l)return!1;var b=a.points.n,c=b.length;if(4>c)return!1;a=Fn(a.g,!0,a.Da,null);for(var d=1;dc)return!1;a=En(a.g,!0,a.Da,null);for(var d=1;da)return new Ce(Ge);var b=!1,c=this.g;null!==c&&Mr(this)&&c.il.contains(this)&&null!==this.Aw&&(b=!0);var d=c=0,e=this.l(0).copy(),f=e.copy(),c=this.hd.n,h=this.computeCurve();if(h===tj&&3<=a&&!Wa(this.Cq,0))if(3===a)var k=this.l(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.l(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.ac)for(k=0;k=a&&(k=a-1),c=this.l(k), -f.x=Math.min(c.x,f.x),f.y=Math.min(c.y,f.y);c=f.x;d=f.y}else{for(k=0;kx?r>q?(u.x=v-A,u.y=q-A,t.x=v+s,t.y=q+s):(u.x=v-A,u.y=q+A,t.x=v+s,t.y=q-s):r>q?(u.x=v+A,u.y=q-A,t.x=v-s,t.y=q+s):(u.x=v+A,u.y=q+A,t.x=v-s,t.y=q-s));Wa(x,v)&&Wa(q,r)&&(q>p?(z>v?(u.x= -v-A,u.y=q-A,t.x=v+s):(u.x=v+A,u.y=q-A,t.x=v-s),t.y=q+s):(z>v?(u.x=v-A,u.y=q+A,t.x=v+s):(u.x=v+A,u.y=q+A,t.x=v-s),t.y=q-s));if(Wa(x,v)&&Wa(v,z)||Wa(p,q)&&Wa(q,r))x=.5*(x+z),p=.5*(p+r),u.x=x,u.y=p,t.x=x,t.y=p;1===k?(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y)):2===k&&Wa(b.x,this.l(0).x)&&Wa(b.y,this.l(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));N(l,e.x-c,e.y-d,h.x-c,h.y-d,m.x-c,m.y-d);f.set(h);e.set(a);b=m}}k=b.x;b=b.y;f=this.l(this.qa-1);0!==this.computeShortLength(!1)&&(f=Xr(this,f.copy(),!1,dd));k=.5*(k+f.x); -b=.5*(b+f.y);N(l,a.x-c,a.y-d,k-c,b-d,f.x-c,f.y-d)}else for(k=3;k=a&&(k=a-1),f=this.l(k-1),e=this.l(k),k===a-1&&0!==this.computeShortLength(!1)&&(e=Xr(this,e.copy(),!1,dd)),N(l,b.x-c,b.y-d,f.x-c,f.y-d,e.x-c,e.y-d);else{f=w.K();f.assign(this.l(0));k=1;for(e=0;k=a-1){if(!f.L(u))0!==this.computeShortLength(!1)&&(u=Xr(this,u.copy(),!1,dd)),$r(this,l,-c,-d,f,u,b);else if(0===e)for(k=1;kn.x?u.x-s:u.x+s,A=t.y>u.y?u.y+v:u.y-v,$r(this,k,h,m,n,new y(q,z),p),Qe(k,u.x+h,u.y+m,r+h,A+m),x.m(r,A))):J(n.x,u.x)&&J(u.y,t.y)?(s=this.computeCorner(),v=Math.min(s,Math.abs(u.y-n.y)/2),v=s=Math.min(v,Math.abs(t.x-u.x)/2),J(s,0)?($r(this,k,h,m,n,u, -p),x.assign(u)):(q=u.x,A=z=u.y,z=u.y>n.y?u.y-v:u.y+v,r=t.x>u.x?u.x+s:u.x-s,$r(this,k,h,m,n,new y(q,z),p),Qe(k,u.x+h,u.y+m,r+h,A+m),x.m(r,A))):($r(this,k,h,m,n,u,p),x.assign(u));k=e}w.v(f)}c=l.o;w.q(l)}else l=this.l(1).copy(),l.x-=c,l.y-=d,0!==this.computeShortLength(!0)&&(e=Xr(this,e,!0,f)),0!==this.computeShortLength(!1)&&(l=Xr(this,l,!1,f)),c=new Ce(Ge),c.ha=e.x,c.fa=e.y,c.C=l.x,c.D=l.y;return c}; -function Zr(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Wa(a,0)?b:Wa(b,0)?a:Math.sqrt(a*a+b*b)} -function Xr(a,b,c,d){var e=a.qa;if(2>e)return b;if(c){var f=a.l(1);c=f.x-d.x;d=f.y-d.y;f=Zr(b.x,b.y,c,d);if(0===f)return b;e=2===e?.5*f:f;a=a.computeShortLength(!0);a>e&&(a=e);c=a*(c-b.x)/f;a=a*(d-b.y)/f;b.x+=c;b.y+=a}else{f=a.l(e-2);c=f.x-d.x;d=f.y-d.y;f=Zr(b.x,b.y,c,d);if(0===f)return b;e=2===e?.5*f:f;a=a.computeShortLength(!1);a>e&&(a=e);c=a*(b.x-c)/f;a=a*(b.y-d)/f;b.x-=c;b.y-=a}return b} -function Yr(a,b,c,d){for(var e=a.qa,f=b;Wa(b.x,f.x)&&Wa(b.y,f.y);){if(c>=e)return e-1;f=a.l(c++)}if(!Wa(b.x,f.x)&&!Wa(b.y,f.y))return c-1;for(var h=f;Wa(b.x,f.x)&&Wa(f.x,h.x)&&(!d||(b.y>=f.y?f.y>=h.y:f.y<=h.y))||Wa(b.y,f.y)&&Wa(f.y,h.y)&&(!d||(b.x>=f.x?f.x>=h.x:f.x<=h.x));){if(c>=e)return e-1;h=a.l(c++)}return c-2} -function $r(a,b,c,d,e,f,h){if(!h&&Mr(a)){h=[];var k=0;a.isVisible()&&(k=as(a,e,f,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,f.x);else break;q=f.y-10+d;n=p+c;p=f.y+d;a.bf===lj?M(b,n,p,!1,!1):N(b,l,q,n,q,n,p)}else if(J(e.x,f.x))if(e.yp-10)m--,p=Math.max(q-5,f.y);else break;q=f.x-10+c;n=f.x+c;p+=d;a.bf===lj?M(b,n,p,!1,!1):N(b,q,l,q,p,n,p)}}b.lineTo(f.x+c,f.y+d)} -function as(a,b,c,d){var e=a.g;if(null===e||b.L(c))return 0;for(e=e.Px;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.zb.n,h=f.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,x)q&&!J(h,x)){n.x=u;n.y=q;n=!0;break a}}else if(!J(q,s)&&J(h,x)&&Math.min(q,s)h&&Math.min(u,t)p&&!J(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}w.v(k)}w.u(W,{Zt:"firstPickIndex"},function(){var a;2>=this.qa?a=0:((a=this.ac)||(a=this.computeSpot(!0)!==yb),a=a?1:0);return a});w.u(W,{Nx:"lastPickIndex"},function(){var a=this.qa;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.ac)||(b=this.computeSpot(!1)!==yb);a=b?a-2:a-1}return a});function Mr(a){a=a.bf;return a===kj||a===lj} -function Or(a,b){if(b||Mr(a)){var c=a.g;null===c||c.il.contains(a)||null===a.Aw||c.il.add(a,a.Aw)}}function nj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Pc){var d=c.g;if(null!==d)for(var e=!1,d=d.Px;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,h=!1,f=f.zb.n,k=f.length,l=0;la)return new Be(Fe);var b=!1,c=this.g;null!==c&&Lr(this)&&c.il.contains(this)&&null!==this.Aw&&(b=!0);var d=c=0,e=this.l(0).copy(),f=e.copy(),c=this.hd.n,h=this.computeCurve();if(h===sj&&3<=a&&!Wa(this.Cq,0))if(3===a)var k=this.l(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.l(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.ac)for(k=0;k=a&&(k=a-1),c=this.l(k), +f.x=Math.min(c.x,f.x),f.y=Math.min(c.y,f.y);c=f.x;d=f.y}else{for(k=0;kx?r>q?(u.x=v-A,u.y=q-A,t.x=v+s,t.y=q+s):(u.x=v-A,u.y=q+A,t.x=v+s,t.y=q-s):r>q?(u.x=v+A,u.y=q-A,t.x=v-s,t.y=q+s):(u.x=v+A,u.y=q+A,t.x=v-s,t.y=q-s));Wa(x,v)&&Wa(q,r)&&(q>p?(z>v?(u.x= +v-A,u.y=q-A,t.x=v+s):(u.x=v+A,u.y=q-A,t.x=v-s),t.y=q+s):(z>v?(u.x=v-A,u.y=q+A,t.x=v+s):(u.x=v+A,u.y=q+A,t.x=v-s),t.y=q-s));if(Wa(x,v)&&Wa(v,z)||Wa(p,q)&&Wa(q,r))x=.5*(x+z),p=.5*(p+r),u.x=x,u.y=p,t.x=x,t.y=p;1===k?(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y)):2===k&&Wa(b.x,this.l(0).x)&&Wa(b.y,this.l(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));N(l,e.x-c,e.y-d,h.x-c,h.y-d,m.x-c,m.y-d);f.set(h);e.set(a);b=m}}k=b.x;b=b.y;f=this.l(this.qa-1);0!==this.computeShortLength(!1)&&(f=Wr(this,f.copy(),!1,cd));k=.5*(k+f.x); +b=.5*(b+f.y);N(l,a.x-c,a.y-d,k-c,b-d,f.x-c,f.y-d)}else for(k=3;k=a&&(k=a-1),f=this.l(k-1),e=this.l(k),k===a-1&&0!==this.computeShortLength(!1)&&(e=Wr(this,e.copy(),!1,cd)),N(l,b.x-c,b.y-d,f.x-c,f.y-d,e.x-c,e.y-d);else{f=w.K();f.assign(this.l(0));k=1;for(e=0;k=a-1){if(!f.L(u))0!==this.computeShortLength(!1)&&(u=Wr(this,u.copy(),!1,cd)),Zr(this,l,-c,-d,f,u,b);else if(0===e)for(k=1;kn.x?u.x-s:u.x+s,A=t.y>u.y?u.y+v:u.y-v,Zr(this,k,h,m,n,new y(q,z),p),Pe(k,u.x+h,u.y+m,r+h,A+m),x.m(r,A))):J(n.x,u.x)&&J(u.y,t.y)?(s=this.computeCorner(),v=Math.min(s,Math.abs(u.y-n.y)/2),v=s=Math.min(v,Math.abs(t.x-u.x)/2),J(s,0)?(Zr(this,k,h,m,n,u, +p),x.assign(u)):(q=u.x,A=z=u.y,z=u.y>n.y?u.y-v:u.y+v,r=t.x>u.x?u.x+s:u.x-s,Zr(this,k,h,m,n,new y(q,z),p),Pe(k,u.x+h,u.y+m,r+h,A+m),x.m(r,A))):(Zr(this,k,h,m,n,u,p),x.assign(u));k=e}w.v(f)}c=l.o;w.q(l)}else l=this.l(1).copy(),l.x-=c,l.y-=d,0!==this.computeShortLength(!0)&&(e=Wr(this,e,!0,f)),0!==this.computeShortLength(!1)&&(l=Wr(this,l,!1,f)),c=new Be(Fe),c.ha=e.x,c.fa=e.y,c.C=l.x,c.D=l.y;return c}; +function Yr(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Wa(a,0)?b:Wa(b,0)?a:Math.sqrt(a*a+b*b)} +function Wr(a,b,c,d){var e=a.qa;if(2>e)return b;if(c){var f=a.l(1);c=f.x-d.x;d=f.y-d.y;f=Yr(b.x,b.y,c,d);if(0===f)return b;e=2===e?.5*f:f;a=a.computeShortLength(!0);a>e&&(a=e);c=a*(c-b.x)/f;a=a*(d-b.y)/f;b.x+=c;b.y+=a}else{f=a.l(e-2);c=f.x-d.x;d=f.y-d.y;f=Yr(b.x,b.y,c,d);if(0===f)return b;e=2===e?.5*f:f;a=a.computeShortLength(!1);a>e&&(a=e);c=a*(b.x-c)/f;a=a*(b.y-d)/f;b.x-=c;b.y-=a}return b} +function Xr(a,b,c,d){for(var e=a.qa,f=b;Wa(b.x,f.x)&&Wa(b.y,f.y);){if(c>=e)return e-1;f=a.l(c++)}if(!Wa(b.x,f.x)&&!Wa(b.y,f.y))return c-1;for(var h=f;Wa(b.x,f.x)&&Wa(f.x,h.x)&&(!d||(b.y>=f.y?f.y>=h.y:f.y<=h.y))||Wa(b.y,f.y)&&Wa(f.y,h.y)&&(!d||(b.x>=f.x?f.x>=h.x:f.x<=h.x));){if(c>=e)return e-1;h=a.l(c++)}return c-2} +function Zr(a,b,c,d,e,f,h){if(!h&&Lr(a)){h=[];var k=0;a.isVisible()&&(k=$r(a,e,f,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,f.x);else break;q=f.y-10+d;n=p+c;p=f.y+d;a.bf===kj?M(b,n,p,!1,!1):N(b,l,q,n,q,n,p)}else if(J(e.x,f.x))if(e.yp-10)m--,p=Math.max(q-5,f.y);else break;q=f.x-10+c;n=f.x+c;p+=d;a.bf===kj?M(b,n,p,!1,!1):N(b,q,l,q,p,n,p)}}b.lineTo(f.x+c,f.y+d)} +function $r(a,b,c,d){var e=a.g;if(null===e||b.L(c))return 0;for(e=e.Px;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.zb.n,h=f.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,x)q&&!J(h,x)){n.x=u;n.y=q;n=!0;break a}}else if(!J(q,s)&&J(h,x)&&Math.min(q,s)h&&Math.min(u,t)p&&!J(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}w.v(k)}w.u(W,{Zt:"firstPickIndex"},function(){var a;2>=this.qa?a=0:((a=this.ac)||(a=this.computeSpot(!0)!==yb),a=a?1:0);return a});w.u(W,{Nx:"lastPickIndex"},function(){var a=this.qa;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.ac)||(b=this.computeSpot(!1)!==yb);a=b?a-2:a-1}return a});function Lr(a){a=a.bf;return a===jj||a===kj} +function Nr(a,b){if(b||Lr(a)){var c=a.g;null===c||c.il.contains(a)||null===a.Aw||c.il.add(a,a.Aw)}}function mj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Pc){var d=c.g;if(null!==d)for(var e=!1,d=d.Px;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,h=!1,f=f.zb.n,k=f.length,l=0;l=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Ag=Math.floor((a.x-this.De)/this.De)*this.De;this.Bg=Math.floor((b-this.Ee)/this.Ee)*this.Ee;this.ms=Math.ceil((c+2*this.De)/this.De)*this.De;this.ns=Math.ceil((d+2*this.Ee)/this.Ee)*this.Ee;a=1+(Math.ceil((this.ms-this.Ag)/this.De)|0);b=1+(Math.ceil((this.ns-this.Bg)/this.Ee)|0);if(null===this.qd||this.ypthis.ms||a+cthis.ns||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.yp)|0;for(c=Math.min(b+e-1,this.zp)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.qd[a][e])return!1;return!0}; -function ds(a,b,c,d,e,f,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.qd[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;f<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.qd[m][n]);)a.qd[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)ds(a,b,c,1,!e,f,h,k,l),ds(a,b,c,-1,!e,f,h,k,l);else if(0m;b+=d)ds(a,b,c,1,!e,f,h,k,l),ds(a,b,c,-1,!e,f,h, -k,l)}}function es(a,b,c,d,e,f,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.qd[b][c]=n;0===m&&b>f&&bk&&cf&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=f.x,m=f.y,n=f.x+f.width,p=f.y+f.height,l=l-a.Ag,l=l/a.De,m=m-a.Bg,m=m/a.Ee,n=n-a.Ag,n=n/a.De,p=p-a.Bg,p=p/a.Ee;f=Math.max(0,Math.min(a.yp,l|0));n=Math.min(a.yp,Math.max(0,n|0));m=Math.max(0,Math.min(a.zp,m|0));p=Math.min(a.zp,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| -90===c?1:-1;c=90===c||270===c;0===a.qd[h][k]?(es(a,h,k,l,c,f,n,m,p),es(a,h,k,1,!c,f,n,m,p),es(a,h,k,-1,!c,f,n,m,p)):es(a,h,k,l,c,h,k,h,k);0===a.qd[b][d]?(fs(a,b,d,0===e||90===e?1:-1,90===e||270===e,f,n,m,p),fs(a,b,d,1,!(90===e||270===e),f,n,m,p),fs(a,b,d,-1,!(90===e||270===e),f,n,m,p)):fs(a,b,d,l,c,b,d,b,d);a.abort||(ds(a,h,k,1,!1,f,n,m,p),ds(a,h,k,-1,!1,f,n,m,p),ds(a,h,k,1,!0,f,n,m,p),ds(a,h,k,-1,!0,f,n,m,p))}}}function Rr(){w.oc(this);this.port=this.Qc=null;this.fg=[];this.jq=!1} -w.be(Rr,{Qc:!0,port:!0,fg:!0,jq:!0});Rr.prototype.toString=function(){for(var a=this.fg,b=this.Qc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Tc|w.od:return c>a&&c<=180+a?180:270;case w.od|w.fd:return c>180-a&&c<=360-a?270:0;case w.fd|w.ed:return c>a&&c<=180+a?90:0;case w.ed|w.Tc:return c>180-a&&c<=360-a?180:90;case w.Tc|w.od|w.fd:return 90180+a&&c<=360- -a?270:0;case w.od|w.fd|w.ed:return 180a&&180>=c?90:0;case w.fd|w.ed|w.Tc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.ed|w.Tc|w.od:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Tc|w.od|w.fd|w.ed)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Rr.prototype.$p=function(){this.fg.length=0}; -function Sr(a,b){var c=a.fg;if(0===c.length){a:if(!a.jq){c=a.jq;a.jq=!0;var d,e=null,f=a.Qc,f=f instanceof V?f:null;if(null===f||f.ad)d=a.Qc.ZE(a.port.Vd);else{if(!f.Y.I()){a.jq=c;break a}e=f;d=e.YE()}var h=a.fg.length=0,k=a.port.Wa(zb,w.K()),l=a.port.Wa(Sb,w.K()),f=w.lg(k.x,k.y,0,0);f.vi(l);w.v(k);w.v(l);k=w.xb(f.x+f.width/2,f.y+f.height/2);l=a.port.Wl();for(d=d.i;d.next();){var m=d.value;if(m.isVisible()&&m.lc!==m.Ic){var n=m.lc===a.port||m.W.oi(e),p=m.computeSpot(n,a.port);if(p.xj()&&(n=n?m.Ic: -m.lc,null!==n)){var q=n.U;if(null!==q){var r=q.findVisibleNode();null!==r&&r!==q&&(q=r,n=q.port);n=m.computeOtherPoint(q,n);q=k.Pb(n);q-=l;0>q&&(q+=360);p=gs(f,p,q,m.ac);r=0;0===p?(r=w.fd,180Math.abs(E)?(z=Math.abs(E)/q,q=Math.abs(E)):z=1;break;case w.Tc:r>Math.abs(L)?(z=Math.abs(L)/r,r=Math.abs(L)):z=1;break;case w.od:p>Math.abs(E)?(z=Math.abs(E)/p,p=Math.abs(E)):z=1;break;default:case w.fd:n>Math.abs(L)?(z=Math.abs(L)/n,n=Math.abs(L)):z=1}v=0}var P=u.hq;if(e===sr){t=u.link.computeThickness();t*=z;P.set(A);switch(x){case w.ed:P.x=A.x+E/2+q/2-v-t/2;break;case w.Tc:P.y=A.y+L/2+r/2-v-t/2;break;case w.od:P.x= -A.x+E/2-p/2+v+t/2;break;default:case w.fd:P.y=A.y+L/2-n/2+v+t/2}v+=t}else t=.5,e===pr&&(t=(u.Yp+1)/(u.tn+1)),P.x=A.x+E*t,P.y=A.y+L*t}w.v(k);w.v(l);w.v(d);w.v(m);A=a.fg;for(E=0;Eb.ze?1:a.angleb.angle?1:0}; -Rr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Qc,this.port,yb,b.lc===this.port),d=a.Yp;if(0>d)return c;var e=a.tn;if(1>=e||!b.ac)return c;var b=a.Zx,f=a.hq;if(a.ze===w.Tc||a.ze===w.ed)d=e-1-d;return((a=a.ze===w.Tc||a.ze===w.fd)?b.y=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Ag=Math.floor((a.x-this.De)/this.De)*this.De;this.Bg=Math.floor((b-this.Ee)/this.Ee)*this.Ee;this.ms=Math.ceil((c+2*this.De)/this.De)*this.De;this.ns=Math.ceil((d+2*this.Ee)/this.Ee)*this.Ee;a=1+(Math.ceil((this.ms-this.Ag)/this.De)|0);b=1+(Math.ceil((this.ns-this.Bg)/this.Ee)|0);if(null===this.qd||this.ypthis.ms||a+cthis.ns||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.yp)|0;for(c=Math.min(b+e-1,this.zp)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.qd[a][e])return!1;return!0}; +function cs(a,b,c,d,e,f,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.qd[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;f<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.qd[m][n]);)a.qd[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)cs(a,b,c,1,!e,f,h,k,l),cs(a,b,c,-1,!e,f,h,k,l);else if(0m;b+=d)cs(a,b,c,1,!e,f,h,k,l),cs(a,b,c,-1,!e,f,h, +k,l)}}function ds(a,b,c,d,e,f,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.qd[b][c]=n;0===m&&b>f&&bk&&cf&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=f.x,m=f.y,n=f.x+f.width,p=f.y+f.height,l=l-a.Ag,l=l/a.De,m=m-a.Bg,m=m/a.Ee,n=n-a.Ag,n=n/a.De,p=p-a.Bg,p=p/a.Ee;f=Math.max(0,Math.min(a.yp,l|0));n=Math.min(a.yp,Math.max(0,n|0));m=Math.max(0,Math.min(a.zp,m|0));p=Math.min(a.zp,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| +90===c?1:-1;c=90===c||270===c;0===a.qd[h][k]?(ds(a,h,k,l,c,f,n,m,p),ds(a,h,k,1,!c,f,n,m,p),ds(a,h,k,-1,!c,f,n,m,p)):ds(a,h,k,l,c,h,k,h,k);0===a.qd[b][d]?(es(a,b,d,0===e||90===e?1:-1,90===e||270===e,f,n,m,p),es(a,b,d,1,!(90===e||270===e),f,n,m,p),es(a,b,d,-1,!(90===e||270===e),f,n,m,p)):es(a,b,d,l,c,b,d,b,d);a.abort||(cs(a,h,k,1,!1,f,n,m,p),cs(a,h,k,-1,!1,f,n,m,p),cs(a,h,k,1,!0,f,n,m,p),cs(a,h,k,-1,!0,f,n,m,p))}}}function Qr(){w.oc(this);this.port=this.Qc=null;this.fg=[];this.jq=!1} +w.be(Qr,{Qc:!0,port:!0,fg:!0,jq:!0});Qr.prototype.toString=function(){for(var a=this.fg,b=this.Qc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Tc|w.od:return c>a&&c<=180+a?180:270;case w.od|w.fd:return c>180-a&&c<=360-a?270:0;case w.fd|w.ed:return c>a&&c<=180+a?90:0;case w.ed|w.Tc:return c>180-a&&c<=360-a?180:90;case w.Tc|w.od|w.fd:return 90180+a&&c<=360- +a?270:0;case w.od|w.fd|w.ed:return 180a&&180>=c?90:0;case w.fd|w.ed|w.Tc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.ed|w.Tc|w.od:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Tc|w.od|w.fd|w.ed)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Qr.prototype.$p=function(){this.fg.length=0}; +function Rr(a,b){var c=a.fg;if(0===c.length){a:if(!a.jq){c=a.jq;a.jq=!0;var d,e=null,f=a.Qc,f=f instanceof V?f:null;if(null===f||f.ad)d=a.Qc.ZE(a.port.Vd);else{if(!f.Y.I()){a.jq=c;break a}e=f;d=e.YE()}var h=a.fg.length=0,k=a.port.Wa(zb,w.K()),l=a.port.Wa(Sb,w.K()),f=w.lg(k.x,k.y,0,0);f.vi(l);w.v(k);w.v(l);k=w.xb(f.x+f.width/2,f.y+f.height/2);l=a.port.Wl();for(d=d.i;d.next();){var m=d.value;if(m.isVisible()&&m.lc!==m.Ic){var n=m.lc===a.port||m.W.oi(e),p=m.computeSpot(n,a.port);if(p.xj()&&(n=n?m.Ic: +m.lc,null!==n)){var q=n.U;if(null!==q){var r=q.findVisibleNode();null!==r&&r!==q&&(q=r,n=q.port);n=m.computeOtherPoint(q,n);q=k.Pb(n);q-=l;0>q&&(q+=360);p=fs(f,p,q,m.ac);r=0;0===p?(r=w.fd,180Math.abs(E)?(z=Math.abs(E)/q,q=Math.abs(E)):z=1;break;case w.Tc:r>Math.abs(L)?(z=Math.abs(L)/r,r=Math.abs(L)):z=1;break;case w.od:p>Math.abs(E)?(z=Math.abs(E)/p,p=Math.abs(E)):z=1;break;default:case w.fd:n>Math.abs(L)?(z=Math.abs(L)/n,n=Math.abs(L)):z=1}v=0}var P=u.hq;if(e===rr){t=u.link.computeThickness();t*=z;P.set(A);switch(x){case w.ed:P.x=A.x+E/2+q/2-v-t/2;break;case w.Tc:P.y=A.y+L/2+r/2-v-t/2;break;case w.od:P.x= +A.x+E/2-p/2+v+t/2;break;default:case w.fd:P.y=A.y+L/2-n/2+v+t/2}v+=t}else t=.5,e===or&&(t=(u.Yp+1)/(u.tn+1)),P.x=A.x+E*t,P.y=A.y+L*t}w.v(k);w.v(l);w.v(d);w.v(m);A=a.fg;for(E=0;Eb.ze?1:a.angleb.angle?1:0}; +Qr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Qc,this.port,yb,b.lc===this.port),d=a.Yp;if(0>d)return c;var e=a.tn;if(1>=e||!b.ac)return c;var b=a.Zx,f=a.hq;if(a.ze===w.Tc||a.ze===w.ed)d=e-1-d;return((a=a.ze===w.Tc||a.ze===w.fd)?b.ye&&(e=k.right);k.bottom>f&&(f=k.bottom)}}isFinite(c)&&isFinite(d)?a.m(c,d,e-c,f-d):(b=b.location,c=this.padding,a.m(b.x+c.left,b.y+c.top,0,0));return a}; -w.defineProperty(Pj,{padding:"padding"},function(){return this.nf},function(a){"number"===typeof a?a=new hb(a):w.G(a,hb,Pj,"padding");var b=this.nf;b.L(a)||(this.nf=a=a.S(),this.h("padding",b,a))});function tg(){0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.Yc("Layout")}this.tf=!0};tg.prototype.Sn=function(a){return!a.location.I()||a instanceof V&&a.Sn?!0:!1}; -function ks(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.dq||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof T?l.Cf||(l instanceof V?null===l.Tb?ks(a,b,l.vc,!1,e,f,h,k):(ls(l),b.add(l)):(ls(l),b.add(l))):h&&l instanceof W?b.add(l):!k||!l.fe()||l instanceof T||(ls(l),b.add(l)))}}function ls(a){var b=a.Y;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.cf()} -tg.prototype.collectParts=tg.prototype.vH=function(a){var b=new I(R);a instanceof D?(ks(this,b,a.ig,!0,null,!0,!0,!0),ks(this,b,a.links,!0,null,!0,!0,!0),ks(this,b,a.Qk,!0,null,!0,!0,!0)):a instanceof V?ks(this,b,a.vc,!1,null,!0,!0,!0):ks(this,b,a.i,!1,null,!0,!0,!0);return b};w.defineProperty(tg,{Nd:"arrangementOrigin"},function(){return this.Rq},function(a){w.G(a,y,tg,"arrangementOrigin");this.Rq.L(a)||(this.Rq.assign(a),this.J())}); -tg.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.Wa(zb),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; -function ug(){w.oc(this);this.le=null;if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new I(ms);this.edges=new I(ns);this.Wx=new ma(T,ms);this.Rx=new ma(W,ns)}w.ga("LayoutNetwork",ug); -ug.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new I(ms);this.edges=new I(ns);this.Wx=new ma(T,ms);this.Rx=new ma(W,ns)}; -ug.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Tb?"("+this.Tb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; -ms.smartComparer=function(a,b){if(null!==a){if(null!==b){var c=a.vd,d=b.vd;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=f&&0>=h&&(f=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Hb("Layout");d=[];switch(this.alignment){case Bs:var k=a,l=c,m=Math.max(this.Gp.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0h)d.push(new B(0,x,h+k,z)),v=0,t=u,x+=z,z=0;z=Math.max(z,L);L=0;switch(s){case As:L=-q.width;break;default:L=0}p.moveTo(t+L,x);switch(s){case As:t-=A;break; -default:t+=A}v++}d.push(new B(0,x,h+k,z));break;case ts:k=f;l=a;m=c;n=Math.max(this.Gp.width,1);p=x=A=0;q=w.K();for(f=0;f=A&&(h-=A);for(var A=L=0,E=Math.max(this.Gp.height,1),$=p=0,S=!0,ba=w.K(),f=0;fk-1||0h){d.push(new B(0,S?v-p:v,h+l,$+p+m));for(P=0;PA&&(e.width+=e.x-A,e.x=A)}for(k=f=h=e=0;kd?1:0}; -Pn.smartComparer=function(a,b){if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.la=0,a.ra=0);else{var b=new H(Us);b.Nc(a.i);a=new H(Us);var c=new H(Us),d;d=this.sort(b);var e=this.hz,f=this.UC,h=this.Gd,k=this.Bo,l=this.iz,m=this.zr,b=this.jl,n=this.iE,p=this.Uf,q=this.wv, -e=this.Vf,f=this.Vx,h=this.lJ;if(!isFinite(h)||0>=h)h=NaN;k=this.pH;if(!isFinite(k)||0>=k)k=1;l=this.Ae;isFinite(l)||(l=0);m=this.vf;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Rs&&f===Ss?e=Ds:e===Rs&&f!==Ss&&(f=Ss,e=this.Vf);if((this.direction===Ms||this.direction===Ns)&&this.sorting!==Gs){for(var r=0;!(r>=d.length);r+=2){a.add(d.ea(r));if(r+1>=d.length)break;c.add(d.ea(r+1))}this.direction===Ms?(this.Vf===Rs&&a.reverse(),d=new H(Us),d.Nc(a),d.Nc(c)):(this.Vf===Rs&& -c.reverse(),d=new H(Us),d.Nc(c),d.Nc(a))}for(var s=d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Rs){isNaN(b)&&(b=6);if(e!==Ds&&e!==Rs){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.hz=e;this.UC=f;this.Gd=h;this.Bo=k;this.iz=l;this.zr=m;this.jl=b;this.iE=n;this.Uf=p;this.wv=q;b=d;d=this.hz;e=this.Gd;f=this.iz;k=this.zr;l=this.jl;m=this.Uf;n=this.wv;if(this.direction!==Ms&&this.direction!==Ns||d!==Rs)if(this.direction===Ms||this.direction===Ns){h=0;switch(d){case Qs:h=180*Ys(this,e,m,f,n)/Math.PI;break;case Ds:n=b=0;h=a.first();null!==h&&(b=Vs(h,Math.PI/2));h=c.first();null!== -h&&(n=Vs(h,Math.PI/2));h=180*Ys(this,e,m,f,l+(b+n)/2)/Math.PI;break;case Ps:h=k/b.length}if(this.direction===Ms){switch(d){case Qs:Zs(this,a,f,Os);break;case Ds:$s(this,a,f,Os);break;case Ps:at(this,a,k/2,f,Os)}switch(d){case Qs:Zs(this,c,f+h,Fs);break;case Ds:$s(this,c,f+h,Fs);break;case Ps:at(this,c,k/2,f+h,Fs)}}else{switch(d){case Qs:Zs(this,c,f,Os);break;case Ds:$s(this,c,f,Os);break;case Ps:at(this,c,k/2,f,Os)}switch(d){case Qs:Zs(this,a,f+h,Fs);break;case Ds:$s(this,a,f+h,Fs);break;case Ps:at(this, -a,k/2,f+h,Fs)}}}else switch(d){case Qs:Zs(this,b,f,this.direction);break;case Ds:$s(this,b,f,this.direction);break;case Ps:at(this,b,k,f,this.direction);break;case Rs:bt(this,b,k,f,this.direction)}else bt(this,b,k,f-k/2,Fs)}this.updateParts();this.network=null;this.tf=!0}; -function at(a,b,c,d,e){var f=a.zr,h=a.Gd;a=a.Uf;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(f=d+(e===Fs?f:-f);0>f;)f+=360;f%=360;180=n.length-1)break;et(a,l,m,n,p,e,f)||ft(a,l,m,n,p,e,f);l=f.x;m=f.y}w.v(f);a.Tm++;if(!(23Math.abs(r)?Math.abs(l-f)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(f)>Math.abs(p)?0p:0a.Tm?a.Gd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;et(a,l,m,p,q,e,n)||ft(a,l,m,p,q,e,n);l=n.x;m=n.y}w.v(n);a.Tm++;if(!(23a.Tm?a.Gd-f/(2*Math.PI):a.Gd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} -function ft(a,b,c,d,e,f,h){var k=a.Gd,l=a.Uf,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.jl;d=!1;if(0<=b!==(f===Fs)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Cs.prototype.commitLayout=function(){this.commitNodes();this.vu&&this.commitLinks()}; -Cs.prototype.commitNodes=function(){var a=this.hH,b=null!==this.group&&null!==this.group.placeholder&&this.group.ad,c=b?this.group.location.copy():null;b?a=new y(0,0):(a.x=this.Nd.x+this.Gd,a.y=this.Nd.y+this.Uf);for(var d=this.network.vertexes.i;d.next();){var e=d.value;e.x+=a.x;e.y+=a.y;e.commit()}b&&(this.group.cf(),a=this.group.position.copy(),b=this.group.location.copy(),c=c.Hj(b.Hj(a)),this.group.move(c),this.eC=c.Hj(a))};Cs.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()}; -function Xs(a,b,c,d,e){var f=a.ZG;if(.001>Math.abs(a.Bo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),l=0,m=0;m<=f;m++)l=void 0!==d&&void 0!==e?d+m*e/f:m*Math.PI/(2*f),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function Ws(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Xs(a,1,c,d,e):Xs(a,1,c);return b/f} -function Ys(a,b,c,d,e){if(.001>Math.abs(a.Bo-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-f*f*l*l)*a;if(h>=e)return k*a}} -Cs.prototype.sort=function(a){switch(this.sorting){case Ks:break;case Ls:a.reverse();break;case Is:a.sort(this.comparer);break;case Js:a.sort(this.comparer);a.reverse();break;case Gs:for(var b=[],c=0;ce&&(e=k,f=h)}else for(h=0;he&&(e=k,f=h);d.add(a.ea(f));b[f]=-1;f=a.ea(f);e=0;for(h=f.nc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& -b[e]++;for(f=f.kc;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(f=0;fa[f].indexOf(l)&&a[f].push(l);for(b=b.nc;b.next();)l=d.indexOf(b.value.fromVertex),l!==f&&0>a[f].indexOf(l)&&a[f].push(l)}h=[];for(f=0;fe&&(e=k.right);k.bottom>f&&(f=k.bottom)}}isFinite(c)&&isFinite(d)?a.m(c,d,e-c,f-d):(b=b.location,c=this.padding,a.m(b.x+c.left,b.y+c.top,0,0));return a}; +w.defineProperty(Oj,{padding:"padding"},function(){return this.nf},function(a){"number"===typeof a?a=new hb(a):w.G(a,hb,Oj,"padding");var b=this.nf;b.L(a)||(this.nf=a=a.S(),this.h("padding",b,a))});function sg(){0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.Yc("Layout")}this.tf=!0};sg.prototype.Sn=function(a){return!a.location.I()||a instanceof V&&a.Sn?!0:!1}; +function js(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.dq||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof T?l.Cf||(l instanceof V?null===l.Tb?js(a,b,l.vc,!1,e,f,h,k):(ks(l),b.add(l)):(ks(l),b.add(l))):h&&l instanceof W?b.add(l):!k||!l.fe()||l instanceof T||(ks(l),b.add(l)))}}function ks(a){var b=a.Y;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.cf()} +sg.prototype.collectParts=sg.prototype.vH=function(a){var b=new I(R);a instanceof D?(js(this,b,a.ig,!0,null,!0,!0,!0),js(this,b,a.links,!0,null,!0,!0,!0),js(this,b,a.Qk,!0,null,!0,!0,!0)):a instanceof V?js(this,b,a.vc,!1,null,!0,!0,!0):js(this,b,a.i,!1,null,!0,!0,!0);return b};w.defineProperty(sg,{Nd:"arrangementOrigin"},function(){return this.Rq},function(a){w.G(a,y,sg,"arrangementOrigin");this.Rq.L(a)||(this.Rq.assign(a),this.J())}); +sg.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.Wa(zb),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; +function tg(){w.oc(this);this.le=null;if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new I(ls);this.edges=new I(ms);this.Wx=new ma(T,ls);this.Rx=new ma(W,ms)}w.ga("LayoutNetwork",tg); +tg.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new I(ls);this.edges=new I(ms);this.Wx=new ma(T,ls);this.Rx=new ma(W,ms)}; +tg.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Tb?"("+this.Tb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; +ls.smartComparer=function(a,b){if(null!==a){if(null!==b){var c=a.vd,d=b.vd;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=f&&0>=h&&(f=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Hb("Layout");d=[];switch(this.alignment){case As:var k=a,l=c,m=Math.max(this.Gp.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0h)d.push(new B(0,x,h+k,z)),v=0,t=u,x+=z,z=0;z=Math.max(z,L);L=0;switch(s){case zs:L=-q.width;break;default:L=0}p.moveTo(t+L,x);switch(s){case zs:t-=A;break; +default:t+=A}v++}d.push(new B(0,x,h+k,z));break;case ss:k=f;l=a;m=c;n=Math.max(this.Gp.width,1);p=x=A=0;q=w.K();for(f=0;f=A&&(h-=A);for(var A=L=0,E=Math.max(this.Gp.height,1),$=p=0,S=!0,ba=w.K(),f=0;fk-1||0h){d.push(new B(0,S?v-p:v,h+l,$+p+m));for(P=0;PA&&(e.width+=e.x-A,e.x=A)}for(k=f=h=e=0;kd?1:0}; +On.smartComparer=function(a,b){if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.la=0,a.ra=0);else{var b=new H(Ts);b.Nc(a.i);a=new H(Ts);var c=new H(Ts),d;d=this.sort(b);var e=this.hz,f=this.UC,h=this.Gd,k=this.Bo,l=this.iz,m=this.zr,b=this.jl,n=this.iE,p=this.Uf,q=this.wv, +e=this.Vf,f=this.Vx,h=this.lJ;if(!isFinite(h)||0>=h)h=NaN;k=this.pH;if(!isFinite(k)||0>=k)k=1;l=this.Ae;isFinite(l)||(l=0);m=this.vf;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Qs&&f===Rs?e=Cs:e===Qs&&f!==Rs&&(f=Rs,e=this.Vf);if((this.direction===Ls||this.direction===Ms)&&this.sorting!==Fs){for(var r=0;!(r>=d.length);r+=2){a.add(d.ea(r));if(r+1>=d.length)break;c.add(d.ea(r+1))}this.direction===Ls?(this.Vf===Qs&&a.reverse(),d=new H(Ts),d.Nc(a),d.Nc(c)):(this.Vf===Qs&& +c.reverse(),d=new H(Ts),d.Nc(c),d.Nc(a))}for(var s=d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Qs){isNaN(b)&&(b=6);if(e!==Cs&&e!==Qs){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.hz=e;this.UC=f;this.Gd=h;this.Bo=k;this.iz=l;this.zr=m;this.jl=b;this.iE=n;this.Uf=p;this.wv=q;b=d;d=this.hz;e=this.Gd;f=this.iz;k=this.zr;l=this.jl;m=this.Uf;n=this.wv;if(this.direction!==Ls&&this.direction!==Ms||d!==Qs)if(this.direction===Ls||this.direction===Ms){h=0;switch(d){case Ps:h=180*Xs(this,e,m,f,n)/Math.PI;break;case Cs:n=b=0;h=a.first();null!==h&&(b=Us(h,Math.PI/2));h=c.first();null!== +h&&(n=Us(h,Math.PI/2));h=180*Xs(this,e,m,f,l+(b+n)/2)/Math.PI;break;case Os:h=k/b.length}if(this.direction===Ls){switch(d){case Ps:Ys(this,a,f,Ns);break;case Cs:Zs(this,a,f,Ns);break;case Os:$s(this,a,k/2,f,Ns)}switch(d){case Ps:Ys(this,c,f+h,Es);break;case Cs:Zs(this,c,f+h,Es);break;case Os:$s(this,c,k/2,f+h,Es)}}else{switch(d){case Ps:Ys(this,c,f,Ns);break;case Cs:Zs(this,c,f,Ns);break;case Os:$s(this,c,k/2,f,Ns)}switch(d){case Ps:Ys(this,a,f+h,Es);break;case Cs:Zs(this,a,f+h,Es);break;case Os:$s(this, +a,k/2,f+h,Es)}}}else switch(d){case Ps:Ys(this,b,f,this.direction);break;case Cs:Zs(this,b,f,this.direction);break;case Os:$s(this,b,k,f,this.direction);break;case Qs:at(this,b,k,f,this.direction)}else at(this,b,k,f-k/2,Es)}this.updateParts();this.network=null;this.tf=!0}; +function $s(a,b,c,d,e){var f=a.zr,h=a.Gd;a=a.Uf;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(f=d+(e===Es?f:-f);0>f;)f+=360;f%=360;180=n.length-1)break;dt(a,l,m,n,p,e,f)||et(a,l,m,n,p,e,f);l=f.x;m=f.y}w.v(f);a.Tm++;if(!(23Math.abs(r)?Math.abs(l-f)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(f)>Math.abs(p)?0p:0a.Tm?a.Gd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;dt(a,l,m,p,q,e,n)||et(a,l,m,p,q,e,n);l=n.x;m=n.y}w.v(n);a.Tm++;if(!(23a.Tm?a.Gd-f/(2*Math.PI):a.Gd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} +function et(a,b,c,d,e,f,h){var k=a.Gd,l=a.Uf,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.jl;d=!1;if(0<=b!==(f===Es)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Bs.prototype.commitLayout=function(){this.commitNodes();this.vu&&this.commitLinks()}; +Bs.prototype.commitNodes=function(){var a=this.hH,b=null!==this.group&&null!==this.group.placeholder&&this.group.ad,c=b?this.group.location.copy():null;b?a=new y(0,0):(a.x=this.Nd.x+this.Gd,a.y=this.Nd.y+this.Uf);for(var d=this.network.vertexes.i;d.next();){var e=d.value;e.x+=a.x;e.y+=a.y;e.commit()}b&&(this.group.cf(),a=this.group.position.copy(),b=this.group.location.copy(),c=c.Hj(b.Hj(a)),this.group.move(c),this.eC=c.Hj(a))};Bs.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()}; +function Ws(a,b,c,d,e){var f=a.ZG;if(.001>Math.abs(a.Bo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),l=0,m=0;m<=f;m++)l=void 0!==d&&void 0!==e?d+m*e/f:m*Math.PI/(2*f),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function Vs(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Ws(a,1,c,d,e):Ws(a,1,c);return b/f} +function Xs(a,b,c,d,e){if(.001>Math.abs(a.Bo-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-f*f*l*l)*a;if(h>=e)return k*a}} +Bs.prototype.sort=function(a){switch(this.sorting){case Js:break;case Ks:a.reverse();break;case Hs:a.sort(this.comparer);break;case Is:a.sort(this.comparer);a.reverse();break;case Fs:for(var b=[],c=0;ce&&(e=k,f=h)}else for(h=0;he&&(e=k,f=h);d.add(a.ea(f));b[f]=-1;f=a.ea(f);e=0;for(h=f.nc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& +b[e]++;for(f=f.kc;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(f=0;fa[f].indexOf(l)&&a[f].push(l);for(b=b.nc;b.next();)l=d.indexOf(b.value.fromVertex),l!==f&&0>a[f].indexOf(l)&&a[f].push(l)}h=[];for(f=0;fa[b[p]].indexOf(b[p===b.length-1?0:p+1])&&u.push(p===b.length-1?0:p+1);if(0===u.length)for(p=0;pL.indexOf(S)||baL.indexOf(S)||ba< z[S]&&z[S]=t?l+1:l)),v+=l=t&&l++,A>=t&&A++,l>A&&(L=A,A=l,l=L),A-l<(b.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else f=!1;if(f)break;else b.push(c[0]),c.splice(0,1)}for(f=0;f=a?a:360,this.J())}); -w.defineProperty(Cs,{Vf:"arrangement"},function(){return this.pd},function(a){this.pd!==a&&(w.ob(a,Cs,Cs,"arrangement"),a===Rs||a===Ds||a===Qs||a===Ps)&&(this.pd=a,this.J())});w.defineProperty(Cs,{direction:"direction"},function(){return this.ba},function(a){this.ba!==a&&(w.ob(a,Cs,Cs,"direction"),a===Fs||a===Os||a===Ms||a===Ns)&&(this.ba=a,this.J())}); -w.defineProperty(Cs,{sorting:"sorting"},function(){return this.ci},function(a){this.ci!==a&&(w.ob(a,Cs,Cs,"sorting"),a===Ks||a===Ls||a===Is||Js||a===Gs)&&(this.ci=a,this.J())});w.defineProperty(Cs,{comparer:"comparer"},function(){return this.Mh},function(a){this.Mh!==a&&(w.j(a,"function",Cs,"comparer"),this.Mh=a,this.J())});w.defineProperty(Cs,{spacing:"spacing"},function(){return this.di},function(a){this.di!==a&&(w.j(a,"number",Cs,"spacing"),this.di=a,this.J())}); -w.defineProperty(Cs,{Vx:"nodeDiameterFormula"},function(){return this.Es},function(a){this.Es!==a&&(w.ob(a,Cs,Cs,"nodeDiameterFormula"),a===Hs||a===Ss)&&(this.Es=a,this.J())});w.u(Cs,{fK:"actualXRadius"},function(){return this.Gd});w.u(Cs,{gK:"actualYRadius"},function(){return this.Uf});w.u(Cs,{eK:"actualSpacing"},function(){return this.jl});w.u(Cs,{hH:"actualCenter"},function(){return this.eC});var Ds;Cs.ConstantSpacing=Ds=w.p(Cs,"ConstantSpacing",0);var Qs; -Cs.ConstantDistance=Qs=w.p(Cs,"ConstantDistance",1);var Ps;Cs.ConstantAngle=Ps=w.p(Cs,"ConstantAngle",2);var Rs;Cs.Packed=Rs=w.p(Cs,"Packed",3);var Fs;Cs.Clockwise=Fs=w.p(Cs,"Clockwise",4);var Os;Cs.Counterclockwise=Os=w.p(Cs,"Counterclockwise",5);var Ms;Cs.BidirectionalLeft=Ms=w.p(Cs,"BidirectionalLeft",6);var Ns;Cs.BidirectionalRight=Ns=w.p(Cs,"BidirectionalRight",7);var Ks;Cs.Forwards=Ks=w.p(Cs,"Forwards",8);var Ls;Cs.Reverse=Ls=w.p(Cs,"Reverse",9);var Is;Cs.Ascending=Is=w.p(Cs,"Ascending",10); -var Js;Cs.Descending=Js=w.p(Cs,"Descending",11);var Gs;Cs.Optimized=Gs=w.p(Cs,"Optimized",12);var Hs;Cs.Pythagorean=Hs=w.p(Cs,"Pythagorean",13);var Ss;Cs.Circular=Ss=w.p(Cs,"Circular",14);function Es(){this.Vp=-Infinity;this.Hq=this.eo=null}Es.prototype.compare=function(a,b){if(0this.Vp||Math.abs(a)a&&0f?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new y(n.x+n.width+d.width,n.y),l[1]=new y(n.x,n.y+n.height+d.height),f=2):(p=kt(l,f,e,k,n.width,n.height,d),q=l[p],r=new y(q.x+n.width+d.width, -q.y),s=new y(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().ab,d=this.network.vertexes.i;d.next();){if(d.value.ab.Zf(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Ig?a.Ig=new H(eu):a.Ig.clear();a.Ig.Nc(a.network.vertexes);var c=a.Ig;c.sort(function(a,b){return null===a||null===b||a===b?0:b.jg-a.jg});for(var d=c.count-1;0<=d&&1>=c.ea(d).jg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=Td((m+s+n*n*4/(h*h))/ -s);h=(m-1)*p/2;m=(m-1)*q/2;f.ab=new B(k-r.x-h,l-r.y-m,p+2*h,q+2*m);f.focus=new y(r.x+h,r.y+m)}a.network=d;return c}function du(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.Fh){var e=d.Fh.ea(d.rB);d.jg=e.Fy;var f=e.XB,h=e.YB;d.ab=new B(d.la-f,d.ra-h,e.Gy,e.Ey);d.focus=new y(f,h);d.rB--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} -function fu(a,b){var c=b.pn;if(null!==c&&0!==c.count){var d=b.la,e=b.ra,f=b.width,h=b.height;null!==b.Fh&&0=p.jg?l++:(k=!0,m++,h+=Math.atan2(b.ra-p.ra,b.la-p.la))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.la=d+p*Math.cos(q);l.ra=e+p*Math.sin(q);k++}}}function kt(a,b,c,d,e,f,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+f-k,e=e-l-h,Td(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,Td(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.la,e=d,f=c.ra,h=f,c=1;ch-f)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.la-b.la}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.ra-b.ra});for(var h=a.Mi,m=0,n=0,p=0,c=0;ch||p-d>h){if(f)break}else if(l-r>h||r-l>h){if(!f)break}else{var s=hu(k,e);1>s?(n=a.gy,null===n&&(a.gy=n=new sa(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.M.right-k.M.x),n=(1+n)*m):dr?(p=Math.abs(e.M.bottom-k.M.y),p=(1+p)*s):ds?(n=a.gy,null===n&&(a.gy=n=new sa(0)),m=n.random(),s= -n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=f.stiffness*(s-f.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=a.eJ;for(e=0;ed&&(f=d),h<-d?h=-d:h>d&&(h=d),k.la+=f,k.ra+=h,c=Math.max(c,f*f+h*h));return c>a.XE*a.XE}ht.prototype.moveFixedVertex=function(){}; -ht.prototype.commitLayout=function(){this.zB();this.commitNodes();this.vu&&this.commitLinks()};ht.prototype.zB=function(){if(this.Bq)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.Ab=qc,b.Bb=qc)}};ht.prototype.commitNodes=function(){var a=0,b=0;if(this.oH){var c=w.Kf();this.sh(this.network,c);b=this.Nd;a=b.x-c.x;b=b.y-c.y;w.Eb(c)}for(var c=w.Kf(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.ab),c.x+=a,c.y+=b,e.ab=c;e.commit()}w.Eb(c)}; -ht.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};ht.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.yo:a};ht.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.xo:a};ht.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.vo:a};ht.prototype.electricalFieldX=function(){return 0};ht.prototype.electricalFieldY=function(){return 0}; -ht.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.wo:a};ht.prototype.gravitationalFieldX=function(){return 0};ht.prototype.gravitationalFieldY=function(){return 0};ht.prototype.isFixed=function(a){return a.isFixed};w.u(ht,{NK:"currentIteration"},function(){return this.cs});w.defineProperty(ht,{CE:"arrangementSpacing"},function(){return this.ng},function(a){w.G(a,ia,ht,"arrangementSpacing");this.ng.L(a)||(this.ng.assign(a),this.J())}); -w.defineProperty(ht,{oH:"arrangesToOrigin"},function(){return this.Sq},function(a){this.Sq!==a&&(w.j(a,"boolean",ht,"arrangesToOrigin"),this.Sq=a,this.J())});w.defineProperty(ht,{Bq:"setsPortSpots"},function(){return this.bi},function(a){this.bi!==a&&(w.j(a,"boolean",ht,"setsPortSpots"),this.bi=a,this.J())});w.defineProperty(ht,{comments:"comments"},function(){return this.Lh},function(a){this.Lh!==a&&(w.j(a,"boolean",ht,"comments"),this.Lh=a,this.J())}); -w.defineProperty(ht,{ZA:"maxIterations"},function(){return this.Yo},function(a){this.Yo!==a&&(w.j(a,"number",ht,"maxIterations"),0<=a&&(this.Yo=a,this.J()))});w.defineProperty(ht,{XE:"epsilonDistance"},function(){return this.Cr},function(a){this.Cr!==a&&(w.j(a,"number",ht,"epsilonDistance"),0b.toVertex.index&&(a.my(b),b.rev=!0);break;case lu:for(d=this.network.vertexes.i;d.next();)a=d.value,a.Qp=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.As=0;for(d.reset();d.next();)b=d.value,0===b.nc.count&&vu(this,b);for(d.reset();d.next();)b=d.value,-1===b.Qp&&vu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Qpq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else f=!1;if(f)break;else b.push(c[0]),c.splice(0,1)}for(f=0;f=a?a:360,this.J())}); +w.defineProperty(Bs,{Vf:"arrangement"},function(){return this.pd},function(a){this.pd!==a&&(w.ob(a,Bs,Bs,"arrangement"),a===Qs||a===Cs||a===Ps||a===Os)&&(this.pd=a,this.J())});w.defineProperty(Bs,{direction:"direction"},function(){return this.ba},function(a){this.ba!==a&&(w.ob(a,Bs,Bs,"direction"),a===Es||a===Ns||a===Ls||a===Ms)&&(this.ba=a,this.J())}); +w.defineProperty(Bs,{sorting:"sorting"},function(){return this.ci},function(a){this.ci!==a&&(w.ob(a,Bs,Bs,"sorting"),a===Js||a===Ks||a===Hs||Is||a===Fs)&&(this.ci=a,this.J())});w.defineProperty(Bs,{comparer:"comparer"},function(){return this.Mh},function(a){this.Mh!==a&&(w.j(a,"function",Bs,"comparer"),this.Mh=a,this.J())});w.defineProperty(Bs,{spacing:"spacing"},function(){return this.di},function(a){this.di!==a&&(w.j(a,"number",Bs,"spacing"),this.di=a,this.J())}); +w.defineProperty(Bs,{Vx:"nodeDiameterFormula"},function(){return this.Es},function(a){this.Es!==a&&(w.ob(a,Bs,Bs,"nodeDiameterFormula"),a===Gs||a===Rs)&&(this.Es=a,this.J())});w.u(Bs,{fK:"actualXRadius"},function(){return this.Gd});w.u(Bs,{gK:"actualYRadius"},function(){return this.Uf});w.u(Bs,{eK:"actualSpacing"},function(){return this.jl});w.u(Bs,{hH:"actualCenter"},function(){return this.eC});var Cs;Bs.ConstantSpacing=Cs=w.p(Bs,"ConstantSpacing",0);var Ps; +Bs.ConstantDistance=Ps=w.p(Bs,"ConstantDistance",1);var Os;Bs.ConstantAngle=Os=w.p(Bs,"ConstantAngle",2);var Qs;Bs.Packed=Qs=w.p(Bs,"Packed",3);var Es;Bs.Clockwise=Es=w.p(Bs,"Clockwise",4);var Ns;Bs.Counterclockwise=Ns=w.p(Bs,"Counterclockwise",5);var Ls;Bs.BidirectionalLeft=Ls=w.p(Bs,"BidirectionalLeft",6);var Ms;Bs.BidirectionalRight=Ms=w.p(Bs,"BidirectionalRight",7);var Js;Bs.Forwards=Js=w.p(Bs,"Forwards",8);var Ks;Bs.Reverse=Ks=w.p(Bs,"Reverse",9);var Hs;Bs.Ascending=Hs=w.p(Bs,"Ascending",10); +var Is;Bs.Descending=Is=w.p(Bs,"Descending",11);var Fs;Bs.Optimized=Fs=w.p(Bs,"Optimized",12);var Gs;Bs.Pythagorean=Gs=w.p(Bs,"Pythagorean",13);var Rs;Bs.Circular=Rs=w.p(Bs,"Circular",14);function Ds(){this.Vp=-Infinity;this.Hq=this.eo=null}Ds.prototype.compare=function(a,b){if(0this.Vp||Math.abs(a)a&&0f?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new y(n.x+n.width+d.width,n.y),l[1]=new y(n.x,n.y+n.height+d.height),f=2):(p=jt(l,f,e,k,n.width,n.height,d),q=l[p],r=new y(q.x+n.width+d.width, +q.y),s=new y(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().ab,d=this.network.vertexes.i;d.next();){if(d.value.ab.Zf(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Ig?a.Ig=new H(du):a.Ig.clear();a.Ig.Nc(a.network.vertexes);var c=a.Ig;c.sort(function(a,b){return null===a||null===b||a===b?0:b.jg-a.jg});for(var d=c.count-1;0<=d&&1>=c.ea(d).jg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=Sd((m+s+n*n*4/(h*h))/ +s);h=(m-1)*p/2;m=(m-1)*q/2;f.ab=new B(k-r.x-h,l-r.y-m,p+2*h,q+2*m);f.focus=new y(r.x+h,r.y+m)}a.network=d;return c}function cu(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.Fh){var e=d.Fh.ea(d.rB);d.jg=e.Fy;var f=e.XB,h=e.YB;d.ab=new B(d.la-f,d.ra-h,e.Gy,e.Ey);d.focus=new y(f,h);d.rB--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} +function eu(a,b){var c=b.pn;if(null!==c&&0!==c.count){var d=b.la,e=b.ra,f=b.width,h=b.height;null!==b.Fh&&0=p.jg?l++:(k=!0,m++,h+=Math.atan2(b.ra-p.ra,b.la-p.la))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.la=d+p*Math.cos(q);l.ra=e+p*Math.sin(q);k++}}}function jt(a,b,c,d,e,f,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+f-k,e=e-l-h,Sd(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,Sd(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.la,e=d,f=c.ra,h=f,c=1;ch-f)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.la-b.la}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.ra-b.ra});for(var h=a.Mi,m=0,n=0,p=0,c=0;ch||p-d>h){if(f)break}else if(l-r>h||r-l>h){if(!f)break}else{var s=gu(k,e);1>s?(n=a.gy,null===n&&(a.gy=n=new sa(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.M.right-k.M.x),n=(1+n)*m):dr?(p=Math.abs(e.M.bottom-k.M.y),p=(1+p)*s):ds?(n=a.gy,null===n&&(a.gy=n=new sa(0)),m=n.random(),s= +n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=f.stiffness*(s-f.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=a.eJ;for(e=0;ed&&(f=d),h<-d?h=-d:h>d&&(h=d),k.la+=f,k.ra+=h,c=Math.max(c,f*f+h*h));return c>a.XE*a.XE}gt.prototype.moveFixedVertex=function(){}; +gt.prototype.commitLayout=function(){this.zB();this.commitNodes();this.vu&&this.commitLinks()};gt.prototype.zB=function(){if(this.Bq)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.Ab=qc,b.Bb=qc)}};gt.prototype.commitNodes=function(){var a=0,b=0;if(this.oH){var c=w.Kf();this.sh(this.network,c);b=this.Nd;a=b.x-c.x;b=b.y-c.y;w.Eb(c)}for(var c=w.Kf(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.ab),c.x+=a,c.y+=b,e.ab=c;e.commit()}w.Eb(c)}; +gt.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};gt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.yo:a};gt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.xo:a};gt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.vo:a};gt.prototype.electricalFieldX=function(){return 0};gt.prototype.electricalFieldY=function(){return 0}; +gt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.wo:a};gt.prototype.gravitationalFieldX=function(){return 0};gt.prototype.gravitationalFieldY=function(){return 0};gt.prototype.isFixed=function(a){return a.isFixed};w.u(gt,{NK:"currentIteration"},function(){return this.cs});w.defineProperty(gt,{CE:"arrangementSpacing"},function(){return this.ng},function(a){w.G(a,ia,gt,"arrangementSpacing");this.ng.L(a)||(this.ng.assign(a),this.J())}); +w.defineProperty(gt,{oH:"arrangesToOrigin"},function(){return this.Sq},function(a){this.Sq!==a&&(w.j(a,"boolean",gt,"arrangesToOrigin"),this.Sq=a,this.J())});w.defineProperty(gt,{Bq:"setsPortSpots"},function(){return this.bi},function(a){this.bi!==a&&(w.j(a,"boolean",gt,"setsPortSpots"),this.bi=a,this.J())});w.defineProperty(gt,{comments:"comments"},function(){return this.Lh},function(a){this.Lh!==a&&(w.j(a,"boolean",gt,"comments"),this.Lh=a,this.J())}); +w.defineProperty(gt,{ZA:"maxIterations"},function(){return this.Yo},function(a){this.Yo!==a&&(w.j(a,"number",gt,"maxIterations"),0<=a&&(this.Yo=a,this.J()))});w.defineProperty(gt,{XE:"epsilonDistance"},function(){return this.Cr},function(a){this.Cr!==a&&(w.j(a,"number",gt,"epsilonDistance"),0b.toVertex.index&&(a.my(b),b.rev=!0);break;case ku:for(d=this.network.vertexes.i;d.next();)a=d.value,a.Qp=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.As=0;for(d.reset();d.next();)b=d.value,0===b.nc.count&&uu(this,b);for(d.reset();d.next();)b=d.value,-1===b.Qp&&uu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Qpu&&0u&&0d[this.Rf]&&(this.iw=d[b]-1,this.Rf=b),d[b]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.mn===m.mn||k++;var m=0,q,r=q=p=l=0,s,u=0,t=0;s=0;var x;if(0<=c)for(n=d[h].Re,m=0;md[this.Rf]&&(this.iw=d[b]-1,this.Rf=b),d[b]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.mn===m.mn||k++;var m=0,q,r=q=p=l=0,s,u=0,t=0;s=0;var x;if(0<=c)for(n=d[h].Re,m=0;mu||l===u&&q>s)&&k++,tl||u===l&&s>q)&&k++);if(0>=c)for(n=d[h].Le,m=0;mu||l===u&&p>t)&&k++,sl||u===l&&t>p)&&k++);f[h*e+h]=k;for(n=h+1;n=c)for(k=d[h].Le,x=d[n].Le,m=0;m=c&&(l=k.Re);var m=null;0<=c&&(m=k.Le);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.Re);var m=null;0<=c&&(m=k.Le);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,f[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}zu(a,b,d);return f}function Hu(a,b,c,d,e,f){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.kc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Hu(a,m,c,d,e,f)}if(f)for(l=b.nc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Hu(a,m,c,d,e,f)}} -function Iu(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var h=b.kc;h.next();)Iu(a,h.value.toVertex,c,d,e,f);if(f)for(b=b.nc;b.next();)Iu(a,b.value.fromVertex,c,d,e,f)}}function su(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function tu(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.kc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} -function uu(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.nc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function vu(a,b){b.Qp=a.As;a.As++;for(var c=b.kc;c.next();){var d=c.value,e=d.toVertex;-1===e.Qp&&(d.forest=!0,vu(a,e))}b.finish=a.As;a.As++} -ku.prototype.assignLayers=function(){switch(this.Uo){case Ju:Ku(this);break;case Lu:for(var a=0,b=this.network.vertexes.i;b.next();)a=Mu(this,b.value),this.sb=Math.max(a,this.sb);for(b.reset();b.next();)a=b.value,a.layer=this.sb-a.layer;break;default:case mu:Ku(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.nc.count&&Nu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.sb=-1;for(b.reset();b.next();){var c=b.value;c.layer-= -a;this.sb=Math.max(this.sb,c.layer)}}};function Ku(a){for(var b=a.network.vertexes.i;b.next();){var c=Ou(a,b.value);a.sb=Math.max(c,a.sb)}}function Ou(a,b){var c=0;if(-1===b.layer){for(var d=b.kc;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Ou(a,f)+e);b.layer=c}else c=b.layer;return c}function Mu(a,b){var c=0;if(-1===b.layer){for(var d=b.nc;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Mu(a,f)+e);b.layer=c}else c=b.layer;return c} -function Nu(a,b){if(!b.valid){b.valid=!0;for(var c=b.kc;c.next();)Nu(a,c.value.toVertex);for(c=a.network.vertexes.i;c.next();)c.value.component=-1;for(var d=b.Re.n,e=d.length,f=0;fh&&Hu(a,k,0,-1,!0,!1)}for(Hu(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.i;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Re.n,e=s.length,f=0;f=c&&(l=k.Re);var m=null;0<=c&&(m=k.Le);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.Re);var m=null;0<=c&&(m=k.Le);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,f[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}yu(a,b,d);return f}function Gu(a,b,c,d,e,f){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.kc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Gu(a,m,c,d,e,f)}if(f)for(l=b.nc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Gu(a,m,c,d,e,f)}} +function Hu(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var h=b.kc;h.next();)Hu(a,h.value.toVertex,c,d,e,f);if(f)for(b=b.nc;b.next();)Hu(a,b.value.fromVertex,c,d,e,f)}}function ru(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function su(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.kc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} +function tu(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.nc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function uu(a,b){b.Qp=a.As;a.As++;for(var c=b.kc;c.next();){var d=c.value,e=d.toVertex;-1===e.Qp&&(d.forest=!0,uu(a,e))}b.finish=a.As;a.As++} +ju.prototype.assignLayers=function(){switch(this.Uo){case Iu:Ju(this);break;case Ku:for(var a=0,b=this.network.vertexes.i;b.next();)a=Lu(this,b.value),this.sb=Math.max(a,this.sb);for(b.reset();b.next();)a=b.value,a.layer=this.sb-a.layer;break;default:case lu:Ju(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.nc.count&&Mu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.sb=-1;for(b.reset();b.next();){var c=b.value;c.layer-= +a;this.sb=Math.max(this.sb,c.layer)}}};function Ju(a){for(var b=a.network.vertexes.i;b.next();){var c=Nu(a,b.value);a.sb=Math.max(c,a.sb)}}function Nu(a,b){var c=0;if(-1===b.layer){for(var d=b.kc;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Nu(a,f)+e);b.layer=c}else c=b.layer;return c}function Lu(a,b){var c=0;if(-1===b.layer){for(var d=b.nc;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Lu(a,f)+e);b.layer=c}else c=b.layer;return c} +function Mu(a,b){if(!b.valid){b.valid=!0;for(var c=b.kc;c.next();)Mu(a,c.value.toVertex);for(c=a.network.vertexes.i;c.next();)c.value.component=-1;for(var d=b.Re.n,e=d.length,f=0;fh&&Gu(a,k,0,-1,!0,!1)}for(Gu(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.i;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Re.n,e=s.length,f=0;fd)&&!n&&(h=l,d=m)}if(0>f){for(c.reset();c.next();)f=c.value,1===f.component&&(f.layer-=e);b.component=0}else h.component=0}}} -function xu(a,b,c){return 90===a.ba?c&&!b.rev||!c&&b.rev?270:90:180===a.ba?c&&!b.rev||!c&&b.rev?0:180:270===a.ba?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} -ku.prototype.initializeIndices=function(){switch(this.Ko){default:case Pu:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.ke[c];this.ke[c]++}break;case nu:a=this.network.vertexes.i;for(b=this.sb;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Qu(this,c);break;case Ru:for(a=this.network.vertexes.i,b=0;b<=this.sb;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Su(this,c)}}; -function Qu(a,b){var c=b.layer;b.index=a.ke[c];a.ke[c]++;for(var c=b.Le.xc(),d=!0;d;)for(var d=!1,e=0;eh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;e=h;d--)f=Uu(this,d,-1)||f;e=this.countCrossings();e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Uu(this,d,1)||f;e=this.countCrossings();e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Uu(this,d,1)||f;e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1, -d=h;d<=c;d++)f=Uu(this,d,-1)||f;e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Uu(this,d,0)||f;e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Uu(this,d,0)||f;e>=a?Cu(this,b):(a=e,b=Bu(this))}break;default:case ou:for(c=this.sb,h=0,k=a+1;(d=this.countCrossings())=h;d--)f=Uu(this,d,-1)||f;e=this.countCrossings();e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Uu(this,d,1)||f;e=this.countCrossings(); -e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Uu(this,d,1)||f;e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Uu(this,d,-1)||f;e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Uu(this,d,0)||f;e>=a?Cu(this,b):(a=e,b=Bu(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Uu(this,d,0)||f;e>=a?Cu(this,b):(a=e,b=Bu(this))}}Cu(this,b)}; -function Tu(a,b,c){var d=0,e=yu(a,b),f=a.ke[b],h=Gu(a,b,c);c=Fu(a,b,c);for(d=0;dh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;e=h;d--)f=Tu(this,d,-1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1, +d=h;d<=c;d++)f=Tu(this,d,-1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this))}break;default:case nu:for(c=this.sb,h=0,k=a+1;(d=this.countCrossings())=h;d--)f=Tu(this,d,-1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,1)||f;e=this.countCrossings(); +e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,-1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this))}}Bu(this,b)}; +function Su(a,b,c){var d=0,e=xu(a,b),f=a.ke[b],h=Fu(a,b,c);c=Eu(a,b,c);for(d=0;df+1&&(q+=4*(v-f),r+=4*(v-(f+1)))}A=d[f].kc.i;for(A.reset();A.next();)if(v=A.value,z=v.toVertex,v.valid&&z.layer===b){for(v=0;d[v]!==z;)v++;v===f+1&&(r+=1)}A=d[f+1].nc.i;for(A.reset();A.next();)if(v=A.value,z=v.fromVertex,v.valid&&z.layer===b){for(v=0;d[v]!==z;)v++;vf+1&&(q+=4*(v-(f+1)),r+=4*(v-f))}A=d[f+1].kc.i;for(A.reset();A.next();)if(v=A.value,z=v.toVertex,v.valid&& -z.layer===b){for(v=0;d[v]!==z;)v++;v===f&&(q+=1)}var v=z=0,A=h[d[f].index],L=k[d[f].index],E=h[d[f+1].index],P=k[d[f+1].index];-1!==A&&(z+=Math.abs(A-s),v+=Math.abs(A-x));-1!==L&&(z+=Math.abs(L-s),v+=Math.abs(L-x));-1!==E&&(z+=Math.abs(E-u),v+=Math.abs(E-t));-1!==P&&(z+=Math.abs(P-u),v+=Math.abs(P-t));if(r>1)+8*d;this.Lb*=8}if(0!==(this.aj&Yu))for(b=!0;b;){b=!1;for(a=this.Rf+1;a<=this.sb;a++)b=Zu(this,a,1)||b; -for(a=this.Rf-1;0<=a;a--)b=Zu(this,a,-1)||b;b=Zu(this,this.Rf,0)||b}if(0!==(this.aj&$u)){for(a=this.Rf+1;a<=this.sb;a++)av(this,a,1);for(a=this.Rf-1;0<=a;a--)av(this,a,-1);av(this,this.Rf,0)}c&&(bv(this,-1),bv(this,1));if(0!==(this.aj&Yu))for(b=!0;b;){b=!1;b=Zu(this,this.Rf,0)||b;for(a=this.Rf+1;a<=this.sb;a++)b=Zu(this,a,0)||b;for(a=this.Rf-1;0<=a;a--)b=Zu(this,a,0)||b}};function Zu(a,b,c){for(var d=!1;cv(a,b,c);)d=!0;return d} -function cv(a,b,c){var d=0,e=yu(a,b),f=a.ke[b],h=Fu(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=f||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q=0,u=0,t=0,x=0,v=0;if(0>=c)for(var z=e[d].nc.i;z.next();){var v=z.value,A=v.fromVertex;v.valid&& -A.layer!==b&&(t=Au(v),x=v.portFromColOffset,v=v.portToColOffset,A=A.column,q+=(Math.abs(n+v-(A+x))+1)*t,s+=(Math.abs(r+v-(A+x))+1)*t,u+=(Math.abs(p+v-(A+x))+1)*t)}if(0<=c)for(z=e[d].kc.i;z.next();)v=z.value,A=v.toVertex,v.valid&&A.layer!==b&&(t=Au(v),x=v.portFromColOffset,v=v.portToColOffset,A=A.column,q+=(Math.abs(n+x-(A+v))+1)*t,s+=(Math.abs(r+x-(A+v))+1)*t,u+=(Math.abs(p+x-(A+v))+1)*t);v=x=t=0;z=h[e[d].index];A=k[e[d].index];-1!==z&&(t+=Math.abs(z-n),x+=Math.abs(z-r),v+=Math.abs(z-p));-1!==A&& -(t+=Math.abs(A-n),x+=Math.abs(A-r),v+=Math.abs(A-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}zu(a,b,e);a.normalize()} -function dv(a,b){for(var c=!0,d=a.network.vertexes.i;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} -function ev(a,b){for(var c=b,c=b+1,d=0,e=[],f=[],d=0;d<=a.sb;d++)e[d]=!1,f[d]=!1;for(var h=a.network.vertexes.i;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(f[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.sb;d++)k=k&&!(e[d]&&f[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c} -function bv(a,b){for(var c=0;c<=a.Lb;c++)for(;dv(a,c););a.normalize();for(c=0;ce?Cu(a,d):hb)for(c=a.Lb;0<=c;c--)for(d=Bu(a),e=Eu(a),f=e+1;ee?Cu(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Cg);a.Cg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Iu(a,b,a.Cg,-1,!0,!0),a.Cg++);var f=0;b=[];for(f=0;f>1)+8*d;this.Lb*=8}if(0!==(this.aj&Xu))for(b=!0;b;){b=!1;for(a=this.Rf+1;a<=this.sb;a++)b=Yu(this,a,1)||b; +for(a=this.Rf-1;0<=a;a--)b=Yu(this,a,-1)||b;b=Yu(this,this.Rf,0)||b}if(0!==(this.aj&Zu)){for(a=this.Rf+1;a<=this.sb;a++)$u(this,a,1);for(a=this.Rf-1;0<=a;a--)$u(this,a,-1);$u(this,this.Rf,0)}c&&(av(this,-1),av(this,1));if(0!==(this.aj&Xu))for(b=!0;b;){b=!1;b=Yu(this,this.Rf,0)||b;for(a=this.Rf+1;a<=this.sb;a++)b=Yu(this,a,0)||b;for(a=this.Rf-1;0<=a;a--)b=Yu(this,a,0)||b}};function Yu(a,b,c){for(var d=!1;bv(a,b,c);)d=!0;return d} +function bv(a,b,c){var d=0,e=xu(a,b),f=a.ke[b],h=Eu(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=f||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q=0,u=0,t=0,x=0,v=0;if(0>=c)for(var z=e[d].nc.i;z.next();){var v=z.value,A=v.fromVertex;v.valid&& +A.layer!==b&&(t=zu(v),x=v.portFromColOffset,v=v.portToColOffset,A=A.column,q+=(Math.abs(n+v-(A+x))+1)*t,s+=(Math.abs(r+v-(A+x))+1)*t,u+=(Math.abs(p+v-(A+x))+1)*t)}if(0<=c)for(z=e[d].kc.i;z.next();)v=z.value,A=v.toVertex,v.valid&&A.layer!==b&&(t=zu(v),x=v.portFromColOffset,v=v.portToColOffset,A=A.column,q+=(Math.abs(n+x-(A+v))+1)*t,s+=(Math.abs(r+x-(A+v))+1)*t,u+=(Math.abs(p+x-(A+v))+1)*t);v=x=t=0;z=h[e[d].index];A=k[e[d].index];-1!==z&&(t+=Math.abs(z-n),x+=Math.abs(z-r),v+=Math.abs(z-p));-1!==A&& +(t+=Math.abs(A-n),x+=Math.abs(A-r),v+=Math.abs(A-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}yu(a,b,e);a.normalize()} +function cv(a,b){for(var c=!0,d=a.network.vertexes.i;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} +function dv(a,b){for(var c=b,c=b+1,d=0,e=[],f=[],d=0;d<=a.sb;d++)e[d]=!1,f[d]=!1;for(var h=a.network.vertexes.i;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(f[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.sb;d++)k=k&&!(e[d]&&f[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c} +function av(a,b){for(var c=0;c<=a.Lb;c++)for(;cv(a,c););a.normalize();for(c=0;ce?Bu(a,d):hb)for(c=a.Lb;0<=c;c--)for(d=Au(a),e=Du(a),f=e+1;ee?Bu(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Cg);a.Cg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Hu(a,b,a.Cg,-1,!0,!0),a.Cg++);var f=0;b=[];for(f=0;fc)for(k=a.Lb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -ku.prototype.commitLayout=function(){if(this.Bq)for(var a=wu(this,!0),b=wu(this,!1),c=this.network.edges.i;c.next();){var d=c.value.link;null!==d&&(d.Ab=a,d.Bb=b)}this.commitNodes();this.iA();this.vu&&this.commitLinks()};function wu(a,b){return 270===a.ba?b?Gc:Jc:90===a.ba?b?Jc:Gc:180===a.ba?b?Hc:Ic:b?Ic:Hc} -ku.prototype.commitNodes=function(){this.yg=[];this.Qf=[];this.Pf=[];this.Ob=[];for(var a=0;a<=this.sb;a++)this.yg[a]=0,this.Qf[a]=0,this.Pf[a]=0,this.Ob[a]=0;for(a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;this.yg[c]=Math.max(this.yg[c],this.nodeMinLayerSpace(b,!0));this.Qf[c]=Math.max(this.Qf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.Km,c=0;c<=this.sb;c++){var e=d;0>=this.yg[c]+this.Qf[c]&&(e=0);0=this.yg[c]+this.Qf[c]&&(e=0);0=r.M.bottom?(Ma=r.M.y+r.M.height, b.w(U++,na,Ma+kb),b.w(U++,na,Ma),b.w(U++,na,Ma-Ia)):(b.w(U++,na,ja+kb),b.w(U++,na,ja),b.w(U++,na,ja-Ia)):270===this.ba?ja<=r.M.y?(Ma=r.M.y,b.w(U++,na,Ma-Ia),b.w(U++,na,Ma),b.w(U++,na,Ma+kb)):(b.w(U++,na,ja-Ia),b.w(U++,na,ja),b.w(U++,na,ja+kb)):0===this.ba&&(na>=r.M.right?(Ma=r.M.x+r.M.width,b.w(U++,Ma+kb,ja),b.w(U++,Ma,ja),b.w(U++,Ma-Ia,ja)):(b.w(U++,na+kb,ja),b.w(U++,na,ja),b.w(U++,na-Ia,ja)));else{b.w(U++,fb,pb);var td=0;if(180===this.ba||0===this.ba){if(180===this.ba?na>=r.M.right:na<=r.M.x)td= @@ -1947,132 +1947,132 @@ this.yg[q.layer]);kb=Math.max(10,this.Qf[q.layer]);td=0;if(180===this.ba||0===th if(Oa!==r)if(fb=b.l(U-1).x,pb=b.l(U-1).y,na=Oa.la,ja=Oa.ra,eb)if(180===this.ba||0===this.ba){var Hd=null!==Lc?Lc.ra:pb;Hd!==ja&&(Za=this.Ob[Oa.layer],2===U&&(Za=0===this.ba?Math.max(Za,fb):Math.min(Za,fb)),b.w(U++,Za,pb),b.w(U++,Za,ja))}else{var Gf=null!==Lc?Lc.la:fb;Gf!==na&&(Za=this.Ob[Oa.layer],2===U&&(Za=90===this.ba?Math.max(Za,pb):Math.min(Za,pb)),b.w(U++,fb,Za),b.w(U++,na,Za))}else Ia=Math.max(10,this.yg[Oa.layer]),kb=Math.max(10,this.Qf[Oa.layer]),180===this.ba?(b.w(U++,na+kb,ja),Ga&&b.w(U++, na,ja),b.w(U++,na-Ia,ja)):90===this.ba?(b.w(U++,na,ja-Ia),Ga&&b.w(U++,na,ja),b.w(U++,na,ja+kb)):270===this.ba?(b.w(U++,na,ja+kb),Ga&&b.w(U++,na,ja),b.w(U++,na,ja-Ia)):(b.w(U++,na-Ia,ja),Ga&&b.w(U++,na,ja),b.w(U++,na+kb,ja));q=Oa}eb&&(fb=b.l(U-1).x,pb=b.l(U-1).y,na=b.l(U).x,ja=b.l(U).y,180===this.ba||0===this.ba?pb!==ja&&(Za=0===this.ba?Math.min(Math.max((na+fb)/2,this.Ob[r.layer]),na):Math.max(Math.min((na+fb)/2,this.Ob[r.layer]),na),b.w(U++,Za,pb),b.w(U++,Za,ja)):fb!==na&&(Za=90===this.ba?Math.min(Math.max((ja+ pb)/2,this.Ob[r.layer]),ja):Math.max(Math.min((ja+pb)/2,this.Ob[r.layer]),ja),b.w(U++,fb,Za),b.w(U++,na,Za)))}if(null!==d&&Ga){if(null!==h){if(n===yb){var qe=b.l(0),Yd=b.l(2);qe.L(Yd)||b.ca(1,(qe.x+Yd.x)/2,(qe.y+Yd.y)/2)}ya=b.getLinkPoint(e,h,yb,!0,!1,f,k);ya.I()||ya.set(e.Y.Ol);b.ca(0,ya.x,ya.y)}null!==k&&(p===yb&&(qe=b.l(b.qa-1),Yd=b.l(b.qa-3),qe.L(Yd)||b.ca(b.qa-2,(qe.x+Yd.x)/2,(qe.y+Yd.y)/2)),ya=b.getLinkPoint(f,k,yb,!1,!1,e,h),ya.I()||ya.set(f.Y.Ol),b.ca(b.qa-1,ya.x,ya.y))}b.nj();c.commit()}}}for(var gd= -new H(W),rh=this.network.edges.i;rh.next();){var Hf=rh.value.link;null!==Hf&&Hf.ac&&!gd.contains(Hf)&&gd.add(Hf)}if(0Ac.y&&(tc=gb.y>Ac.y?0:Zd.xCc.x&&(Fg=vh.x>Cc.x?0:wc.yb.layer?1:a.$eb.$e?1:a.seb.se?1:0:0};ku.prototype.lG=function(a,b){return a instanceof gv&&b instanceof gv&&a!==b?a.firstb.first||a.uib.ui||a.$eb.$e?1:a.seb.se?1:0:0}; -ku.prototype.py=function(a,b){return a instanceof gv&&b instanceof gv&&a!==b?a.geb.ge||a.uib.ui||a.$eb.$e?1:a.seb.se?1:0:0};function hv(a,b){var c=a-b;return-1c}function yu(a,b){var c,d=a.ke[b];if(d>=a.ih.length){c=[];for(var e=0;ea&&(this.aj=a,this.J()))});w.defineProperty(ku,{Bq:"setsPortSpots"},function(){return this.bi},function(a){this.bi!==a&&(w.j(a,"boolean",ku,"setsPortSpots"),this.bi=a,this.J())});w.defineProperty(ku,{LF:"linkSpacing"},function(){return this.hs},function(a){this.hs!==a&&(w.j(a,"number",ku,"linkSpacing"),0<=a&&(this.hs=a,this.J()))});w.u(ku,{RI:"maxLayer"},function(){return this.sb}); -w.u(ku,{tL:"maxIndex"},function(){return this.iw});w.u(ku,{sL:"maxColumn"},function(){return this.Lb});w.u(ku,{yL:"minIndexLayer"},function(){return this.rs});w.u(ku,{uL:"maxIndexLayer"},function(){return this.Rf});var lu;ku.CycleDepthFirst=lu=w.p(ku,"CycleDepthFirst",0);var ru;ku.CycleGreedy=ru=w.p(ku,"CycleGreedy",1);var mu;ku.LayerOptimalLinkLength=mu=w.p(ku,"LayerOptimalLinkLength",0);var Ju;ku.LayerLongestPathSink=Ju=w.p(ku,"LayerLongestPathSink",1);var Lu; -ku.LayerLongestPathSource=Lu=w.p(ku,"LayerLongestPathSource",2);var nu;ku.InitDepthFirstOut=nu=w.p(ku,"InitDepthFirstOut",0);var Ru;ku.InitDepthFirstIn=Ru=w.p(ku,"InitDepthFirstIn",1);var Pu;ku.InitNaive=Pu=w.p(ku,"InitNaive",2);var Vu;ku.AggressiveNone=Vu=w.p(ku,"AggressiveNone",0);var ou;ku.AggressiveLess=ou=w.p(ku,"AggressiveLess",1);var Wu;ku.AggressiveMore=Wu=w.p(ku,"AggressiveMore",2);ku.PackNone=0;var Xu;ku.PackExpand=Xu=1;var Yu;ku.PackStraighten=Yu=2;var $u;ku.PackMedian=$u=4;var pu; -ku.PackAll=pu=7;function gv(){this.index=this.se=this.$e=this.ge=this.first=this.layer=0;this.link=null;this.ui=0}w.be(gv,{layer:!0,first:!0,ge:!0,$e:!0,se:!0,index:!0,link:!0,ui:!0});function qu(){ug.call(this)}w.La(qu,ug);w.ga("LayeredDigraphNetwork",qu);qu.prototype.createVertex=function(){return new iv};qu.prototype.createEdge=function(){return new jv}; -function iv(){ms.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.Qp=NaN;this.mn=0;this.eB=this.fB=null}w.La(iv,ms);w.ga("LayeredDigraphVertex",iv);function jv(){ns.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.La(jv,ns);w.ga("LayeredDigraphEdge",jv); -function Z(){0b.layer?1:a.$eb.$e?1:a.seb.se?1:0:0};ju.prototype.lG=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.firstb.first||a.uib.ui||a.$eb.$e?1:a.seb.se?1:0:0}; +ju.prototype.py=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.geb.ge||a.uib.ui||a.$eb.$e?1:a.seb.se?1:0:0};function gv(a,b){var c=a-b;return-1c}function xu(a,b){var c,d=a.ke[b];if(d>=a.ih.length){c=[];for(var e=0;ea&&(this.aj=a,this.J()))});w.defineProperty(ju,{Bq:"setsPortSpots"},function(){return this.bi},function(a){this.bi!==a&&(w.j(a,"boolean",ju,"setsPortSpots"),this.bi=a,this.J())});w.defineProperty(ju,{LF:"linkSpacing"},function(){return this.hs},function(a){this.hs!==a&&(w.j(a,"number",ju,"linkSpacing"),0<=a&&(this.hs=a,this.J()))});w.u(ju,{RI:"maxLayer"},function(){return this.sb}); +w.u(ju,{tL:"maxIndex"},function(){return this.iw});w.u(ju,{sL:"maxColumn"},function(){return this.Lb});w.u(ju,{yL:"minIndexLayer"},function(){return this.rs});w.u(ju,{uL:"maxIndexLayer"},function(){return this.Rf});var ku;ju.CycleDepthFirst=ku=w.p(ju,"CycleDepthFirst",0);var qu;ju.CycleGreedy=qu=w.p(ju,"CycleGreedy",1);var lu;ju.LayerOptimalLinkLength=lu=w.p(ju,"LayerOptimalLinkLength",0);var Iu;ju.LayerLongestPathSink=Iu=w.p(ju,"LayerLongestPathSink",1);var Ku; +ju.LayerLongestPathSource=Ku=w.p(ju,"LayerLongestPathSource",2);var mu;ju.InitDepthFirstOut=mu=w.p(ju,"InitDepthFirstOut",0);var Qu;ju.InitDepthFirstIn=Qu=w.p(ju,"InitDepthFirstIn",1);var Ou;ju.InitNaive=Ou=w.p(ju,"InitNaive",2);var Uu;ju.AggressiveNone=Uu=w.p(ju,"AggressiveNone",0);var nu;ju.AggressiveLess=nu=w.p(ju,"AggressiveLess",1);var Vu;ju.AggressiveMore=Vu=w.p(ju,"AggressiveMore",2);ju.PackNone=0;var Wu;ju.PackExpand=Wu=1;var Xu;ju.PackStraighten=Xu=2;var Zu;ju.PackMedian=Zu=4;var ou; +ju.PackAll=ou=7;function fv(){this.index=this.se=this.$e=this.ge=this.first=this.layer=0;this.link=null;this.ui=0}w.be(fv,{layer:!0,first:!0,ge:!0,$e:!0,se:!0,index:!0,link:!0,ui:!0});function pu(){tg.call(this)}w.La(pu,tg);w.ga("LayeredDigraphNetwork",pu);pu.prototype.createVertex=function(){return new hv};pu.prototype.createEdge=function(){return new iv}; +function hv(){ls.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.Qp=NaN;this.mn=0;this.eB=this.fB=null}w.La(hv,ls);w.ga("LayeredDigraphVertex",hv);function iv(){ms.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.La(iv,ms);w.ga("LayeredDigraphEdge",iv); +function Z(){0b.level)return!1;a.removeChild(c.parent,c)}return!0}Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;eb.level)return!1;a.removeChild(c.parent,c)}return!0}Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ef?$v(a,k,va,z,A):aw(a,k,va,z,A);va=A.x;z=A.width;A=A.height;break;case Ov:for(m=0;ms&&(basb&&(Kw(a,-sb,0,eb,m-1),Lw(E,-sb,0),Lw(P,-sb,0),sb=0)}n.pa.m(sb,ha);z=Math.max(z,$);A=Math.max(A,L+(0===ya?0:x)+U.height);ba=$}else{0s&&(hasb&&(Kw(a,0,-sb,eb,m-1),Lw(E,0,-sb),Lw(P,0,-sb),sb=0);n.pa.m(ba,sb);A=Math.max(A,S);z=Math.max(z,L+(0===ya?0:x)+U.width);ha=S}Ga++}0q&&(q=0),135v&&(v=0),p===Pv&&(l+=u/2+a.T.y),k+=d+c):b?(null===a.comments?d>z&&(p=Pw(p,d-z,0),k=p.x,l=p.y,z=d,q=0):z=Nw(a,z,q),0>q&&(k-=q,q=0),135A&&(p=Pw(p,0,e-A),k=p.x,l=p.y,A=e,v=0):A=Ow(a,A,v),0>v&&(l-=v,v=0),k+=d+c);if(0f[0].x?f[2].assign(f[1]):f[1].assign(f[2])),f[3].yf[0].x?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(q+d,0),p[1].m(p[0].x,e),p[2].yf[0].y?f[2].assign(f[1]):f[1].assign(f[2])),f[3].xf[0].y?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(0,v+e),p[1].m(d,p[0].y),p[2].xc?$v(b,e,Ga,L,E):aw(b,e,Ga,L,E);Ga=E.x;L=E.width;E=E.height;break;case Ov:for(k=0;kr&&($r&&(Sp&&(p=0),135z&&(z=0));b.Oa.m(p,z);b.kb.m(L,E)}} -function $v(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.kb.width;e=h.kb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Vv(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(v, -q)+b+s.height),0>h.pa.x&&(c=Tw(a,h.pa.x,!1,c,k))):(h.pa.m(d+b,c+k/2-h.T.y-h.Oa.y),d=Math.max(d,Math.max(x,p)+b+s.width),m=c+k/2-h.T.y-h.Oa.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.pa.y&&(c=Tw(a,h.pa.y,!0,c,k))));return new B(c,0,d,e)} -function aw(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.kb.width;e=h.kb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Vv(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(v, -q))+l+s.height),0>h.pa.x&&(c=Tw(a,h.pa.x,!1,c,k))):(h.pa.m(-d-s.width-l,c+k/2-h.T.y-h.Oa.y),d=Math.max(d,Math.abs(Math.min(x,p))+l+s.width),p=c+k/2-h.T.y-h.Oa.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.pa.y&&(c=Tw(a,h.pa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Wv:return a.width>b?a.width:b;case Xv:return 2*a.T.x>b?a.width:b+a.width-2*a.T.x;case Nv:case Cv:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Ov:return a.width-a.T.x+a.nodeSpacing/2+b;case Pv:return Math.max(a.width,a.T.x+a.nodeSpacing/2+b);default:return b}} -function Ow(a,b,c){switch(a.alignment){case Lv:case Mw:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Wv:return a.height>b?a.height:b;case Xv:return 2*a.T.y>b?a.height:b+a.height-2*a.T.y;case Nv:case Cv:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Ov:return a.height-a.T.y+a.nodeSpacing/2+b;case Pv:return Math.max(a.height,a.T.y+a.nodeSpacing/2+b);default:return b}} -function Pw(a,b,c){switch(a){case Mw:b/=2;c/=2;break;case Lv:b/=2;c/=2;break;case Wv:c=b=0;break;case Xv:break;default:w.k("Unhandled alignment value "+a.toString())}return new y(b,c)}function Hw(a,b,c,d,e,f){b=Pw(b,c,d);Kw(a,b.x,b.y,e,f)}function Kw(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].pa;f.x+=b;f.y+=c}} -function Iw(a,b,c,d){var e=b.parent;switch(a.Of){case lv:for(a=b.nc;a.next();)b=a.value,b.fromVertex===e&&b.Ts.m(c,d);break;case sv:for(a=b.kc;a.next();)b=a.value,b.toVertex===e&&b.Ts.m(c,d);break;default:w.k("Unhandled path value "+a.Of.toString())}}function Lw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m=l=0;lt&&e.ye.y&&tb.length||null===l||2>l.length)d=null;else{n=bw(a,b.length+l.length);for(d=f=e=0;fe;)t=l[f++],n[d++].m(t.x+m,t.y);l=bw(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=bw(a,p.length+f.length);for(m=x=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=bw(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lf&&e.xe.x&&fb.length||null===l||2>l.length)d=null;else{n=bw(a, -b.length+l.length);for(d=f=e=0;fe;)t=l[f++],n[d++].m(t.x,t.y+m);l=bw(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=bw(a,p.length+f.length);for(m=x=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=bw(a,m);for(l=0;lf?Zv(a,k,va,z,A):$v(a,k,va,z,A);va=A.x;z=A.width;A=A.height;break;case Nv:for(m=0;ms&&(basb&&(Jw(a,-sb,0,eb,m-1),Kw(E,-sb,0),Kw(P,-sb,0),sb=0)}n.pa.m(sb,ha);z=Math.max(z,$);A=Math.max(A,L+(0===ya?0:x)+U.height);ba=$}else{0s&&(hasb&&(Jw(a,0,-sb,eb,m-1),Kw(E,0,-sb),Kw(P,0,-sb),sb=0);n.pa.m(ba,sb);A=Math.max(A,S);z=Math.max(z,L+(0===ya?0:x)+U.width);ha=S}Ga++}0q&&(q=0),135v&&(v=0),p===Ov&&(l+=u/2+a.T.y),k+=d+c):b?(null===a.comments?d>z&&(p=Ow(p,d-z,0),k=p.x,l=p.y,z=d,q=0):z=Mw(a,z,q),0>q&&(k-=q,q=0),135A&&(p=Ow(p,0,e-A),k=p.x,l=p.y,A=e,v=0):A=Nw(a,A,v),0>v&&(l-=v,v=0),k+=d+c);if(0f[0].x?f[2].assign(f[1]):f[1].assign(f[2])),f[3].yf[0].x?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(q+d,0),p[1].m(p[0].x,e),p[2].yf[0].y?f[2].assign(f[1]):f[1].assign(f[2])),f[3].xf[0].y?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(0,v+e),p[1].m(d,p[0].y),p[2].xc?Zv(b,e,Ga,L,E):$v(b,e,Ga,L,E);Ga=E.x;L=E.width;E=E.height;break;case Nv:for(k=0;kr&&($r&&(Sp&&(p=0),135z&&(z=0));b.Oa.m(p,z);b.kb.m(L,E)}} +function Zv(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.kb.width;e=h.kb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Uv(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(v, +q)+b+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(d+b,c+k/2-h.T.y-h.Oa.y),d=Math.max(d,Math.max(x,p)+b+s.width),m=c+k/2-h.T.y-h.Oa.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));return new B(c,0,d,e)} +function $v(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.kb.width;e=h.kb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Uv(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(v, +q))+l+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(-d-s.width-l,c+k/2-h.T.y-h.Oa.y),d=Math.max(d,Math.abs(Math.min(x,p))+l+s.width),p=c+k/2-h.T.y-h.Oa.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Vv:return a.width>b?a.width:b;case Wv:return 2*a.T.x>b?a.width:b+a.width-2*a.T.x;case Mv:case Bv:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Nv:return a.width-a.T.x+a.nodeSpacing/2+b;case Ov:return Math.max(a.width,a.T.x+a.nodeSpacing/2+b);default:return b}} +function Nw(a,b,c){switch(a.alignment){case Kv:case Lw:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Vv:return a.height>b?a.height:b;case Wv:return 2*a.T.y>b?a.height:b+a.height-2*a.T.y;case Mv:case Bv:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Nv:return a.height-a.T.y+a.nodeSpacing/2+b;case Ov:return Math.max(a.height,a.T.y+a.nodeSpacing/2+b);default:return b}} +function Ow(a,b,c){switch(a){case Lw:b/=2;c/=2;break;case Kv:b/=2;c/=2;break;case Vv:c=b=0;break;case Wv:break;default:w.k("Unhandled alignment value "+a.toString())}return new y(b,c)}function Gw(a,b,c,d,e,f){b=Ow(b,c,d);Jw(a,b.x,b.y,e,f)}function Jw(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].pa;f.x+=b;f.y+=c}} +function Hw(a,b,c,d){var e=b.parent;switch(a.Of){case kv:for(a=b.nc;a.next();)b=a.value,b.fromVertex===e&&b.Ts.m(c,d);break;case rv:for(a=b.kc;a.next();)b=a.value,b.toVertex===e&&b.Ts.m(c,d);break;default:w.k("Unhandled path value "+a.Of.toString())}}function Kw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m=l=0;lt&&e.ye.y&&tb.length||null===l||2>l.length)d=null;else{n=aw(a,b.length+l.length);for(d=f=e=0;fe;)t=l[f++],n[d++].m(t.x+m,t.y);l=aw(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=aw(a,p.length+f.length);for(m=x=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=aw(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lf&&e.xe.x&&fb.length||null===l||2>l.length)d=null;else{n=aw(a, +b.length+l.length);for(d=f=e=0;fe;)t=l[f++],n[d++].m(t.x,t.y+m);l=aw(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=aw(a,p.length+f.length);for(m=x=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=aw(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} -function Yv(a){var b=Vv(a),b=90===b||270===b,c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0} +function Xv(a){var b=Uv(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.va.nodeIndentPastParent=a,this.J()))}); w.defineProperty(Z,{nodeSpacing:"nodeSpacing"},function(){return this.va.nodeSpacing},function(a){this.va.nodeSpacing!==a&&(w.j(a,"number",Z,"nodeSpacing"),this.va.nodeSpacing=a,this.J())});w.defineProperty(Z,{layerSpacing:"layerSpacing"},function(){return this.va.layerSpacing},function(a){this.va.layerSpacing!==a&&(w.j(a,"number",Z,"layerSpacing"),this.va.layerSpacing=a,this.J())}); -w.defineProperty(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.va.layerSpacingParentOverlap},function(a){this.va.layerSpacingParentOverlap!==a&&(w.j(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.va.layerSpacingParentOverlap=a,this.J()))});w.defineProperty(Z,{compaction:"compaction"},function(){return this.va.compaction},function(a){this.va.compaction!==a&&(w.ob(a,Z,Z,"compaction"),a===Sv||a===Uv)&&(this.va.compaction=a,this.J())}); +w.defineProperty(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.va.layerSpacingParentOverlap},function(a){this.va.layerSpacingParentOverlap!==a&&(w.j(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.va.layerSpacingParentOverlap=a,this.J()))});w.defineProperty(Z,{compaction:"compaction"},function(){return this.va.compaction},function(a){this.va.compaction!==a&&(w.ob(a,Z,Z,"compaction"),a===Rv||a===Tv)&&(this.va.compaction=a,this.J())}); w.defineProperty(Z,{breadthLimit:"breadthLimit"},function(){return this.va.breadthLimit},function(a){this.va.breadthLimit!==a&&(w.j(a,"number",Z,"breadthLimit"),0<=a&&(this.va.breadthLimit=a,this.J()))});w.defineProperty(Z,{rowSpacing:"rowSpacing"},function(){return this.va.rowSpacing},function(a){this.va.rowSpacing!==a&&(w.j(a,"number",Z,"rowSpacing"),this.va.rowSpacing=a,this.J())}); w.defineProperty(Z,{rowIndent:"rowIndent"},function(){return this.va.rowIndent},function(a){this.va.rowIndent!==a&&(w.j(a,"number",Z,"rowIndent"),0<=a&&(this.va.rowIndent=a,this.J()))});w.defineProperty(Z,{commentSpacing:"commentSpacing"},function(){return this.va.commentSpacing},function(a){this.va.commentSpacing!==a&&(w.j(a,"number",Z,"commentSpacing"),this.va.commentSpacing=a,this.J())}); w.defineProperty(Z,{commentMargin:"commentMargin"},function(){return this.va.commentMargin},function(a){this.va.commentMargin!==a&&(w.j(a,"number",Z,"commentMargin"),this.va.commentMargin=a,this.J())});w.defineProperty(Z,{setsPortSpot:"setsPortSpot"},function(){return this.va.setsPortSpot},function(a){this.va.setsPortSpot!==a&&(w.j(a,"boolean",Z,"setsPortSpot"),this.va.setsPortSpot=a,this.J())}); w.defineProperty(Z,{portSpot:"portSpot"},function(){return this.va.portSpot},function(a){w.G(a,K,Z,"portSpot");this.va.portSpot.L(a)||(this.va.portSpot=a,this.J())});w.defineProperty(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.va.setsChildPortSpot},function(a){this.va.setsChildPortSpot!==a&&(w.j(a,"boolean",Z,"setsChildPortSpot"),this.va.setsChildPortSpot=a,this.J())}); -w.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.va.childPortSpot},function(a){w.G(a,K,Z,"childPortSpot");this.va.childPortSpot.L(a)||(this.va.childPortSpot=a,this.J())});w.defineProperty(Z,{BK:"alternateSorting"},function(){return this.wa.sorting},function(a){this.wa.sorting!==a&&(w.ob(a,Z,Z,"alternateSorting"),a===Hv||a===Iv||a===Jv||Kv)&&(this.wa.sorting=a,this.J())}); +w.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.va.childPortSpot},function(a){w.G(a,K,Z,"childPortSpot");this.va.childPortSpot.L(a)||(this.va.childPortSpot=a,this.J())});w.defineProperty(Z,{BK:"alternateSorting"},function(){return this.wa.sorting},function(a){this.wa.sorting!==a&&(w.ob(a,Z,Z,"alternateSorting"),a===Gv||a===Hv||a===Iv||Jv)&&(this.wa.sorting=a,this.J())}); w.defineProperty(Z,{pK:"alternateComparer"},function(){return this.wa.comparer},function(a){this.wa.comparer!==a&&(w.j(a,"function",Z,"alternateComparer"),this.wa.comparer=a,this.J())});w.defineProperty(Z,{jK:"alternateAngle"},function(){return this.wa.angle},function(a){this.wa.angle!==a&&(w.j(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.wa.angle=a,this.J())}); w.defineProperty(Z,{iK:"alternateAlignment"},function(){return this.wa.alignment},function(a){this.wa.alignment!==a&&(w.ob(a,Z,Z,"alternateAlignment"),this.wa.alignment=a,this.J())});w.defineProperty(Z,{tK:"alternateNodeIndent"},function(){return this.wa.nodeIndent},function(a){this.wa.nodeIndent!==a&&(w.j(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.wa.nodeIndent=a,this.J()))}); w.defineProperty(Z,{uK:"alternateNodeIndentPastParent"},function(){return this.wa.nodeIndentPastParent},function(a){this.wa.nodeIndentPastParent!==a&&(w.j(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.wa.nodeIndentPastParent=a,this.J()))});w.defineProperty(Z,{vK:"alternateNodeSpacing"},function(){return this.wa.nodeSpacing},function(a){this.wa.nodeSpacing!==a&&(w.j(a,"number",Z,"alternateNodeSpacing"),this.wa.nodeSpacing=a,this.J())}); w.defineProperty(Z,{rK:"alternateLayerSpacing"},function(){return this.wa.layerSpacing},function(a){this.wa.layerSpacing!==a&&(w.j(a,"number",Z,"alternateLayerSpacing"),this.wa.layerSpacing=a,this.J())});w.defineProperty(Z,{sK:"alternateLayerSpacingParentOverlap"},function(){return this.wa.layerSpacingParentOverlap},function(a){this.wa.layerSpacingParentOverlap!==a&&(w.j(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.wa.layerSpacingParentOverlap=a,this.J()))}); -w.defineProperty(Z,{oK:"alternateCompaction"},function(){return this.wa.compaction},function(a){this.wa.compaction!==a&&(w.ob(a,Z,Z,"alternateCompaction"),a===Sv||a===Uv)&&(this.wa.compaction=a,this.J())});w.defineProperty(Z,{kK:"alternateBreadthLimit"},function(){return this.wa.breadthLimit},function(a){this.wa.breadthLimit!==a&&(w.j(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.wa.breadthLimit=a,this.J()))}); +w.defineProperty(Z,{oK:"alternateCompaction"},function(){return this.wa.compaction},function(a){this.wa.compaction!==a&&(w.ob(a,Z,Z,"alternateCompaction"),a===Rv||a===Tv)&&(this.wa.compaction=a,this.J())});w.defineProperty(Z,{kK:"alternateBreadthLimit"},function(){return this.wa.breadthLimit},function(a){this.wa.breadthLimit!==a&&(w.j(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.wa.breadthLimit=a,this.J()))}); w.defineProperty(Z,{yK:"alternateRowSpacing"},function(){return this.wa.rowSpacing},function(a){this.wa.rowSpacing!==a&&(w.j(a,"number",Z,"alternateRowSpacing"),this.wa.rowSpacing=a,this.J())});w.defineProperty(Z,{xK:"alternateRowIndent"},function(){return this.wa.rowIndent},function(a){this.wa.rowIndent!==a&&(w.j(a,"number",Z,"alternateRowIndent"),0<=a&&(this.wa.rowIndent=a,this.J()))}); w.defineProperty(Z,{nK:"alternateCommentSpacing"},function(){return this.wa.commentSpacing},function(a){this.wa.commentSpacing!==a&&(w.j(a,"number",Z,"alternateCommentSpacing"),this.wa.commentSpacing=a,this.J())});w.defineProperty(Z,{mK:"alternateCommentMargin"},function(){return this.wa.commentMargin},function(a){this.wa.commentMargin!==a&&(w.j(a,"number",Z,"alternateCommentMargin"),this.wa.commentMargin=a,this.J())}); w.defineProperty(Z,{AK:"alternateSetsPortSpot"},function(){return this.wa.setsPortSpot},function(a){this.wa.setsPortSpot!==a&&(w.j(a,"boolean",Z,"alternateSetsPortSpot"),this.wa.setsPortSpot=a,this.J())});w.defineProperty(Z,{wK:"alternatePortSpot"},function(){return this.wa.portSpot},function(a){w.G(a,K,Z,"alternatePortSpot");this.wa.portSpot.L(a)||(this.wa.portSpot=a,this.J())}); -w.defineProperty(Z,{zK:"alternateSetsChildPortSpot"},function(){return this.wa.setsChildPortSpot},function(a){this.wa.setsChildPortSpot!==a&&(w.j(a,"boolean",Z,"alternateSetsChildPortSpot"),this.wa.setsChildPortSpot=a,this.J())});w.defineProperty(Z,{lK:"alternateChildPortSpot"},function(){return this.wa.childPortSpot},function(a){w.G(a,K,Z,"alternateChildPortSpot");this.wa.childPortSpot.L(a)||(this.wa.childPortSpot=a,this.J())});var kv;Z.PathDefault=kv=w.p(Z,"PathDefault",-1);var lv; -Z.PathDestination=lv=w.p(Z,"PathDestination",0);var sv;Z.PathSource=sv=w.p(Z,"PathSource",1);var Hv;Z.SortingForwards=Hv=w.p(Z,"SortingForwards",10);var Iv;Z.SortingReverse=Iv=w.p(Z,"SortingReverse",11);var Jv;Z.SortingAscending=Jv=w.p(Z,"SortingAscending",12);var Kv;Z.SortingDescending=Kv=w.p(Z,"SortingDescending",13);var Mw;Z.AlignmentCenterSubtrees=Mw=w.p(Z,"AlignmentCenterSubtrees",20);var Lv;Z.AlignmentCenterChildren=Lv=w.p(Z,"AlignmentCenterChildren",21);var Wv; -Z.AlignmentStart=Wv=w.p(Z,"AlignmentStart",22);var Xv;Z.AlignmentEnd=Xv=w.p(Z,"AlignmentEnd",23);var Nv;Z.AlignmentBus=Nv=w.p(Z,"AlignmentBus",24);var Cv;Z.AlignmentBusBranching=Cv=w.p(Z,"AlignmentBusBranching",25);var Ov;Z.AlignmentTopLeftBus=Ov=w.p(Z,"AlignmentTopLeftBus",26);var Pv;Z.AlignmentBottomRightBus=Pv=w.p(Z,"AlignmentBottomRightBus",27);var Sv;Z.CompactionNone=Sv=w.p(Z,"CompactionNone",30);var Uv;Z.CompactionBlock=Uv=w.p(Z,"CompactionBlock",31);var mv; -Z.StyleLayered=mv=w.p(Z,"StyleLayered",40);var Gv;Z.StyleLastParents=Gv=w.p(Z,"StyleLastParents",41);var Fv;Z.StyleAlternating=Fv=w.p(Z,"StyleAlternating",42);var Ev;Z.StyleRootOnly=Ev=w.p(Z,"StyleRootOnly",43);var ov;Z.ArrangementVertical=ov=w.p(Z,"ArrangementVertical",50);var Vw;Z.ArrangementHorizontal=Vw=w.p(Z,"ArrangementHorizontal",51);var rv;Z.ArrangementFixedRoots=rv=w.p(Z,"ArrangementFixedRoots",52);var nv;Z.LayerIndividual=nv=w.p(Z,"LayerIndividual",60);var Av; -Z.LayerSiblings=Av=w.p(Z,"LayerSiblings",61);var zv;Z.LayerUniform=zv=w.p(Z,"LayerUniform",62);function qv(){ug.call(this)}w.La(qv,ug);w.ga("TreeNetwork",qv);qv.prototype.createVertex=function(){return new pv};qv.prototype.createEdge=function(){return new Xw}; -function pv(){ms.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.pa=new y(0,0);this.kb=new ia(0,0);this.Oa=new y(0,0);this.vq=this.uq=this.zJ=!1;this.Su=this.xu=null;this.sorting=Hv;this.comparer=ss;this.angle=0;this.alignment=Lv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Uv;this.breadthLimit= -0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=qc;this.setsChildPortSpot=!0;this.childPortSpot=qc}w.La(pv,ms);w.ga("TreeVertex",pv); -pv.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing, -this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};w.u(pv,{on:"childrenCount"},function(){return this.children.length});w.defineProperty(pv,{ML:"relativePosition"},function(){return this.pa},function(a){this.pa.set(a)});w.defineProperty(pv,{YL:"subtreeSize"},function(){return this.kb},function(a){this.kb.set(a)}); -w.defineProperty(pv,{XL:"subtreeOffset"},function(){return this.Oa},function(a){this.Oa.set(a)});function Xw(){ns.call(this);this.Ts=new y(0,0)}w.La(Xw,ns);w.ga("TreeEdge",Xw); -Xw.prototype.commit=function(){var a=this.link;if(null!==a&&!a.$l){var b=this.network.Tb,c=null,d=null;switch(b.Of){case lv:c=this.fromVertex;d=this.toVertex;break;case sv:c=this.toVertex;d=this.fromVertex;break;default:w.k("Unhandled path value "+b.Of.toString())}if(null!==c&&null!==d)if(b=this.Ts,0!==b.x||0!==b.y||c.zJ){var d=c.ab,e=Vv(c),f=Yv(c),h=c.rowSpacing;a.bo();var k=a.bf===tj,l=a.ac,m=0,n,p;a.km();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Zv(c))))):c.alignment===Wv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Zv(c))))):c.alignment===Wv?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Zv(c))))):c.alignment===Wv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Zv(c))))):c.alignment===Wv?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.x Data Flow Diagram - + @@ -174,7 +174,7 @@

- This sample demonstrates labeled ports on nodes. These ports are set up as panels, created within + This sample demonstrates labeled ports on nodes, arranged as a data flow or workflow. These ports are set up as panels, created within the makePort function. This function sets various properties of the Shape and TextBlock that make up the panel, and properties of the panel itself. Most notable are GraphObject.portId to declare the shape as a port, and GraphObject.fromLinkable and diff --git a/samples/dataFlowVertical.html b/samples/dataFlowVertical.html index eb3ee1da4..e168949f8 100644 --- a/samples/dataFlowVertical.html +++ b/samples/dataFlowVertical.html @@ -3,7 +3,7 @@ Data Flow Diagram - + @@ -174,7 +174,7 @@

- This sample demonstrates labeled ports on nodes. These ports are set up as panels, created within + This sample demonstrates a data flow or workflow graph with labeled ports on nodes. These ports are set up as panels, created within the makePort function. This function sets various properties of the Shape and TextBlock that make up the panel, and properties of the panel itself. Most notable are GraphObject.portId to declare the shape as a port, and GraphObject.fromLinkable and diff --git a/samples/pageFlow.html b/samples/pageFlow.html index 8867e9d54..b0b6445e6 100644 --- a/samples/pageFlow.html +++ b/samples/pageFlow.html @@ -3,7 +3,7 @@ Page Flow - + @@ -272,7 +272,7 @@

- This sample uses the LayeredDigraphLayout to display some data about the flow of a fictional web site. + This workflow diagram uses the LayeredDigraphLayout to display some data about the flow of a fictional web site. You can add to the Diagram by dragging Nodes from the Palette and by buttons that appear when clicking on the Page (yellow) and Drop (red) Nodes.