From ae8314f14d8ebb83e53abde2baab7abb524b755c Mon Sep 17 00:00:00 2001 From: WalterNorthwoods Date: Thu, 4 May 2017 11:14:32 -0400 Subject: [PATCH] 1.7.9 * Added the Parallel Route sample, demonstrating a custom Link.computePoints method in order to have multiple links between the same two ports have parallel segments. This makes use of the ParallelRouteLink.js extension. * Fixed some instances of ticks not rendering on Graduated Panels with small Panel.graduatedTickUnit values. --- api/index.html | 2 +- api/symbols/ActionTool.html | 2 +- api/symbols/Adornment.html | 2 +- api/symbols/AnimationManager.html | 2 +- api/symbols/Binding.html | 2 +- api/symbols/Brush.html | 2 +- api/symbols/ChangedEvent.html | 2 +- api/symbols/CircularEdge.html | 2 +- api/symbols/CircularLayout.html | 2 +- api/symbols/CircularVertex.html | 2 +- api/symbols/ClickCreatingTool.html | 2 +- api/symbols/ClickSelectingTool.html | 2 +- api/symbols/CommandHandler.html | 2 +- api/symbols/ContextMenuTool.html | 2 +- api/symbols/Diagram.html | 2 +- api/symbols/DiagramEvent.html | 2 +- api/symbols/DragSelectingTool.html | 2 +- api/symbols/DraggingTool.html | 2 +- api/symbols/ForceDirectedEdge.html | 2 +- api/symbols/ForceDirectedLayout.html | 2 +- api/symbols/ForceDirectedVertex.html | 2 +- api/symbols/Geometry.html | 2 +- api/symbols/GraphLinksModel.html | 2 +- api/symbols/GraphObject.html | 2 +- api/symbols/GridLayout.html | 4 +- api/symbols/Group.html | 2 +- api/symbols/HTMLInfo.html | 2 +- api/symbols/InputEvent.html | 2 +- api/symbols/Iterable.html | 2 +- api/symbols/Iterator.html | 2 +- api/symbols/Layer.html | 2 +- api/symbols/LayeredDigraphEdge.html | 2 +- api/symbols/LayeredDigraphLayout.html | 2 +- api/symbols/LayeredDigraphVertex.html | 2 +- api/symbols/Layout.html | 2 +- api/symbols/LayoutEdge.html | 2 +- api/symbols/LayoutNetwork.html | 2 +- api/symbols/LayoutVertex.html | 2 +- api/symbols/Link.html | 2 +- api/symbols/LinkReshapingTool.html | 2 +- api/symbols/LinkingBaseTool.html | 2 +- api/symbols/LinkingTool.html | 2 +- api/symbols/List.html | 2 +- api/symbols/Map.html | 2 +- api/symbols/Margin.html | 2 +- api/symbols/Model.html | 2 +- api/symbols/Node.html | 2 +- api/symbols/Overview.html | 2 +- api/symbols/Palette.html | 2 +- api/symbols/Panel.html | 2 +- api/symbols/PanningTool.html | 2 +- api/symbols/Part.html | 2 +- api/symbols/PathFigure.html | 2 +- api/symbols/PathSegment.html | 2 +- api/symbols/Picture.html | 2 +- api/symbols/Placeholder.html | 2 +- api/symbols/Point.html | 2 +- api/symbols/Rect.html | 2 +- api/symbols/RelinkingTool.html | 2 +- api/symbols/ResizingTool.html | 2 +- api/symbols/RotatingTool.html | 2 +- api/symbols/RowColumnDefinition.html | 2 +- api/symbols/Set.html | 2 +- api/symbols/Shape.html | 2 +- api/symbols/Size.html | 2 +- api/symbols/Spot.html | 2 +- api/symbols/TextBlock.html | 2 +- api/symbols/TextEditingTool.html | 2 +- api/symbols/Tool.html | 2 +- api/symbols/ToolManager.html | 2 +- api/symbols/Transaction.html | 2 +- api/symbols/TreeEdge.html | 2 +- api/symbols/TreeLayout.html | 4 +- api/symbols/TreeModel.html | 2 +- api/symbols/TreeVertex.html | 2 +- api/symbols/UndoManager.html | 2 +- assets/images/screenshots/ParallelRoute.png | Bin 0 -> 11439 bytes doc/changelog.html | 12 + extensions/FloorPlanEditor.html | 42 +- extensions/ParallelRoute.html | 82 + extensions/ParallelRouteLink.js | 75 + extensions/PortShiftingTool.js | 7 +- intro/layers.html | 24 +- package.json | 2 +- release/go-debug.js | 1536 +++++++++---------- release/go.js | 1512 +++++++++--------- samples/all.html | 22 +- samples/indexList.js | 16 +- samples/treeMapper.html | 3 +- 89 files changed, 1844 insertions(+), 1645 deletions(-) create mode 100644 assets/images/screenshots/ParallelRoute.png create mode 100644 extensions/ParallelRoute.html create mode 100644 extensions/ParallelRouteLink.js diff --git a/api/index.html b/api/index.html index 670780bab..ba0fb49d4 100644 --- a/api/index.html +++ b/api/index.html @@ -1105,7 +1105,7 @@

GoJS Class Index

diff --git a/api/symbols/ActionTool.html b/api/symbols/ActionTool.html index c71786c72..06e65a52a 100644 --- a/api/symbols/ActionTool.html +++ b/api/symbols/ActionTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Adornment.html b/api/symbols/Adornment.html index 1fc4ba22b..0e798f87c 100644 --- a/api/symbols/Adornment.html +++ b/api/symbols/Adornment.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/AnimationManager.html b/api/symbols/AnimationManager.html index 5f141c5b5..672db09c6 100644 --- a/api/symbols/AnimationManager.html +++ b/api/symbols/AnimationManager.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Binding.html b/api/symbols/Binding.html index 30078eac5..8617da517 100644 --- a/api/symbols/Binding.html +++ b/api/symbols/Binding.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Brush.html b/api/symbols/Brush.html index 18c903e00..60ed9c827 100644 --- a/api/symbols/Brush.html +++ b/api/symbols/Brush.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ChangedEvent.html b/api/symbols/ChangedEvent.html index caff39462..2eff4ba5e 100644 --- a/api/symbols/ChangedEvent.html +++ b/api/symbols/ChangedEvent.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CircularEdge.html b/api/symbols/CircularEdge.html index 95a6a9eba..48daa742a 100644 --- a/api/symbols/CircularEdge.html +++ b/api/symbols/CircularEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CircularLayout.html b/api/symbols/CircularLayout.html index cd62334c6..e39dfcb0f 100644 --- a/api/symbols/CircularLayout.html +++ b/api/symbols/CircularLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CircularVertex.html b/api/symbols/CircularVertex.html index 381d8ed6c..939a4fc78 100644 --- a/api/symbols/CircularVertex.html +++ b/api/symbols/CircularVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ClickCreatingTool.html b/api/symbols/ClickCreatingTool.html index 6c9c16cb3..03a8face5 100644 --- a/api/symbols/ClickCreatingTool.html +++ b/api/symbols/ClickCreatingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ClickSelectingTool.html b/api/symbols/ClickSelectingTool.html index 3f66fe693..e8dd5b22d 100644 --- a/api/symbols/ClickSelectingTool.html +++ b/api/symbols/ClickSelectingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CommandHandler.html b/api/symbols/CommandHandler.html index fd2f9fabd..21a8eac0c 100644 --- a/api/symbols/CommandHandler.html +++ b/api/symbols/CommandHandler.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ContextMenuTool.html b/api/symbols/ContextMenuTool.html index 4f9b9a063..9d727b133 100644 --- a/api/symbols/ContextMenuTool.html +++ b/api/symbols/ContextMenuTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Diagram.html b/api/symbols/Diagram.html index 11ec1a4d2..148f7cbab 100644 --- a/api/symbols/Diagram.html +++ b/api/symbols/Diagram.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/DiagramEvent.html b/api/symbols/DiagramEvent.html index 129c28440..80d705828 100644 --- a/api/symbols/DiagramEvent.html +++ b/api/symbols/DiagramEvent.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/DragSelectingTool.html b/api/symbols/DragSelectingTool.html index efb1161a4..2c90b7150 100644 --- a/api/symbols/DragSelectingTool.html +++ b/api/symbols/DragSelectingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/DraggingTool.html b/api/symbols/DraggingTool.html index 79788ed57..96b30f9fb 100644 --- a/api/symbols/DraggingTool.html +++ b/api/symbols/DraggingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ForceDirectedEdge.html b/api/symbols/ForceDirectedEdge.html index 68e7cca11..fb5460add 100644 --- a/api/symbols/ForceDirectedEdge.html +++ b/api/symbols/ForceDirectedEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ForceDirectedLayout.html b/api/symbols/ForceDirectedLayout.html index afc87d809..ee4569c16 100644 --- a/api/symbols/ForceDirectedLayout.html +++ b/api/symbols/ForceDirectedLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ForceDirectedVertex.html b/api/symbols/ForceDirectedVertex.html index 857b99454..e71c4d267 100644 --- a/api/symbols/ForceDirectedVertex.html +++ b/api/symbols/ForceDirectedVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Geometry.html b/api/symbols/Geometry.html index 52afedeb9..8a6cc11e8 100644 --- a/api/symbols/Geometry.html +++ b/api/symbols/Geometry.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/GraphLinksModel.html b/api/symbols/GraphLinksModel.html index cb79e592e..e25ee502d 100644 --- a/api/symbols/GraphLinksModel.html +++ b/api/symbols/GraphLinksModel.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/GraphObject.html b/api/symbols/GraphObject.html index e2157de08..10d5422a6 100644 --- a/api/symbols/GraphObject.html +++ b/api/symbols/GraphObject.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/GridLayout.html b/api/symbols/GridLayout.html index 7003fabf4..7485e5e4e 100644 --- a/api/symbols/GridLayout.html +++ b/api/symbols/GridLayout.html @@ -1111,7 +1111,7 @@
@@ -1258,7 +1258,7 @@

Properties Summary
-

Gets or sets the comparison function used to sort the parts.More...

The default value is a case-insensitive alphabetic comparison using the Part.text property of each part. +

Gets or sets the comparison function used to sort the parts.More...

The default value is a case-insensitive alphabetic comparison using the Part.text property of each part.
  $(go.GridLayout,
    {
      sorting: go.TreeLayout.SortingAscending,
      comparer: function(pa, pb) {
        var da = pa.data;
        var db = pb.data;
        if (da.someProperty < db.someProperty) return -1;
        if (da.someProperty > db.someProperty) return 1;
        return 0;
      }
    }
  )
diff --git a/api/symbols/Group.html b/api/symbols/Group.html index e3f1c6c6a..52b9aca57 100644 --- a/api/symbols/Group.html +++ b/api/symbols/Group.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/HTMLInfo.html b/api/symbols/HTMLInfo.html index e5e9bc8ce..18f781372 100644 --- a/api/symbols/HTMLInfo.html +++ b/api/symbols/HTMLInfo.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/InputEvent.html b/api/symbols/InputEvent.html index db08a5fcc..7a35ebf04 100644 --- a/api/symbols/InputEvent.html +++ b/api/symbols/InputEvent.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Iterable.html b/api/symbols/Iterable.html index ab2e701d2..d0a02ddbe 100644 --- a/api/symbols/Iterable.html +++ b/api/symbols/Iterable.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Iterator.html b/api/symbols/Iterator.html index ca9084c31..00c0fcf30 100644 --- a/api/symbols/Iterator.html +++ b/api/symbols/Iterator.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Layer.html b/api/symbols/Layer.html index f3a38f866..ed91cb914 100644 --- a/api/symbols/Layer.html +++ b/api/symbols/Layer.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayeredDigraphEdge.html b/api/symbols/LayeredDigraphEdge.html index 26887f84e..966e3f9a9 100644 --- a/api/symbols/LayeredDigraphEdge.html +++ b/api/symbols/LayeredDigraphEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayeredDigraphLayout.html b/api/symbols/LayeredDigraphLayout.html index dd66843c2..ba753f671 100644 --- a/api/symbols/LayeredDigraphLayout.html +++ b/api/symbols/LayeredDigraphLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayeredDigraphVertex.html b/api/symbols/LayeredDigraphVertex.html index fa65c7adc..b12eede2a 100644 --- a/api/symbols/LayeredDigraphVertex.html +++ b/api/symbols/LayeredDigraphVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Layout.html b/api/symbols/Layout.html index ff49c00b1..1debd3c54 100644 --- a/api/symbols/Layout.html +++ b/api/symbols/Layout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayoutEdge.html b/api/symbols/LayoutEdge.html index 4b11d6727..0686e8152 100644 --- a/api/symbols/LayoutEdge.html +++ b/api/symbols/LayoutEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayoutNetwork.html b/api/symbols/LayoutNetwork.html index 7b49ef9d5..be1887387 100644 --- a/api/symbols/LayoutNetwork.html +++ b/api/symbols/LayoutNetwork.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayoutVertex.html b/api/symbols/LayoutVertex.html index e42a05e08..1f3d9ef8f 100644 --- a/api/symbols/LayoutVertex.html +++ b/api/symbols/LayoutVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Link.html b/api/symbols/Link.html index 8a88ad3fd..b24f50ee1 100644 --- a/api/symbols/Link.html +++ b/api/symbols/Link.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LinkReshapingTool.html b/api/symbols/LinkReshapingTool.html index f862062a9..ffb217009 100644 --- a/api/symbols/LinkReshapingTool.html +++ b/api/symbols/LinkReshapingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LinkingBaseTool.html b/api/symbols/LinkingBaseTool.html index 334340ea4..98750f018 100644 --- a/api/symbols/LinkingBaseTool.html +++ b/api/symbols/LinkingBaseTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LinkingTool.html b/api/symbols/LinkingTool.html index 26973557b..44310c6d8 100644 --- a/api/symbols/LinkingTool.html +++ b/api/symbols/LinkingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/List.html b/api/symbols/List.html index e96267a33..08ba03f5e 100644 --- a/api/symbols/List.html +++ b/api/symbols/List.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Map.html b/api/symbols/Map.html index f287668d3..45cea0337 100644 --- a/api/symbols/Map.html +++ b/api/symbols/Map.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Margin.html b/api/symbols/Margin.html index 796e130ce..7396e72a7 100644 --- a/api/symbols/Margin.html +++ b/api/symbols/Margin.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Model.html b/api/symbols/Model.html index db5c4f169..b197d1a8c 100644 --- a/api/symbols/Model.html +++ b/api/symbols/Model.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Node.html b/api/symbols/Node.html index 075caeea6..66e8648fd 100644 --- a/api/symbols/Node.html +++ b/api/symbols/Node.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Overview.html b/api/symbols/Overview.html index 06cf9ac7e..2f74bc214 100644 --- a/api/symbols/Overview.html +++ b/api/symbols/Overview.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Palette.html b/api/symbols/Palette.html index 1412fd7a1..679a650c7 100644 --- a/api/symbols/Palette.html +++ b/api/symbols/Palette.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Panel.html b/api/symbols/Panel.html index f6e116790..fde15bfba 100644 --- a/api/symbols/Panel.html +++ b/api/symbols/Panel.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/PanningTool.html b/api/symbols/PanningTool.html index 85a282628..9a78acb91 100644 --- a/api/symbols/PanningTool.html +++ b/api/symbols/PanningTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Part.html b/api/symbols/Part.html index 0df8d75df..180969d2b 100644 --- a/api/symbols/Part.html +++ b/api/symbols/Part.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/PathFigure.html b/api/symbols/PathFigure.html index b8c7e59b3..b48fca4f3 100644 --- a/api/symbols/PathFigure.html +++ b/api/symbols/PathFigure.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/PathSegment.html b/api/symbols/PathSegment.html index 9f870f9f6..d03b54097 100644 --- a/api/symbols/PathSegment.html +++ b/api/symbols/PathSegment.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Picture.html b/api/symbols/Picture.html index f2e0f07c2..24d3d5510 100644 --- a/api/symbols/Picture.html +++ b/api/symbols/Picture.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Placeholder.html b/api/symbols/Placeholder.html index 1ea423b55..70bd17d4c 100644 --- a/api/symbols/Placeholder.html +++ b/api/symbols/Placeholder.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Point.html b/api/symbols/Point.html index bcba7199c..e4d263f4a 100644 --- a/api/symbols/Point.html +++ b/api/symbols/Point.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Rect.html b/api/symbols/Rect.html index 7e943db68..c524569e7 100644 --- a/api/symbols/Rect.html +++ b/api/symbols/Rect.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/RelinkingTool.html b/api/symbols/RelinkingTool.html index 2dbf83497..d8a4acea9 100644 --- a/api/symbols/RelinkingTool.html +++ b/api/symbols/RelinkingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ResizingTool.html b/api/symbols/ResizingTool.html index aefa7c2ae..7e26ad688 100644 --- a/api/symbols/ResizingTool.html +++ b/api/symbols/ResizingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/RotatingTool.html b/api/symbols/RotatingTool.html index 32a6012fc..8519f5696 100644 --- a/api/symbols/RotatingTool.html +++ b/api/symbols/RotatingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/RowColumnDefinition.html b/api/symbols/RowColumnDefinition.html index 913a89615..54fef1647 100644 --- a/api/symbols/RowColumnDefinition.html +++ b/api/symbols/RowColumnDefinition.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Set.html b/api/symbols/Set.html index ad3218942..69d9ba7b7 100644 --- a/api/symbols/Set.html +++ b/api/symbols/Set.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Shape.html b/api/symbols/Shape.html index 615f608c9..431c78bd8 100644 --- a/api/symbols/Shape.html +++ b/api/symbols/Shape.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Size.html b/api/symbols/Size.html index 21dd55552..f5f78ed8b 100644 --- a/api/symbols/Size.html +++ b/api/symbols/Size.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Spot.html b/api/symbols/Spot.html index 6eb4e1702..8abc956cd 100644 --- a/api/symbols/Spot.html +++ b/api/symbols/Spot.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TextBlock.html b/api/symbols/TextBlock.html index 940504d61..2ff3ec445 100644 --- a/api/symbols/TextBlock.html +++ b/api/symbols/TextBlock.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TextEditingTool.html b/api/symbols/TextEditingTool.html index 87ed2ffbe..b83de5962 100644 --- a/api/symbols/TextEditingTool.html +++ b/api/symbols/TextEditingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Tool.html b/api/symbols/Tool.html index d6307d843..dceb68583 100644 --- a/api/symbols/Tool.html +++ b/api/symbols/Tool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ToolManager.html b/api/symbols/ToolManager.html index 9fca1d42b..6ea8434bd 100644 --- a/api/symbols/ToolManager.html +++ b/api/symbols/ToolManager.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Transaction.html b/api/symbols/Transaction.html index f8cd797d8..433a58d3e 100644 --- a/api/symbols/Transaction.html +++ b/api/symbols/Transaction.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TreeEdge.html b/api/symbols/TreeEdge.html index ef8a2f109..080ab75fe 100644 --- a/api/symbols/TreeEdge.html +++ b/api/symbols/TreeEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TreeLayout.html b/api/symbols/TreeLayout.html index 58e4978cc..030ff81b2 100644 --- a/api/symbols/TreeLayout.html +++ b/api/symbols/TreeLayout.html @@ -1111,7 +1111,7 @@
@@ -1800,7 +1800,7 @@

Properties Summary
-

Gets or sets the default comparison function used for sorting the immediate children of a vertex.More...

The default comparer compares the LayoutVertex.node Text values.

This sets the rootDefaults' property of the same name. Whether this comparison function is used is determined by the value of sorting.

+

Gets or sets the default comparison function used for sorting the immediate children of a vertex.More...

The default comparer compares the LayoutVertex.node Text values.

This sets the rootDefaults' property of the same name. Whether this comparison function is used is determined by the value of sorting.

  $(go.TreeLayout,
    {
      sorting: go.TreeLayout.SortingAscending,
      comparer: function(va, vb) {
        var da = va.node.data;
        var db = vb.node.data;
        if (da.someProperty < db.someProperty) return -1;
        if (da.someProperty > db.someProperty) return 1;
        return 0;
      }
    }
  )
diff --git a/api/symbols/TreeModel.html b/api/symbols/TreeModel.html index 8fd9a91f5..a5ebd47f0 100644 --- a/api/symbols/TreeModel.html +++ b/api/symbols/TreeModel.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TreeVertex.html b/api/symbols/TreeVertex.html index 952a0e9f1..38957b6b3 100644 --- a/api/symbols/TreeVertex.html +++ b/api/symbols/TreeVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/UndoManager.html b/api/symbols/UndoManager.html index ffb0abb13..65e5bb0c5 100644 --- a/api/symbols/UndoManager.html +++ b/api/symbols/UndoManager.html @@ -1111,7 +1111,7 @@
diff --git a/assets/images/screenshots/ParallelRoute.png b/assets/images/screenshots/ParallelRoute.png new file mode 100644 index 0000000000000000000000000000000000000000..587dff654223cf369a91b8eb9a39b5cfb7e0e202 GIT binary patch literal 11439 zcmeHtXH-+)wr>DII!ILzq)2bl6{JXqNRbjkkr+Vfpg=?kMI=ZQ5D}2xTSy?3fCK@F z6p z5c}J|KbroaYEKYI-pJhOn*9T}%>tHZ9*z%JQk;-a&2RWK#x)IaHJUT`=ZX0@^33X= zJ8d}QPwP27tB}EFV*}2gzT=ejCb0LBC@K!5tP#}{t0~EV^iLyCZ2x*)RJiwao_|8rXHQF*UIdSwK?Xt?BsoSBOmH%LP4N6rx;m4 zZy5gf^8c1W6pAN9Kq8^R9MK{4tk=n*fov_+f;iyePkc zV7A2Ec^~e8MovCayjYmDP-`Ww8q!j|KH0-a1E=|LRhK{Ok`k2t^F96ej$tw8dG|%VtB_)=XnIUPcmyVv{C`=yUKJi4ZFT zJqt(lgaE+Uqmxm1&I_I_jrsI{Oi_RrVAhcat}e^S@~DoM=xYxM@+SSijPn6AB{IzK z!m`N!-(K+|n0NOmpT9dRb@YV z_^5NN9BsM)i4G52rH)?0G43djzL*k&o0)vV-?cps>u}RdmBSwi zk!H4czw{d98g`7~jr8;+ifv0z)1AA5KYgE{U7^o+Y5F6a28oj2G z$Zof2*;mFK; z?2$dWbAczhxiL>G-B?A}XD&D;`t6vFz8^e<&5-Y4XaU(s&O+lEY@q`o;>z zf2fd7fBKCzR5)W~X*7PNLfoihM)UZ`Cy(`ah3RH6HS>(k;W-oED^jq~1+yOEg2-O2 z-=+?IYX?4*aYt;$Ii!Kd_ylQ9uYN9nJx&wq*m>I;RIL372Z`GVDKT*T zHc#JK`mUjJmEcyX%DLSXH;urK-w(-7f`N^Sx;D(sG;dsJ6);0d=y0Br1g)#OVZK^* zsjPjr9RqHb4y79M{${sB;`?h^5%)CGokueA?mM_x^PLO03J(u-i_8#p{HR&bgP_dx zBLV_`JJp`tL(+l@Ic?y#w`$S8T5X{cwo`Z6dhJx(&XrUt)F{|GwA;4##IoeDG>Rl3Y#k^Fninme}-d+5;VOX*UJ)*oVbe(ntRJ`ZJZ zmqEB_RX;6ns&K?(mLg($!tVN86^JB<8d|z)z_?t&)u)>be~!BZXnz&N3Vol%BR=av zn@j;+H>ZG@YRl2@h?Sj5l14(ZwMnneT2))8)Xn%dypm>}YWmP*1LaJsd6E@B;x&@o zUtbP8gDj5nMIPkR-FQ1CoT#KQLGyLD8$IFHXl2=JxTHD3dSGy)^ZceNEcAf#&S4E% z9vXnI#C|O@kXH4Ui{a!$DAv~aS~SoJ71WHr54kQiUNLA?!;p1arT6KB>j(uG!U{E~ zM|H6u+O50Y@hZP6%989rmgA7*&q}rKoAhaP6K0-(uNj0a9HnzEJ^3}=Y^qcItU)ni zAbi*4CJ^UZGr@Bqpu4<9EXnr9MSs*CjPq-C>C{W|&qN0wn{SOxBv!56D}i!`ml9sK znTbz&C0+=tykB>{^@^rlMVF&wDR?LFllcns^vZMO6R)X(M(^4NqwwLn#8l}eNtW4N z*F~H_1tR{3;WyVco41&!>H_S2*mZHog9(5rZkIQ;8U+279wM{(5zwAcs=-ASC#s$bzR zl;YMAK&m-5YiI9lQ{oC!m4x`kzeGTvCKQ4tUcbz29ZT?y@VyF?PaRV7HGR>zn`-pC ztcFk^@X*34&xazx&i3+?GhXaTbw`&2^EcWzY!MO|26Qf_O4gv`b8(fDJyLz*xc7*o zS6C~*4wJhx`Nz({I(|HULv(O`a5rVCZ{q^md}YfNT|cg+ry8W!s+D-18tfU9tAa3e z>X-7!jo{9?eXv2pp?J^x&4-hw@MyPblH8v2PcY!``HS4}CFb5*1$5HoD-KsyEc@MS z)g{5bXq`Woe|m^wI+7LC*jH*tS1-sEjQg&OJz4Wy?vY(t4r7fo_ucBuPj1T0zN{w9 zrgXo0l*{$_$<8M%p=IO`hn%V(5ONVSEZ}Nia0+@i%|xI&>2k?=!}K+Q{F~zs;9uxP zF+w#$yEY*ox{D)>(L%AR!wWaf;$x1+zICR*A3)&QQ%1*PJSAZt0=cxV2nE@>8`(X} zduNl|R2bcXSP}%lJEIzKTfK`@ZE*@y7jDSfPW3n^+V{UGybX>vbDN)K&EwNxf(KXy zw#4V&xvyL%w8Ykzsb4Gk66`fPJT%RmyFM8jaVZPkahSWDF}ShW5ubW$?Sah%pOET! zx;RLIXbUYz`-PZ$p=F&(H+mtH&(-#Kv5Ft3yb5ZVk(`vt3 z&w|VGN9PNkj@!*fTx&0Wif&ah>QZh9@M7FlD2SYH#&2s{tgO*^3)~@cq34{-(2?b6 zNveb*4_5qre8l1Br?H3oyYh21QKJ|0qrK`2$HhkH%CH$j%X?2}rtb;~)Rw~}RNCy` zpVPWA`N=1nj2wQadcU#QIbPS9AWQp5@|HM;xQ_N!*%fh=M&~g9T1(L;Q1)$pKjS2E ztfVx?4k#@aY^0BEq+Yf=E^Xra>Gp&j;aC4mMDM*zy4KsB(^&q6azDzq3)ywo=!->J zQO0P3o1=sHFxo=DGvg!mJhN23+nFe}NP9-V$cPS|Z;THYRB9%KgHisZRi)b;4yp~f z=GJBZqlN+Kq>lxP<=gWL?FVXJI!KQ-w;}`6u1}}PY;Bp)Pg_DHTO z+lmFQBM?0a5aLd3F`OaN^o*h9UJ zBT=L`?`lwFo7PoR9+}bhm+{Vb(z3>V)B-jic**oLJn{u7%C=q9bCzT|8B0(9lotC< zW?*W_K?ZYu?BHiI;n^vnT|g&g^9@jccfFdWKeOxY>DAQ-0yd7U+l4<1ZTX5Tv5{Rj zE!a*Kv(mxi_?xyuZU;+O&5K^Y;EZfWFl3*uz&)p5nP#r0Rd2IOa<*zKTFzcctZc$} zZzE0ah7hgUTf<9G+P zVMn6np{bICwl71ACkBRMayci(zm6@}ABGjVcQzAypX7xGbo@RTPdY0ybBPloW@oOb zc_7l8E!%q9ly#T;eSA6YPVmTR_5||T_kPa;#clQ%>{fo?8+Fx%_OzVA5<0gFe%k^2 z`U2GXA?vBL3`A$wkwNS90eYkL=WLQR@*xLTWH3LM?g6YVT67xJI)1FJ7V;jtr8m9& zyhGi`mEVh7a^>)PVu!PHhr$#X_f_`Sjs^U7NXrziG#hlY`3sfB4pQEknT&PuFKSQcdJG)-&_j=47p zcbzIfAa{7i@5|*f4HEerxGf1sdQIO*<8xcD&XuTJnoq~{y5I*aG|qNi8d*(QVzn{fo zF5*|$`rLYCt@;m?4$b}WY9Sl`yikQ$9{uSv_Ob{MvXIDh)hka)_lFsur&_S! zSFY0N+Uv=4ll%m&?2S*BI$6BB-kXPy>aYdh8zsXxncl#DaFV*WdQ+sT@?q8H8%p&H zVOpM{Or=fGJ?Hz`Wf)d^S?v!5xfX(%N}gTzCZ}ce*;w@kSR3ip`O?9?!?9PUJT!T3w+Q;mCTLRgZ<8U zZ1#MqA7#G^JBibw`4JzF`_{S<-zQg+%l-`f_JZ=qG;>UQ()DRop6U&KYfEI<_WN%J z;YE#$&C*;s1ID<@Zxf`0E>eLp;`jvG){;-A6Mkz5^)lR@dism0A^!ZeBCm!bI*VK! z9jgafB9N(hJf^OPfE=)ixZxs`wSHaN>U7#J>v!{1sMK*D6~n*afAgeJhXxl106{a? z#`$U_x;~E@O&D8$0LGXT`mLl7qm9=!QPJaC7tL_d{ z#Y_8ie%l{I1B8wY{f?7#XfDOX<0hedcMQ}W4J)~V)>XN(TpFm3g9T;C2CB*7y=0r< zHT~g(2U@P1oxha7h zTE((}ms9x6D)F@|6UzRQ(`|>xi~Jbz6XR*pG7R_Rc&rda;1wn^%dPdXFnr0smVkg! zZ_UrkPQrA$^gJK15M(CWu{z%;@c2VbY|ZBGsSlAqI3d@~HSgnIy*9FxpmsvTR%o%Q zi0|V)k29yXcRq&SXOFXN9B{q$t)E2thzJlmPJ>KJ$I~@42@@@(eTad*gwcuumRg|( z>NbNIyIg^XRP0RNt^3M$?cv8Usr~*p59@Xot=H$YcBDv)fP;mezKW{oBiL!e(^{;? zE9@6{dkEV65C;tMbOt)NGH{60Fi<^!Hmj7E!i2y+6zpvHVUuAE%&burG=MI$STb!a z^?C{Ic*Q5l4OBN3PHbyZ?8mQEAt}rJI5{Q=l0CBYrSAgyL z^n`)#c9vgycLILrBsJZ|LQLV}^3(3*n->2_7^xSK1Xz2`x93CZFLvG=sf~AU{{(*- zFP$)eb_Bh(yA%nqY4BTbTB2)_w}6Fj`BkXz2cG#2EVF z72KJu!v^Y|FZp%71dfjvz=ko@^Nq%z{xTrVmwXX6d*wahtkug;*6aB~UA`=oSwZY% zf)3;BxD=dcwWJO%{`?n+Y{Op?v}8N#`Hn;YS*W7Y+YryOd!ew&?T_JoFtnOezus*Q z+8}_9lRiRwlcGrl-OeQvS#?>pZEk8ijBPa6^~K65bzM!#*P zx!5;y0I?nD9+nPRI|1?i@@&Kx_u+$m%gD_x+}HI5hg{4cto3w^6d*MLz@x5|CVP-m z=B--+%jh%E2-7O>_rG!YX?|+El?-R`dpn#^{F6(Ah-RKL!XVkE2MatL|Ju;Sn_fGA zj>^ttTq-qrs_W>}Xcf^Xd}=d31^1Yf5-9c|FclEuK%B%wQxv9*LD}WNUAfb_b0%h? z=CWMyr0}VLCn-3zf%+MWn_)I!HUqb=;yc`ivSLp@iQWD&dj6! zqezbn5(}yZ7LNMA06x*!anxl|wBD1kR5)m={xg!X z*7y_i6eblB)>%Xa1ho#~)kWFn&;haVyl|1#8b6S?14xioTzFss7$poV%nW@Rejc z=aZ`z_yqMK`UOxCOLxxjTi#5Rcg??fS>+7b%}QA=AZp{xL3h-K9VY|{*tWY}(NR|d zyxGk9ihIpRAn=lUKMPZ+5tqhzF@<~tHMJMzen$~6y-$z*4Qbdrai{x ze?EbR#f~)C@KWYSl3zz&lY~{L%&OFgR~1G-m{9y}U-s5lE+4hD01b2L`K8na6aeQ& zW@GMZ7Y=!4-FEKFHMTr=lyR_i>%r&`%paK9#=po zthG(E?)w(j$eDHeE>{+7km^%J_5vTm64S2mAw<e2d5+H)<@emln_k&nySdPW(no)1P1jK3Cf5G%?peF6J-v1hfY5zhvn+XkTIs$n$ z%VNY~icZCfT|f9DgEQ2BeP+859B-8RZd)eoH4hlYAP@dIC|0h@aS-Rlz}bu_(-Vh2ZB>_UQ3 z7B9_qoe*KtYE=d7+}@imvA`%B`+q_Wi#u66Srx9XUm(v@so`46=u=G~a@kI3@bH!C zO?5NS!>{yoK*NxK#TNL5fSY9Z#=q5yA-p9h6;v)KL1DpLI?`gtCQb(11E{%8$ z5Rx)pJuow4OV`(`Rdyfo)wY+YC@pvyWW$+d$Vr($3kZ)h%$mUBH4tJ=d*Dw-w;SG* zmpOAY)8;H{>i&O^h%=VpOrsPgjiagT^oUXTHE6(!%@y)YSOc{Mcin>=4~$fvn}d(3 z8Q4A5sJb8TZmkFs@EVl;ryoZ9p~dS9J%nvQH&Y#GyN^bjEk=nM zb|_ixE7HXmD(1fZJvqD5a|Bq98oY-yqAb)^{$=CoZ&;xFDhq&d3L3V*@HWdWha-W`C!^w0g$M`&2~ zDFMiCEHo@F26y#Q4i0UoUJxH*%P+n+foPyIhyjRB|Le`9&9HK;&2WXQF;udq2heD{ z#0Mk5EQRR)0VeDG*BAd4UQ_ia-bZl)?g}{3C2qbk7b{I_vX(WsWcd3p`LPU(fG?62 z{u)8-U;NfkfLM@B^5~_^nH^}DY7C?&{@-|taGsdMINS|V0T(6kVrN|n;=3kvl=d6(&qT4gV!!?E#f|Dpmzo|xF74tU3YLyUNMsK{rk|xS z7S)wOz|L*-6uM_c1BgivE=uZ9Rv{f-bSHNhGg5+%x7iks-|mvauGSw$UmylsNRT3V z8mI`spQ<>CTL4Sk04BvA!ZeUg6u84cxD#|i>_0#?nnJ&Vm!M&9?H2*0nj88ws|Nc_ zKw1Gjao_VG50iTJG1@QY4k5=&=(fQ>i(Ke$OM z?qtEzK0-XO@*jFVIB%o?rSOK4zu1TMxHu8{&vN@r$*T(Sz5;!OL5`LpcXD`rdY z*6s(2Y%z#CpbA#~R^XH#$j-Cf$)ll8n8SxnBWD0m^*A2VSn%a4AO_prQ(FUErB_n^15_lHvWGT|{Z1Y6AoHb)d{( zK#xpQFKT*p?)>}#Wa>fc+};2u{(7KLLHRiKEE@xLmJ!u;z?&7dAB8)y~JC3p&9NGH{!5k)TwIc1Y%*_yo(qIOP6X-(# zAgE@x25REd5O^CGB?=!w3%1{Gp#B=6px3|IvnH0k@xt-&Asn_muK01HYx)QrXHN;f z>?gn!qxGcG1Gk7q8dCMQY*^5=QE?SGz-8?w?)967_{u70dU%}!R9Ab>NIhe|H5YBA z@9<_C5G8{(btLU5L<2Ny-LevTi1$3h2@?PXxY%P1`$SMkIb{r6Po z&rn2dk&ETI`2I3%i+`#Ic_3{ata)FtW_?2zon+u3auxuXF2@t^UPI?`UpN_Zx^J1m zqsD&%*32g7SZW(^;iZocS-`7-x@B_y1{+_YcQLxHc{}qQ&8^dpaPvj*ApcvYoUOX4 znzaYjZJ8coYnY)9?x}GZETMtgMnq5ZczYE?Ty81n4EwloBOQi4$9U!f@NZhL6$-bvu2s@%~!H zeO~RUtm9|vBEE|w4$)3BN%pscZ_9&p->wj!UsP!uY+_Mz)HVYOr5XF-?9kbWn23_$ za>A=dhUp5Yk4h7A!`XZk#Ss401f>_~PY2RT&Kg|qYw8etiMPCykI|rN32EZw=;Q01mpH+ja!T*eQ(u0rzWd|eng2{(3zoR>T>UI~Am}Hccfd4*5En1_ z=m_8+02%qBELuzJ9Gjs72xFxmCz12dfkHC3t@F-q+{lyV-iP0nooHA1T^u7WOI+an(0=ALo>*w;>>@;u!zW>&bN&u%dZLHby zZM2_DPzBFl>vp)=gd(B#cs~7mN&4TrdUD* zV>0QcH&q;Uxf90d=dti|_XWh|^qmpZa#ddYz!{K83{F6~4c8o!32t4Vnlv0UHHRww z;+VSXfDWKjU3r^$sm|&28yQa0oct2=BpXnjyjD50i4D`RASFk7aF|{|27V@Jy{b`a z_PZPr9)3LTzc{`@TzW@))Mm>R?%%}#DrOSFsK4V)8t_+ad|3cBv!fzrY0 zYk_G3jB-$*`-!9v?FQOxa12Cd$TjFA_5WmQ?ky&YQrI7ffVwR^y%W2+^U?eOU2YzD zz_W`z~eNWAchvE)~TT9JlH@sX1d{P!{RsTZXhe6d~hxzqRME=~bD3x+= zRCsf&ih!tnY=WWQmEl>4{qXCGJAVbtREP6+HQe-`IX3 zUb}K}lA#8oyWvnxv`r}%TT!z~(;9z`n@lGVowpU#feyS|DJOBp7m#x(p5l~RiBly5 zW@64~zpw|L=(V#g@&1#&VX>UoWeXM6;25mBL;wH^$P8zWz6de3_RFVmVr5 z<)72))bZxGaC@!aYjMa3s>%7Qep;aSEr$OY%VZTw;M7)zQj|Sj%p@U|F*zyfqCnTb z8A9QV64Um4s}(t&Ym!UC&$HC#{F^)tSC;foQAbg2Z=jiOO_b?K`lFh1w+H+N_8==4 z=qy8R5e@{3 qp$B>(aWwyX`Jc$(Qg`FAUYh7#`n}iCi$Iex$lTbGoJS Change Log

} +

Changes for 1.7.9

+ +

Changes for 1.7.8

  • diff --git a/extensions/FloorPlanEditor.html b/extensions/FloorPlanEditor.html index 182c6c295..04fb169c6 100644 --- a/extensions/FloorPlanEditor.html +++ b/extensions/FloorPlanEditor.html @@ -173,22 +173,18 @@ } + + + + + +
    +
    +

    + A ParallelRouteLink is a custom Link that overrides Link.computePoints + in order to produce a middle segment that is parallel to the routes of other ParallelRouteLinks + connecting the same two ports. +

    +
    + + + \ No newline at end of file diff --git a/extensions/ParallelRouteLink.js b/extensions/ParallelRouteLink.js new file mode 100644 index 000000000..0967a014e --- /dev/null +++ b/extensions/ParallelRouteLink.js @@ -0,0 +1,75 @@ +"use strict"; +/* +* Copyright (C) 1998-2017 by Northwoods Software Corporation. All Rights Reserved. +*/ + +// A custom Link whose routing is parallel to other links connecting the same pair of ports + +/** +* @constructor +* @extends Link +* @class +* This custom Link class customizes its route to go parallel to other links connecting the same ports, +* if the link is not orthogonal and is not Bezier curved. +*/ +function ParallelRouteLink() { + go.Link.call(this); +} +go.Diagram.inherit(ParallelRouteLink, go.Link); + +/** +* @this {ParallelRouteLink} +* @return {boolean} +*/ +ParallelRouteLink.prototype.computePoints = function() { + var result = go.Link.prototype.computePoints.call(this); + if (!this.isOrthogonal && this.curve !== go.Link.Bezier && this.hasCurviness()) { + var curv = this.computeCurviness(); + if (curv !== 0) { + var num = this.pointsCount; + var pidx = 0; + var qidx = num-1; + if (num >= 4) { + pidx++; + qidx--; + } + + var frompt = this.getPoint(pidx); + var topt = this.getPoint(qidx); + var dx = topt.x - frompt.x; + var dy = topt.y - frompt.y; + + var mx = frompt.x + dx * 1 / 8; + var my = frompt.y + dy * 1 / 8; + var px = mx; + var py = my; + if (-0.01 < dy && dy < 0.01) { + if (dx > 0) py -= curv; else py += curv; + } else { + var slope = -dx / dy; + var e = Math.sqrt(curv * curv / (slope * slope + 1)); + if (curv < 0) e = -e; + px = (dy < 0 ? -1 : 1) * e + mx; + py = slope * (px - mx) + my; + } + + mx = frompt.x + dx * 7 / 8; + my = frompt.y + dy * 7 / 8; + var qx = mx; + var qy = my; + if (-0.01 < dy && dy < 0.01) { + if (dx > 0) qy -= curv; else qy += curv; + } else { + var slope = -dx / dy; + var e = Math.sqrt(curv * curv / (slope * slope + 1)); + if (curv < 0) e = -e; + qx = (dy < 0 ? -1 : 1) * e + mx; + qy = slope * (qx - mx) + my; + } + + this.insertPointAt(pidx+1, px, py); + this.insertPointAt(qidx+1, qx, qy); + } + } + return result; +}; diff --git a/extensions/PortShiftingTool.js b/extensions/PortShiftingTool.js index d3d81c7e3..62484b22a 100644 --- a/extensions/PortShiftingTool.js +++ b/extensions/PortShiftingTool.js @@ -55,10 +55,11 @@ PortShiftingTool.prototype.findPort = function() { var diagram = this.diagram; var e = diagram.firstInput; var elt = diagram.findObjectAt(e.documentPoint, null, null); - if (elt === null || !(elt.part instanceof go.Node)) return null; - while (elt.panel !== null && elt.panel.type === go.Panel.Spot && elt.panel.findMainElement() !== elt) { - if (elt.portId !== null && elt.portId !== "") return elt; + + while (elt !== null && elt.panel !== null) { + if (elt.panel.type === go.Panel.Spot && elt.panel.findMainElement() !== elt && + elt.portId !== null && elt.portId !== "") return elt; elt = elt.panel; } return null; diff --git a/intro/layers.html b/intro/layers.html index 00abad941..b37311c81 100644 --- a/intro/layers.html +++ b/intro/layers.html @@ -29,12 +29,12 @@

    Standard Layers

    These are their Layer.names, in order from furthest behind to most in front:

      -
    • "Grid"
    • +
    • "Grid", holding the Diagram.grid and any other static Parts that you wish to be behind everything
    • "Background"
    • "", the default layer
    • "Foreground"
    • -
    • "Adornment"
    • -
    • "Tool"
    • +
    • "Adornment", holding Adornments for selection and various Tools
    • +
    • "Tool", holding Parts used in the execution of various Tools

    Each Part is placed in a Layer according to its Part.layerName. @@ -75,26 +75,27 @@

    Layers Example

    diagram.addLayerBefore($(go.Layer, { name: "orange" }), forelayer); diagram.nodeTemplate = - $(go.Part, // no links or grouping, so can use the simpler Part class + $(go.Part, "Spot", // no links or grouping, so can use the simpler Part class new go.Binding("layerName", "color"), new go.Binding("location", "loc"), $(go.Shape, - { width: 100, height: 100 }, + { width: 80, height: 80 }, new go.Binding("fill", "color")), $(go.TextBlock, - new go.Binding("text", "", function(x) { return x.layer.name; }) - .ofObject()), + { stroke: "white", font: "bold 12px sans-serif" }), { selectionChanged: function(p) { - if (p.isSelected) p.layerName = "Foreground"; - else p.layerName = p.data.color; + p.layerName = (p.isSelected ? "Foreground" : p.data.color); + }, + layerChanged: function(p, oldLayer, newLayer) { + if (newLayer !== null) p.elt(1).text = newLayer.name; } } ); var array = []; for (var i = 0; i < 12; i++) { - var data = { loc: new go.Point(Math.random()*500, Math.random()*150) }; + var data = { loc: new go.Point(Math.random()*520, Math.random()*200) }; switch (Math.floor(Math.random()*3)) { case 0: data.color = "blue"; break; case 1: data.color = "green"; break; @@ -114,7 +115,7 @@

    Layers Example

    diagram.commitTransaction('toggle ' + layername); }; - + Layer visibility:
    blue green @@ -122,7 +123,6 @@

    Layers Example

    Foreground -

    ZOrder Example

    This example adds several Parts to one Layer (the default) in the diagram. diff --git a/package.json b/package.json index 67d1c7eef..b7340f2f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gojs", - "version": "1.7.8", + "version": "1.7.9", "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 c7d621ca5..1c3c3f1d6 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,58 +1,58 @@ /* - * GoJS v1.7.8 JavaScript Library for HTML Diagrams + * GoJS v1.7.9 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-2017 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.7.8/doc/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.7.9/doc/license.html. */ (function(window) { var f,aa={};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}); (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=d.length)){var e=D.vb(b,d);if(null!==e&&"function"!==typeof e){if(b.hasOwnProperty(d)){var g=Object.getPrototypeOf(b);if(g&&g.Cw&&g.Cw[d])continue}else if(D.Ox(b,d))continue;""===c&&(c=b+"\n");c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n"}}return c},qx:function(a,b){if(null!==b&&void 0!==b&&"number"!==typeof b&&"string"!== -typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==D.Gd(b)){if(!v.Pw.contains(b))if(v.Pw.add(b),v.sw.add(v.OE(a,b)),b instanceof K||b instanceof L||b instanceof ma)for(var c=b.j;c.next();)v.qx(a+"["+c.key+"]",c.value);else for(c in b){var d=D.vb(b,c);if(void 0!==d&&null!==d&&D.Ta(d)&&d!==b.Cw){if(b instanceof na){if(d===b.hi)continue}else if(b instanceof x){if("data"===c||d===b.Nd)continue;if("itemArray"===c||d===b.cj)continue;if(b instanceof F&&d===b.Ll)continue}else if(!(b instanceof -E))if(b instanceof oa){if("archetypeGroupData"===c||d===b.Yy)continue}else if(b instanceof ra){if("archetypeLinkData"===c||d===b.$y)continue;if("archetypeLabelNodeData"===c||d===b.Zy)continue}else if(b instanceof ta){if("archetypeNodeData"===c||d===b.ql)continue}else if(b instanceof M){if("nodeDataArray"===c||d===b.we)continue;if("linkDataArray"===c||d===b.bf||d===b.ii)continue;if(d===b.Fc)continue;if(d===b.xg)continue}else if(b instanceof va||b instanceof wa||b instanceof xa)continue;v.qx(a+"."+ -c,d)}}}else if(Array.isArray(b))for(c=0;c=d.length)){var e=D.vb(b,d);if(null!==e&&"function"!==typeof e){if(b.hasOwnProperty(d)){var g=Object.getPrototypeOf(b);if(g&&g.Fw&&g.Fw[d])continue}else if(D.Rx(b,d))continue;""===c&&(c=b+"\n");c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n"}}return c},ux:function(a,b){if(null!==b&&void 0!==b&&"number"!==typeof b&&"string"!== +typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==D.Gd(b)){if(!v.Sw.contains(b))if(v.Sw.add(b),v.tw.add(v.OE(a,b)),b instanceof K||b instanceof L||b instanceof ma)for(var c=b.j;c.next();)v.ux(a+"["+c.key+"]",c.value);else for(c in b){var d=D.vb(b,c);if(void 0!==d&&null!==d&&D.Ta(d)&&d!==b.Fw){if(b instanceof na){if(d===b.hi)continue}else if(b instanceof x){if("data"===c||d===b.Nd)continue;if("itemArray"===c||d===b.cj)continue;if(b instanceof F&&d===b.Ll)continue}else if(!(b instanceof +E))if(b instanceof oa){if("archetypeGroupData"===c||d===b.az)continue}else if(b instanceof ra){if("archetypeLinkData"===c||d===b.cz)continue;if("archetypeLabelNodeData"===c||d===b.bz)continue}else if(b instanceof ta){if("archetypeNodeData"===c||d===b.ql)continue}else if(b instanceof M){if("nodeDataArray"===c||d===b.we)continue;if("linkDataArray"===c||d===b.bf||d===b.ii)continue;if(d===b.Fc)continue;if(d===b.xg)continue}else if(b instanceof va||b instanceof wa||b instanceof xa)continue;v.ux(a+"."+ +c,d)}}}else if(Array.isArray(b))for(c=0;c=a.length?a.push(c):a.splice(b,0,c):D.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Ug:function(a, -b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):D.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Qy:[],O:function(){var a=D.Qy.pop();return void 0===a?new O:a},Fb:function(a,b){var c=D.Qy.pop();if(void 0===c)return new O(a,b);c.x=a;c.y=b;return c},A:function(a){D.Qy.push(a)},lC:[],Cm:function(){var a=D.lC.pop();return void 0===a?new Ca:a},Rk:function(a){D.lC.push(a)},Ry:[],Of:function(){var a=D.Ry.pop();return void 0===a?new B:a},sg:function(a,b,c,d){var e=D.Ry.pop(); -if(void 0===e)return new B(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Kb:function(a){D.Ry.push(a)},mC:[],Pf:function(){var a=D.mC.pop();return void 0===a?new Da:a},He:function(a){D.mC.push(a)},Sy:null,v:function(){var a=D.Sy;return null!==a?(D.Sy=null,a):new Ea},u:function(a){a.reset();D.Sy=a},kC:[],tb:function(){var a=D.kC.pop();return void 0===a?[]:a},Ba:function(a){a.length=0;D.kC.push(a)},Eo:Object.freeze([]),Gm:1,uc:function(a){a.__gohashid=D.Gm++},rq:function(a){var b=a.__gohashid; -void 0===b&&(b=D.Gm++,a.__gohashid=b);return b},Gd:function(a){return a.__gohashid},ja:function(a,b){b.ez=a;aa[a]=b},Sa:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Bi:function(a){a.EH=!0},defineProperty:function(a,b,c,d,e){D.h(a,"function","Util.defineProperty:classfunc");D.h(b,"object","Util.defineProperty:propobj");D.h(c,"function","Util.defineProperty:getter");D.h(d,"function","Util.defineProperty:setter");for(var g in b){b=b[g];c={get:c,set:d, +b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):D.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Ty:[],O:function(){var a=D.Ty.pop();return void 0===a?new O:a},Fb:function(a,b){var c=D.Ty.pop();if(void 0===c)return new O(a,b);c.x=a;c.y=b;return c},A:function(a){D.Ty.push(a)},lC:[],Cm:function(){var a=D.lC.pop();return void 0===a?new Ca:a},Rk:function(a){D.lC.push(a)},Uy:[],Of:function(){var a=D.Uy.pop();return void 0===a?new B:a},sg:function(a,b,c,d){var e=D.Uy.pop(); +if(void 0===e)return new B(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Kb:function(a){D.Uy.push(a)},mC:[],Pf:function(){var a=D.mC.pop();return void 0===a?new Da:a},He:function(a){D.mC.push(a)},Vy:null,v:function(){var a=D.Vy;return null!==a?(D.Vy=null,a):new Ea},u:function(a){a.reset();D.Vy=a},kC:[],tb:function(){var a=D.kC.pop();return void 0===a?[]:a},Ba:function(a){a.length=0;D.kC.push(a)},Eo:Object.freeze([]),Gm:1,uc:function(a){a.__gohashid=D.Gm++},rq:function(a){var b=a.__gohashid; +void 0===b&&(b=D.Gm++,a.__gohashid=b);return b},Gd:function(a){return a.__gohashid},ja:function(a,b){b.hz=a;aa[a]=b},Sa:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Bi:function(a){a.EH=!0},defineProperty:function(a,b,c,d,e){D.h(a,"function","Util.defineProperty:classfunc");D.h(b,"object","Util.defineProperty:propobj");D.h(c,"function","Util.defineProperty:getter");D.h(d,"function","Util.defineProperty:setter");for(var g in b){b=b[g];c={get:c,set:d, enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,g,c);e=Object.getOwnPropertyDescriptor(a.prototype,g);b&&e&&Object.defineProperty(a.prototype,b,e);break}},FK:!1,w:function(a,b,c,d){D.h(a,"function","Util.defineReadOnlyProperty:classfunc");D.h(b,"object","Util.defineReadOnlyProperty:propobj");D.h(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var g=b[e];b={get:c,set:function(a){D.k('The property "'+g+'" is read-only and cannot be set to '+ -a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);g&&d&&Object.defineProperty(a.prototype,g,d);break}},ke:function(a,b){for(var c in b)b[c]=!0;a.prototype.Cw=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?D.qf(a):null===a?"*":""},qf:function(a){if("function"===typeof a){if(a.ez)return a.ez;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9, -c).trim();if(""!==b)return a.ez=b}else if("object"===typeof a&&a.constructor)return D.qf(a.constructor);return typeof a},s:function(a,b,c){D.h(a,"function","Util.defineEnumValue:classfunc");D.h(b,"string","Util.defineEnumValue:name");D.h(c,"number","Util.defineEnumValue:num");c=new za(a,b,c);Object.freeze(c);a[b]=c;var d=a.kv;d instanceof ma||(d=new ma("string",za),a.kv=d);d.add(b,c);return c},vb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute? -(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())}},Yu: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[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;cd;d++)b[D.Vg("7ca11abfd7330390")](D.Vg(c[d-1]),10,15*d+0);b[D.Vg("7ca11abfd022028846")]=D.Vg("39f046ebb36e4b");for(d=1;5>d;d++)b[D.Vg("7ca11abfd7330390")](D.Vg(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 za(a,b,2);Object.freeze(c);a[b]=c;var d=a.kv;d instanceof ma||(d=new ma("string",za),a.kv=d);d.add(b,c);return c};return a}();function za(a,b,c){D.uc(this);this.vC=a;this.Xb=b;this.IH=c}D.ja("EnumValue",za);za.prototype.toString=function(){return D.qf(this.vC)+"."+this.Xb};D.w(za,{Ne:"classType"},function(){return this.vC});D.w(za,{name:"name"},function(){return this.Xb});D.w(za,{value:"value"},function(){return this.IH}); -var Ha;za.findName=Ha=function(a,b){if(void 0===b||null===b||""===b)return null;D.h(a,"function","findName:classfunc");D.h(b,"string","EnumValue.findName:name");var c=a.kv;return c instanceof ma?c.na(b):null};function ya(){this.uC=[]}ya.prototype.toString=function(){return this.uC.join("")};ya.prototype.add=function(a){""!==a&&this.uC.push(a)};function la(){} -function Ia(a){void 0===a&&(a=42);this.seed=a;this.My=48271;this.jv=2147483647;this.jC=this.jv/this.My;this.qH=this.jv%this.My;this.pH=1/this.jv;this.random()}Ia.prototype.random=function(){var a=this.seed%this.jC*this.My-this.seed/this.jC*this.qH;this.seed=0this.key)return!1;D.Va(a)}var a=a.o,b=a.length,c=++this.Dc,d=this.ni;if(null!==d)for(;c=this.yd)return Ka;var a=this.Wb;return null!==a?(a.reset(),a):new Qa(this)});function Sa(a){this.Ma=a;this.$a=a.G;this.bb=null}D.ke(Sa,{key:!0,value:!0});D.w(Sa,{j:"iterator"},function(){return this});Sa.prototype.reset=Sa.prototype.reset=function(){this.$a=this.Ma.G;this.bb=null}; Sa.prototype.next=Sa.prototype.next=function(){var a=this.Ma;if(a.G!==this.$a){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ka:b.fb;if(null!==b)return this.bb=b,this.value=this.key=a=b.key,!0;this.Rf();return!1};Sa.prototype.hasNext=function(){return this.next()};Sa.prototype.first=Sa.prototype.first=function(){var a=this.Ma;this.$a=a.G;a=a.Ka;return null!==a?(this.bb=a,this.value=this.key=a=a.key):null}; @@ -123,14 +123,14 @@ D.w(ma,{j:"iterator"},function(){if(0>=this.count)return Ka;var a=this.Wb;return D.ja("Point",O);D.Bi(O);D.ke(O,{x:!0,y:!0});O.prototype.assign=function(a){this.L=a.L;this.M=a.M};O.prototype.setTo=O.prototype.n=function(a,b){v&&(D.h(a,"number",O,"setTo:x"),D.h(b,"number",O,"setTo:y"));this.L=a;this.M=b;return this};O.prototype.set=O.prototype.set=function(a){v&&D.l(a,O,O,"set:p");this.Ra();this.L=a.L;this.M=a.M;return this};O.prototype.copy=function(){var a=new O;a.L=this.L;a.M=this.M;return a};f=O.prototype;f.Na=function(){this.J=!0;Object.freeze(this);return this}; f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; O.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new O(c,e)}return new O};O.stringify=function(a){v&&D.l(a,O);return a.x.toString()+" "+a.y.toString()};O.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};O.prototype.equals=O.prototype.P=function(a){return a instanceof O?this.L===a.x&&this.M===a.y:!1}; -O.prototype.equalTo=O.prototype.Dx=function(a,b){return this.L===a&&this.M===b};O.prototype.equalsApprox=O.prototype.Tc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)};O.prototype.add=O.prototype.add=function(a){v&&D.l(a,O,O,"add:p");this.Ra();this.L+=a.x;this.M+=a.y;return this};O.prototype.subtract=O.prototype.xo=function(a){v&&D.l(a,O,O,"subtract:p");this.Ra();this.L-=a.x;this.M-=a.y;return this}; +O.prototype.equalTo=O.prototype.Gx=function(a,b){return this.L===a&&this.M===b};O.prototype.equalsApprox=O.prototype.Tc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)};O.prototype.add=O.prototype.add=function(a){v&&D.l(a,O,O,"add:p");this.Ra();this.L+=a.x;this.M+=a.y;return this};O.prototype.subtract=O.prototype.xo=function(a){v&&D.l(a,O,O,"subtract:p");this.Ra();this.L-=a.x;this.M-=a.y;return this}; O.prototype.offset=O.prototype.offset=function(a,b){v&&(D.p(a,O,"offset:dx"),D.p(b,O,"offset:dy"));this.Ra();this.L+=a;this.M+=b;return this};O.prototype.rotate=O.prototype.rotate=function(a){v&&D.p(a,O,"rotate:angle");this.Ra();if(0===a)return this;var b=this.L,c=this.M;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.L=d*b-e*c;this.M=e*b+d*c;return this}; -O.prototype.scale=O.prototype.scale=function(a,b){v&&(D.p(a,O,"scale:sx"),D.p(b,O,"scale:sy"));this.L*=a;this.M*=b;return this};O.prototype.distanceSquaredPoint=O.prototype.Cf=function(a){v&&D.l(a,O,O,"distanceSquaredPoint:p");var b=a.x-this.L;a=a.y-this.M;return b*b+a*a};O.prototype.distanceSquared=O.prototype.lq=function(a,b){v&&(D.p(a,O,"distanceSquared:px"),D.p(b,O,"distanceSquared:py"));var c=a-this.L,d=b-this.M;return c*c+d*d}; +O.prototype.scale=O.prototype.scale=function(a,b){v&&(D.p(a,O,"scale:sx"),D.p(b,O,"scale:sy"));this.L*=a;this.M*=b;return this};O.prototype.distanceSquaredPoint=O.prototype.Df=function(a){v&&D.l(a,O,O,"distanceSquaredPoint:p");var b=a.x-this.L;a=a.y-this.M;return b*b+a*a};O.prototype.distanceSquared=O.prototype.lq=function(a,b){v&&(D.p(a,O,"distanceSquared:px"),D.p(b,O,"distanceSquared:py"));var c=a-this.L,d=b-this.M;return c*c+d*d}; O.prototype.normalize=O.prototype.normalize=function(){this.Ra();var a=this.L,b=this.M,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}O.prototype.projectOntoLineSegment=function(a,b,c,d){v&&(D.p(a,O,"projectOntoLineSegment:px"),D.p(b,O,"projectOntoLineSegment:py"),D.p(c,O,"projectOntoLineSegment:qx"),D.p(d,O,"projectOntoLineSegment:qy"));eb(a,b,c,d,this.L,this.M,this);return this}; O.prototype.projectOntoLineSegmentPoint=function(a,b){v&&(D.l(a,O,O,"projectOntoLineSegmentPoint:p"),D.l(b,O,O,"projectOntoLineSegmentPoint:q"));eb(a.x,a.y,b.x,b.y,this.L,this.M,this);return this};O.prototype.snapToGrid=function(a,b,c,d){v&&(D.p(a,O,"snapToGrid:originx"),D.p(b,O,"snapToGrid:originy"),D.p(c,O,"snapToGrid:cellwidth"),D.p(d,O,"snapToGrid:cellheight"));fb(this.L,this.M,a,b,c,d,this);return this}; O.prototype.snapToGridPoint=function(a,b){v&&(D.l(a,O,O,"snapToGridPoint:p"),D.l(b,Ca,O,"snapToGridPoint:q"));fb(this.L,this.M,a.x,a.y,b.width,b.height,this);return this};O.prototype.setRectSpot=O.prototype.uo=function(a,b){v&&(D.l(a,B,O,"setRectSpot:r"),D.l(b,R,O,"setRectSpot:spot"));this.Ra();this.L=a.x+b.x*a.width+b.offsetX;this.M=a.y+b.y*a.height+b.offsetY;return this}; -O.prototype.setSpot=O.prototype.$u=function(a,b,c,d,e){v&&(D.p(a,O,"setSpot:x"),D.p(b,O,"setSpot:y"),D.p(c,O,"setSpot:w"),D.p(d,O,"setSpot:h"),(0>c||0>d)&&D.k("Point.setSpot:Width and height cannot be negative"),D.l(e,R,O,"setSpot:spot"));this.Ra();this.L=a+e.x*c+e.offsetX;this.M=b+e.y*d+e.offsetY;return this};O.prototype.transform=function(a){v&&D.l(a,Da,O,"transform:t");a.wb(this);return this};function gb(a,b){v&&D.l(b,Da,O,"transformInverted:t");b.Di(a);return a}var ib; +O.prototype.setSpot=O.prototype.av=function(a,b,c,d,e){v&&(D.p(a,O,"setSpot:x"),D.p(b,O,"setSpot:y"),D.p(c,O,"setSpot:w"),D.p(d,O,"setSpot:h"),(0>c||0>d)&&D.k("Point.setSpot:Width and height cannot be negative"),D.l(e,R,O,"setSpot:spot"));this.Ra();this.L=a+e.x*c+e.offsetX;this.M=b+e.y*d+e.offsetY;return this};O.prototype.transform=function(a){v&&D.l(a,Da,O,"transform:t");a.wb(this);return this};function gb(a,b){v&&D.l(b,Da,O,"transformInverted:t");b.Di(a);return a}var ib; O.distanceLineSegmentSquared=ib=function(a,b,c,d,e,g){v&&(D.p(a,O,"distanceLineSegmentSquared:px"),D.p(b,O,"distanceLineSegmentSquared:py"),D.p(c,O,"distanceLineSegmentSquared:ax"),D.p(d,O,"distanceLineSegmentSquared:ay"),D.p(e,O,"distanceLineSegmentSquared:bx"),D.p(g,O,"distanceLineSegmentSquared:by"));var h=e-c,k=g-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=g-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var jb; O.distanceSquared=jb=function(a,b,c,d){v&&(D.p(a,O,"distanceSquared:px"),D.p(b,O,"distanceSquared:py"),D.p(c,O,"distanceSquared:qx"),D.p(d,O,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var rb; O.direction=rb=function(a,b,c,d){v&&(D.p(a,O,"direction:px"),D.p(b,O,"direction:py"),D.p(c,O,"direction:qx"),D.p(d,O,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};D.defineProperty(O,{x:"x"},function(){return this.L},function(a){this.Ra(a);v&&D.h(a,"number",O,"x");this.L=a}); @@ -138,24 +138,24 @@ D.defineProperty(O,{y:"y"},function(){return this.M},function(a){this.Ra(a);v&&D Ca.prototype.assign=function(a){this.Ia=a.Ia;this.Ha=a.Ha};Ca.prototype.setTo=Ca.prototype.n=function(a,b){v&&(D.h(a,"number",Ca,"setTo:w"),D.h(b,"number",Ca,"setTo:h"),0>a&&D.ua(a,">= 0",Ca,"setTo:w"),0>b&&D.ua(b,">= 0",Ca,"setTo:h"));this.Ia=a;this.Ha=b;return this};Ca.prototype.set=Ca.prototype.set=function(a){v&&D.l(a,Ca,Ca,"set:s");this.Ra();this.Ia=a.Ia;this.Ha=a.Ha;return this};Ca.prototype.copy=function(){var a=new Ca;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=Ca.prototype; f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; Ca.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Ca(c,e)}return new Ca};Ca.stringify=function(a){v&&D.l(a,Ca);return a.width.toString()+" "+a.height.toString()};Ca.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};Ca.prototype.equals=Ca.prototype.P=function(a){return a instanceof Ca?this.Ia===a.width&&this.Ha===a.height:!1}; -Ca.prototype.equalTo=Ca.prototype.Dx=function(a,b){return this.Ia===a&&this.Ha===b};Ca.prototype.equalsApprox=Ca.prototype.Tc=function(a){return Q(this.Ia,a.width)&&Q(this.Ha,a.height)};D.defineProperty(Ca,{width:"width"},function(){return this.Ia},function(a){this.Ra(a);v&&D.h(a,"number",Ca,"width");0>a&&D.ua(a,">= 0",Ca,"width");this.Ia=a}); +Ca.prototype.equalTo=Ca.prototype.Gx=function(a,b){return this.Ia===a&&this.Ha===b};Ca.prototype.equalsApprox=Ca.prototype.Tc=function(a){return Q(this.Ia,a.width)&&Q(this.Ha,a.height)};D.defineProperty(Ca,{width:"width"},function(){return this.Ia},function(a){this.Ra(a);v&&D.h(a,"number",Ca,"width");0>a&&D.ua(a,">= 0",Ca,"width");this.Ia=a}); D.defineProperty(Ca,{height:"height"},function(){return this.Ha},function(a){this.Ra(a);v&&D.h(a,"number",Ca,"height");0>a&&D.ua(a,">= 0",Ca,"height");this.Ha=a});Ca.prototype.isReal=Ca.prototype.F=function(){return isFinite(this.width)&&isFinite(this.height)}; function B(a,b,c,d){void 0===a?this.Ha=this.Ia=this.M=this.L=0:a instanceof O?b instanceof O?(this.L=Math.min(a.L,b.L),this.M=Math.min(a.M,b.M),this.Ia=Math.abs(a.L-b.L),this.Ha=Math.abs(a.M-b.M)):b instanceof Ca?(this.L=a.L,this.M=a.M,this.Ia=b.Ia,this.Ha=b.Ha):D.k("Incorrect arguments supplied to Rect constructor"):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.L=a,this.M=b,this.Ia=c,this.Ha=d):D.k("Invalid arguments to Rect constructor: "+ a+", "+b+", "+c+", "+d);this.J=!1}D.ja("Rect",B);D.Bi(B);D.ke(B,{x:!0,y:!0,width:!0,height:!0});B.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha};function xb(a,b,c){a.Ia=b;a.Ha=c}B.prototype.setTo=B.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",B,"setTo:x"),D.h(b,"number",B,"setTo:y"),D.h(c,"number",B,"setTo:w"),D.h(d,"number",B,"setTo:h"),0>c&&D.ua(c,">= 0",B,"setTo:w"),0>d&&D.ua(d,">= 0",B,"setTo:h"));this.L=a;this.M=b;this.Ia=c;this.Ha=d;return this}; B.prototype.set=B.prototype.set=function(a){v&&D.l(a,B,B,"set:r");this.Ra();this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha;return this};B.prototype.setPoint=B.prototype.fh=function(a){v&&D.l(a,O,B,"setPoint:p");this.Ra();this.L=a.L;this.M=a.M;return this};B.prototype.setSize=function(a){v&&D.l(a,Ca,B,"setSize:s");this.Ra();this.Ia=a.Ia;this.Ha=a.Ha;return this};B.prototype.copy=function(){var a=new B;a.L=this.L;a.M=this.M;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=B.prototype; f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; B.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new B(c,e,g,h)}return new B};B.stringify=function(a){v&&D.l(a,B);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}; -B.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};B.prototype.equals=B.prototype.P=function(a){return a instanceof B?this.L===a.x&&this.M===a.y&&this.Ia===a.width&&this.Ha===a.height:!1};B.prototype.equalTo=B.prototype.Dx=function(a,b,c,d){return this.L===a&&this.M===b&&this.Ia===c&&this.Ha===d};B.prototype.equalsApprox=B.prototype.Tc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)&&Q(this.Ia,a.width)&&Q(this.Ha,a.height)}; +B.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};B.prototype.equals=B.prototype.P=function(a){return a instanceof B?this.L===a.x&&this.M===a.y&&this.Ia===a.width&&this.Ha===a.height:!1};B.prototype.equalTo=B.prototype.Gx=function(a,b,c,d){return this.L===a&&this.M===b&&this.Ia===c&&this.Ha===d};B.prototype.equalsApprox=B.prototype.Tc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)&&Q(this.Ia,a.width)&&Q(this.Ha,a.height)}; function yb(a,b){return zb(a.L,b.x)&&zb(a.M,b.y)&&zb(a.Ia,b.width)&&zb(a.Ha,b.height)}B.prototype.containsPoint=B.prototype.Oa=function(a){v&&D.l(a,O,B,"containsPoint:p");return this.L<=a.x&&this.L+this.Ia>=a.x&&this.M<=a.y&&this.M+this.Ha>=a.y};B.prototype.containsRect=B.prototype.Nk=function(a){v&&D.l(a,B,B,"containsRect:r");return this.L<=a.x&&a.x+a.width<=this.L+this.Ia&&this.M<=a.y&&a.y+a.height<=this.M+this.Ha}; B.prototype.contains=B.prototype.contains=function(a,b,c,d){v?(D.p(a,B,"contains:x"),D.p(b,B,"contains:y"),void 0===c?c=0:D.p(c,B,"contains:w"),void 0===d?d=0:D.p(d,B,"contains:h"),(0>c||0>d)&&D.k("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.L<=a&&a+c<=this.L+this.Ia&&this.M<=b&&b+d<=this.M+this.Ha};B.prototype.reset=function(){this.Ra();this.Ha=this.Ia=this.M=this.L=0}; -B.prototype.offset=B.prototype.offset=function(a,b){v&&(D.p(a,B,"offset:dx"),D.p(b,B,"offset:dy"));this.Ra();this.L+=a;this.M+=b;return this};B.prototype.inflate=B.prototype.Ff=function(a,b){v&&(D.p(a,B,"inflate:w"),D.p(b,B,"inflate:h"));return Db(this,b,a,b,a)};B.prototype.addMargin=B.prototype.hx=function(a){v&&D.l(a,Ib,B,"addMargin:m");return Db(this,a.top,a.right,a.bottom,a.left)}; +B.prototype.offset=B.prototype.offset=function(a,b){v&&(D.p(a,B,"offset:dx"),D.p(b,B,"offset:dy"));this.Ra();this.L+=a;this.M+=b;return this};B.prototype.inflate=B.prototype.Ff=function(a,b){v&&(D.p(a,B,"inflate:w"),D.p(b,B,"inflate:h"));return Db(this,b,a,b,a)};B.prototype.addMargin=B.prototype.kx=function(a){v&&D.l(a,Ib,B,"addMargin:m");return Db(this,a.top,a.right,a.bottom,a.left)}; B.prototype.subtractMargin=B.prototype.rK=function(a){v&&D.l(a,Ib,B,"subtractMargin:m");return Db(this,-a.top,-a.right,-a.bottom,-a.left)};B.prototype.grow=function(a,b,c,d){v&&(D.p(a,B,"grow:t"),D.p(b,B,"grow:r"),D.p(c,B,"grow:b"),D.p(d,B,"grow:l"));return Db(this,a,b,c,d)};function Db(a,b,c,d,e){a.Ra();var g=a.Ia;c+e<=-g?(a.L+=g/2,a.Ia=0):(a.L-=e,a.Ia+=c+e);c=a.Ha;b+d<=-c?(a.M+=c/2,a.Ha=0):(a.M-=b,a.Ha+=b+d);return a} B.prototype.intersectRect=function(a){v&&D.l(a,B,B,"intersectRect:r");return Lb(this,a.x,a.y,a.width,a.height)};B.prototype.intersect=B.prototype.KF=function(a,b,c,d){v&&(D.p(a,B,"intersect:x"),D.p(b,B,"intersect:y"),D.p(c,B,"intersect:w"),D.p(d,B,"intersect:h"),(0>c||0>d)&&D.k("Rect.intersect:Width and height cannot be negative"));return Lb(this,a,b,c,d)}; function Lb(a,b,c,d,e){a.Ra();var g=Math.max(a.L,b),h=Math.max(a.M,c);b=Math.min(a.L+a.Ia,b+d);c=Math.min(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=Math.max(0,b-g);a.Ha=Math.max(0,c-h);return a}B.prototype.intersectsRect=B.prototype.fg=function(a){v&&D.l(a,B,B,"intersectsRect:r");return this.LF(a.x,a.y,a.width,a.height)}; B.prototype.intersects=B.prototype.LF=function(a,b,c,d){v&&(D.p(a,B,"intersects:x"),D.p(b,B,"intersects:y"),D.p(a,B,"intersects:w"),D.p(b,B,"intersects:h"),(0>c||0>d)&&D.k("Rect.intersects:Width and height cannot be negative"));var e=this.Ia,g=this.L;if(Infinity!==e&&Infinity!==c&&(e+=g,c+=a,isNaN(c)||isNaN(e)||g>c||a>e))return!1;a=this.Ha;c=this.M;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; function Mb(a,b){var c=a.Ia,d=b.width+10+10,e=a.L,g=b.x-10;if(e>d+g||g>c+e)return!1;c=a.Ha;d=b.height+10+10;e=a.M;g=b.y-10;return e>d+g||g>c+e?!1:!0}B.prototype.unionPoint=B.prototype.Ki=function(a){v&&D.l(a,O,B,"unionPoint:p");return Pb(this,a.x,a.y,0,0)};B.prototype.unionRect=B.prototype.Xh=function(a){v&&D.l(a,B,B,"unionRect:r");return Pb(this,a.L,a.M,a.Ia,a.Ha)}; B.prototype.union=B.prototype.jH=function(a,b,c,d){this.Ra();v?(D.p(a,B,"union:x"),D.p(b,B,"union:y"),void 0===c?c=0:D.p(c,B,"union:w"),void 0===d?d=0:D.p(d,B,"union:h"),(0>c||0>d)&&D.k("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return Pb(this,a,b,c,d)};function Pb(a,b,c,d,e){var g=Math.min(a.L,b),h=Math.min(a.M,c);b=Math.max(a.L+a.Ia,b+d);c=Math.max(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=b-g;a.Ha=c-h;return a} -B.prototype.setSpot=B.prototype.$u=function(a,b,c){v&&(D.p(a,B,"setSpot:x"),D.p(b,B,"setSpot:y"),D.l(c,R,B,"setSpot:spot"));this.Ra();this.L=a-c.offsetX-c.x*this.Ia;this.M=b-c.offsetY-c.y*this.Ha;return this};var Qb; +B.prototype.setSpot=B.prototype.av=function(a,b,c){v&&(D.p(a,B,"setSpot:x"),D.p(b,B,"setSpot:y"),D.l(c,R,B,"setSpot:spot"));this.Ra();this.L=a-c.offsetX-c.x*this.Ia;this.M=b-c.offsetY-c.y*this.Ha;return this};var Qb; B.contains=Qb=function(a,b,c,d,e,g,h,k){v?(D.p(a,B,"contains:rx"),D.p(b,B,"contains:ry"),D.p(c,B,"contains:rw"),D.p(d,B,"contains:rh"),D.p(e,B,"contains:x"),D.p(g,B,"contains:y"),void 0===h?h=0:D.p(h,B,"contains:w"),void 0===k?k=0:D.p(k,B,"contains:h"),(0>c||0>d||0>h||0>k)&&D.k("Rect.contains:Width and height cannot be negative")):(void 0===h&&(h=0),void 0===k&&(k=0));return a<=e&&e+h<=a+c&&b<=g&&g+k<=b+d}; B.intersects=function(a,b,c,d,e,g,h,k){v&&(D.p(a,B,"intersects:rx"),D.p(b,B,"intersects:ry"),D.p(c,B,"intersects:rw"),D.p(d,B,"intersects:rh"),D.p(e,B,"intersects:x"),D.p(g,B,"intersects:y"),D.p(h,B,"intersects:w"),D.p(k,B,"intersects:h"),(0>c||0>d||0>h||0>k)&&D.k("Rect.intersects:Width and height cannot be negative"));c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=g;return b>k||g>a?!1:!0};D.defineProperty(B,{x:"x"},function(){return this.L},function(a){this.Ra(a);v&&D.h(a,"number",B,"x");this.L=a}); D.defineProperty(B,{y:"y"},function(){return this.M},function(a){this.Ra(a);v&&D.h(a,"number",B,"y");this.M=a});D.defineProperty(B,{width:"width"},function(){return this.Ia},function(a){this.Ra(a);v&&D.h(a,"number",B,"width");0>a&&D.ua(a,">= 0",B,"width");this.Ia=a});D.defineProperty(B,{height:"height"},function(){return this.Ha},function(a){this.Ra(a);v&&D.h(a,"number",B,"height");0>a&&D.ua(a,">= 0",B,"height");this.Ha=a}); @@ -167,14 +167,14 @@ function Ib(a,b,c,d){void 0===a?this.uh=this.nh=this.Dh=this.Eh=0:void 0===b?thi Ib.prototype.setTo=Ib.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",Ib,"setTo:t"),D.h(b,"number",Ib,"setTo:r"),D.h(c,"number",Ib,"setTo:b"),D.h(d,"number",Ib,"setTo:l"));this.Ra();this.Eh=a;this.Dh=b;this.nh=c;this.uh=d;return this};Ib.prototype.set=Ib.prototype.set=function(a){v&&D.l(a,Ib,Ib,"assign:m");this.Ra();this.Eh=a.Eh;this.Dh=a.Dh;this.nh=a.nh;this.uh=a.uh;return this};Ib.prototype.copy=function(){var a=new Ib;a.Eh=this.Eh;a.Dh=this.Dh;a.nh=this.nh;a.uh=this.uh;return a};f=Ib.prototype; f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; Ib.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new Ib;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new Ib(c);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));if(isNaN(g))return new Ib(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new Ib(c,e):new Ib(c,e,g,h)}return new Ib}; -Ib.stringify=function(a){v&&D.l(a,Ib);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()};Ib.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};Ib.prototype.equals=Ib.prototype.P=function(a){return a instanceof Ib?this.Eh===a.top&&this.Dh===a.right&&this.nh===a.bottom&&this.uh===a.left:!1};Ib.prototype.equalTo=Ib.prototype.Dx=function(a,b,c,d){return this.Eh===a&&this.Dh===b&&this.nh===c&&this.uh===d}; +Ib.stringify=function(a){v&&D.l(a,Ib);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()};Ib.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};Ib.prototype.equals=Ib.prototype.P=function(a){return a instanceof Ib?this.Eh===a.top&&this.Dh===a.right&&this.nh===a.bottom&&this.uh===a.left:!1};Ib.prototype.equalTo=Ib.prototype.Gx=function(a,b,c,d){return this.Eh===a&&this.Dh===b&&this.nh===c&&this.uh===d}; Ib.prototype.equalsApprox=Ib.prototype.Tc=function(a){return Q(this.Eh,a.top)&&Q(this.Dh,a.right)&&Q(this.nh,a.bottom)&&Q(this.uh,a.left)};D.defineProperty(Ib,{top:"top"},function(){return this.Eh},function(a){this.Ra(a);v&&D.p(a,Ib,"top");this.Eh=a});D.defineProperty(Ib,{right:"right"},function(){return this.Dh},function(a){this.Ra(a);v&&D.p(a,Ib,"right");this.Dh=a});D.defineProperty(Ib,{bottom:"bottom"},function(){return this.nh},function(a){this.Ra(a);v&&D.p(a,Ib,"bottom");this.nh=a}); D.defineProperty(Ib,{left:"left"},function(){return this.uh},function(a){this.Ra(a);v&&D.p(a,Ib,"left");this.uh=a});Ib.prototype.isReal=Ib.prototype.F=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function Da(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}D.Bi(Da);D.ke(Da,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0}); Da.prototype.set=Da.prototype.set=function(a){v&&D.l(a,Da,Da,"set:t");this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};Da.prototype.copy=function(){var a=new Da;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};Da.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; -Da.prototype.equals=Da.prototype.P=function(a){return a instanceof Da?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};Da.prototype.isIdentity=Da.prototype.wu=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};Da.prototype.reset=Da.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; +Da.prototype.equals=Da.prototype.P=function(a){return a instanceof Da?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};Da.prototype.isIdentity=Da.prototype.xu=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};Da.prototype.reset=Da.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; Da.prototype.multiply=Da.prototype.multiply=function(a){v&&D.l(a,Da,Da,"multiply:matrix");var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,e=this.m11*a.dx+this.m21*a.dy+this.dx,g=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this}; Da.prototype.multiplyInverted=Da.prototype.pB=function(a){v&&D.l(a,Da,Da,"multiplyInverted:matrix");var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,g=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*g;e=this.m12*e+this.m22*g;g=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=g;this.dy=h;return this}; -Da.prototype.invert=Da.prototype.Px=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),g=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this}; +Da.prototype.invert=Da.prototype.Sx=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),g=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this}; Da.prototype.rotate=Da.prototype.rotate=function(a,b,c){v&&(D.p(a,Da,"rotate:angle"),D.p(b,Da,"rotate:rx"),D.p(c,Da,"rotate:ry"));360<=a?a-=360:0>a&&(a+=360);if(0===a)return this;this.translate(b,c);var d=0,e=0;90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(e=a*Math.PI/180,d=Math.cos(e),e=Math.sin(e));a=this.m12*d+this.m22*e;var g=this.m11*-e+this.m21*d,h=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=g;this.m22=h;this.translate(-b,-c);return this}; Da.prototype.translate=Da.prototype.translate=function(a,b){v&&(D.p(a,Da,"translate:x"),D.p(b,Da,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};Da.prototype.scale=Da.prototype.scale=function(a,b){void 0===b&&(b=a);v&&(D.p(a,Da,"translate:sx"),D.p(b,Da,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this}; Da.prototype.transformPoint=Da.prototype.wb=function(a){v&&D.l(a,O,Da,"transformPoint:p");var b=a.L,c=a.M;a.L=b*this.m11+c*this.m21+this.dx;a.M=b*this.m12+c*this.m22+this.dy;return a};Da.prototype.invertedTransformPoint=Da.prototype.Di=function(a){v&&D.l(a,O,Da,"invertedTransformPoint:p");var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),g=a.L,h=a.M;a.L=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.M=g*c+h*d+e;return a}; @@ -196,8 +196,8 @@ var Xc;R.Right=Xc=rc;var Zc;R.Bottom=Zc=tc;var vc;R.TopSide=vc=Yb(new R(0,0,1,D. R.BottomLeftSides=Mc=Yb(new R(0,0,1,D.ld|D.Zc),1).Na();var Nc;R.BottomRightSides=Nc=Yb(new R(0,0,1,D.ld|D.md),1).Na();var Oc;R.NotTopSide=Oc=Yb(new R(0,0,1,D.Zc|D.md|D.ld),1).Na();var Pc;R.NotLeftSide=Pc=Yb(new R(0,0,1,D.wd|D.md|D.ld),1).Na();var Sc;R.NotRightSide=Sc=Yb(new R(0,0,1,D.wd|D.Zc|D.ld),1).Na();var Tc;R.NotBottomSide=Tc=Yb(new R(0,0,1,D.wd|D.Zc|D.md),1).Na();var Uc;R.AllSides=Uc=Yb(new R(0,0,1,D.wd|D.Zc|D.md|D.ld),1).Na();function jd(){this.Zb=[1,0,0,1,0,0]} jd.prototype.copy=function(){var a=new jd;a.Zb[0]=this.Zb[0];a.Zb[1]=this.Zb[1];a.Zb[2]=this.Zb[2];a.Zb[3]=this.Zb[3];a.Zb[4]=this.Zb[4];a.Zb[5]=this.Zb[5];return a};jd.prototype.translate=function(a,b){this.Zb[4]+=this.Zb[0]*a+this.Zb[2]*b;this.Zb[5]+=this.Zb[1]*a+this.Zb[3]*b};jd.prototype.scale=function(a,b){this.Zb[0]*=a;this.Zb[1]*=a;this.Zb[2]*=b;this.Zb[3]*=b};function kd(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.QE=[];this.pattern=null} kd.prototype.addColorStop=function(a,b){this.QE.push({offset:a,color:b})}; -function od(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.dq=!1;this.Ng=this.tt=this.st=0;this.document=b||document;this.kF=c;this.Zx=null;this.path=[];this.Mh=new jd;this.stack=[];this.Ef=[];this.Bx=a;this.QJ="http://www.w3.org/2000/svg"; -this.width=this.Bx.width;this.height=this.Bx.height;this.Am=pd(this,"svg",{width:this.width+"px",height:this.height+"px",IM:"0 0 "+this.Bx.width+" "+this.Bx.height});this.Am.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg");this.Am.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");qd(this,1,0,0,1,0,0);a=D.Gm++;b=pd(this,"clipPath",{id:"mainClip"+a});b.appendChild(pd(this,"rect",{x:0,y:0,width:this.width,height:this.height})); +function od(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.dq=!1;this.Ng=this.tt=this.st=0;this.document=b||document;this.kF=c;this.by=null;this.path=[];this.Mh=new jd;this.stack=[];this.Ef=[];this.Ex=a;this.QJ="http://www.w3.org/2000/svg"; +this.width=this.Ex.width;this.height=this.Ex.height;this.Am=pd(this,"svg",{width:this.width+"px",height:this.height+"px",IM:"0 0 "+this.Ex.width+" "+this.Ex.height});this.Am.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg");this.Am.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");qd(this,1,0,0,1,0,0);a=D.Gm++;b=pd(this,"clipPath",{id:"mainClip"+a});b.appendChild(pd(this,"rect",{x:0,y:0,width:this.width,height:this.height})); this.Am.appendChild(b);this.Ef[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}f=od.prototype;f.arc=function(a,b,c,d,e,g){rd(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(){sd(this,"clipPath",this.path,new jd)};f.closePath=function(){this.path.push(["z"])};f.createLinearGradient=function(a,b,c,d){var e=new kd("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 kd("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"};zb(d,k)&&zb(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!== @@ -206,7 +206,7 @@ f.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"righ 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;b=2*Math.PI?(rd(a,b,c,d,e,e+Math.PI,h),rd(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 qd(a,b,c,d,e,g,h){var k=new jd;k.Zb=[b,c,d,e,g,h];b={};Ad(a,"g",b,k);k=a.addElement("g",b);a.Ef.push(k)} f.ib=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+D.Gm++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,g,h;c=pd(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",yM:this.shadowBlur/2});d=pd(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=pd(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});g=pd(this,"feOffset",{"in":"comp",result:"offsetBlur", dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=pd(this,"feMerge",{});h.appendChild(pd(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(pd(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(g);b.appendChild(h);0b?(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.or?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.or?this.clip():this.fill()}; +f.transform=function(a,b,c,d,e,g){1===a&&0===b&&0===c&&1===d&&0===e&&0===g||this.xa.transform(a,b,c,d,e,g)};f.translate=function(a,b){this.xa.translate(a,b)};f.Wg=function(a){if(a instanceof Ba&&a.type===Ed){var b=a.Oo;a=a.jz;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.or?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.or?this.clip():this.fill()}; f.Wj=function(){this.or||this.stroke()};D.defineProperty(Dd,{dq:"clipInsteadOfFill"},function(){return this.or},function(a){this.or=a});f=Dd.prototype;f.NB=function(a,b,c){this.st=a;this.tt=b;this.Ng=c};f.vo=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.wo=function(){this.shadowOffsetX=this.st;this.shadowOffsetY=this.tt;this.shadowBlur=this.Ng}; -f.IA=function(a,b){var c=this.xa;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};f.DA=function(){var a=this.xa;void 0!==a.setLineDash?(a.setLineDash(D.Eo),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=D.Eo,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; -f.Be=function(a){a&&(this.bz="");this.az=this.cz=""}; +f.JA=function(a,b){var c=this.xa;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};f.EA=function(){var a=this.xa;void 0!==a.setLineDash?(a.setLineDash(D.Eo),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=D.Eo,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; +f.Be=function(a){a&&(this.ez="");this.dz=this.fz=""}; var Fd=(Math.sqrt(2)-1)/3*4,Gd=(new O(0,0)).Na(),Hd=(new B(0,0,0,0)).Na(),Sd=(new Ib(0,0,0,0)).Na(),Td=(new Ib(2,2,2,2)).Na(),Ud=(new O(6,6)).Na(),Vd=(new O(-Infinity,-Infinity)).Na(),Wd=(new O(Infinity,Infinity)).Na(),Xd=(new Ca(0,0)).Na(),Yd=(new Ca(1,1)).Na(),Zd=(new Ca(6,6)).Na(),$d=(new Ca(8,8)).Na(),ae=(new Ca(10,10)).Na(),he=(new Ca(Infinity,Infinity)).Na(),ie=(new O(NaN,NaN)).Na(),je=(new Ca(NaN,NaN)).Na(),ke=(new B(NaN,NaN,NaN,NaN)).Na(),le=(new R(.156,.156)).Na(),me=(new R(.844,.844)).Na(), ne=new la,oe=new la,pe=null;function qe(a){if(0>=a)return 0;var b=pe;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);pe=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} @@ -251,171 +251,171 @@ function Te(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,0c,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.ma.toString()+" "+this.ka.toString()+"L"+this.H.toString()+" "+this.I.toString():"M"+this.ma.toFixed(a)+" "+this.ka.toFixed(a)+"L"+this.H.toFixed(a)+" "+this.I.toFixed(a);case rf:var b=new B(this.ma,this.ka,0,0);b.jH(this.H,this.I,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 sf:b=new B(this.ma,this.ka,0,0);b.jH(this.H,this.I,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 Ze:for(var b="",c=this.lc.o,d=c.length,e=0;e=u-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function e(){var a=new O(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function g(){return s=e()}function h(){return r=e()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new O(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&D.hc(a,"string",Ye,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/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=-1,n="",p="",q=new O(0,0),r=new O(0,0),s=new O(0, 0),u=l.length,t=D.v(),y=!1,w=!1,C=!0,A=null;!(m>=u-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":C=!0;w=y=!1;break;case "M":A=g();null===t.dc||!0===C?(T(t,A.x,A.y,y,!1,!w),C=!1):t.moveTo(A.x,A.y);for(q=s;!c();)A=g(),t.lineTo(A.x,A.y);break;case "L":for(;!c();)A=g(),t.lineTo(A.x,A.y);break;case "H":for(;!c();)s=A=new O((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),t.lineTo(s.x,s.y);break;case "V":for(;!c();)s=A=new O(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),t.lineTo(s.x,s.y); break;case "C":for(;!c();){var N=e(),H=h(),A=g();V(t,N.x,N.y,H.x,H.y,A.x,A.y)}break;case "S":for(;!c();)N=k(),H=h(),A=g(),V(t,N.x,N.y,H.x,H.y,A.x,A.y);break;case "Q":for(;!c();)H=h(),A=g(),xf(t,H.x,H.y,A.x,A.y);break;case "T":for(;!c();)r=H=k(),A=g(),xf(t,H.x,H.y,A.x,A.y);break;case "B":for(;!c();){var A=parseFloat(d()),N=parseFloat(d()),H=parseFloat(d()),W=parseFloat(d()),fa=parseFloat(d()),S=fa,ba=!1;c()||(S=parseFloat(d()),c()||(ba=0!==parseFloat(d())));n===n.toLowerCase()&&(H+=s.x,W+=s.y);t.arcTo(A, N,H,W,fa,S,ba)}break;case "A":for(;!c();)N=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),W=parseFloat(d()),fa=!!parseFloat(d()),S=!!parseFloat(d()),A=g(),yf(t,N,H,W,fa,S,A.x,A.y);break;case "Z":A=t.q.lc.o[t.q.lc.length-1];X(t);s=q;break;case "F":A="";for(N=1;l[m+N];)if(null!==l[m+N].match(/[Uu]/))N++;else if(null===l[m+N].match(/[A-Za-z]/))N++;else{A=l[m+N];break}A.match(/[Mm]/)?y=!0:zf(t);break;case "U":A="";for(N=1;l[m+N];)if(null!==l[m+N].match(/[Ff]/))N++;else if(null===l[m+N].match(/[A-Za-z]/))N++; -else{A=l[m+N];break}A.match(/[Mm]/)?w=!0:t.ib(!1)}q=t.q;D.u(t);if(b)for(t=q.lc.j;t.next();)A=t.value,A.vu=!0;return q};function Af(a,b){for(var c=a.length,d=D.O(),e=0;eh&&(h+=360),s.Le+=h);0>a&&(s.Le=180-s.Le,s.xf=-s.xf);0>d&&(s.Le=-s.Le,s.xf=-s.xf);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.H;k=s.I;s.H=h* +h*a+k*c+e;s.Xc=h*b+k*d+g;h=s.Sh;k=s.Th;s.Sh=h*a+k*c+e;s.Th=h*b+k*d+g;h=s.H;k=s.I;s.H=h*a+k*c+e;s.I=h*b+k*d+g;break;case Of:h=s.Bc;k=s.Xc;s.Bc=h*a+k*c+e;s.Xc=h*b+k*d+g;h=s.H;k=s.I;s.H=h*a+k*c+e;s.I=h*b+k*d+g;break;case Pf:h=s.oa;k=s.va;s.oa=h*a+k*c+e;s.va=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Le+=h);0>a&&(s.Le=180-s.Le,s.yf=-s.yf);0>d&&(s.Le=-s.Le,s.yf=-s.yf);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.H;k=s.I;s.H=h* a+k*c+e;s.I=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Zj+=h);0>a&&(s.Zj=180-s.Zj,s.sm=!s.sm);0>d&&(s.Zj=-s.Zj,s.sm=!s.sm);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.lb=!0;return this}; -Ye.prototype.Oa=function(a,b,c,d){var e=a.x,g=a.y,h=this.mb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.lc.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}; +Ye.prototype.getPointAlongPath=Ye.prototype.RI=function(a,b){0>a?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}; Ye.prototype.getFractionForPoint=Ye.prototype.MI=function(a){if(this.type===qf){var b=this.ma,c=this.ka,d=this.H,e=this.I;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===rf){if(b=this.ma,c=this.ka,d=this.H,e=this.I,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.LA,h=this.Jx,k=this.MA,l=D.O(),c=Infinity,b=d=0,g=e.length,n=m=0,p=0;pa?0:1a?0:1a?"M"+this.ma.toString()+" "+this.ka.toString():"M"+this.ma.toFixed(a)+" "+this.ka.toFixed(a),c=this.Db.o,d=c.length,e=0;ea&&(a+=360),this.Pd=a,this.df=0,v&&D.p(d,Wf,"x1"),this.Ch=Math.max(d,0),v&&D.p(e,Wf,"y1"),this.Mg=Math.max(e,0),this.vp="boolean"===typeof h?!!h:!1,this.Mo=!!k):(v&&D.p(d,Wf,"x1"),this.Pd=d,v&&D.p(e, Wf,"y1"),this.df=e,v&&D.p(g,Wf,"x2"),a===Pf&&(g=Math.max(g,0)),this.Ch=g,"number"===typeof h?(a===Pf&&(h=Math.max(h,0)),this.Mg=h):this.Mg=0,this.Mo=this.vp=!1);this.fi=!1;this.lb=!0;this.vg=null}D.ja("PathSegment",Wf);D.Bi(Wf);Wf.prototype.copy=function(){var a=new Wf;a.ca=this.ca;a.Ab=this.Ab;a.Ib=this.Ib;a.Pd=this.Pd;a.df=this.df;a.Ch=this.Ch;a.Mg=this.Mg;a.vp=this.vp;a.Mo=this.Mo;a.fi=this.fi;a.lb=this.lb;return a}; -Wf.prototype.equalsApprox=Wf.prototype.Tc=function(a){if(!(a instanceof Wf)||this.type!==a.type||this.Qx!==a.Qx)return!1;switch(this.type){case Cf:case uf:return Q(this.H,a.H)&&Q(this.I,a.I);case Df:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc)&&Q(this.Sh,a.Sh)&&Q(this.Th,a.Th);case Of:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc);case Pf:return Q(this.Le,a.Le)&&Q(this.xf,a.xf)&&Q(this.oa,a.oa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, -a.radiusY);case Qf:return this.sm===a.sm&&this.Vx===a.Vx&&Q(this.Zj,a.Zj)&&Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};Wf.prototype.oc=function(a){a.Ne===Wf?this.type=a:D.Xj(this,a)}; +Wf.prototype.equalsApprox=Wf.prototype.Tc=function(a){if(!(a instanceof Wf)||this.type!==a.type||this.Tx!==a.Tx)return!1;switch(this.type){case Cf:case uf:return Q(this.H,a.H)&&Q(this.I,a.I);case Df:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc)&&Q(this.Sh,a.Sh)&&Q(this.Th,a.Th);case Of:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc);case Pf:return Q(this.Le,a.Le)&&Q(this.yf,a.yf)&&Q(this.oa,a.oa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, +a.radiusY);case Qf:return this.sm===a.sm&&this.Yx===a.Yx&&Q(this.Zj,a.Zj)&&Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};Wf.prototype.oc=function(a){a.Ne===Wf?this.type=a:D.Xj(this,a)}; Wf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Cf:b=0>a?"M"+this.H.toString()+" "+this.I.toString():"M"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case uf:b=0>a?"L"+this.H.toString()+" "+this.I.toString():"L"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Df:b=0>a?"C"+this.Bc.toString()+" "+this.Xc.toString()+" "+this.Sh.toString()+" "+this.Th.toString()+" "+this.H.toString()+" "+this.I.toString():"C"+this.Bc.toFixed(a)+" "+this.Xc.toFixed(a)+" "+this.Sh.toFixed(a)+ -" "+this.Th.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Of:b=0>a?"Q"+this.Bc.toString()+" "+this.Xc.toString()+" "+this.H.toString()+" "+this.I.toString():"Q"+this.Bc.toFixed(a)+" "+this.Xc.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Pf:b=0>a?"B"+this.Le.toString()+" "+this.xf.toString()+" "+this.oa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Le.toFixed(a)+" "+this.xf.toFixed(a)+" "+this.oa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; -break;case Qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Zj.toString()+" "+(this.Vx?1:0)+" "+(this.sm?1:0)+" "+this.H.toString()+" "+this.I.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Zj.toFixed(a)+" "+(this.Vx?1:0)+" "+(this.sm?1:0)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;default:b=this.type.toString()}return b+(this.fi?"z":"")};var Cf;Wf.Move=Cf=D.s(Wf,"Move",0);var uf;Wf.Line=uf=D.s(Wf,"Line",1);var Df; +" "+this.Th.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Of:b=0>a?"Q"+this.Bc.toString()+" "+this.Xc.toString()+" "+this.H.toString()+" "+this.I.toString():"Q"+this.Bc.toFixed(a)+" "+this.Xc.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Pf:b=0>a?"B"+this.Le.toString()+" "+this.yf.toString()+" "+this.oa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Le.toFixed(a)+" "+this.yf.toFixed(a)+" "+this.oa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; +break;case Qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Zj.toString()+" "+(this.Yx?1:0)+" "+(this.sm?1:0)+" "+this.H.toString()+" "+this.I.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Zj.toFixed(a)+" "+(this.Yx?1:0)+" "+(this.sm?1:0)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;default:b=this.type.toString()}return b+(this.fi?"z":"")};var Cf;Wf.Move=Cf=D.s(Wf,"Move",0);var uf;Wf.Line=uf=D.s(Wf,"Line",1);var Df; Wf.Bezier=Df=D.s(Wf,"Bezier",2);var Of;Wf.QuadraticBezier=Of=D.s(Wf,"QuadraticBezier",3);var Pf;Wf.Arc=Pf=D.s(Wf,"Arc",4);var Qf;Wf.SvgArc=Qf=D.s(Wf,"SvgArc",4);Wf.prototype.freeze=function(){this.J=!0;return this};Wf.prototype.Ya=function(){this.J=!1;return this};Wf.prototype.close=Wf.prototype.close=function(){this.fi=!0;return this}; -function Rf(a,b){if(null!==a.vg&&!1===b.lb)return a.vg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.vg=[],a.vg;var e=a.Pd,g=a.df,h=Ve(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=Ve(b>g?b:g,n,n+h,!0);g=D.Pf();g.reset();g.translate(c,d);g.rotate(a.Pd,0,0);g.scale(l,r);Af(b,g);D.He(g);a.vg=b;return a.vg} -D.defineProperty(Wf,{Qx:"isClosed"},function(){return this.fi},function(a){this.fi!==a&&(this.fi=a,this.lb=!0)});D.defineProperty(Wf,{type:"type"},function(){return this.ca},function(a){v&&D.Da(a,Wf,Wf,"type");this.J&&D.pa(this,a);this.ca=a;this.lb=!0});D.defineProperty(Wf,{H:"endX"},function(){return this.Ab},function(a){v&&D.p(a,Wf,"endX");this.J&&D.pa(this,a);this.Ab=a;this.lb=!0}); +D.defineProperty(Wf,{Tx:"isClosed"},function(){return this.fi},function(a){this.fi!==a&&(this.fi=a,this.lb=!0)});D.defineProperty(Wf,{type:"type"},function(){return this.ca},function(a){v&&D.Da(a,Wf,Wf,"type");this.J&&D.pa(this,a);this.ca=a;this.lb=!0});D.defineProperty(Wf,{H:"endX"},function(){return this.Ab},function(a){v&&D.p(a,Wf,"endX");this.J&&D.pa(this,a);this.Ab=a;this.lb=!0}); D.defineProperty(Wf,{I:"endY"},function(){return this.Ib},function(a){v&&D.p(a,Wf,"endY");this.J&&D.pa(this,a);this.Ib=a;this.lb=!0});D.defineProperty(Wf,{Bc:"point1X"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"point1X");this.J&&D.pa(this,a);this.Pd=a;this.lb=!0});D.defineProperty(Wf,{Xc:"point1Y"},function(){return this.df},function(a){v&&D.p(a,Wf,"point1Y");this.J&&D.pa(this,a);this.df=a;this.lb=!0}); D.defineProperty(Wf,{Sh:"point2X"},function(){return this.Ch},function(a){v&&D.p(a,Wf,"point2X");this.J&&D.pa(this,a);this.Ch=a;this.lb=!0});D.defineProperty(Wf,{Th:"point2Y"},function(){return this.Mg},function(a){v&&D.p(a,Wf,"point2Y");this.J&&D.pa(this,a);this.Mg=a;this.lb=!0});D.defineProperty(Wf,{oa:"centerX"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"centerX");this.J&&D.pa(this,a);this.Pd=a;this.lb=!0}); D.defineProperty(Wf,{va:"centerY"},function(){return this.df},function(a){v&&D.p(a,Wf,"centerY");this.J&&D.pa(this,a);this.df=a;this.lb=!0});D.defineProperty(Wf,{radiusX:"radiusX"},function(){return this.Ch},function(a){v&&D.p(a,Wf,"radiusX");0>a&&D.ua(a,">= zero",Wf,"radiusX");this.J&&D.pa(this,a);this.Ch=a;this.lb=!0});D.defineProperty(Wf,{radiusY:"radiusY"},function(){return this.Mg},function(a){v&&D.p(a,Wf,"radiusY");0>a&&D.ua(a,">= zero",Wf,"radiusY");this.J&&D.pa(this,a);this.Mg=a;this.lb=!0}); -D.defineProperty(Wf,{Le:"startAngle"},function(){return this.Ab},function(a){this.Ab!==a&&(this.J&&D.pa(this,a),v&&D.p(a,Wf,"startAngle"),a%=360,0>a&&(a+=360),this.Ab=a,this.lb=!0)});D.defineProperty(Wf,{xf:"sweepAngle"},function(){return this.Ib},function(a){v&&D.p(a,Wf,"sweepAngle");this.J&&D.pa(this,a);360a&&(a=-360);this.Ib=a;this.lb=!0});D.defineProperty(Wf,{sm:"isClockwiseArc"},function(){return this.Mo},function(a){this.J&&D.pa(this,a);this.Mo=a;this.lb=!0}); -D.defineProperty(Wf,{Vx:"isLargeArc"},function(){return this.vp},function(a){this.J&&D.pa(this,a);this.vp=a;this.lb=!0});D.defineProperty(Wf,{Zj:"xAxisRotation"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.pa(this,a);this.Pd=a;this.lb=!0}); -function Yf(){this.ba=null;this.kA=(new O(0,0)).freeze();this.pz=(new O(0,0)).freeze();this.yv=this.vw=0;this.zv=1;this.jw="";this.$w=this.Nv=!1;this.Kv=this.Av=0;this.ak=this.Vv=this.fw=!1;this.Rr=null;this.Yw=0;this.Qg=this.Xw=null}D.ja("InputEvent",Yf); -Yf.prototype.copy=function(){var a=new Yf;a.ba=this.ba;a.kA.assign(this.qe);a.pz.assign(this.ha);a.vw=this.vw;a.yv=this.yv;a.zv=this.zv;a.jw=this.jw;a.Nv=this.Nv;a.$w=this.$w;a.Av=this.Av;a.Kv=this.Kv;a.fw=this.fw;a.Vv=this.Vv;a.ak=this.ak;a.Rr=this.Rr;a.Yw=this.Yw;a.Xw=this.Xw;a.Qg=this.Qg;return a}; -Yf.prototype.toString=function(){var a="^";0!==this.Kd&&(a+="M:"+this.Kd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Oe&&(a+="C:"+this.Oe);0!==this.im&&(a+="D:"+this.im);this.Mc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(Yf,{g:"diagram"},function(){return this.ba},function(a){this.ba=a});D.defineProperty(Yf,{qe:"viewPoint"},function(){return this.kA},function(a){D.l(a,O,Yf,"viewPoint");this.kA.assign(a)}); -D.defineProperty(Yf,{ha:"documentPoint"},function(){return this.pz},function(a){D.l(a,O,Yf,"documentPoint");this.pz.assign(a)});Yf.prototype.getMultiTouchViewPoint=Yf.prototype.Lx=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.YB(b));return b};D.defineProperty(Yf,{Kd:"modifiers"},function(){return this.vw},function(a){this.vw=a}); -D.defineProperty(Yf,{button:"button"},function(){return this.yv},function(a){this.yv=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(Yf,{buttons:"buttons"},function(){return this.zv},function(a){this.zv=a});D.defineProperty(Yf,{key:"key"},function(){return this.jw},function(a){this.jw=a});D.defineProperty(Yf,{jm:"down"},function(){return this.Nv},function(a){this.Nv=a}); -D.defineProperty(Yf,{up:"up"},function(){return this.$w},function(a){this.$w=a});D.defineProperty(Yf,{Oe:"clickCount"},function(){return this.Av},function(a){this.Av=a});D.defineProperty(Yf,{im:"delta"},function(){return this.Kv},function(a){this.Kv=a});D.defineProperty(Yf,{xu:"isMultiTouch"},function(){return this.fw},function(a){this.fw=a});D.defineProperty(Yf,{Mc:"handled"},function(){return this.Vv},function(a){this.Vv=a}); -D.defineProperty(Yf,{bubbles:"bubbles"},function(){return this.ak},function(a){this.ak=a});D.defineProperty(Yf,{event:"event"},function(){return this.Rr},function(a){this.Rr=a});D.w(Yf,{Mj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});D.w(Yf,{Wk:"isMac"},function(){return D.Wk});D.defineProperty(Yf,{timestamp:"timestamp"},function(){return this.Yw},function(a){this.Yw=a}); -D.defineProperty(Yf,{gh:"targetDiagram"},function(){return this.Xw},function(a){this.Xw=a});D.defineProperty(Yf,{We:"targetObject"},function(){return this.Qg},function(a){this.Qg=a});D.defineProperty(Yf,{control:"control"},function(){return 0!==(this.Kd&1)},function(a){this.Kd=a?this.Kd|1:this.Kd&-2});D.defineProperty(Yf,{shift:"shift"},function(){return 0!==(this.Kd&4)},function(a){this.Kd=a?this.Kd|4:this.Kd&-5}); -D.defineProperty(Yf,{alt:"alt"},function(){return 0!==(this.Kd&2)},function(a){this.Kd=a?this.Kd|2:this.Kd&-3});D.defineProperty(Yf,{Gu:"meta"},function(){return 0!==(this.Kd&8)},function(a){this.Kd=a?this.Kd|8:this.Kd&-9});D.defineProperty(Yf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); +D.defineProperty(Wf,{Le:"startAngle"},function(){return this.Ab},function(a){this.Ab!==a&&(this.J&&D.pa(this,a),v&&D.p(a,Wf,"startAngle"),a%=360,0>a&&(a+=360),this.Ab=a,this.lb=!0)});D.defineProperty(Wf,{yf:"sweepAngle"},function(){return this.Ib},function(a){v&&D.p(a,Wf,"sweepAngle");this.J&&D.pa(this,a);360a&&(a=-360);this.Ib=a;this.lb=!0});D.defineProperty(Wf,{sm:"isClockwiseArc"},function(){return this.Mo},function(a){this.J&&D.pa(this,a);this.Mo=a;this.lb=!0}); +D.defineProperty(Wf,{Yx:"isLargeArc"},function(){return this.vp},function(a){this.J&&D.pa(this,a);this.vp=a;this.lb=!0});D.defineProperty(Wf,{Zj:"xAxisRotation"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.pa(this,a);this.Pd=a;this.lb=!0}); +function Yf(){this.ba=null;this.lA=(new O(0,0)).freeze();this.sz=(new O(0,0)).freeze();this.zv=this.ww=0;this.Av=1;this.kw="";this.ex=this.Ov=!1;this.Lv=this.Bv=0;this.ak=this.Wv=this.gw=!1;this.Rr=null;this.ax=0;this.Qg=this.$w=null}D.ja("InputEvent",Yf); +Yf.prototype.copy=function(){var a=new Yf;a.ba=this.ba;a.lA.assign(this.qe);a.sz.assign(this.ha);a.ww=this.ww;a.zv=this.zv;a.Av=this.Av;a.kw=this.kw;a.Ov=this.Ov;a.ex=this.ex;a.Bv=this.Bv;a.Lv=this.Lv;a.gw=this.gw;a.Wv=this.Wv;a.ak=this.ak;a.Rr=this.Rr;a.ax=this.ax;a.$w=this.$w;a.Qg=this.Qg;return a}; +Yf.prototype.toString=function(){var a="^";0!==this.Kd&&(a+="M:"+this.Kd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Oe&&(a+="C:"+this.Oe);0!==this.im&&(a+="D:"+this.im);this.Mc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(Yf,{g:"diagram"},function(){return this.ba},function(a){this.ba=a});D.defineProperty(Yf,{qe:"viewPoint"},function(){return this.lA},function(a){D.l(a,O,Yf,"viewPoint");this.lA.assign(a)}); +D.defineProperty(Yf,{ha:"documentPoint"},function(){return this.sz},function(a){D.l(a,O,Yf,"documentPoint");this.sz.assign(a)});Yf.prototype.getMultiTouchViewPoint=Yf.prototype.Px=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.YB(b));return b};D.defineProperty(Yf,{Kd:"modifiers"},function(){return this.ww},function(a){this.ww=a}); +D.defineProperty(Yf,{button:"button"},function(){return this.zv},function(a){this.zv=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(Yf,{buttons:"buttons"},function(){return this.Av},function(a){this.Av=a});D.defineProperty(Yf,{key:"key"},function(){return this.kw},function(a){this.kw=a});D.defineProperty(Yf,{jm:"down"},function(){return this.Ov},function(a){this.Ov=a}); +D.defineProperty(Yf,{up:"up"},function(){return this.ex},function(a){this.ex=a});D.defineProperty(Yf,{Oe:"clickCount"},function(){return this.Bv},function(a){this.Bv=a});D.defineProperty(Yf,{im:"delta"},function(){return this.Lv},function(a){this.Lv=a});D.defineProperty(Yf,{yu:"isMultiTouch"},function(){return this.gw},function(a){this.gw=a});D.defineProperty(Yf,{Mc:"handled"},function(){return this.Wv},function(a){this.Wv=a}); +D.defineProperty(Yf,{bubbles:"bubbles"},function(){return this.ak},function(a){this.ak=a});D.defineProperty(Yf,{event:"event"},function(){return this.Rr},function(a){this.Rr=a});D.w(Yf,{Mj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});D.w(Yf,{Wk:"isMac"},function(){return D.Wk});D.defineProperty(Yf,{timestamp:"timestamp"},function(){return this.ax},function(a){this.ax=a}); +D.defineProperty(Yf,{gh:"targetDiagram"},function(){return this.$w},function(a){this.$w=a});D.defineProperty(Yf,{We:"targetObject"},function(){return this.Qg},function(a){this.Qg=a});D.defineProperty(Yf,{control:"control"},function(){return 0!==(this.Kd&1)},function(a){this.Kd=a?this.Kd|1:this.Kd&-2});D.defineProperty(Yf,{shift:"shift"},function(){return 0!==(this.Kd&4)},function(a){this.Kd=a?this.Kd|4:this.Kd&-5}); +D.defineProperty(Yf,{alt:"alt"},function(){return 0!==(this.Kd&2)},function(a){this.Kd=a?this.Kd|2:this.Kd&-3});D.defineProperty(Yf,{Hu:"meta"},function(){return 0!==(this.Kd&8)},function(a){this.Kd=a?this.Kd|8:this.Kd&-9});D.defineProperty(Yf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); D.defineProperty(Yf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});D.defineProperty(Yf,{YL:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5}); -function $f(){this.ba=null;this.Xb="";this.Dw=this.Vw=null;this.lr=!1}D.ja("DiagramEvent",$f);$f.prototype.copy=function(){var a=new $f;a.ba=this.ba;a.Xb=this.Xb;a.Vw=this.Vw;a.Dw=this.Dw;a.lr=this.lr;return a};$f.prototype.toString=function(){var a="*"+this.name;null!==this.PB&&(a+=":"+this.PB.toString());null!==this.uB&&(a+="("+this.uB.toString()+")");return a};D.defineProperty($f,{g:"diagram"},function(){return this.ba},function(a){this.ba=a}); -D.defineProperty($f,{name:"name"},function(){return this.Xb},function(a){this.Xb=a});D.defineProperty($f,{PB:"subject"},function(){return this.Vw},function(a){this.Vw=a});D.defineProperty($f,{uB:"parameter"},function(){return this.Dw},function(a){this.Dw=a});D.defineProperty($f,{cancel:"cancel"},function(){return this.lr},function(a){this.lr!==a&&D.Pn("DiagramEvent.cancel","2.0");this.lr=a});function ag(){this.mr=bg;this.ln=this.uw="";this.Ls=this.Ms=this.Qs=this.Rs=this.Ps=this.ba=this.ve=null} +function $f(){this.ba=null;this.Xb="";this.Gw=this.Yw=null;this.lr=!1}D.ja("DiagramEvent",$f);$f.prototype.copy=function(){var a=new $f;a.ba=this.ba;a.Xb=this.Xb;a.Yw=this.Yw;a.Gw=this.Gw;a.lr=this.lr;return a};$f.prototype.toString=function(){var a="*"+this.name;null!==this.PB&&(a+=":"+this.PB.toString());null!==this.uB&&(a+="("+this.uB.toString()+")");return a};D.defineProperty($f,{g:"diagram"},function(){return this.ba},function(a){this.ba=a}); +D.defineProperty($f,{name:"name"},function(){return this.Xb},function(a){this.Xb=a});D.defineProperty($f,{PB:"subject"},function(){return this.Yw},function(a){this.Yw=a});D.defineProperty($f,{uB:"parameter"},function(){return this.Gw},function(a){this.Gw=a});D.defineProperty($f,{cancel:"cancel"},function(){return this.lr},function(a){this.lr!==a&&D.Pn("DiagramEvent.cancel","2.0");this.lr=a});function ag(){this.mr=bg;this.ln=this.vw="";this.Ls=this.Ms=this.Qs=this.Rs=this.Ps=this.ba=this.ve=null} D.ja("ChangedEvent",ag);var cg;ag.Transaction=cg=D.s(ag,"Transaction",-1);var bg;ag.Property=bg=D.s(ag,"Property",0);var dg;ag.Insert=dg=D.s(ag,"Insert",1);var og;ag.Remove=og=D.s(ag,"Remove",2);ag.prototype.clear=ag.prototype.clear=function(){this.Ls=this.Ms=this.Qs=this.Rs=this.Ps=this.ba=this.ve=null}; -ag.prototype.copy=function(){var a=new ag;a.mr=this.mr;a.uw=this.uw;a.ln=this.ln;a.ve=this.ve;a.ba=this.ba;a.Ps=this.Ps;var b=this.Rs;a.Rs=D.Ta(b)&&"function"===typeof b.V?b.V():b;b=this.Qs;a.Qs=D.Ta(b)&&"function"===typeof b.V?b.V():b;b=this.Ms;a.Ms=D.Ta(b)&&"function"===typeof b.V?b.V():b;b=this.Ls;a.Ls=D.Ta(b)&&"function"===typeof b.V?b.V():b;return a};ag.prototype.oc=function(a){a.Ne===ag?this.Jc=a:D.Xj(this,a)}; -ag.prototype.toString=function(){var a="",a=this.Jc===cg?a+"* ":this.Jc===bg?a+(null!==this.ga?"!m":"!d"):a+((null!==this.ga?"!m":"!d")+this.Jc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.wf&&this.wf!==this.propertyName&&(a+=" "+this.wf);a+=": ";this.Jc===cg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ja(this.object)),null!==this.oldValue&&(a+=" old: "+ja(this.oldValue)),null!==this.Tj&&(a+=" "+this.Tj),null!==this.newValue&& +ag.prototype.copy=function(){var a=new ag;a.mr=this.mr;a.vw=this.vw;a.ln=this.ln;a.ve=this.ve;a.ba=this.ba;a.Ps=this.Ps;var b=this.Rs;a.Rs=D.Ta(b)&&"function"===typeof b.V?b.V():b;b=this.Qs;a.Qs=D.Ta(b)&&"function"===typeof b.V?b.V():b;b=this.Ms;a.Ms=D.Ta(b)&&"function"===typeof b.V?b.V():b;b=this.Ls;a.Ls=D.Ta(b)&&"function"===typeof b.V?b.V():b;return a};ag.prototype.oc=function(a){a.Ne===ag?this.Jc=a:D.Xj(this,a)}; +ag.prototype.toString=function(){var a="",a=this.Jc===cg?a+"* ":this.Jc===bg?a+(null!==this.ga?"!m":"!d"):a+((null!==this.ga?"!m":"!d")+this.Jc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.xf&&this.xf!==this.propertyName&&(a+=" "+this.xf);a+=": ";this.Jc===cg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ja(this.object)),null!==this.oldValue&&(a+=" old: "+ja(this.oldValue)),null!==this.Tj&&(a+=" "+this.Tj),null!==this.newValue&& (a+=" new: "+ja(this.newValue)),null!==this.Rj&&(a+=" "+this.Rj));return a};ag.prototype.getValue=ag.prototype.na=function(a){return a?this.oldValue:this.newValue};ag.prototype.getParam=function(a){return a?this.Tj:this.Rj};ag.prototype.canUndo=ag.prototype.canUndo=function(){return null!==this.ga||null!==this.g?!0:!1};ag.prototype.undo=ag.prototype.undo=function(){this.canUndo()&&(null!==this.ga?this.ga.Gn(this,!0):null!==this.g&&this.g.Gn(this,!0))}; ag.prototype.canRedo=ag.prototype.canRedo=function(){return null!==this.ga||null!==this.g?!0:!1};ag.prototype.redo=ag.prototype.redo=function(){this.canRedo()&&(null!==this.ga?this.ga.Gn(this,!1):null!==this.g&&this.g.Gn(this,!1))};D.defineProperty(ag,{ga:"model"},function(){return this.ve},function(a){this.ve=a});D.defineProperty(ag,{g:"diagram"},function(){return this.ba},function(a){this.ba=a}); -D.defineProperty(ag,{Jc:"change"},function(){return this.mr},function(a){v&&D.Da(a,ag,ag,"change");this.mr=a});D.defineProperty(ag,{wf:"modelChange"},function(){return this.uw},function(a){v&&D.h(a,"string",ag,"modelChange");this.uw=a});D.defineProperty(ag,{propertyName:"propertyName"},function(){return this.ln},function(a){v&&"string"!==typeof a&&D.h(a,"function",ag,"propertyName");this.ln=a}); +D.defineProperty(ag,{Jc:"change"},function(){return this.mr},function(a){v&&D.Da(a,ag,ag,"change");this.mr=a});D.defineProperty(ag,{xf:"modelChange"},function(){return this.vw},function(a){v&&D.h(a,"string",ag,"modelChange");this.vw=a});D.defineProperty(ag,{propertyName:"propertyName"},function(){return this.ln},function(a){v&&"string"!==typeof a&&D.h(a,"function",ag,"propertyName");this.ln=a}); D.w(ag,{YF:"isTransactionFinished"},function(){return this.mr===cg&&("CommittedTransaction"===this.ln||"FinishedUndo"===this.ln||"FinishedRedo"===this.ln)});D.defineProperty(ag,{object:"object"},function(){return this.Ps},function(a){this.Ps=a});D.defineProperty(ag,{oldValue:"oldValue"},function(){return this.Rs},function(a){this.Rs=a});D.defineProperty(ag,{Tj:"oldParam"},function(){return this.Qs},function(a){this.Qs=a}); D.defineProperty(ag,{newValue:"newValue"},function(){return this.Ms},function(a){this.Ms=a});D.defineProperty(ag,{Rj:"newParam"},function(){return this.Ls},function(a){this.Ls=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.iv=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.iv(a.valueOf()):D.isArray(a)?ug(this,a):D.Ta(a)?rg(this,a):"function"===typeof a?"null":a.toString()}; -function ug(a,b,c){void 0===c&&(c=!1);var d=D.cb(b);if(0>=d)return"[]";var e=new ya;e.add("[ ");c&&1=d)return"[]";var e=new ya;e.add("[ ");c&&1d)return;D.Ug(a.we,d)}Xg(a,"nodeDataArray",og,"nodeDataArray",a,b,null,d,null);a.gv(b)} -M.prototype.removeNodeDataCollection=function(a){if(D.isArray(a))for(var b=D.cb(a),c=0;cd)return;D.Ug(a.we,d)}Xg(a,"nodeDataArray",og,"nodeDataArray",a,b,null,d,null);a.hv(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);Xg(this,"",dg,"",a,null,c,null,b)}; M.prototype.removeArrayItem=M.prototype.vG=function(a,b){void 0===b&&(b=-1);v&&(D.Wt(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.we&&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.Ug(a,b);Xg(this,"",og,"",a,c,null,b,null)};D.defineProperty(M,{po:"nodeCategoryProperty"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(Yg(a,M,"nodeCategoryProperty"),this.fn=a,this.i("nodeCategoryProperty",b,a))}); M.prototype.getCategoryForNodeData=M.prototype.QA=function(a){if(null===a)return"";var b=this.fn;if(""===b)return"";b=D.vb(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.Dy=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.fn;if(""!==c)if(this.ie(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"nodeCategory",bg,c,a,d,b))}else D.Ua(a,c,b)}}; +M.prototype.setCategoryForNodeData=M.prototype.Gy=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.fn;if(""!==c)if(this.ie(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"nodeCategory",bg,c,a,d,b))}else D.Ua(a,c,b)}}; function Y(a,b){M.call(this);2D.am(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Jc=== -og){c=a.Tj;if("linkDataArray"===a.wf){d=a.oldValue;D.Ta(d)&&"number"===typeof c&&(e=this.eg(d),b?(this.ii.add(d),D.La(this.bf,c)!==d&&D.Ih(this.bf,c,d),void 0!==e&&this.pd.add(e,d)):(this.ii.remove(d),D.La(this.bf,c)===d&&D.Ug(this.bf,c),void 0!==e&&this.pd.remove(e)));return}if("linkLabelKeys"===a.wf){d=this.Sk(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.am(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.am(d,a.newValue),0<=c&&D.Ug(d,c)));return}}M.prototype.Gn.call(this,a,b)}; -D.defineProperty(Y,{rA:"archetypeNodeData"},function(){return this.ql},function(a){var b=this.ql;b!==a&&(null!==a&&D.l(a,Object,Y,"archetypeNodeData"),this.ql=a,this.i("archetypeNodeData",b,a))});Y.prototype.io=function(a){if(void 0!==a){var b=this.ql;if(null!==b){var c=this.Fe(a);null===c&&(c=this.copyNodeData(b),D.Ua(c,this.wk,a),this.Xl(c))}return a}}; +g=new ma,h=a.Zg,k=0;kD.am(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Jc=== +og){c=a.Tj;if("linkDataArray"===a.xf){d=a.oldValue;D.Ta(d)&&"number"===typeof c&&(e=this.eg(d),b?(this.ii.add(d),D.La(this.bf,c)!==d&&D.Ih(this.bf,c,d),void 0!==e&&this.pd.add(e,d)):(this.ii.remove(d),D.La(this.bf,c)===d&&D.Ug(this.bf,c),void 0!==e&&this.pd.remove(e)));return}if("linkLabelKeys"===a.xf){d=this.Sk(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.am(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.am(d,a.newValue),0<=c&&D.Ug(d,c)));return}}M.prototype.Gn.call(this,a,b)}; +D.defineProperty(Y,{sA:"archetypeNodeData"},function(){return this.ql},function(a){var b=this.ql;b!==a&&(null!==a&&D.l(a,Object,Y,"archetypeNodeData"),this.ql=a,this.i("archetypeNodeData",b,a))});Y.prototype.io=function(a){if(void 0!==a){var b=this.ql;if(null!==b){var c=this.Fe(a);null===c&&(c=this.copyNodeData(b),D.Ua(c,this.wk,a),this.Xl(c))}return a}}; D.defineProperty(Y,{fo:"linkFromKeyProperty"},function(){return this.ji},function(a){var b=this.ji;b!==a&&(Yg(a,Y,"linkFromKeyProperty"),this.ji=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.pm=function(a){if(null!==a){var b=this.ji;if(""!==b&&(b=D.vb(a,b),void 0!==b)){if(Zg(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; Y.prototype.setFromKeyForLinkData=Y.prototype.FB=function(a,b){null===b&&(b=void 0);void 0===b||Zg(b)||D.hc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.ji;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.vb(a,c);d!==b&&(dh(this,d,a),D.Ua(a,c,b),null===this.Fe(b)&&ch(this,b,a),Xg(this,"linkFromKey",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; D.defineProperty(Y,{ho:"linkToKeyProperty"},function(){return this.ki},function(a){var b=this.ki;b!==a&&(Yg(a,Y,"linkToKeyProperty"),this.ki=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.qm=function(a){if(null!==a){var b=this.ki;if(""!==b&&(b=D.vb(a,b),void 0!==b)){if(Zg(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; Y.prototype.setToKeyForLinkData=Y.prototype.LB=function(a,b){null===b&&(b=void 0);void 0===b||Zg(b)||D.hc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.ki;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.vb(a,c);d!==b&&(dh(this,d,a),D.Ua(a,c,b),null===this.Fe(b)&&ch(this,b,a),Xg(this,"linkToKey",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Cu:"linkFromPortIdProperty"},function(){return this.an},function(a){var b=this.an;b!==a&&(Yg(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.an=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.NI=function(a){if(null===a)return"";var b=this.an;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; +D.defineProperty(Y,{Du:"linkFromPortIdProperty"},function(){return this.an},function(a){var b=this.an;b!==a&&(Yg(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.an=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.NI=function(a){if(null===a)return"";var b=this.an;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; Y.prototype.setFromPortIdForLinkData=Y.prototype.GB=function(a,b){D.h(b,"string",Y,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.an;if(""!==c)if(this.Lh(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"linkFromPortId",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Eu:"linkToPortIdProperty"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(Yg(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.bn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.SI=function(a){if(null===a)return"";var b=this.bn;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; -Y.prototype.setToPortIdForLinkData=Y.prototype.MB=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.bn;if(""!==c)if(this.Lh(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"linkToPortId",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Du:"linkLabelKeysProperty"},function(){return this.Ig},function(a){var b=this.Ig;b!==a&&(Yg(a,Y,"linkLabelKeysProperty"),this.Ig=a,this.i("linkLabelKeysProperty",b,a))}); +D.defineProperty(Y,{Fu:"linkToPortIdProperty"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(Yg(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.bn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.SI=function(a){if(null===a)return"";var b=this.bn;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; +Y.prototype.setToPortIdForLinkData=Y.prototype.MB=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.bn;if(""!==c)if(this.Lh(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"linkToPortId",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Eu:"linkLabelKeysProperty"},function(){return this.Ig},function(a){var b=this.Ig;b!==a&&(Yg(a,Y,"linkLabelKeysProperty"),this.Ig=a,this.i("linkLabelKeysProperty",b,a))}); Y.prototype.getLabelKeysForLinkData=Y.prototype.Sk=function(a){if(null===a)return D.Eo;var b=this.Ig;if(""===b)return D.Eo;a=D.vb(a,b);return void 0===a?D.Eo:a}; Y.prototype.setLabelKeysForLinkData=Y.prototype.TG=function(a,b){D.Wt(b,Y,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Ig;if(""!==c)if(this.Lh(a)){var d=D.vb(a,c);void 0===d&&(d=D.Eo);if(d!==b){for(var e=D.cb(d),g=0;gd)return;D.Ug(a.bf,d)}Xg(a,"linkDataArray",og,"linkDataArray",a,b,null,d,null);c=a.pm(b);dh(a,c,b);c=a.qm(b);dh(a,c,b);d=a.Sk(b);if(D.isArray(d))for(var e=D.cb(d),g=0;gd)return;D.Ug(a.bf,d)}Xg(a,"linkDataArray",og,"linkDataArray",a,b,null,d,null);c=a.pm(b);dh(a,c,b);c=a.qm(b);dh(a,c,b);d=a.Sk(b);if(D.isArray(d))for(var e=D.cb(d),g=0;ga.Wh&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Wh;d&&b&&a.rd("CommittingTransaction",c,a.Dj);var e=0;if(0a.Ij;e--)g=d.ea(e),null!==g&&g.clear(), -d.jd(e),a.Kz=!0;e=a.fG;0===e&&(e=1);0=e&&(g=d.ea(0),null!==g&&g.clear(),d.jd(0),a.sh--);d.add(b);a.sh++;d.freeze();g=b}a.rd("CommittedTransaction",c,g)}else{a.bj=!0;try{a.isEnabled&&null!==g&&(g.tu=!0,g.undo())}finally{a.rd("RolledBackTransaction",c,g),a.bj=!1}null!==g&&g.clear()}a.Jv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.bg;for(b=c.count-1;b>=a;b--)d=c.ea(b),null!==d&&d.undo(),c.Ya(),c.jd(b);c.freeze()}return!1} +function ph(a,b,c){if(a.ob)return!1;a.uA&&1>a.Wh&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Wh;d&&b&&a.rd("CommittingTransaction",c,a.Dj);var e=0;if(0a.Ij;e--)g=d.ea(e),null!==g&&g.clear(), +d.jd(e),a.Nz=!0;e=a.fG;0===e&&(e=1);0=e&&(g=d.ea(0),null!==g&&g.clear(),d.jd(0),a.sh--);d.add(b);a.sh++;d.freeze();g=b}a.rd("CommittedTransaction",c,g)}else{a.bj=!0;try{a.isEnabled&&null!==g&&(g.uu=!0,g.undo())}finally{a.rd("RolledBackTransaction",c,g),a.bj=!1}null!==g&&g.clear()}a.Kv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.bg;for(b=c.count-1;b>=a;b--)d=c.ea(b),null!==d&&d.undo(),c.Ya(),c.jd(b);c.freeze()}return!1} pg.prototype.canUndo=pg.prototype.canUndo=function(){if(!this.isEnabled||0=this.Wh&&!this.Az&&(a=a.g,null!==a&&!1===a.ao||D.trace("Change not within a transaction: "+c.toString()))}}; -pg.prototype.skipsEvent=function(a){if(null===a||0>a.Jc.value)return!0;a=a.object;if(a instanceof P){if(a=a.layer,null!==a&&a.Uc)return!0}else if(a instanceof Ug&&a.Uc)return!0;return!1};D.w(pg,{KJ:"models"},function(){return this.Pz.j});D.defineProperty(pg,{isEnabled:"isEnabled"},function(){return this.mf},function(a){this.mf=a});D.w(pg,{hH:"transactionToUndo"},function(){return 0<=this.Ij&&this.Ij<=this.history.count-1?this.history.ea(this.Ij):null}); -D.w(pg,{gH:"transactionToRedo"},function(){return this.Ij=this.Wh&&!this.Dz&&(a=a.g,null!==a&&!1===a.ao||D.trace("Change not within a transaction: "+c.toString()))}}; +pg.prototype.skipsEvent=function(a){if(null===a||0>a.Jc.value)return!0;a=a.object;if(a instanceof P){if(a=a.layer,null!==a&&a.Uc)return!0}else if(a instanceof Ug&&a.Uc)return!0;return!1};D.w(pg,{KJ:"models"},function(){return this.Sz.j});D.defineProperty(pg,{isEnabled:"isEnabled"},function(){return this.mf},function(a){this.mf=a});D.w(pg,{hH:"transactionToUndo"},function(){return 0<=this.Ij&&this.Ij<=this.history.count-1?this.history.ea(this.Ij):null}); +D.w(pg,{gH:"transactionToRedo"},function(){return this.Ijb.Qh||(b.scale=a))};oa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Ly);D.p(a,oa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Qh?!1:b.ox}; -oa.prototype.increaseZoom=function(a){void 0===a&&(a=this.Ly);D.p(a,oa,"increaseZoom:factor");var b=this.g;null!==b&&b.bm===Rh&&(a*=b.scale,ab.Qh||(b.scale=a))};oa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Ly);D.p(a,oa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Qh?!1:b.ox};oa.prototype.resetZoom=function(a){void 0===a&&(a=this.yx);D.p(a,oa,"resetZoom:newscale");var b=this.g;null===b||ab.Qh||(b.scale=a)}; -oa.prototype.canResetZoom=function(a){void 0===a&&(a=this.yx);D.p(a,oa,"canResetZoom:newscale");var b=this.g;return null===b||ab.Qh?!1:b.ox};oa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.nA&&!isNaN(this.Lz)&&a.dd.P(this.mA)?(a.scale=this.Lz,a.position=this.vD,this.nA=NaN,this.mA=Hd):(this.Lz=b,this.vD=c.copy(),a.zoomToFit(),this.nA=a.scale,this.mA=a.dd.copy())}};oa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.ox}; +""}};oa.prototype.canPasteSelection=function(){var a=this.g;return null===a||a.nb||a.Gf||!a.$p||!a.qA||null===qh||rh!==a.ga.gm?!1:!0};oa.prototype.undo=function(){var a=this.g;null!==a&&a.ra.undo()};oa.prototype.canUndo=function(){var a=this.g;return null===a||a.nb||a.Gf?!1:a.IE&&a.ra.canUndo()};oa.prototype.redo=function(){var a=this.g;null!==a&&a.ra.redo()};oa.prototype.canRedo=function(){var a=this.g;return null===a||a.nb||a.Gf?!1:a.IE&&a.ra.canRedo()}; +oa.prototype.decreaseZoom=function(a){void 0===a&&(a=1/this.Oy);D.p(a,oa,"decreaseZoom:factor");var b=this.g;null!==b&&b.bm===Rh&&(a*=b.scale,ab.Qh||(b.scale=a))};oa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Oy);D.p(a,oa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Qh?!1:b.sx}; +oa.prototype.increaseZoom=function(a){void 0===a&&(a=this.Oy);D.p(a,oa,"increaseZoom:factor");var b=this.g;null!==b&&b.bm===Rh&&(a*=b.scale,ab.Qh||(b.scale=a))};oa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Oy);D.p(a,oa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Qh?!1:b.sx};oa.prototype.resetZoom=function(a){void 0===a&&(a=this.Bx);D.p(a,oa,"resetZoom:newscale");var b=this.g;null===b||ab.Qh||(b.scale=a)}; +oa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Bx);D.p(a,oa,"canResetZoom:newscale");var b=this.g;return null===b||ab.Qh?!1:b.sx};oa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.oA&&!isNaN(this.Oz)&&a.dd.P(this.nA)?(a.scale=this.Oz,a.position=this.vD,this.oA=NaN,this.nA=Hd):(this.Oz=b,this.vD=c.copy(),a.zoomToFit(),this.oA=a.scale,this.nA=a.dd.copy())}};oa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.sx}; oa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,oa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.sj&&(this.sj.next()?a=this.sj.value:this.sj=null)}catch(c){this.sj=null}null===a&&(0e||Math.abs(b.y-a.y)>d};D.w(Vg,{g:"diagram"},function(){return this.ba});D.defineProperty(Vg,{name:"name"},function(){return this.Xb},function(a){D.h(a,"string",Vg,"name");this.Xb=a}); D.defineProperty(Vg,{isEnabled:"isEnabled"},function(){return this.mf},function(a){D.h(a,"boolean",Vg,"isEnabled");this.mf=a});D.defineProperty(Vg,{wa:"isActive"},function(){return this.iD},function(a){D.h(a,"boolean",Vg,"isActive");this.iD=a});D.defineProperty(Vg,{Qf:"transactionResult"},function(){return this.tE},function(a){null!==a&&D.h(a,"string",Vg,"transactionResult");this.tE=a}); -function Qh(){Vg.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.jc){var c=a.g;if(!(null===c||b&&(c.nb||c.Gf))&&null!==a.fc){var d=c.ra;d.isEnabled&&d.UF?null!==d.Dj&&0c.ta)){var d=a.g;if(null!==d&&!d.nb){var e=a.qj;if(null!==e){var g=null,h=null;null===c.aa&&(g=Yi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.da&&(k=Yi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.hq=c.m(0),c.iq=c.m(c.ta-1),c.zm=!1,c.aa=h,null!==g&&(c.dg=g.ud),c.da=l,null!==k&&(c.jh=k.ud),c.Lc!==a.Sz&&d.Ja("LinkRelinked",c,a.Sz),c.kd!==a.Tz&&d.Ja("LinkRelinked",c,a.Tz)):Zi(e,h,g,l,k):Zi(e,null,null,null,null)}}}} +function Yi(a,b,c){var d=a.qj;if(null===d)return null;var e=a.g.Qn(b,d.sG,function(a){return d.findValidLinkablePort(a,c)});a=D.O();for(var g=Infinity,h=null,e=e.j;e.next();){var k=e.value;if(null!==k.Y){var l=k.eb(hc,a),l=b.Df(l);lc.ta)){var d=a.g;if(null!==d&&!d.nb){var e=a.qj;if(null!==e){var g=null,h=null;null===c.aa&&(g=Yi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.da&&(k=Yi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.hq=c.m(0),c.iq=c.m(c.ta-1),c.zm=!1,c.aa=h,null!==g&&(c.dg=g.ud),c.da=l,null!==k&&(c.jh=k.ud),c.Lc!==a.zw&&d.Ja("LinkRelinked",c,a.zw),c.kd!==a.Aw&&d.Ja("LinkRelinked",c,a.Aw)):Zi(e,h,g,l,k):Zi(e,null,null,null,null)}}}} Qh.prototype.doDragOver=function(){}; function $i(a,b){var c=a.g;if(null!==c){a.Fj&&Vi(a,!0);Ei(a);var d=Wi(c,b,null,function(b){return!Ti(a,b)}),e=c.U;e.We=d;if(null!==d){e.Mc=!1;for(var g=d;null!==g;){var h=g.lB;if(null!==h&&(h(e,g),e.Mc))break;g=Xi(g)}}else g=c.lB,null!==g&&g(e);if(a.wa||null!==Zh){for(e=(a.jc||a.fc).j;e.next();)g=e.key,g instanceof G&&g.Hd.each(function(a){a.zm=!1});a.doDropOnto(b,d);if(a.wa||null!==Zh){d=D.Of();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&aj(c,g.getAvoidableRect(d));D.Kb(d)}}}} Qh.prototype.doDropOnto=function(){};Qh.prototype.doMouseMove=function(){if(this.wa){var a=this.g;if(null!==a&&null!==this.Nn&&null!==this.fc){var b=!1,c=!1;this.mayCopy()?(b=!0,a.kc="copy",Oi(this,!1),Yh(this,this.jc),Pi(this,this.jc,!1),Fi(this,this.jc)):this.mayMove()?(c=!0,a.kc="default",Ii(this),Pi(this,this.fc,!0)):this.mayDragOut()?(a.kc="no-drop",Oi(this,!1),Pi(this,this.jc,!1)):Ii(this);Ui(this,a.U.ha,c,b)}}}; @@ -579,149 +579,149 @@ Qh.prototype.mayDragOut=function(){if(!this.PF)return!1;var a=this.g;if(null===a Qh.prototype.getDraggingSource=function(){return Zh};Qh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.HE||a.nb||a.Gf||!a.$p)return!1;var b=Zh;return null===b||null===b.g||b.g.ga.gm!==a.ga.gm?!1:!0};Qh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Xa.Ii();bj(a);a=Zh;null!==a&&null!==a.g&&(a.g.kc="copy")}};Qh.prototype.doSimulatedDragLeave=function(){var a=Zh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; Qh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Zh;null!==b&&null!==b.fc&&this.mayDragIn()&&(a.kc="copy",cj(this,b.fc.Yj(),!1),Pi(this,this.jc,!1),Ui(this,a.U.ha,!1,!0))}}; Qh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Zh;if(null!==b){var c=b.g;b.Lr=!0;Ii(this);this.mayDragIn()&&(this.ac("Drop"),cj(this,b.fc.Yj(),!0),Pi(this,this.jc,!1),null!==this.jc&&a.OG(this.jc.Yj()),$i(this,a.U.ha),a.zc(),b=a.selection,null!==this.jc?this.Qf="ExternalCopy":b=new L(F),this.jc=null,a.doFocus(),a.Ja("ExternalObjectsDropped",b,c),this.dl())}}}; -function cj(a,b,c){if(null===a.jc){var d=a.g;if(null!==d&&!d.nb&&!d.Gf){d.Eb=!c;d.ar=!c;a.cl=d.U.ha;d=d.gq(b,d,!0);c=D.Of();Ni(b,c);var e=c.x+c.width/2,g=c.y+c.height/2;D.Kb(c);var h=a.Tw;c=new ma(F);var k=D.O();for(b=b.j;b.next();){var l=b.value,m=d.na(l);l.oe()&&l.canCopy()?(l=l.location,k.n(h.x-(e-l.x),h.y-(g-l.y)),m.location=k,m.hf(),c.add(m,ci(k))):l instanceof J&&l.canCopy()&&m.$k(h.x-e,h.y-g)}D.A(k);for(d=d.j;d.next();)e=d.value,e instanceof J&&e.canCopy()&&c.add(e,ci());a.jc=c;Xh(a,c.Yj()); +function cj(a,b,c){if(null===a.jc){var d=a.g;if(null!==d&&!d.nb&&!d.Gf){d.Eb=!c;d.ar=!c;a.cl=d.U.ha;d=d.gq(b,d,!0);c=D.Of();Ni(b,c);var e=c.x+c.width/2,g=c.y+c.height/2;D.Kb(c);var h=a.Ww;c=new ma(F);var k=D.O();for(b=b.j;b.next();){var l=b.value,m=d.na(l);l.oe()&&l.canCopy()?(l=l.location,k.n(h.x-(e-l.x),h.y-(g-l.y)),m.location=k,m.hf(),c.add(m,ci(k))):l instanceof J&&l.canCopy()&&m.$k(h.x-e,h.y-g)}D.A(k);for(d=d.j;d.next();)e=d.value,e instanceof J&&e.canCopy()&&c.add(e,ci());a.jc=c;Xh(a,c.Yj()); null!==a.sd&&(c=a.sd,d=c.so,c.$k(a.cl.x-(d.x+d.width/2),a.cl.y-(d.y+d.height/2)))}}}Qh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.kc="":a.kc="no-drop")};function qi(a){this.point=a;this.UG=Gd}D.ja("DraggingInfo",qi);function Qi(a,b,c){this.Wc=a;this.info=b;this.VI=c} function dj(){0=d&&(d=.1);for(var e=this,g=b.Qn(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.eb(hc,D.O()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;lc){if(null!==this.sc&&a===this.ah&&b===this.bh)return!0;var d=b.ud;null===d&&(d="");if(a.Gx(d).count>=c)return!1}return!0}; +dj.prototype.findTargetPort=function(a){var b=this.g,c=b.U.ha,d=this.sG;0>=d&&(d=.1);for(var e=this,g=b.Qn(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.eb(hc,D.O()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;lc){if(null!==this.sc&&a===this.ah&&b===this.bh)return!0;var d=b.ud;null===d&&(d="");if(a.Jx(d).count>=c)return!1}return!0}; dj.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.zq;if(null!==this.g&&this.g.gb===this&&(null!==a.layer&&!a.layer.Ut||!0!==b.cH))return!1;var c=b.wK;if(Infinity>c){if(null!==this.sc&&a===this.dh&&b===this.eh)return!0;var d=b.ud;null===d&&(d="");if(a.Xg(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.ud;null===d&&(d="");var e=b.Y;if(!(e instanceof G))return!1;var g=b.ud;null===g&&(g="");for(e=e.Xg(g);e.next();)if(g=e.value,g.aa===c&&g.dg===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.KI&&d.vK||!this.isInSameNode(b,d))&&(b.JI&&d.uK||!this.isLinked(b,d)))||null!==this.sc&&(null!==a&&this.isLabelDependentOnLink(a,this.sc)||null!==c&&this.isLabelDependentOnLink(c,this.sc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.sc))return!1;if(null!==a){var e=a.ey;if(null!==e&&!e(a,b,c,d,this.sc))return!1}if(null!== -c&&(e=c.ey,null!==e&&!e(a,b,c,d,this.sc)))return!1;e=this.ey;return null!==e?e(a,b,c,d,this.sc):!0};dj.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Ac;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.aa;if(null!==e&&e.tf&&(d.add(e),ej(a,e.Ac,c,d)))return!0;b=b.da;return null!==b&&b.tf&&(d.add(b),ej(a,b.Ac,c,d))?!0:!1} +dj.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.KI&&d.vK||!this.isInSameNode(b,d))&&(b.JI&&d.uK||!this.isLinked(b,d)))||null!==this.sc&&(null!==a&&this.isLabelDependentOnLink(a,this.sc)||null!==c&&this.isLabelDependentOnLink(c,this.sc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.sc))return!1;if(null!==a){var e=a.iy;if(null!==e&&!e(a,b,c,d,this.sc))return!1}if(null!== +c&&(e=c.iy,null!==e&&!e(a,b,c,d,this.sc)))return!1;e=this.iy;return null!==e?e(a,b,c,d,this.sc):!0};dj.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Ac;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.aa;if(null!==e&&e.uf&&(d.add(e),ej(a,e.Ac,c,d)))return!0;b=b.da;return null!==b&&b.uf&&(d.add(b),ej(a,b.Ac,c,d))?!0:!1} dj.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.zq;var d=null!==this.g?this.g.CK:fj;if(d!==fj){if(d===gj){if(null!==c&&!c.Vc)return!0;for(d=b.Hd;d.next();){var e=d.value;if(e!==c&&e.Vc&&e.da===b)return!1}return!hj(this,a,b,c,!0)}if(d===ij){if(null!==c&&!c.Vc)return!0;for(d=a.Hd;d.next();)if(e=d.value,e!==c&&e.Vc&&e.aa===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.Hd;g.next();){var h=g.value;if(h!==d&&(!e||h.Vc)&&h.da===b&&(h=h.aa,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.Hd;g.next();){var h=g.value;if(h!==e&&h.da===c&&(h=h.aa,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.Hd;g.next();){var h=g.value;if(h!==e){var k=h.aa,h=h.da,k=k===c?h:k;if(k!==c&&nj(a,b,k,d,e))return!0}}return!1}D.defineProperty(dj,{ey:"linkValidation"},function(){return this.Il},function(a){null!==a&&D.h(a,"function",dj,"linkValidation");this.Il=a});D.defineProperty(dj,{qy:"portTargeted"},function(){return this.VD},function(a){null!==a&&D.h(a,"function",dj,"portTargeted");this.VD=a}); -function ra(){0b.iu+1&&cb.iu+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(Uj,{pu:"handleArchetype"},function(){return this.xl},function(a){null!==a&&D.l(a,P,Uj,"handleArchetype");this.xl=a});D.w(Uj,{handle:"handle"},function(){return this.nc});D.defineProperty(Uj,{zb:"adornedObject"},function(){return this.Qc},function(a){null!==a&&D.l(a,P,Uj,"adornedObject");this.Qc=a}); +"ne-resize":"e-resize"}else if(a instanceof x)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};D.defineProperty(Uj,{qu:"handleArchetype"},function(){return this.xl},function(a){null!==a&&D.l(a,P,Uj,"handleArchetype");this.xl=a});D.w(Uj,{handle:"handle"},function(){return this.nc});D.defineProperty(Uj,{zb:"adornedObject"},function(){return this.Qc},function(a){null!==a&&D.l(a,P,Uj,"adornedObject");this.Qc=a}); Uj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.nb&&a.Vt&&a.U.left?null!==this.findToolHandleAt(a.Kc.ha,this.name):!1}; -Uj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.nc=this.findToolHandleAt(a.Kc.ha,this.name),null!==this.nc&&(this.Qc=this.nc.Y.zb,this.Fp.set(this.zb.eb(this.handle.alignment.nG())),this.QD.set(this.Qc.Y.location),this.LD.set(this.Qc.Ea),this.wz=this.computeCellSize(),this.yz=this.computeMinSize(),this.xz=this.computeMaxSize(),a.jf=!0,this.HD=a.Xa.isEnabled,a.Xa.isEnabled=!1,this.ac(this.name),this.wa=!0))}; -Uj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.dl(),this.Qc=this.nc=null,this.wa=a.jf=!1,a.Xa.isEnabled=this.HD)};Uj.prototype.doCancel=function(){null!==this.zb&&(this.zb.Ea=this.oG,this.zb.Y.location=this.RJ);this.stopTool()};Uj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.yz,c=this.xz,d=this.wz,e=this.zb.xF(a.U.ha,D.O()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.hg();D.A(e)}}; -Uj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.yz,c=this.xz,d=this.wz,e=this.zb.xF(a.U.ha,D.O()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.zc();this.Qf=this.name;a.Ja("PartResized",this.zb,this.oG)}this.stopTool()}; +Uj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.nc=this.findToolHandleAt(a.Kc.ha,this.name),null!==this.nc&&(this.Qc=this.nc.Y.zb,this.Fp.set(this.zb.eb(this.handle.alignment.nG())),this.QD.set(this.Qc.Y.location),this.LD.set(this.Qc.Ea),this.zz=this.computeCellSize(),this.Bz=this.computeMinSize(),this.Az=this.computeMaxSize(),a.jf=!0,this.HD=a.Xa.isEnabled,a.Xa.isEnabled=!1,this.ac(this.name),this.wa=!0))}; +Uj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.dl(),this.Qc=this.nc=null,this.wa=a.jf=!1,a.Xa.isEnabled=this.HD)};Uj.prototype.doCancel=function(){null!==this.zb&&(this.zb.Ea=this.oG,this.zb.Y.location=this.RJ);this.stopTool()};Uj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Bz,c=this.Az,d=this.zz,e=this.zb.xF(a.U.ha,D.O()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.hg();D.A(e)}}; +Uj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Bz,c=this.Az,d=this.zz,e=this.zb.xF(a.U.ha,D.O()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.zc();this.Qf=this.name;a.Ja("PartResized",this.zb,this.oG)}this.stopTool()}; Uj.prototype.resize=function(a){if(null!==this.g){var b=this.zb,c=b.Y;b.Ea=a.size;c.hf();a=this.zb.eb(this.handle.alignment.nG());c instanceof I?(a=c.position.copy().xo(a).add(this.Fp),c.move(a)):c.location=c.location.copy().xo(a).add(this.Fp)}}; Uj.prototype.computeResize=function(a,b,c,d,e,g){b.Zd()&&(b=hc);var h=this.zb.Ga,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.O();fb(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};Uj.prototype.computeReshape=function(){var a=Xj;this.zb instanceof z&&(a=Yj(this.zb));return!(a===Zj||a===ak||null!==this.g&&this.g.U.shift)};Uj.prototype.computeMinSize=function(){var a=this.zb.ig.copy(),b=this.ig;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; Uj.prototype.computeMaxSize=function(){var a=this.zb.kf.copy(),b=this.kf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.nK),180),c=Math.min(Math.abs(this.mK),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(bk,{nK:"snapAngleMultiple"},function(){return this.aE},function(a){D.h(a,"number",bk,"snapAngleMultiple");this.aE=a}); -D.defineProperty(bk,{mK:"snapAngleEpsilon"},function(){return this.$D},function(a){D.h(a,"number",bk,"snapAngleEpsilon");this.$D=a});D.w(bk,{fM:"originalAngle"},function(){return this.yw});function dk(){Vg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.U.Oe?!1:!0};ok.prototype.doStart=function(){this.wa||null===this.ih||this.doActivate()}; +ok.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;if(null===a||a.nb||!a.U.left||this.isBeyondDragSize())return!1;var b=a.Ge(a.U.ha,null,function(a){return a instanceof na});if(null===b||!b.IA||!b.Y.canEdit())return!1;b=b.Y;return null===b||this.YG===pk&&!b.hb||this.YG===wk&&2>a.U.Oe?!1:!0};ok.prototype.doStart=function(){this.wa||null===this.ih||this.doActivate()}; ok.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.ih;null===b&&(b=a.Ge(a.U.ha,function(a){return a instanceof na?a:null}));if(null!==b&&(this.ih=b,null!==b.Y)){this.wa=!0;this.$a=xk;var c=this.rI;null!==b.bH&&(c=b.bH);this.Ck=this.ih.copy();var d=new B(this.ih.eb(dc),this.ih.eb(uc));a.gK(d);if(c instanceof fk)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();"function"=== -typeof c.focus&&c.focus();"function"===typeof c.select&&this.Cy&&(c.select(),c.setSelectionRange(0,9999));a.Ej.appendChild(c)}this.Cj=c}}}};ok.prototype.doCancel=function(){null!==this.Nl&&this.Cj instanceof HTMLElement&&(this.Cj.style.border=this.Nl,this.Nl=null);this.stopTool()};ok.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};ok.prototype.doMouseDown=function(){this.wa&&this.acceptText(tk)}; -ok.prototype.acceptText=function(a){switch(a){case tk:if(this.$a===Bk)this.Cj instanceof HTMLElement&&this.Cj.focus();else if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this);break;case sk:case vk:case uk:if(vk===a&&!0===this.gA.Wx)break;if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this)}}; -function Ek(a){var b=a.ih,c=a.g,d=a.Cj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof fk?null!==d.bC&&(g=d.bC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.ac(a.name),a.$a=Bk,d instanceof fk?d.show(b,c,a):null!==a.Nl&&(d.style.border=a.Nl,a.Nl=null),a.Qf=a.name,b.text=g,null!==b.aH&&b.aH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.dl(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Ak,null!==b.JA&&b.JA(a,e,g),d instanceof fk?d.show(b,c,a):(null===a.Nl&&(a.Nl=d.style.border, +typeof c.focus&&c.focus();"function"===typeof c.select&&this.Fy&&(c.select(),c.setSelectionRange(0,9999));a.Ej.appendChild(c)}this.Cj=c}}}};ok.prototype.doCancel=function(){null!==this.Nl&&this.Cj instanceof HTMLElement&&(this.Cj.style.border=this.Nl,this.Nl=null);this.stopTool()};ok.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};ok.prototype.doMouseDown=function(){this.wa&&this.acceptText(tk)}; +ok.prototype.acceptText=function(a){switch(a){case tk:if(this.$a===Bk)this.Cj instanceof HTMLElement&&this.Cj.focus();else if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this);break;case sk:case vk:case uk:if(vk===a&&!0===this.hA.Zx)break;if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this)}}; +function Ek(a){var b=a.ih,c=a.g,d=a.Cj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof fk?null!==d.bC&&(g=d.bC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.ac(a.name),a.$a=Bk,d instanceof fk?d.show(b,c,a):null!==a.Nl&&(d.style.border=a.Nl,a.Nl=null),a.Qf=a.name,b.text=g,null!==b.aH&&b.aH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.dl(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Ak,null!==b.KA&&b.KA(a,e,g),d instanceof fk?d.show(b,c,a):(null===a.Nl&&(a.Nl=d.style.border, d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}}ok.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.$a=qk;this.ih=null;if(null!==this.Cj){var b=this.Cj;if(b instanceof fk)b.Yn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Ej.removeChild(b)}}this.wa=!1}};ok.prototype.doFocus=function(){v&&D.Pn("TextEditingTool.doFocus","2.0");Ck(this)};ok.prototype.doBlur=function(){v&&D.Pn("TextEditingTool.doBlur","2.0");Dk(this)}; -function Ck(a){if(null!==a.Cj){var b=a.kz;a.$a===xk&&(a.$a=yk);"function"===typeof b.select&&a.Cy&&(b.select(),b.setSelectionRange(0,9999))}}function Dk(a){if(null!==a.Cj){var b=a.kz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Cy&&(b.select(),b.setSelectionRange(0,9999))}}ok.prototype.isValidText=function(a,b,c){D.l(a,na,ok,"isValidText:textblock");var d=this.RB;if(null!==d&&!d(a,b,c))return!1;d=a.RB;return null===d||d(a,b,c)?!0:!1}; -D.defineProperty(ok,{RB:"textValidation"},function(){return this.Sl},function(a){null!==a&&D.h(a,"function",ok,"textValidation");this.Sl=a});D.defineProperty(ok,{iG:"minimumEditorScale"},function(){return this.BD},function(a){null!==a&&D.h(a,"number",ok,"minimumEditorScale");this.BD=a});D.defineProperty(ok,{Cy:"selectsTextOnActivate"},function(){return this.YD},function(a){null!==a&&D.h(a,"boolean",ok,"selectsTextOnActivate");this.YD=a}); -D.defineProperty(ok,{state:"state"},function(){return this.$a},function(a){this.$a!==a&&(D.Da(a,ok,ok,"starting"),this.$a=a)});ok.prototype.measureTemporaryTextBlock=ok.prototype.FJ=function(a){var b=this.Ck;b.text=a;Fk(b,this.ih.wp,Infinity);return b};function Lh(){Vg.call(this);this.name="ToolManager";this.xH=new K(Vg);this.yH=new K(Vg);this.zH=new K(Vg);this.fD=this.gD=850;this.VC=(new Ca(2,2)).Na();this.qE=5E3;this.FD=Wh;this.dD=Gk;this.Iv=this.JC=null;this.xn=-1}D.Sa(Lh,Vg); -D.ja("ToolManager",Lh);var Wh;Lh.WheelScroll=Wh=D.s(Lh,"WheelScroll",0);var Vh;Lh.WheelZoom=Vh=D.s(Lh,"WheelZoom",1);Lh.WheelNone=D.s(Lh,"WheelNone",2);var Gk;Lh.GestureZoom=Gk=D.s(Lh,"GestureZoom",3);var Hk;Lh.GestureCancel=Hk=D.s(Lh,"GestureCancel",4);var Ik;Lh.GestureNone=Ik=D.s(Lh,"GestureNone",5);D.defineProperty(Lh,{Ju:"mouseWheelBehavior"},function(){return this.FD},function(a){D.Da(a,Lh,Lh,"mouseWheelBehavior");this.FD=a}); -D.defineProperty(Lh,{qq:"gestureBehavior"},function(){return this.dD},function(a){D.Da(a,Lh,Lh,"gestureBehavior");this.dD=a});Lh.prototype.initializeStandardTools=function(){this.JH=new ek;this.uG=new ai;this.xJ=new Cj;this.HG=new Uj;this.dK=new bk;this.eG=new ra;this.De=new Qh;this.vI=new mk;this.SJ=new nk;this.xA=new hk;this.QB=new ok;this.$H=new ta;this.aI=new dk}; -Lh.prototype.updateAdornments=function(a){var b=this.fm;if(b instanceof da&&this.Iv===a){var c=b.zb;(null!==a?c.Y===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -Lh.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.U;b.Mj&&this.qq===Hk&&(b.bubbles=!1);if(b.xu){this.cancelWaitAfter();if(this.qq===Ik){b.bubbles=!0;return}if(this.qq===Hk)return;if(a.gb.canStartMultiTouch()){a.gb.standardPinchZoomStart();return}}var c=a.ra;c.tA&&0!==c.Wh&&D.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.lf.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(gh,{bL:"animationReasons"},function(){return this.uv}); -gh.prototype.canStart=function(){return!0};gh.prototype.prepareAutomaticAnimation=gh.prototype.qo=function(a){this.mf&&(this.ok||this.ba.ao)&&(this.uv.add(a),this.canStart(a)&&(this.nk&&this.Ii(),this.wc=!0))};function cl(a){if(a.mf&&(a.uv.clear(),a.wc))if(!a.Jo)a.wc=!1;else if(0===a.Io){var b=+new Date;a.Io=b;requestAnimationFrame(function(){if(!1!==a.wc&&!a.nk&&a.Io===b){var c=a.ba;c.Hj("temporaryPixelRatio")&&(c.Bk=1);dl(c);a.wc=!1;c.Ja("AnimationStarting");el(a,b)}})}} -function fl(a,b,c,d,e,g){if(a.wc&&(v&&D.l(b,P,gh,"addPropToAnimation:obj"),!("position"===c&&d.P(e)||b instanceof F&&!b.NF))){var h=a.gn;if(h.contains(b)){var h=h.na(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=gl(d));h.vx&&void 0!==l[c]?h.eu[c]=gl(e):(g||(h.eu[c]=gl(e)),l[c]=gl(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.eu.location=gl(b.location))}else k=new la,l=new la,k[c]=gl(d),l[c]=gl(e),d=l,e=k.position,e instanceof O&&!e.F()&&a.uv.contains("Expand SubGraph")&&e.assign(d.position),k= +function gh(){this.KC=Wk;this.Gr=this.Hr=this.ba=null;this.Io=this.Ir=this.Jr=0;this.Jo=this.wc=this.qp=this.nk=!1;this.ok=this.mf=!0;this.Hv=this.Gv=this.FC=null;this.EC=0;this.Iv=null;this.vv=new L("string");this.wz=600;this.AH=new O(0,0);this.tC=this.sC=this.uE=!1;this.gn=new ma(P,bl)}D.ja("AnimationManager",gh);gh.prototype.Yc=function(a){this.ba=a};function Wk(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(gh,{bL:"animationReasons"},function(){return this.vv}); +gh.prototype.canStart=function(){return!0};gh.prototype.prepareAutomaticAnimation=gh.prototype.qo=function(a){this.mf&&(this.ok||this.ba.ao)&&(this.vv.add(a),this.canStart(a)&&(this.nk&&this.Ii(),this.wc=!0))};function cl(a){if(a.mf&&(a.vv.clear(),a.wc))if(!a.Jo)a.wc=!1;else if(0===a.Io){var b=+new Date;a.Io=b;requestAnimationFrame(function(){if(!1!==a.wc&&!a.nk&&a.Io===b){var c=a.ba;c.Hj("temporaryPixelRatio")&&(c.Bk=1);dl(c);a.wc=!1;c.Ja("AnimationStarting");el(a,b)}})}} +function fl(a,b,c,d,e,g){if(a.wc&&(v&&D.l(b,P,gh,"addPropToAnimation:obj"),!("position"===c&&d.P(e)||b instanceof F&&!b.NF))){var h=a.gn;if(h.contains(b)){var h=h.na(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=gl(d));h.yx&&void 0!==l[c]?h.eu[c]=gl(e):(g||(h.eu[c]=gl(e)),l[c]=gl(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.eu.location=gl(b.location))}else k=new la,l=new la,k[c]=gl(d),l[c]=gl(e),d=l,e=k.position,e instanceof O&&!e.F()&&a.vv.contains("Expand SubGraph")&&e.assign(d.position),k= new bl(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.eu.location=gl(b.location)),h.add(b,k);a.Jo=!0}}function gl(a){return a instanceof O?a.copy():a instanceof Ca?a.copy():a} -function el(a,b){var c;function d(){if(!1!==g.nk&&g.Io===b){var a=+new Date,c=a>s?m:a-r;hl(g);il(g,e,q,h,c,m);g.Fv&&g.Fv();bj(e);jl(g);a>s?kl(g):requestAnimationFrame(d)}}void 0===c&&(c=new la);var e=a.ba;if(null!==e){a.nk=!0;var g=a,h=c.EL||a.KC,k=c.dM||null,l=c.eM||null,m=c.duration||a.sz,n=a.AH;for(c=a.gn.j;c.next();){var p=c.value.start.position;p instanceof O&&(p.F()||p.assign(n))}a.FC=h;a.Fv=k;a.Gv=l;a.EC=m;a.Hv=a.gn;var q=a.Hv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l= -k["position:placeholder"],n=l.eb(dc),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);hl(a);il(a,e,q,h,0,m);bj(a.ba);jl(a);var r=+new Date,s=r+m;g.Io===b&&requestAnimationFrame(function(){d()})}}function hl(a){if(!a.qp){var b=a.ba;a.uE=b.Eb;a.sC=b.Ue;a.tC=b.bv;b.Eb=!0;b.Ue=!0;b.bv=!0;a.qp=!0}}function jl(a){var b=a.ba;b.Eb=a.uE;b.Ue=a.sC;b.bv=a.tC;a.qp=!1} +function el(a,b){var c;function d(){if(!1!==g.nk&&g.Io===b){var a=+new Date,c=a>s?m:a-r;hl(g);il(g,e,q,h,c,m);g.Gv&&g.Gv();bj(e);jl(g);a>s?kl(g):requestAnimationFrame(d)}}void 0===c&&(c=new la);var e=a.ba;if(null!==e){a.nk=!0;var g=a,h=c.EL||a.KC,k=c.dM||null,l=c.eM||null,m=c.duration||a.wz,n=a.AH;for(c=a.gn.j;c.next();){var p=c.value.start.position;p instanceof O&&(p.F()||p.assign(n))}a.FC=h;a.Gv=k;a.Hv=l;a.EC=m;a.Iv=a.gn;var q=a.Iv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l= +k["position:placeholder"],n=l.eb(dc),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);hl(a);il(a,e,q,h,0,m);bj(a.ba);jl(a);var r=+new Date,s=r+m;g.Io===b&&requestAnimationFrame(function(){d()})}}function hl(a){if(!a.qp){var b=a.ba;a.uE=b.Eb;a.sC=b.Ue;a.tC=b.cv;b.Eb=!0;b.Ue=!0;b.cv=!0;a.qp=!0}}function jl(a){var b=a.ba;b.Eb=a.uE;b.Ue=a.sC;b.cv=a.tC;a.qp=!1} function il(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!==ll[m])ll[m](h,l[m],k[m],d,e,g)}d=b.aB;b.aB=!0;m=a.KC;0!==a.Jr&&0!==a.Ir&&(c=a.Jr,b.Bb=m(e,c,a.Ir-c,g));null!==a.Hr&&null!==a.Gr&&(c=a.Hr,a=a.Gr,b.rb=new O(m(e,c.x,a.x-c.x,g),m(e,c.y,a.y-c.y,g)));b.aB=d} gh.prototype.stopAnimation=gh.prototype.Ii=function(){!0===this.wc&&(this.wc=!1,this.Jo&&this.ba.Se());this.nk&&this.mf&&kl(this)}; -function kl(a){a.nk=!1;a.Jo=!1;hl(a);for(var b=a.ba,c=a.FC,d=a.EC,e=a.Hv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.eu,n;for(n in l)if(void 0!==ll[n]){var p=n;!h.vx||"position:node"!==p&&"position:placeholder"!==p||(p="position");ll[p](g,k[n],void 0!==m[n]?m[n]:h.vx?k[n]:l[n],c,d,d)}h.vx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.uy&&g instanceof F&&g.Jd(!1)}for(c=a.ba.links;c.next();)d=c.value,null!==d.Kp&&(d.points=d.Kp,d.Kp=null);b.gy.clear();b.Bk=null;b.zc(); -b.qa();b.hg();ml(b);jl(a);a.Gv&&a.Gv();a.Io=0;a.Hv=null;a.Gv=null;a.Fv=null;a.Hr=null;a.Gr=null;a.Jr=0;a.Ir=0;a.gn=new ma(P,bl);b.Ja("AnimationFinished");b.Se()} +function kl(a){a.nk=!1;a.Jo=!1;hl(a);for(var b=a.ba,c=a.FC,d=a.EC,e=a.Iv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.eu,n;for(n in l)if(void 0!==ll[n]){var p=n;!h.yx||"position:node"!==p&&"position:placeholder"!==p||(p="position");ll[p](g,k[n],void 0!==m[n]?m[n]:h.yx?k[n]:l[n],c,d,d)}h.yx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.xy&&g instanceof F&&g.Jd(!1)}for(c=a.ba.links;c.next();)d=c.value,null!==d.Kp&&(d.points=d.Kp,d.Kp=null);b.jy.clear();b.Bk=null;b.zc(); +b.qa();b.hg();ml(b);jl(a);a.Hv&&a.Hv();a.Io=0;a.Iv=null;a.Hv=null;a.Gv=null;a.Hr=null;a.Gr=null;a.Jr=0;a.Ir=0;a.gn=new ma(P,bl);b.Ja("AnimationFinished");b.Se()} function nl(a,b,c){var d=b.$,e=c.$,g=null;c instanceof I&&(g=c.placeholder);null!==g?(d=g.eb(dc),d.x+=g.padding.left,d.y+=g.padding.top,fl(a,b,"position",d,b.position,!1)):fl(a,b,"position",new O(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);fl(a,b,"scale",.01,b.scale,!1);if(b instanceof I)for(b=b.Nc;b.next();)g=b.value,g instanceof G&&nl(a,g,c)} -function ol(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?fl(a,b,"position:placeholder",b.position,d,!0):fl(a,b,"position:node",b.position,c,!0);fl(a,b,"scale",b.scale,.01,!0);a.wc&&(d=a.gn,d.contains(b)&&(d.na(b).uy=!0));if(b instanceof I)for(b=b.Nc;b.next();)d=b.value,d instanceof G&&ol(a,d,c)}}function pl(a,b,c){a.wc&&(null===a.Hr&&b.F()&&null===a.Gr&&(a.Hr=b.copy()),a.Gr=c.copy(),a.Jo=!0)} -function ql(a,b,c){a.wc&&a.ba.ao&&(0===a.Jr&&0===a.Ir&&(a.Jr=b),a.Ir=c,a.Jo=!0)}D.defineProperty(gh,{isEnabled:"isEnabled"},function(){return this.mf},function(a){D.h(a,"boolean",gh,"isEnabled");this.mf=a});D.defineProperty(gh,{duration:"duration"},function(){return this.sz},function(a){D.h(a,"number",gh,"duration");1>a&&D.ua(a,">= 1",gh,"duration");this.sz=a});D.w(gh,{sf:"isAnimating"},function(){return this.nk});D.w(gh,{oJ:"isTicking"},function(){return this.qp}); -D.defineProperty(gh,{VF:"isInitial"},function(){return this.ok},function(a){D.h(a,"boolean",gh,"isInitial");this.ok=a});function bl(a,b,c){this.start=a;this.end=b;this.eu=new la;this.vx=c;this.uy=!1} -var ll={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.Gy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new O(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.$,k=c.$;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Gy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new O(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.Gy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): -a.position=new O(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 Ug(){0a&&D.ua(a,">= 1",gh,"duration");this.wz=a});D.w(gh,{tf:"isAnimating"},function(){return this.nk});D.w(gh,{oJ:"isTicking"},function(){return this.qp}); +D.defineProperty(gh,{VF:"isInitial"},function(){return this.ok},function(a){D.h(a,"boolean",gh,"isInitial");this.ok=a});function bl(a,b,c){this.start=a;this.end=b;this.eu=new la;this.yx=c;this.xy=!1} +var ll={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.Jy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new O(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.$,k=c.$;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Jy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new O(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.Jy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): +a.position=new O(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 Ug(){0=a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.qb.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.ea(a)===b)return-1;d.Xd(a,b);b.qu(c);d=this.g;null!==d&&(c?d.qa():d.tq(b));wl(this,a,b);return a}; -f.rf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.rf(a,b,c);var d=this.qb;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.ru(c);d.jd(a);d=this.g;null!==d&&(c?d.qa():d.rf(b));b.kw=null;return a}; +f.Mf=function(a,b){if(this.visible){var c;c=void 0===b?a.ub:b;for(var d=this.qb.o,e=d.length,g=0;g=d.count)a=d.count;else if(d.ea(a)===b)return-1;d.Xd(a,b);b.ru(c);d=this.g;null!==d&&(c?d.qa():d.tq(b));wl(this,a,b);return a}; +f.sf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.sf(a,b,c);var d=this.qb;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.su(c);d.jd(a);d=this.g;null!==d&&(c?d.qa():d.sf(b));b.lw=null;return a}; function wl(a,b,c){b=xl(a,b,c);if(c instanceof I&&null!==c&&isNaN(c.Do)){if(0!==c.Nc.count){for(var d=-1,e=a.qb.o,g=e.length,h=0;hd&&k.Pa===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.ea(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.jd(b);a.Xd(g,c);return g}for(h=NaN;0<=--g&&(h=a.ea(g).Do,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.jd(b);a.Xd(k,c);return k}for(l=NaN;++ka||1a||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.Ax.licenseKey=!0);this.Fl=1;this.Ym=0;this.wD=new O;this.sE=500;this.wv=new O;this.ut=null;this.Cl=!1;this.preventDefault=this.ty=this.qG=this.rG=this.pG=this.mo=this.$g=this.no=this.ko=this.lo=this.dC=this.UB=this.VB=this.WB=this.Ql=this.ht=this.Pl=this.gt=null;this.zl=new Kl;void 0!==a&&Ll(this,a);this.ew=!1;this.GD=1;this.$c=!1}D.ja("Diagram",E); -E.prototype.clear=E.prototype.clear=function(){var a=null;null!==this.Ad&&(a=this.Ad.Y);this.ga.clear();for(var b=this.cc.length,c=0;cparseInt(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.Dx.licenseKey=!0);this.Fl=1;this.Ym=0;this.wD=new O;this.sE=500;this.xv=new O;this.ut=null;this.Cl=!1;this.preventDefault=this.wy=this.qG=this.rG=this.pG=this.mo=this.$g=this.no=this.ko=this.lo=this.dC=this.UB=this.VB=this.WB=this.Ql=this.ht=this.Pl=this.gt=null;this.zl=new Kl;void 0!==a&&Ll(this,a);this.fw=!1;this.GD=1;this.$c=!1}D.ja("Diagram",E); +E.prototype.clear=E.prototype.clear=function(){var a=null;null!==this.Ad&&(a=this.Ad.Y);this.ga.clear();for(var b=this.cc.length,c=0;c=a)return b;for(var c=this.cc.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.ba instanceof E?b.ba:null}; D.defineProperty(E,{Ej:"div"},function(){return this.Sb},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Sb!==a){zl=[];var b=this.Sb;null!==b?(b.ba=void 0,b.innerHTML="",null!==this.Mb&&(this.Mb.removeEventListener("touchstart",this.WB,!1),this.Mb.removeEventListener("touchmove",this.VB,!1),this.Mb.removeEventListener("touchend",this.UB,!1),this.Mb.Ud.ba=null),b=this.kb,null!==b&&(b.lf.each(function(a){a.cancelWaitAfter()}),b.jg.each(function(a){a.cancelWaitAfter()}),b.kg.each(function(a){a.cancelWaitAfter()})), b.cancelWaitAfter(),this.gb.doCancel(),this.od=this.Mb=null,window.removeEventListener("resize",this.dC,!1),window.removeEventListener("mousemove",this.lo,!0),window.removeEventListener("mousedown",this.ko,!0),window.removeEventListener("mouseup",this.no,!0),window.removeEventListener("mousewheel",this.$g,!0),window.removeEventListener("DOMMouseScroll",this.$g,!0),window.removeEventListener("mouseout",this.mo,!0)):this.th=!1;this.Sb=null;if(null!==a){if(b=a.ba)b.Ej=null;Ll(this,a);this.Gq()}}}); function Ol(a){var b=a.Mb;b.addEventListener("touchstart",a.WB,!1);b.addEventListener("touchmove",a.VB,!1);b.addEventListener("touchend",a.UB,!1);b.addEventListener("mousemove",a.lo,!1);b.addEventListener("mousedown",a.ko,!1);b.addEventListener("mouseup",a.no,!1);b.addEventListener("mousewheel",a.$g,!1);b.addEventListener("DOMMouseScroll",a.$g,!1);b.addEventListener("mouseout",a.mo,!1);b.addEventListener("keydown",a.qJ,!1);b.addEventListener("keyup",a.rJ,!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.kb.qq===Hk&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.pG,!1);b.addEventListener("pointermove",a.rG,!1);b.addEventListener("pointerleave",a.qG,!1);window.addEventListener("resize",a.dC,!1)}E.prototype.computePixelRatio=function(){return null!==this.Bk?this.Bk:this.GD};E.prototype.doMouseMove=function(){this.gb.doMouseMove()}; E.prototype.doMouseDown=function(){this.gb.doMouseDown()};E.prototype.doMouseUp=function(){this.gb.doMouseUp()};E.prototype.doMouseWheel=function(){this.gb.doMouseWheel()};E.prototype.doKeyDown=function(){this.gb.doKeyDown()};E.prototype.doKeyUp=function(){this.gb.doKeyUp()};E.prototype.doFocus=function(){this.focus()};E.prototype.focus=E.prototype.focus=function(){this.Mb&&this.Mb.focus()}; -function dl(a){if(null!==a.Mb){var b=a.Sb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.yl?a.Rd:0,d=a.lk?a.Rd:0,e=a.qd;a.qd=a.computePixelRatio();a.qd!==e&&(a.cs=!0,a.Se());if(b.clientWidth!==a.Ob+c||b.clientHeight!==a.Rb+d)a.Sm=!0,a.Me=!0,b=a.Vb,null!==b&&b.Yx&&a.bm===Rh&&b.N(),a.ge||a.Se()}}} -function Il(a){var b=new Ug;b.name="Background";a.Ot(b);b=new Ug;b.name="";a.Ot(b);b=new Ug;b.name="Foreground";a.Ot(b);b=new Ug;b.name="Adornment";b.Uc=!0;a.Ot(b);b=new Ug;b.name="Tool";b.Uc=!0;b.OF=!0;a.Ot(b);b=new Ug;b.name="Grid";b.Bf=!1;b.qg=!1;b.Uc=!0;a.OH(b,a.km("Background"))} +function dl(a){if(null!==a.Mb){var b=a.Sb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.yl?a.Rd:0,d=a.lk?a.Rd:0,e=a.qd;a.qd=a.computePixelRatio();a.qd!==e&&(a.cs=!0,a.Se());if(b.clientWidth!==a.Ob+c||b.clientHeight!==a.Rb+d)a.Sm=!0,a.Me=!0,b=a.Vb,null!==b&&b.ay&&a.bm===Rh&&b.N(),a.ge||a.Se()}}} +function Il(a){var b=new Ug;b.name="Background";a.Ot(b);b=new Ug;b.name="";a.Ot(b);b=new Ug;b.name="Foreground";a.Ot(b);b=new Ug;b.name="Adornment";b.Uc=!0;a.Ot(b);b=new Ug;b.name="Tool";b.Uc=!0;b.OF=!0;a.Ot(b);b=new Ug;b.name="Grid";b.Cf=!1;b.qg=!1;b.Uc=!0;a.OH(b,a.km("Background"))} function Pl(a){a.Ad=new x(Ql);a.Ad.name="GRID";var b=new z;b.Jb="LineH";b.stroke="lightgray";b.jb=.5;b.interval=1;a.Ad.add(b);b=new z;b.Jb="LineH";b.stroke="gray";b.jb=.5;b.interval=5;a.Ad.add(b);b=new z;b.Jb="LineH";b.stroke="gray";b.jb=1;b.interval=10;a.Ad.add(b);b=new z;b.Jb="LineV";b.stroke="lightgray";b.jb=.5;b.interval=1;a.Ad.add(b);b=new z;b.Jb="LineV";b.stroke="gray";b.jb=.5;b.interval=5;a.Ad.add(b);b=new z;b.Jb="LineV";b.stroke="gray";b.jb=1;b.interval=10;a.Ad.add(b);b=new F;b.add(a.Ad); -b.Kf="Grid";b.Do=0;b.Tx=!1;b.NF=!1;b.qg=!1;b.hy="GRID";a.add(b);a.qb.remove(b);a.Ad.visible=!1}function Rl(){this.ba.isEnabled?this.ba.uI(this):Sl(this.ba)}function Tl(a){this.ba.isEnabled?(this.ba.Zz=!0,this.ba.aA=a.target.scrollTop,this.ba.$z=a.target.scrollLeft):Sl(this.ba)} -E.prototype.diagramScroll=E.prototype.uI=function(a){if(this.Zz&&null!==this.Mb){this.Jw=!0;var b=this.dd,c=this.ub,d=b.width,e=c.width,g=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.gs)switch(this.Xz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;el&&(this.position=s.n(-(this.Nw.scrollWidth-this.Ob)+u-this.Ob/r+k,this.position.y))),a.DH&&this.ze&&(bn&&(this.position=s.n(this.position.x,-(this.Nw.scrollHeight-this.Rb)+a.scrollTop-this.Rb/r+m))),D.A(s),Ul(this),this.Sm=this.Jw=!1,b=this.dd,c=this.ub,k=b.right,l=c.right, +b.Kf="Grid";b.Do=0;b.Wx=!1;b.NF=!1;b.qg=!1;b.ky="GRID";a.add(b);a.qb.remove(b);a.Ad.visible=!1}function Rl(){this.ba.isEnabled?this.ba.uI(this):Sl(this.ba)}function Tl(a){this.ba.isEnabled?(this.ba.$z=!0,this.ba.bA=a.target.scrollTop,this.ba.aA=a.target.scrollLeft):Sl(this.ba)} +E.prototype.diagramScroll=E.prototype.uI=function(a){if(this.$z&&null!==this.Mb){this.Mw=!0;var b=this.dd,c=this.ub,d=b.width,e=c.width,g=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.gs)switch(this.Yz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;el&&(this.position=s.n(-(this.Qw.scrollWidth-this.Ob)+u-this.Ob/r+k,this.position.y))),a.DH&&this.ze&&(bn&&(this.position=s.n(this.position.x,-(this.Qw.scrollHeight-this.Rb)+a.scrollTop-this.Rb/r+m))),D.A(s),Ul(this),this.Sm=this.Mw=!1,b=this.dd,c=this.ub,k=b.right,l=c.right, m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,e>=d&&p>=q&&k<=l&&(this.lt.style.width="1px"),h>=g&&b>=c&&m<=n&&(this.lt.style.height="1px"))}};E.prototype.computeBounds=E.prototype.Kh=function(){0c&&(e=c),ea.Qh&&(e=a.Qh),e):b===am?(e=l>k?(h-a.Rd)/d:(g-a.Rd)/e,e>c&&(e=c),ea.Qh&&(e=a.Qh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Xl(this,$l)}; +function Wl(a,b){if((b||a.th)&&!a.$c&&null!==a.Mb&&!a.Xa.tf&&a.dd.F()){a.$c=!0;var c=a.Im;b&&a.Al!==Rh&&(c=a.Al);var d=c!==Rh?Xl(a,c):a.scale,c=a.ub.copy(),e=a.Ob/d,g=a.Rb/d,h=null,k=a.Xa;k.wc&&(h=a.rb.copy());a.position.Ya();var l=a.Po;b&&!l.fd()&&a.kp.fd()&&(l=a.kp);Yl(a,a.rb,a.dd,e,g,l,b);a.position.freeze();null!==h&&pl(k,h,a.rb);e=a.scale;a.scale=d;a.$c=!1;d=a.ub;d.Tc(c)||a.Pu(c,d,e,a.scale,!1)}} +function Xl(a,b){var c=a.xb.Bx;if(null===a.Mb)return c;a.mk&&Zl(a,a.Kh());var d=a.dd;if(!d.F())return c;var e=d.width,d=d.height,g=a.Ob,h=a.Rb,k=g/e,l=h/d;return b===$l?(e=Math.min(l,k),e>c&&(e=c),ea.Qh&&(e=a.Qh),e):b===am?(e=l>k?(h-a.Rd)/d:(g-a.Rd)/e,e>c&&(e=c),ea.Qh&&(e=a.Qh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Xl(this,$l)}; E.prototype.zoomToRect=function(a,b){void 0===b&&(b=$l);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===$l||b===am)if(isNaN(c))e=this.ub.height*this.scale/d;else if(isNaN(d))e=this.ub.width*this.scale/c;else var e=this.Ob,g=this.Rb,e=b===am?g/d>e/c?(g-(this.lk?this.Rd:0))/d:(e-(this.yl?this.Rd:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new O(a.x,a.y)}};D.defineProperty(E,{aB:null},function(){return this.$c},function(a){this.$c=a}); E.prototype.alignDocument=function(a,b){this.mk&&Zl(this,this.Kh());var c=this.dd,d=this.ub;this.position=new O(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 Yl(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.CB===Al)g.fd()&&(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.LG,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lc.touches.length)&&c.preventDefault();c.cancelBubble=!0;return!1} E.prototype.qJ=function(a){if(!this.ba.isEnabled)return!1;var b=this.ba.Tb;bm(this.ba,this.ba,a,b,!1);b.key=String.fromCharCode(a.which);b.jm=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= "Add";break;case 189:case 173:case 109:b.key="Subtract";break;case 27:b.key="Esc"}this.ba.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?ga(this.ba,b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; @@ -827,40 +827,40 @@ return ga(this.ba,b,a)};E.prototype.gp=function(a){var b=this.Mb;if(null===b)ret function cm(a,b,c){var d=a.Mb,e=a.Ob,g=a.Rb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-e/d.width*d.left,k=b.clientY-g/d.height*d.top);c.qe.n(h,k);null!==a.Ic?(b=D.Fb(h,k),a.Ic.Di(b),c.ha.assign(b),D.A(b)):c.ha.n(h,k)} function Zf(a,b,c,d){var e=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.pj[0])e=a.pj[c];else return;c=a.Mb;b=a.Ob;a=a.Rb;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.zc=function(){this.mk||(this.mk=!0,this.Se(!0))};function ml(a){a.ge||Si(a);a.mk&&Zl(a,a.Kh())} E.prototype.redraw=E.prototype.Gq=function(){this.$c||this.ge||(this.qa(),fm(this),Ul(this),this.zc(),this.hg())};E.prototype.isUpdateRequested=function(){return this.Zf};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Xa,c=b.isEnabled;b.Ii();b.isEnabled=!1;bj(this);this.th=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; -E.prototype.requestUpdate=E.prototype.Se=function(a){void 0===a&&(a=!1);if(!0!==this.Zf&&!(this.$c||!1===a&&this.ge)){this.Zf=!0;var b=this;requestAnimationFrame(function(){b.Zf&&b.hg()})}};E.prototype.maybeUpdate=E.prototype.hg=function(){if(!this.ep||this.Zf)this.ep&&(this.ep=!1),bj(this)};function gm(a,b){a.Xa.sf||a.$c||!a.Sm||Sl(a)||(b&&Si(a),Wl(a,!1))} -function bj(a){if(!a.ge&&(a.Zf=!1,null!==a.Sb)){a.ge=!0;var b=a.Xa,c=a.Vz;if(!b.qp&&0!==c.length){for(var d=c.o,e=d.length,g=0;gb;b++){var c=a.Eg.j;if(null===c||0===a.Eg.count)break;a.Eg=new L(F);a.aC(c,a.Eg);v&&22===b&&D.trace("failure to validate parts")}a.og.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} +function Si(a){if((a.ge||!a.Xa.tf)&&0!==a.Eg.count){for(var b=0;23>b;b++){var c=a.Eg.j;if(null===c||0===a.Eg.count)break;a.Eg=new L(F);a.aC(c,a.Eg);v&&22===b&&D.trace("failure to validate parts")}a.og.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} E.prototype.aC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.oe()||c instanceof I||(c.um()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&Im(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.um()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.um()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c))}; -function Im(a,b){for(var c=D.tb(),d=D.tb(),e=b.Nc;e.next();){var g=e.value;g.isVisible()&&(g instanceof I?(Jm(g)||Km(g)||Lm(g))&&Im(a,g):g instanceof J?g.aa===b||g.da===b?d.push(g):c.push(g):(Fk(g,Infinity,Infinity),g.pc()))}for(var e=c.length,h=0;hy+1&& (N=Math.max((t-y)*c+a.Ob,N)),q+k+1p+1&&(k=Math.max((A-p)*c+a.Rb,k)),r+l+1y+1&&(N=Math.max((t-y)*c+a.Ob,N)),q+1p+1&&(k=Math.max((A-p)*c+W,k)),r+1y+1&&(l=a.position.x*c));if(a.gs)switch(a.Xz){case "negative":l=-(b.scrollWidth-l-b.clientWidth);break;case "reverse":l=b.scrollWidth-l-b.clientWidth}b.scrollLeft=l;a.WA&&a.ze&&(r+1p+1&&(b.scrollTop=a.position.y*c));h&&(a.cs=!0);m=a.Ob;n=a.Rb;b.style.width=m+(a.yl?a.Rd:0)+ -"px";b.style.height=n+(a.lk?a.Rd:0)+"px";a.Zz=!1;return d!==m||e!==n||a.Xa.wc?(p=a.ub,a.Ou(g,p,c,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.ar&&(a.Gl="Tool");var c=a.Kf,b=this.km(c);null===b&&(b=this.km(""));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.tq(99999999,a,a.g===this),0<=c&&this.hd(dg,"parts",b,null,a,null,c),b.Uc||this.zc(),a.N(Sm),c=a.ay,null!== +a.ze&&(k=1,w+1p+1&&(k=Math.max((A-p)*c+W,k)),r+1y+1&&(l=a.position.x*c));if(a.gs)switch(a.Yz){case "negative":l=-(b.scrollWidth-l-b.clientWidth);break;case "reverse":l=b.scrollWidth-l-b.clientWidth}b.scrollLeft=l;a.WA&&a.ze&&(r+1p+1&&(b.scrollTop=a.position.y*c));h&&(a.cs=!0);m=a.Ob;n=a.Rb;b.style.width=m+(a.yl?a.Rd:0)+ +"px";b.style.height=n+(a.lk?a.Rd:0)+"px";a.$z=!1;return d!==m||e!==n||a.Xa.wc?(p=a.ub,a.Pu(g,p,c,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.ar&&(a.Gl="Tool");var c=a.Kf,b=this.km(c);null===b&&(b=this.km(""));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.tq(99999999,a,a.g===this),0<=c&&this.hd(dg,"parts",b,null,a,null,c),b.Uc||this.zc(),a.N(Sm),c=a.gy,null!== c&&c(a,null,b))}}; E.prototype.tq=function(a){if(a instanceof G){if(this.Ep.add(a),a instanceof I){var b=a.Pa;null===b?this.Tl.add(a):b.en.add(a);b=a.Vb;null!==b&&(b.g=this)}}else a instanceof J?this.yp.add(a):a instanceof da||this.qb.add(a);var c=this;Tm(a,function(a){Um(c,a)});(a instanceof da||a instanceof I&&null!==a.Qb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.ck.add(b,a):this.Ti.add(b,a)),Tm(a,function(a){Vm(c,a)}));!0!==Km(a)&&!0!==Lm(a)||this.Eg.add(a);Wm(a,!0,this);Xm(a)?(a.$.F()&&this.qa(vl(a, a.$)),this.zc()):a.isVisible()&&a.$.F()&&this.qa(vl(a,a.$));this.Se()}; -E.prototype.rf=function(a){a.Yt();if(a instanceof G){if(this.Ep.remove(a),a instanceof I){var b=a.Pa;null===b?this.Tl.remove(a):b.en.remove(a);b=a.Vb;null!==b&&(b.g=null)}}else a instanceof J?this.yp.remove(a):a instanceof da||this.qb.remove(a);var c=this;Tm(a,function(a){Ym(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.ck.remove(b):this.Ti.remove(b)),Tm(a,function(a){Zm(c,a)}));this.Eg.remove(a);Xm(a)?(a.$.F()&&this.qa(vl(a,a.$)),this.zc()):a.isVisible()&&a.$.F()&&this.qa(vl(a, -a.$));this.Se()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");$m(this,a,!0)};function $m(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.hb=!1,b.Yg=!1,b.N(an),c&&b.On(),c=d.rf(-1,b,!1),0<=c&&a.hd(og,"parts",d,b,null,c,null),a=b.ay,null!==a&&a(b,d,null))} +E.prototype.sf=function(a){a.Yt();if(a instanceof G){if(this.Ep.remove(a),a instanceof I){var b=a.Pa;null===b?this.Tl.remove(a):b.en.remove(a);b=a.Vb;null!==b&&(b.g=null)}}else a instanceof J?this.yp.remove(a):a instanceof da||this.qb.remove(a);var c=this;Tm(a,function(a){Ym(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.ck.remove(b):this.Ti.remove(b)),Tm(a,function(a){Zm(c,a)}));this.Eg.remove(a);Xm(a)?(a.$.F()&&this.qa(vl(a,a.$)),this.zc()):a.isVisible()&&a.$.F()&&this.qa(vl(a, +a.$));this.Se()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");$m(this,a,!0)};function $m(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.hb=!1,b.Yg=!1,b.N(an),c&&b.On(),c=d.sf(-1,b,!1),0<=c&&a.hd(og,"parts",d,b,null,c,null),a=b.gy,null!==a&&a(b,d,null))} E.prototype.removeParts=E.prototype.zB=function(a,b){if(D.isArray(a))for(var c=D.cb(a),d=0;dd&&this.zc()}; E.prototype.addLayerAfter=function(a,b){bn(this,a,b);a.Yc(this);var c=this.cc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ve&&this.hd(og,"layers",this,a,null,d,null));for(var e=c.count,g=0;gd&&this.zc()}; E.prototype.removeLayer=function(a){D.l(a,Ug,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.cc,c=b.indexOf(a);if(b.remove(a)){for(b=a.qb.copy().j;b.next();){var d=b.value,e=d.Kf;d.Kf=e!==a.name?e:""}null!==this.ve&&this.hd(og,"layers",this,a,null,c,null);this.qa();this.zc()}}};E.prototype.findLayer=E.prototype.km=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.QH=function(a){D.h(a,"function",E,"addModelChangedListener:listener");null===this.wh&&(this.wh=new K("function"));this.wh.add(a);this.ga.An(a)};E.prototype.removeModelChangedListener=function(a){D.h(a,"function",E,"removeModelChangedListener:listener");null!==this.wh&&(this.wh.remove(a),0===this.wh.count&&(this.wh=null));this.ga.Ru(a)}; -E.prototype.addChangedListener=E.prototype.An=function(a){D.h(a,"function",E,"addChangedListener:listener");null===this.Oi&&(this.Oi=new K("function"));this.Oi.add(a)};E.prototype.removeChangedListener=E.prototype.Ru=function(a){D.h(a,"function",E,"removeChangedListener:listener");null!==this.Oi&&(this.Oi.remove(a),0===this.Oi.count&&(this.Oi=null))}; -E.prototype.px=function(a){this.Eb||this.ra.HF(a);a.Jc!==cg&&(this.Fi=!0);if(null!==this.Oi){var b=this.Oi,c=b.length;if(1===c)b=b.ea(0),b(a);else if(0!==c)for(var d=b.mc(),e=0;ea.Qh&&(c=a.Qh);e=D.Fb(a.rb.x+h/b-h/c,a.rb.y+k/b-k/c);a.position=e;D.A(e);a.Bb=c;a.Ou(d,a.ub,b,c,!1);a.$c=!1;Wl(a, +function cn(a,b,c){if(a.$c||a.ge)a.Bb=c,c=a.Xa,c.wc&&ql(c,b,a.Bb);else if(a.$c=!0,null===a.Mb)a.Bb=c;else{var d=a.ub.copy(),e=a.Ob,g=a.Rb;d.width=a.Ob/b;d.height=a.Rb/b;var h=a.Fm.x,k=a.Fm.y,l=a.UE;isNaN(h)&&(l.Lj()?l.Jj(wc)?h=0:l.Jj(xc)&&(h=e-1):h=l.fd()?l.x*(e-1):e/2);isNaN(k)&&(l.Lj()?l.Jj(vc)?k=0:l.Jj(Bc)&&(k=g-1):k=l.fd()?l.y*(g-1):g/2);null!==a.KG&&(c=a.KG(a,c));ca.Qh&&(c=a.Qh);e=D.Fb(a.rb.x+h/b-h/c,a.rb.y+k/b-k/c);a.position=e;D.A(e);a.Bb=c;a.Pu(d,a.ub,b,c,!1);a.$c=!1;Wl(a, !1);c=a.Xa;c.wc&&ql(c,b,a.Bb);a.qa();fm(a)}} -E.prototype.Ou=function(a,b,c,d,e){a.P(b)||(void 0===e&&(e=!1),e||fm(this),Ul(this),d=this.Vb,null===d||!d.Yx||this.bm!==Rh||e||a.width===b.width&&a.height===b.height||d.N(),d=this.gb,!0===this.Um&&d instanceof Lh&&(this.U.ha=this.YB(this.U.qe),Jk(d,this)),this.$c||this.MF(a,b),im(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.dB&&this.links.each(function(a){a.Oh&&a.$.fg(b)&&a.gc()}))}; -function im(a,b){void 0===b&&(b=null);var c=a.Ad;if(null!==c&&c.visible){for(var d=D.Cm(),e=1,g=1,h=c.ya.o,k=h.length,l=0;ln||(dn(m.Jb)?g=g*n/We(g,n):e=e*n/We(e,n))}h=c.Nx;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.Of();g=a.ub;e.n(g.x,g.y,g.width,g.height);for(h=a.Bw.j;h.next();)g=h.value.ub,g.F()&&Pb(e,g.x,g.y,g.width,g.height);if(!e.F()){D.Kb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Kb(e)}c.width=k+2*d.width;c.height= -l+2*d.height;e=D.O();fb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.Rk(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.sx=function(){var a=0n||(dn(m.Jb)?g=g*n/We(g,n):e=e*n/We(e,n))}h=c.Qx;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.Of();g=a.ub;e.n(g.x,g.y,g.width,g.height);for(h=a.Ew.j;h.next();)g=h.value.ub,g.F()&&Pb(e,g.x,g.y,g.width,g.height);if(!e.F()){D.Kb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Kb(e)}c.width=k+2*d.width;c.height= +l+2*d.height;e=D.O();fb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.Rk(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.vx=function(){var a=0a&&D.ua(a,">= 0",E,"scrollHorizontalLineChange"),this.Kw=a,this.i("scrollHorizontalLineChange",b,a))}); -D.defineProperty(E,{Xu:"scrollVerticalLineChange"},function(){return this.Ow},function(a){var b=this.Ow;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.Ow=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Tb},function(a){v&&D.l(a,Yf,E,"lastInput");this.Tb=a});D.defineProperty(E,{Kc:"firstInput"},function(){return this.Zi},function(a){v&&D.l(a,Yf,E,"firstInput");this.Zi=a}); -D.defineProperty(E,{kc:"currentCursor"},function(){return this.Ev},function(a){""===a&&(a=this.Fr);var b=this.Ev;if(b!==a){D.h(a,"string",E,"currentCursor");var c=this.Mb,d=this.Sb;null!==c&&(this.Ev=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,{nx:"allowReshape"},function(){return this.kl},function(a){var b=this.kl;b!==a&&(D.h(a,"boolean",E,"allowReshape"),this.kl=a,this.i("allowReshape",b,a))});D.defineProperty(E,{Vt:"allowResize"},function(){return this.ll},function(a){var b=this.ll;b!==a&&(D.h(a,"boolean",E,"allowResize"),this.ll=a,this.i("allowResize",b,a))}); +D.defineProperty(E,{ox:"allowRotate"},function(){return this.ml},function(a){var b=this.ml;b!==a&&(D.h(a,"boolean",E,"allowRotate"),this.ml=a,this.i("allowRotate",b,a))});D.defineProperty(E,{Cf:"allowSelect"},function(){return this.nl},function(a){var b=this.nl;b!==a&&(D.h(a,"boolean",E,"allowSelect"),this.nl=a,this.i("allowSelect",b,a))}); +D.defineProperty(E,{IE:"allowUndo"},function(){return this.sv},function(a){var b=this.sv;b!==a&&(D.h(a,"boolean",E,"allowUndo"),this.sv=a,this.i("allowUndo",b,a))});D.defineProperty(E,{sx:"allowZoom"},function(){return this.uv},function(a){var b=this.uv;b!==a&&(D.h(a,"boolean",E,"allowZoom"),this.uv=a,this.i("allowZoom",b,a))}); +D.defineProperty(E,{WA:"hasVerticalScrollbar"},function(){return this.Yv},function(a){var b=this.Yv;b!==a&&(D.h(a,"boolean",E,"hasVerticalScrollbar"),this.Yv=a,fm(this),this.qa(),this.i("hasVerticalScrollbar",b,a),Wl(this,!1))});D.defineProperty(E,{VA:"hasHorizontalScrollbar"},function(){return this.Xv},function(a){var b=this.Xv;b!==a&&(D.h(a,"boolean",E,"hasHorizontalScrollbar"),this.Xv=a,fm(this),this.qa(),this.i("hasHorizontalScrollbar",b,a),Wl(this,!1))}); +D.defineProperty(E,{ye:"allowHorizontalScroll"},function(){return this.qv},function(a){var b=this.qv;b!==a&&(D.h(a,"boolean",E,"allowHorizontalScroll"),this.qv=a,this.i("allowHorizontalScroll",b,a),Wl(this,!1))});D.defineProperty(E,{ze:"allowVerticalScroll"},function(){return this.tv},function(a){var b=this.tv;b!==a&&(D.h(a,"boolean",E,"allowVerticalScroll"),this.tv=a,this.i("allowVerticalScroll",b,a),Wl(this,!1))}); +D.defineProperty(E,{Xu:"scrollHorizontalLineChange"},function(){return this.Nw},function(a){var b=this.Nw;b!==a&&(D.h(a,"number",E,"scrollHorizontalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollHorizontalLineChange"),this.Nw=a,this.i("scrollHorizontalLineChange",b,a))}); +D.defineProperty(E,{Yu:"scrollVerticalLineChange"},function(){return this.Rw},function(a){var b=this.Rw;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.Rw=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Tb},function(a){v&&D.l(a,Yf,E,"lastInput");this.Tb=a});D.defineProperty(E,{Kc:"firstInput"},function(){return this.Zi},function(a){v&&D.l(a,Yf,E,"firstInput");this.Zi=a}); +D.defineProperty(E,{kc:"currentCursor"},function(){return this.Fv},function(a){""===a&&(a=this.Fr);var b=this.Fv;if(b!==a){D.h(a,"string",E,"currentCursor");var c=this.Mb,d=this.Sb;null!==c&&(this.Fv=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,{nL:"defaultCursor"},function(){return this.Fr},function(a){""===a&&(a="auto");var b=this.Fr;b!==a&&(D.h(a,"string",E,"defaultCursor"),this.Fr=a,this.i("defaultCursor",b,a))});D.defineProperty(E,{click:"click"},function(){return this.Pi},function(a){var b=this.Pi;b!==a&&(null!==a&&D.h(a,"function",E,"click"),this.Pi=a,this.i("click",b,a))}); -D.defineProperty(E,{cu:"doubleClick"},function(){return this.Wi},function(a){var b=this.Wi;b!==a&&(null!==a&&D.h(a,"function",E,"doubleClick"),this.Wi=a,this.i("doubleClick",b,a))});D.defineProperty(E,{wA:"contextClick"},function(){return this.Ri},function(a){var b=this.Ri;b!==a&&(null!==a&&D.h(a,"function",E,"contextClick"),this.Ri=a,this.i("contextClick",b,a))}); +D.defineProperty(E,{cu:"doubleClick"},function(){return this.Wi},function(a){var b=this.Wi;b!==a&&(null!==a&&D.h(a,"function",E,"doubleClick"),this.Wi=a,this.i("doubleClick",b,a))});D.defineProperty(E,{xA:"contextClick"},function(){return this.Ri},function(a){var b=this.Ri;b!==a&&(null!==a&&D.h(a,"function",E,"contextClick"),this.Ri=a,this.i("contextClick",b,a))}); D.defineProperty(E,{oB:"mouseOver"},function(){return this.lj},function(a){var b=this.lj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseOver"),this.lj=a,this.i("mouseOver",b,a))});D.defineProperty(E,{nB:"mouseHover"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHover"),this.kj=a,this.i("mouseHover",b,a))}); -D.defineProperty(E,{mB:"mouseHold"},function(){return this.jj},function(a){var b=this.jj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHold"),this.jj=a,this.i("mouseHold",b,a))});D.defineProperty(E,{NJ:"mouseDragOver"},function(){return this.ww},function(a){var b=this.ww;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDragOver"),this.ww=a,this.i("mouseDragOver",b,a))}); +D.defineProperty(E,{mB:"mouseHold"},function(){return this.jj},function(a){var b=this.jj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHold"),this.jj=a,this.i("mouseHold",b,a))});D.defineProperty(E,{NJ:"mouseDragOver"},function(){return this.xw},function(a){var b=this.xw;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDragOver"),this.xw=a,this.i("mouseDragOver",b,a))}); D.defineProperty(E,{lB:"mouseDrop"},function(){return this.ij},function(a){var b=this.ij;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.ij=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{TB:"toolTip"},function(){return this.uj},function(a){var b=this.uj;b!==a&&(!v||null===a||a instanceof da||a instanceof fk||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.uj=a,this.i("toolTip",b,a))}); -D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Si},function(a){var b=this.Si;b!==a&&(!v||a instanceof da||a instanceof fk||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Si=a,this.i("contextMenu",b,a))});D.defineProperty(E,{xb:"commandHandler"},function(){return this.fz},function(a){var b=this.fz;b!==a&&(D.l(a,oa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Yc(null),this.fz=a,a.Yc(this))}); -D.defineProperty(E,{kb:"toolManager"},function(){return this.hA},function(a){var b=this.hA;b!==a&&(D.l(a,Lh,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Yc(null),this.hA=a,a.Yc(this))});D.defineProperty(E,{bu:"defaultTool"},function(){return this.lz},function(a){var b=this.lz;b!==a&&(D.l(a,Vg,E,"defaultTool"),this.lz=a,this.gb===b&&(this.gb=a))}); -D.defineProperty(E,{gb:"currentTool"},function(){return this.iz},function(a){var b=this.iz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.bu);null!==a&&(D.l(a,Vg,E,"currentTool"),this.iz=a,a.Yc(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.Rw}); -D.defineProperty(E,{EJ:"maxSelectionCount"},function(){return this.rw},function(a){var b=this.rw;if(b!==a)if(D.h(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.rw=a,this.i("maxSelectionCount",b,a),!this.ra.ob&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); -D.defineProperty(E,{PJ:"nodeSelectionAdornmentTemplate"},function(){return this.xw},function(a){var b=this.xw;b!==a&&(D.l(a,da,E,"nodeSelectionAdornmentTemplate"),this.xw=a,this.i("nodeSelectionAdornmentTemplate",b,a))});D.defineProperty(E,{WI:"groupSelectionAdornmentTemplate"},function(){return this.Uv},function(a){var b=this.Uv;b!==a&&(D.l(a,da,E,"groupSelectionAdornmentTemplate"),this.Uv=a,this.i("groupSelectionAdornmentTemplate",b,a))}); -D.defineProperty(E,{yJ:"linkSelectionAdornmentTemplate"},function(){return this.mw},function(a){var b=this.mw;b!==a&&(D.l(a,da,E,"linkSelectionAdornmentTemplate"),this.mw=a,this.i("linkSelectionAdornmentTemplate",b,a))});D.w(E,{rm:"highlighteds"},function(){return this.Yv}); -D.defineProperty(E,{Fi:"isModified"},function(){var a=this.ra;return a.isEnabled?null!==a.Dj?!0:this.ew&&this.sh!==a.Ij:this.ew},function(a){if(this.ew!==a){D.h(a,"boolean",E,"isModified");this.ew=a;var b=this.ra;!a&&b.isEnabled&&(this.sh=b.Ij);a||gn(this)}});function gn(a){var b=a.Fi;a.xE!==b&&(a.xE=b,a.Ja("Modified"))} -D.defineProperty(E,{ga:"model"},function(){return this.ve},function(a){var b=this.ve;if(b!==a){D.l(a,M,E,"model");this.gb.doCancel();null!==b&&b.ra!==a.ra&&b.ra.UF&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Xa.Ii();this.sx();this.th=!1;this.ep=!0;this.sh=-2;this.Zf=!1;var c=this.ge;this.ge=!0;this.Xa.qo("Model");null!==b&&(null!==this.wh&&this.wh.each(function(a){b.Ru(a)}),b.Ru(this.DD),b instanceof Y&&hn(this,b.Zg),hn(this,b.ng));this.ve=a;a.An(this.CD);jn(this, -a.ng);a instanceof Y&&kn(this,a.Zg);a.Ru(this.CD);a.An(this.DD);null!==this.wh&&this.wh.each(function(b){a.An(b)});this.ge=c;this.$c||this.qa();null!==b&&(a.ra.isEnabled=b.ra.isEnabled)}});D.defineProperty(E,{ab:null},function(){return this.uD},function(a){this.uD=a});D.w(E,{gy:null},function(){return this.wH}); -function El(a,b){if(b.ga===a.ga){var c=b.Jc,d=b.propertyName;if(c===cg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.kb,c.lf.each(function(b){b.Yc(a)}),c.jg.each(function(b){b.Yc(a)}),c.kg.each(function(b){b.Yc(a)}),a.ge||a.th||(a.Lv=!0,a.ep&&(a.Zf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Xa;e.sf&&!a.Eb&&e.Ii();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Xa,e.sf&&!a.Eb&&e.Ii());else if(a.ab){a.ab=!1;try{var g=b.wf;if(""!==g)if(c===bg){if("linkFromKey"===g){var h= +D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Si},function(a){var b=this.Si;b!==a&&(!v||a instanceof da||a instanceof fk||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Si=a,this.i("contextMenu",b,a))});D.defineProperty(E,{xb:"commandHandler"},function(){return this.iz},function(a){var b=this.iz;b!==a&&(D.l(a,oa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Yc(null),this.iz=a,a.Yc(this))}); +D.defineProperty(E,{kb:"toolManager"},function(){return this.iA},function(a){var b=this.iA;b!==a&&(D.l(a,Lh,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Yc(null),this.iA=a,a.Yc(this))});D.defineProperty(E,{bu:"defaultTool"},function(){return this.oz},function(a){var b=this.oz;b!==a&&(D.l(a,Vg,E,"defaultTool"),this.oz=a,this.gb===b&&(this.gb=a))}); +D.defineProperty(E,{gb:"currentTool"},function(){return this.lz},function(a){var b=this.lz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.bu);null!==a&&(D.l(a,Vg,E,"currentTool"),this.lz=a,a.Yc(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.Uw}); +D.defineProperty(E,{EJ:"maxSelectionCount"},function(){return this.sw},function(a){var b=this.sw;if(b!==a)if(D.h(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.sw=a,this.i("maxSelectionCount",b,a),!this.ra.ob&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); +D.defineProperty(E,{PJ:"nodeSelectionAdornmentTemplate"},function(){return this.yw},function(a){var b=this.yw;b!==a&&(D.l(a,da,E,"nodeSelectionAdornmentTemplate"),this.yw=a,this.i("nodeSelectionAdornmentTemplate",b,a))});D.defineProperty(E,{WI:"groupSelectionAdornmentTemplate"},function(){return this.Vv},function(a){var b=this.Vv;b!==a&&(D.l(a,da,E,"groupSelectionAdornmentTemplate"),this.Vv=a,this.i("groupSelectionAdornmentTemplate",b,a))}); +D.defineProperty(E,{yJ:"linkSelectionAdornmentTemplate"},function(){return this.nw},function(a){var b=this.nw;b!==a&&(D.l(a,da,E,"linkSelectionAdornmentTemplate"),this.nw=a,this.i("linkSelectionAdornmentTemplate",b,a))});D.w(E,{rm:"highlighteds"},function(){return this.Zv}); +D.defineProperty(E,{Fi:"isModified"},function(){var a=this.ra;return a.isEnabled?null!==a.Dj?!0:this.fw&&this.sh!==a.Ij:this.fw},function(a){if(this.fw!==a){D.h(a,"boolean",E,"isModified");this.fw=a;var b=this.ra;!a&&b.isEnabled&&(this.sh=b.Ij);a||gn(this)}});function gn(a){var b=a.Fi;a.xE!==b&&(a.xE=b,a.Ja("Modified"))} +D.defineProperty(E,{ga:"model"},function(){return this.ve},function(a){var b=this.ve;if(b!==a){D.l(a,M,E,"model");this.gb.doCancel();null!==b&&b.ra!==a.ra&&b.ra.UF&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Xa.Ii();this.vx();this.th=!1;this.ep=!0;this.sh=-2;this.Zf=!1;var c=this.ge;this.ge=!0;this.Xa.qo("Model");null!==b&&(null!==this.wh&&this.wh.each(function(a){b.Su(a)}),b.Su(this.DD),b instanceof Y&&hn(this,b.Zg),hn(this,b.ng));this.ve=a;a.An(this.CD);jn(this, +a.ng);a instanceof Y&&kn(this,a.Zg);a.Su(this.CD);a.An(this.DD);null!==this.wh&&this.wh.each(function(b){a.An(b)});this.ge=c;this.$c||this.qa();null!==b&&(a.ra.isEnabled=b.ra.isEnabled)}});D.defineProperty(E,{ab:null},function(){return this.uD},function(a){this.uD=a});D.w(E,{jy:null},function(){return this.wH}); +function El(a,b){if(b.ga===a.ga){var c=b.Jc,d=b.propertyName;if(c===cg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.kb,c.lf.each(function(b){b.Yc(a)}),c.jg.each(function(b){b.Yc(a)}),c.kg.each(function(b){b.Yc(a)}),a.ge||a.th||(a.Mv=!0,a.ep&&(a.Zf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Xa;e.tf&&!a.Eb&&e.Ii();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Xa,e.tf&&!a.Eb&&e.Ii());else if(a.ab){a.ab=!1;try{var g=b.xf;if(""!==g)if(c===bg){if("linkFromKey"===g){var h= b.object,k=a.cg(h);if(null!==k){var l=b.newValue,m=a.Qe(l);k.aa=m}}else if("linkToKey"===g)h=b.object,k=a.cg(h),null!==k&&(l=b.newValue,m=a.Qe(l),k.da=m);else if("linkFromPortId"===g){if(h=b.object,k=a.cg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.dg=n)}}else if("linkToPortId"===g)h=b.object,k=a.cg(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.Qe(q);p.Pa=r instanceof I? -r:null}else p.Pa=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.cg(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;rn(k)&&m++;k.rf(m);sn(k,m,l)}}}}function Vm(a,b){var c=b.cj;if(D.isArray(c)){var d=a.Wm.na(c);if(null===d)d=[],d.push(b),a.Wm.add(c,d);else{for(c=0;cl)){var m=l;rn(k)&&m++;k.sf(m);sn(k,m,l)}}}}function Vm(a,b){var c=b.cj;if(D.isArray(c)){var d=a.Wm.na(c);if(null===d)d=[],d.push(b),a.Wm.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):D.ua(a,"> 0",E,"minScale"))});D.defineProperty(E,{Qh:"maxScale"},function(){return this.qw},function(a){D.p(a,E,"maxScale");var b=this.qw;b!==a&&(0 0",E,"maxScale"))}); -D.defineProperty(E,{Fm:"zoomPoint"},function(){return this.gx},function(a){this.gx.P(a)||(D.l(a,O,E,"zoomPoint"),this.gx=a=a.V())});D.defineProperty(E,{UE:"contentAlignment"},function(){return this.Po},function(a){var b=this.Po;b.P(a)||(D.l(a,R,E,"contentAlignment"),this.Po=a=a.V(),this.i("contentAlignment",b,a),Wl(this,!1))}); +D.defineProperty(E,{eJ:"initialViewportSpot"},function(){return this.cw},function(a){var b=this.cw;b!==a&&(D.l(a,R,E,"initialViewportSpot"),a.fd()||D.k("initialViewportSpot must be a specific Spot: "+a),this.cw=a,this.i("initialViewportSpot",b,a))});D.defineProperty(E,{bJ:"initialDocumentSpot"},function(){return this.$v},function(a){var b=this.$v;b!==a&&(D.l(a,R,E,"initialDocumentSpot"),a.fd()||D.k("initialViewportSpot must be a specific Spot: "+a),this.$v=a,this.i("initialDocumentSpot",b,a))}); +D.defineProperty(E,{Rh:"minScale"},function(){return this.uw},function(a){D.p(a,E,"minScale");var b=this.uw;b!==a&&(0this.scale&&(this.scale=a)):D.ua(a,"> 0",E,"minScale"))});D.defineProperty(E,{Qh:"maxScale"},function(){return this.rw},function(a){D.p(a,E,"maxScale");var b=this.rw;b!==a&&(0 0",E,"maxScale"))}); +D.defineProperty(E,{Fm:"zoomPoint"},function(){return this.jx},function(a){this.jx.P(a)||(D.l(a,O,E,"zoomPoint"),this.jx=a=a.V())});D.defineProperty(E,{UE:"contentAlignment"},function(){return this.Po},function(a){var b=this.Po;b.P(a)||(D.l(a,R,E,"contentAlignment"),this.Po=a=a.V(),this.i("contentAlignment",b,a),Wl(this,!1))}); D.defineProperty(E,{JL:"initialContentAlignment"},function(){return this.kp},function(a){var b=this.kp;b.P(a)||(D.l(a,R,E,"initialContentAlignment"),this.kp=a=a.V(),this.i("initialContentAlignment",b,a))});D.defineProperty(E,{padding:"padding"},function(){return this.of},function(a){"number"===typeof a?a=new Ib(a):D.l(a,Ib,E,"padding");var b=this.of;b.P(a)||(this.of=a=a.V(),this.zc(),this.i("padding",b,a))});D.w(E,{og:"nodes"},function(){return this.Ep.j});D.w(E,{links:"links"},function(){return this.yp.j}); D.w(E,{Gi:"parts"},function(){return this.qb.j});E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.Ep.j;b.next();){var c=b.value;c.yq&&a.add(c)}for(b=this.yp.j;b.next();)c=b.value,c.yq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.Tl.j}; -D.defineProperty(E,{Vb:"layout"},function(){return this.te},function(a){var b=this.te;b!==a&&(D.l(a,Wg,E,"layout"),null!==b&&(b.g=null,b.group=null),this.te=a,a.g=this,a.group=null,this.vv=!0,this.i("layout",b,a),this.Se())});E.prototype.layoutDiagram=function(a){Si(this);a&&xn(this,!0);jm(this,!1)};function xn(a,b){for(var c=a.Tl.j;c.next();)Fn(a,c.value,b);null!==a.Vb&&(b?a.Vb.If=!1:a.Vb.N())} -function Fn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Fn(a,d.value,c);null!==b.Vb&&(c?b.Vb.If=!1:b.Vb.N())}}function jm(a,b){if(!a.mz){var c=a.Vb,d=a.ab;a.ab=!0;try{var e=a.ra.Wh;0===e&&a.ac("Layout");var g=a.Xa;1!==a.ra.Wh||g.sf||g.wc||b||g.qo("Layout");for(var h=a.Tl.j;h.next();)Gn(a,h.value,b);c.If||b&&!c.XF&&0!==e||(c.doLayout(a),Si(a),c.If=!0)}finally{0===e&&a.Td("Layout"),a.vv=!c.If,a.ab=d}}} -function Gn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Gn(a,d.value,c);d=b.Vb;null===d||d.If||c&&!d.XF||(b.oo=!b.location.F(),d.doLayout(b),b.N(Hn),d.If=!0,Im(a,b))}}D.defineProperty(E,{$d:"isTreePathToChildren"},function(){return this.hw},function(a){var b=this.hw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.hw=a,this.i("isTreePathToChildren",b,a),!this.ra.ob))for(a=this.og;a.next();)In(a.value)}); -E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.og;b.next();){var c=b.value;c.yq&&null===c.Rn()&&a.add(c)}return a.j};D.defineProperty(E,{ZB:"treeCollapsePolicy"},function(){return this.Zw},function(a){var b=this.Zw;b!==a&&(a!==Cl&&a!==en&&a!==fn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Zw=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Ph:null},function(){return this.jD},function(a){this.jD=a}); +D.defineProperty(E,{Vb:"layout"},function(){return this.te},function(a){var b=this.te;b!==a&&(D.l(a,Wg,E,"layout"),null!==b&&(b.g=null,b.group=null),this.te=a,a.g=this,a.group=null,this.wv=!0,this.i("layout",b,a),this.Se())});E.prototype.layoutDiagram=function(a){Si(this);a&&xn(this,!0);jm(this,!1)};function xn(a,b){for(var c=a.Tl.j;c.next();)Fn(a,c.value,b);null!==a.Vb&&(b?a.Vb.If=!1:a.Vb.N())} +function Fn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Fn(a,d.value,c);null!==b.Vb&&(c?b.Vb.If=!1:b.Vb.N())}}function jm(a,b){if(!a.pz){var c=a.Vb,d=a.ab;a.ab=!0;try{var e=a.ra.Wh;0===e&&a.ac("Layout");var g=a.Xa;1!==a.ra.Wh||g.tf||g.wc||b||g.qo("Layout");for(var h=a.Tl.j;h.next();)Gn(a,h.value,b);c.If||b&&!c.XF&&0!==e||(c.doLayout(a),Si(a),c.If=!0)}finally{0===e&&a.Td("Layout"),a.wv=!c.If,a.ab=d}}} +function Gn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Gn(a,d.value,c);d=b.Vb;null===d||d.If||c&&!d.XF||(b.oo=!b.location.F(),d.doLayout(b),b.N(Hn),d.If=!0,Im(a,b))}}D.defineProperty(E,{$d:"isTreePathToChildren"},function(){return this.iw},function(a){var b=this.iw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.iw=a,this.i("isTreePathToChildren",b,a),!this.ra.ob))for(a=this.og;a.next();)In(a.value)}); +E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.og;b.next();){var c=b.value;c.yq&&null===c.Rn()&&a.add(c)}return a.j};D.defineProperty(E,{ZB:"treeCollapsePolicy"},function(){return this.bx},function(a){var b=this.bx;b!==a&&(a!==Cl&&a!==en&&a!==fn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.bx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Ph:null},function(){return this.jD},function(a){this.jD=a}); function Bl(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 ma("string",K),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.oz=c;a.nz=d} -function Ga(a,b){var c=a.nz.na(b);return null!==c?c:a.nz.na(b.toLowerCase())}function Jn(a,b){var c=a.oz.na(b);if(null!==c)return c;c=a.oz.na(b.toLowerCase());if(null!==c)return c;D.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.oA=function(a,b){D.h(a,"string",E,"addDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Jn(this,a);null!==c&&c.add(b)}; +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.rz=c;a.qz=d} +function Ga(a,b){var c=a.qz.na(b);return null!==c?c:a.qz.na(b.toLowerCase())}function Jn(a,b){var c=a.rz.na(b);if(null!==c)return c;c=a.rz.na(b.toLowerCase());if(null!==c)return c;D.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.pA=function(a,b){D.h(a,"string",E,"addDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Jn(this,a);null!==c&&c.add(b)}; E.prototype.removeDiagramListener=E.prototype.xG=function(a,b){D.h(a,"string",E,"removeDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Jn(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=Jn(this,a),e=new $f;e.g=this;a=Ga(this,a);null!==a&&(e.name=a);void 0!==b&&(e.PB=b);void 0!==c&&(e.uB=c);b=d.length;if(1===b)d=d.ea(0),d(e);else if(0!==b)for(c=d.mc(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.ub,g=a.scale,e=D.sg(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.Wu,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.Xu,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.Tc(Gd)||(c=new O(c.x+h.x/g,c.y+h.y/g));D.Kb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new la);a.context="svg";a=Qn(this,a);return null!==a?a.Am:null}; +function Ln(a,b,c,d){if(b!==c)if(b.isVisible()&&b.tA&&!b.uf){c=b.getAvoidableRect(d);d=a.Qd.Fn;b=a.Qd.En;for(var e=c.x+c.width,g=c.y+c.height,h=c.x;h=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.ub,g=a.scale,e=D.sg(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.Xu,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.Yu,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.Tc(Gd)||(c=new O(c.x+h.x/g,c.y+h.y/g));D.Kb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new la);a.context="svg";a=Qn(this,a);return null!==a?a.Am:null}; E.prototype.makeImage=function(a){void 0===a&&(a=new la);var b=(a.document||document).createElement("img");b.src=this.zJ(a);return b}; E.prototype.makeImageData=E.prototype.zJ=function(a){void 0===a&&(a=new la);var b=Qn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Ok.getImageData(0,0,b.width,b.height);case "blob":b=b.Ud;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 Rn=!1; function Qn(a,b){a.Xa.Ii();a.hg();if(null===a.Mb)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 Ib(l):l instanceof Ib||(l=new Ib(0));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.$o=!1;a.od.Be(!0);var s=new ka(null,p),u=s.Ok;if(!(d||e||k||h)){s.width=a.Ob+Math.ceil(l.left+l.right);s.height=a.Rb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new od(s.Ud,p,q),Pm(a,u,l,new Ca(s.width, -s.height),a.Bb,a.rb,k,m,r,n),a.$o=!0,u;Pm(a,u,l,new Ca(s.width,s.height),a.Bb,a.rb,k,m,r,n);a.$o=!0;return s}var t=a.xb.yx,y=new O(0,0),w=a.dd.copy();w.rK(a.padding);if(r)for(var C=!0,C=a.cc.o,A=C.length,N=0;Nt?(e=t,h=w.width,ba=w.height):(h=g.width,ba=g.height)):(h=w.width*e,ba=w.height*e):(e=t,h=w.width,ba=w.height);null!==l?(h+=S,ba+=C):l=new Ib(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Rn&&(h>d||ba>g)&&(D.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."), -Rn=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ba=Math.min(ba,g)));s.width=Math.ceil(h);s.height=Math.ceil(ba);if("svg"===b.context)return u=new od(s.Ud,p,q),Pm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ba)),e,y,k,m,r,n),a.$o=!0,u;Pm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ba)),e,y,k,m,r,n);a.$o=!0;return s}E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.EH&&D.k("Cannot inherit from "+D.qf(b));D.Sa(a,b)}; +Rn=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ba=Math.min(ba,g)));s.width=Math.ceil(h);s.height=Math.ceil(ba);if("svg"===b.context)return u=new od(s.Ud,p,q),Pm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ba)),e,y,k,m,r,n),a.$o=!0,u;Pm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ba)),e,y,k,m,r,n);a.$o=!0;return s}E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.EH&&D.k("Cannot inherit from "+D.rf(b));D.Sa(a,b)}; function Kl(){this.fE=null;this.GH="63ad05bbe23a1786468a4c741b6d2";this.Xi=this.GH===this._tk?!0:null} function Sn(a){var b="f",c=window[D.Vg("76a715b2f73f148a")][D.Vg("72ba13b5")],d=D.Vg;if(window[d("7da7")]&&window[d("7da7")][d("76a115b6ed251eaf4692")]){a.Xi=!0;var e=window[d("7da7")][d("76a115b6ed251eaf4692")],e=d(e).split(d("39e9"));if(6>e.length)return;var g=d(e[1]).split(".");if("7da71ca0"!==e[4])return;var h=d(D[d("6cae19")]).split(".");if(g[0]>h[0]||g[0]===h[0]&&g[1]>=h[1]){g=c[d("76ad18b4f73e")];for(h=c[d("73a612b6fb191d")](d("35e7"))+2;h g&&d(e[2])!==d("7da71ca0ad381e90")&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));0>g&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Xi=!(0<=g&&gg&&d(D.adym)!==d("7da71ca0ad381e90")&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Xi=!(0<=g&&gb.timeStamp-a.Ym)b.preventDefault();else if(a.Cl)b.preventDefault();else{a.cd=a.Tb;a.Tb=c;bm(a,a,b,c,!0);c.jm=!0;c.Oe=b.detail;if(D.RF||D.SF)b.timeStamp-a.Ymb.timeStamp-a.Ym){b.preventDefault();return}a.Ym=b.timeStamp}if(D.Zn&&null!==a.ut)a.ut=null,b.preventDefault();else{a.cd=a.Tb;a.Tb=c;bm(a, a,b,c,!0);c.up=!0;c.Oe=b.detail;if(D.RF||D.SF)c.Oe=a.Fl;c.bubbles=b.bubbles;b.target.ba&&(c.gh=b.target.ba);a.simulatedMouseUp(b,null,new O,c.gh)||(a.doMouseUp(),Di(a),ga(a,c,b))}}};a.$g=function(b){if(a.isEnabled){var c=a.cd;a.cd=a.Tb;a.Tb=c;bm(a,a,b,c,!0);c.bubbles=!0;c.im=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();ga(a,c,b)}};a.mo=function(){if(a.isEnabled){a.Um=!1;var b=a.gb;b.cancelWaitAfter();b instanceof Lh&&b.hideToolTip()}};a.WB=function(b){if(a.isEnabled){a.Ct=!1;a.Cl= !0;var c=a.cd;a.cd=a.Tb;a.Tb=c;dm(a,b,b.targetTouches[0],c,1a.Fw)){var c=a.pj;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.cd,a.cd=a.Tb,a.Tb=c,em(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.gh)||(a.doMouseMove(),ga(a,c,b)))}};a.qG=function(b){if("touch"===b.pointerType){var c=a.TD;void 0!==c[b.pointerId]&&(a.Fw--,delete c[b.pointerId],c=a.pj,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};d.Be(!0);Ol(a)} +b;c.timestamp=Date.now();c.gh=null===d?b.target.ba:d.ba?d.ba:null;c.We=null;a.simulatedMouseUp(e?e:b,null,new O,c.gh)||a.doMouseUp();ga(a,c,b);a.Cl=!1}}};a.pG=function(b){if("touch"===b.pointerType){var c=a.TD;void 0===c[b.pointerId]&&(a.Iw++,c[b.pointerId]=b);a.pj[0]=null;a.pj[1]=null;for(var d in c)if(null===a.pj[0])a.pj[0]=c[d];else if(null===a.pj[1]){a.pj[1]=c[d];break}a.isEnabled&&(a.Ct=!1,a.Cl=!0,c=a.cd,a.cd=a.Tb,a.Tb=c,dm(a,b,b,c,1a.Iw)){var c=a.pj;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.cd,a.cd=a.Tb,a.Tb=c,em(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.gh)||(a.doMouseMove(),ga(a,c,b)))}};a.qG=function(b){if("touch"===b.pointerType){var c=a.TD;void 0!==c[b.pointerId]&&(a.Iw--,delete c[b.pointerId],c=a.pj,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};d.Be(!0);Ol(a)} function Tn(a){1a)&&D.ua(a,"0 <= loc <= 1",Ba,"addColorStop:loc");D.h(b,"string",Ba,"addColorStop:color");v&&!Aa(b)&&D.k('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.qh&&(this.qh=new ma("number","string"));this.qh.add(a,b);this.ca===Bg&&(this.type=Cg);this.rh=null}; D.defineProperty(Ba,{type:"type"},function(){return this.ca},function(a){this.J&&D.pa(this,a);D.Da(a,Ba,Ba,"type");this.ca=a;this.start.Zd()&&(a===Cg?this.start=ec:a===Ed&&(this.start=hc));this.end.Zd()&&(a===Cg?this.end=tc:a===Ed&&(this.end=hc));this.rh=null});D.defineProperty(Ba,{color:"color"},function(){return this.No},function(a){this.J&&D.pa(this,a);v&&!Aa(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.No=a;this.rh=null}); -D.defineProperty(Ba,{start:"start"},function(){return this.Pp},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"start");this.Pp=a.V();this.rh=null});D.defineProperty(Ba,{end:"end"},function(){return this.bp},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"end");this.bp=a.V();this.rh=null});D.defineProperty(Ba,{cv:"startRadius"},function(){return this.Uw},function(a){this.J&&D.pa(this,a);D.p(a,Ba,"startRadius");0>a&&D.ua(a,">= zero",Ba,"startRadius");this.Uw=a;this.rh=null}); -D.defineProperty(Ba,{du:"endRadius"},function(){return this.Qv},function(a){this.J&&D.pa(this,a);D.p(a,Ba,"endRadius");0>a&&D.ua(a,">= zero",Ba,"endRadius");this.Qv=a;this.rh=null});D.defineProperty(Ba,{Lk:"colorStops"},function(){return this.qh},function(a){this.J&&D.pa(this,a);v&&D.l(a,ma,Ba,"colorStops");this.qh=a;this.rh=null});D.defineProperty(Ba,{pattern:"pattern"},function(){return this.Ew},function(a){this.J&&D.pa(this,a);this.Ew=a;this.rh=null}); +D.defineProperty(Ba,{start:"start"},function(){return this.Pp},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"start");this.Pp=a.V();this.rh=null});D.defineProperty(Ba,{end:"end"},function(){return this.bp},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"end");this.bp=a.V();this.rh=null});D.defineProperty(Ba,{dv:"startRadius"},function(){return this.Xw},function(a){this.J&&D.pa(this,a);D.p(a,Ba,"startRadius");0>a&&D.ua(a,">= zero",Ba,"startRadius");this.Xw=a;this.rh=null}); +D.defineProperty(Ba,{du:"endRadius"},function(){return this.Rv},function(a){this.J&&D.pa(this,a);D.p(a,Ba,"endRadius");0>a&&D.ua(a,">= zero",Ba,"endRadius");this.Rv=a;this.rh=null});D.defineProperty(Ba,{Lk:"colorStops"},function(){return this.qh},function(a){this.J&&D.pa(this,a);v&&D.l(a,ma,Ba,"colorStops");this.qh=a;this.rh=null});D.defineProperty(Ba,{pattern:"pattern"},function(){return this.Hw},function(a){this.J&&D.pa(this,a);this.Hw=a;this.rh=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 co=(new ka(null)).Ok,Aa;Ba.isValidColor=Aa=function(a){if("black"===a)return!0;if(""===a)return!1;v&&D.h(a,"string",Ba,"isValidColor");co.fillStyle="#000000";var b=co.fillStyle;co.fillStyle=a;if(co.fillStyle!==b)return!0;co.fillStyle="#FFFFFF";b=co.fillStyle;co.fillStyle=a;return co.fillStyle!==b};var eo=new Zn,fo=new Zn,ho=new Zn,io=new Zn;Ba.lighten=function(a){return jo(a)}; Ba.prototype.lightenBy=function(a,b){this.J&&D.pa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?ao:b;if(this.type===Bg)ko(this.color),this.color=lo(c,d);else if((this.type===Cg||this.type===Ed)&&null!==this.Lk)for(var e=this.Lk.j;e.next();)ko(e.value),this.addColorStop(e.key,lo(c,d));return this};var jo;Ba.lightenBy=jo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?ao:c;ko(a);return lo(b,c)};Ba.darken=function(a){return mo(a)}; @@ -1044,16 +1044,16 @@ io.mg;c=-.969266*ho.Oc+1.8760108*ho.Ld+.041556*ho.gd;d=.0556434*ho.Oc+-.2040259* function ko(a){co.clearRect(0,0,1,1);co.fillStyle="#000000";var b=co.fillStyle;co.fillStyle=a;co.fillStyle!==b?(co.fillRect(0,0,1,1),a=co.getImageData(0,0,1,1).data,eo.Oc=a[0],eo.Ld=a[1],eo.gd=a[2],eo.mg=a[3]/255):(co.fillStyle="#FFFFFF",b=co.fillStyle,co.fillStyle=a,co.fillStyle===b&&v&&D.k('Color "'+a+'" is not a valid color string for RGBA color conversion'),eo.Oc=0,eo.Ld=0,eo.gd=0,eo.mg=1)}function no(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)} function to(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var so=216/24389,ro=24389/27,po=[95.047,100,108.883];function oo(a){return a>so?Math.pow(a,1/3):(ro*a+16)/116}function qo(a){var b=a*a*a;return b>so?b:(116*a-16)/ro} function P(){D.uc(this);this.T=4225027;this.Gc=1;this.Bh=null;this.Xb="";this.ic=this.Lb=null;this.rb=(new O(NaN,NaN)).freeze();this.Ye=je;this.mi=Xd;this.li=he;this.Ic=new Da;this.Li=new Da;this.gj=new Da;this.Bb=this.Zo=1;this.tg=0;this.Og=uo;this.cn=Sd;this.Bd=(new B(NaN,NaN,NaN,NaN)).freeze();this.bc=(new B(NaN,NaN,NaN,NaN)).freeze();this.ad=(new B(0,0,NaN,NaN)).freeze();this.Z=this.Ws=this.Xs=null;this.Hm=this.re=Vc;this.it=0;this.rj=1;this.pr=0;this.Qi=1;this.yt=null;this.mt=-Infinity;this.on= -0;this.pn=Gd;this.qn=uj;this.yr="";this.Cc=this.la=null;this.Lo=-1;this.un=this.wg=this.tl=this.Op=null;this.Wz=Dj;this.kn=null}D.Bi(P);D.ja("GraphObject",P); +0;this.pn=Gd;this.qn=uj;this.yr="";this.Cc=this.la=null;this.Lo=-1;this.un=this.wg=this.tl=this.Op=null;this.Xz=Dj;this.kn=null}D.Bi(P);D.ja("GraphObject",P); P.prototype.cloneProtected=function(a){a.T=this.T|6144;a.Gc=this.Gc;a.Xb=this.Xb;a.Lb=this.Lb;a.ic=this.ic;a.rb.assign(this.rb);a.Ye=this.Ye.V();a.mi=this.mi.V();a.li=this.li.V();a.gj=this.gj.copy();a.Bb=this.Bb;a.tg=this.tg;a.Og=this.Og;a.cn=this.cn.V();a.Bd.assign(this.Bd);a.bc.assign(this.bc);a.ad.assign(this.ad);a.Ws=this.Ws;null!==this.Z&&(a.Z=this.Z.copy());a.re=this.re.V();a.Hm=this.Hm.V();a.it=this.it;a.rj=this.rj;a.pr=this.pr;a.Qi=this.Qi;a.yt=this.yt;a.mt=this.mt;a.on=this.on;a.pn=this.pn.V(); a.qn=this.qn;a.yr=this.yr;null!==this.la&&(a.la=this.la.copy());a.Cc=this.Cc;a.Lo=this.Lo;null!==this.tl&&(a.tl=D.dm(this.tl));null!==this.wg&&(a.wg=this.wg.copy());a.un=this.un};P.prototype.addCopyProperty=P.prototype.NH=function(a){var b=this.tl;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}} P.prototype.raiseChangedEvent=P.prototype.hd=function(a,b,c,d,e,g,h){var k=this.Y;if(null!==k&&(k.ro(a,b,c,d,e,g,h),Fo(this)&&c===this&&a===bg&&Go(this,k,b),c===k&&0!==(k.T&16777216)&&null!==k.data))for(a=this.ya.o,c=a.length,d=0;dd&&(g=b);isFinite(c)&& c>e&&(k=c);break;case wo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case vo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.kf,m=a.ig;g>l.width&&m.widthl.height&&m.heighta.height||this.hi.nf>a.width))&&(c=!0);this.T=c?this.T|256:this.T&-257;this.bc.F()|| -D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.bc.toString());this.ly(g,this.bc);Lo(this,!1);D.Kb(g)};f.zj=function(){}; +f.pc=function(a,b,c,d,e){this.$i();var g=D.Of();g.assign(this.bc);this.bc.Ya();if(!1===Km(this)){var h=this.bc;h.x=a;h.y=b;h.width=c;h.height=d}else this.zj(a,b,c,d);this.bc.freeze();this.wg=void 0===e?null:e;c=!1;void 0!==e?c=!0:null!==this.Q&&(e=this.Q.ad,d=this.Fa,null!==this.$l&&(d=this.bc),c=b+d.height,d=a+d.width,c=!(0<=a+.05&&d<=e.width+.05&&0<=b+.05&&c<=e.height+.05),this instanceof na&&(a=this.ad,this.qw>a.height||this.hi.nf>a.width))&&(c=!0);this.T=c?this.T|256:this.T&-257;this.bc.F()|| +D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.bc.toString());this.oy(g,this.bc);Lo(this,!1);D.Kb(g)};f.zj=function(){}; function Mo(a,b,c,d,e){var g=a.$;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ea.F()){g=a.Bd;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=Ko(a,!0);c===d&&g===e&&(b=Xj);switch(b){case Xj:if(c>d||g>e)hm(a,!0),Fk(a,c>d?d:c,g>e?e:g);break;case pf:hm(a,!0);Fk(a,d,e,0,0);break;case wo:hm(a,!0);Fk(a,d,g,0,0);break;case vo:hm(a,!0),Fk(a,c,e,0,0)}}} -f.ly=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.to!==this&&c.FG!==this&&c.JG!==this||No(c,!0),this.qa(),yb(a,b)||(c.Vk(),this.Os(c)))};f.Os=function(a){null!==this.ud&&(No(a,!0),a instanceof G&&Oo(a,this))};D.defineProperty(P,{Rq:"shadowVisible"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"shadowVisible"),this.un=a,this.qa(),this.i("shadowVisible",b,a))}); -P.prototype.Ee=function(a,b){if(this.visible){var c=this.bc;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 od)a:{if(this.visible){var g=null,h=a.Zx;if(this instanceof x&&(this.type===Po||this.type===Qo))Ro(this,a,b);else{var k=this.bc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.Q;0!==(this.T&4096)===!0&&So(this);var c=0!==(this.T&256),n=!1;this instanceof +f.oy=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.to!==this&&c.FG!==this&&c.JG!==this||No(c,!0),this.qa(),yb(a,b)||(c.Vk(),this.Os(c)))};f.Os=function(a){null!==this.ud&&(No(a,!0),a instanceof G&&Oo(a,this))};D.defineProperty(P,{Rq:"shadowVisible"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"shadowVisible"),this.un=a,this.qa(),this.i("shadowVisible",b,a))}); +P.prototype.Ee=function(a,b){if(this.visible){var c=this.bc;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 od)a:{if(this.visible){var g=null,h=a.by;if(this instanceof x&&(this.type===Po||this.type===Qo))Ro(this,a,b);else{var k=this.bc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.Q;0!==(this.T&4096)===!0&&So(this);var c=0!==(this.T&256),n=!1;this instanceof na&&(a.font=this.font);if(c){n=m.kh()?m.Ga:m.$;if(null!==this.wg)var p=this.wg,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;qd(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.Kj()){var u=this;if(!u.isVisible())break a}a.Mh.Zb=[1,0,0,1,0,0];q=!1;this.Kj()&&this.Xk&&b.Hj("drawShadows")&&(r=this.tn,a.NB(r.x* b.scale*b.qd,r.y*b.scale*b.qd,u.Ng),a.wo(),a.shadowColor=u.sn);u=!1;this.Y&&b.Hj("drawShadows")&&(u=this.Y.Xk);!0===this.Rq?(a.wo(),!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0)):!1===this.Rq&&a.vo();null!==this.ic&&(To(this,a,this.ic,!0,!0),!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0),this.ic instanceof Ba&&this.ic.type===Ed?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Wg(this.ic)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof x?qd(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.Mh.Zb=[l.m11,l.m12, l.m21,l.m22,l.dx,l.dy];null!==this.Lb&&(!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0),s=this.Ga,l=k=0,r=s.width,s=s.height,p=0,this instanceof z&&(s=this.pb.mb,k=s.x,l=s.y,r=s.width,s=s.height,p=this.Pg),To(this,a,this.Lb,!0,!1),this.Lb instanceof Ba&&this.Lb.type===Ed?(a.beginPath(),a.rect(k-p/2,l-p/2,r+p,s+p),a.Wg(this.Lb)):a.fillRect(k-p/2,l-p/2,r+p,s+p));u&&(null!==this.Lb||null!==this.ic||null!==m&&0!==(m.T&512)||null!==m&&(m.type===Nl||m.type===Vj)&&m.Vd()!==this)?(Uo(this,!0),null===this.Rq&& -a.vo()):Uo(this,!1);this.Pk(a,b);u&&0!==(this.T&512)===!0&&a.wo();this.Kj()&&u&&a.vo();c&&(a.restore(),n&&a.Ef.pop());this instanceof x&&(g=a.Ef.pop());!0===q&&a.Ef.pop();null!==a.kF&&(null===g&&(h===a.Zx?(qd(a,1,0,0,1,0,0),g=a.Ef.pop()):g=a.Zx),a.kF(this,g))}}}}else{if(this instanceof x&&(this.type===Po||this.type===Qo)){Ro(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof J&&this.Fu(!1);v&&v.Aj&&v.zI(a,this);g=this.transform;h=this.Q;0!==(this.T&4096)===!0&&So(this);m=0!==(this.T&256);a.dq&& +a.vo()):Uo(this,!1);this.Pk(a,b);u&&0!==(this.T&512)===!0&&a.wo();this.Kj()&&u&&a.vo();c&&(a.restore(),n&&a.Ef.pop());this instanceof x&&(g=a.Ef.pop());!0===q&&a.Ef.pop();null!==a.kF&&(null===g&&(h===a.by?(qd(a,1,0,0,1,0,0),g=a.Ef.pop()):g=a.by),a.kF(this,g))}}}}else{if(this instanceof x&&(this.type===Po||this.type===Qo)){Ro(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof J&&this.Gu(!1);v&&v.Aj&&v.zI(a,this);g=this.transform;h=this.Q;0!==(this.T&4096)===!0&&So(this);m=0!==(this.T&256);a.dq&& (m=!1);this instanceof na&&(a.font=this.font);if(m){v&&v.jF&&D.trace("clip"+this.toString());n=h.kh()?h.Ga:h.$;null!==this.wg?(q=this.wg,k=q.x,l=q.y,u=q.width,q=q.height):(k=Math.max(c.x,n.x),l=Math.max(c.y,n.y),u=Math.min(c.right,n.right)-k,q=Math.min(c.bottom,n.bottom)-l);if(k>c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}v&&v.jF&&v.BI(a,k,l,u,q);a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.Kj()){if(!this.isVisible()){1!==d&&(a.globalAlpha= -e);return}this.Xk&&b.Hj("drawShadows")&&(n=this.tn,a.NB(n.x*b.scale*b.qd,n.y*b.scale*b.qd,this.Ng),a.wo(),a.shadowColor=this.sn)}n=!1;this.Y&&b.Hj("drawShadows")&&(n=this.Y.Xk);!0===this.Rq?a.wo():!1===this.Rq&&a.vo();null!==this.ic&&(To(this,a,this.ic,!0,!0),this.ic instanceof Ba&&this.ic.type===Ed?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Wg(this.ic)):a.fillRect(c.x,c.y,c.width,c.height));g.wu()||a.transform(g.m11,g.m12,g.m21,g.m22,g.dx,g.dy);null!==this.Lb&&(u=this.Ga,k=c=0,l=u.width,u= +e);return}this.Xk&&b.Hj("drawShadows")&&(n=this.tn,a.NB(n.x*b.scale*b.qd,n.y*b.scale*b.qd,this.Ng),a.wo(),a.shadowColor=this.sn)}n=!1;this.Y&&b.Hj("drawShadows")&&(n=this.Y.Xk);!0===this.Rq?a.wo():!1===this.Rq&&a.vo();null!==this.ic&&(To(this,a,this.ic,!0,!0),this.ic instanceof Ba&&this.ic.type===Ed?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Wg(this.ic)):a.fillRect(c.x,c.y,c.width,c.height));g.xu()||a.transform(g.m11,g.m12,g.m21,g.m22,g.dx,g.dy);null!==this.Lb&&(u=this.Ga,k=c=0,l=u.width,u= u.height,q=0,this instanceof z&&(u=this.pb.mb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Pg),To(this,a,this.Lb,!0,!1),this.Lb instanceof Ba&&this.Lb.type===Ed?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Wg(this.Lb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.Aj&&v.AI(a,this);n&&(null!==this.Lb||null!==this.ic||null!==h&&0!==(h.T&512)||null!==h&&(h.type===Nl||h.type===Vj)&&h.Vd()!==this)?(Uo(this,!0),null===this.Rq&&a.vo()):Uo(this,!1);this.Pk(a,b);n&&0!==(this.T&512)===!0&&a.wo();this.Kj()&&n&&a.vo();m? -(a.restore(),this instanceof x?a.Be(!0):a.Be(!1)):g.wu()||(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)}}}; +(a.restore(),this instanceof x?a.Be(!0):a.Be(!1)):g.xu()||(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 Ro(a,b,c){var d=a.bc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.ic&&(To(a,b,a.ic,!0,!0),a.ic instanceof Ba&&a.ic.type===Ed?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Wg(a.ic)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Lb&&(To(a,b,a.Lb,!0,!1),a.Lb instanceof Ba&&a.Lb.type===Ed?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Wg(a.Lb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Pk(b,c))}P.prototype.Pk=function(){}; -function To(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===Bg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ga,g=h.width,h=h.height;if(e)var l=a.$,g=l.width,h=l.height;var m=b instanceof Dd;if(m&&c.rh&&(c.type===$n||c.Oo===g&&c.gz===h))k=c.rh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.$,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===Cg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Ed)s=isNaN(c.du)?Math.max(g,h)/2:c.du,isNaN(c.cv)?(r=0,s=Math.max(g,h)/2):r=c.cv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===$n)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.hc(c.type,"Brush type");if(c.type!==$n&&(e=c.Lk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.rh=k,null!==k&&(c.Oo=g,c.gz=h),null===k&&c.type===$n&&-1!==c.Oo)){c.Oo=-1;var t=a.g;null!==t&& +function To(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===Bg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ga,g=h.width,h=h.height;if(e)var l=a.$,g=l.width,h=l.height;var m=b instanceof Dd;if(m&&c.rh&&(c.type===$n||c.Oo===g&&c.jz===h))k=c.rh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.$,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===Cg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Ed)s=isNaN(c.du)?Math.max(g,h)/2:c.du,isNaN(c.dv)?(r=0,s=Math.max(g,h)/2):r=c.dv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===$n)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.hc(c.type,"Brush type");if(c.type!==$n&&(e=c.Lk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.rh=k,null!==k&&(c.Oo=g,c.jz=h),null===k&&c.type===$n&&-1!==c.Oo)){c.Oo=-1;var t=a.g;null!==t&& -1===c.Oo&&D.setTimeout(function(){t.Gq()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}P.prototype.isContainedBy=P.prototype.tm=function(a){if(a instanceof x)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};P.prototype.isVisibleObject=P.prototype.Oj=function(){if(!this.visible)return!1;var a=this.Q;return null!==a?a.Oj():!0}; -P.prototype.isEnabledObject=P.prototype.uu=function(){for(var a=this instanceof x?this:this.Q;null!==a&&a.isEnabled;)a=a.Q;return null===a};D.defineProperty(P,{lF:"enabledChanged"},function(){return null!==this.la?this.la.Pr:null},function(a){Ao(this);var b=this.la.Pr;b!==a&&(null!==a&&D.h(a,"function",P,"enabledChanged"),this.la.Pr=a,this.i("enabledChanged",b,a))}); +P.prototype.isEnabledObject=P.prototype.vu=function(){for(var a=this instanceof x?this:this.Q;null!==a&&a.isEnabled;)a=a.Q;return null===a};D.defineProperty(P,{lF:"enabledChanged"},function(){return null!==this.la?this.la.Pr:null},function(a){Ao(this);var b=this.la.Pr;b!==a&&(null!==a&&D.h(a,"function",P,"enabledChanged"),this.la.Pr=a,this.i("enabledChanged",b,a))}); function So(a){if(0!==(a.T&2048)===!0){var b=a.Ic;b.reset();if(!a.bc.F()||!a.Bd.F()){Vo(a,!1);return}b.translate(a.bc.x,a.bc.y);b.translate(-a.Fa.x,-a.Fa.y);var c=a.Ga;Io(a,b,c.x,c.y,c.width,c.height);Vo(a,!1);Wo(a,!0)}0!==(a.T&4096)===!0&&(b=a.Q,null===b?(a.Li.set(a.Ic),a.Zo=a.scale,Wo(a,!1)):null!==b.Hh&&(c=a.Li,c.reset(),b.kh()?c.multiply(b.Li):null!==b.Q&&c.multiply(b.Q.Li),c.multiply(a.Ic),a.Zo=a.scale*b.Zo,Wo(a,!1)))} -function Io(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=hc;a.Kj()&&a.Lf.fd()&&(h=a.Lf);var k=D.O();if(a instanceof F&&a.uf!==a)for(c=a.uf,d=c.Ga,k.$u(d.x,d.y,d.width,d.height,h),c.gj.wb(k),k.offset(-c.Fa.x,-c.Fa.y),h=c.Q;null!==h&&h!==a;)h.gj.wb(k),k.offset(-h.Fa.x,-h.Fa.y),h=h.Q;else k.$u(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=P.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Jm(this)){hm(this,!0);Lo(this,!0);var b=this.Q;null===b||a||b.K()}}; +function Io(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=hc;a.Kj()&&a.Lf.fd()&&(h=a.Lf);var k=D.O();if(a instanceof F&&a.vf!==a)for(c=a.vf,d=c.Ga,k.av(d.x,d.y,d.width,d.height,h),c.gj.wb(k),k.offset(-c.Fa.x,-c.Fa.y),h=c.Q;null!==h&&h!==a;)h.gj.wb(k),k.offset(-h.Fa.x,-h.Fa.y),h=h.Q;else k.av(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=P.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Jm(this)){hm(this,!0);Lo(this,!0);var b=this.Q;null===b||a||b.K()}}; f.wq=function(){!0!==Jm(this)&&(hm(this,!0),Lo(this,!0))};function Xo(a){if(!1===Km(a)){var b=a.Q;null!==b?b.K():a.Kj()&&(b=a.g,null!==b&&(b.Eg.add(a),a instanceof G&&a.gg(),b.Se()));Lo(a,!0)}}f.$i=function(){0!==(this.T&2048)===!1&&(Vo(this,!0),Wo(this,!0))};f.ZA=function(){Wo(this,!0)};f.qa=function(){var a=this.Y;null!==a&&a.qa()}; function Ko(a,b){var c=a.stretch,d=a.Q;if(null!==d&&d.ca===ea)return Yo(a,d.me(a.$b),d.le(a.column),b);if(null!==d&&d.ca===Nl&&d.Vd()===a)return Zo(a,pf,b);if(c===uo){if(null!==d){if(d.ca===Vj&&d.Vd()===a)return Zo(a,pf,b);c=d.je;return c===uo?Zo(a,Xj,b):Zo(a,c,b)}return Zo(a,Xj,b)}return Zo(a,c,b)} function Yo(a,b,c,d){var e=a.stretch;if(e!==uo)return Zo(a,e,d);var g=e=null;switch(b.stretch){case vo:g=!0;break;case pf:g=!0}switch(c.stretch){case wo:e=!0;break;case pf:e=!0}b=a.Q.je;null===e&&(e=b===wo||b===pf);null===g&&(g=b===vo||b===pf);return!0===e&&!0===g?Zo(a,pf,d):!0===e?Zo(a,wo,d):!0===g?Zo(a,vo,d):Zo(a,Xj,d)} @@ -1096,11 +1096,11 @@ D.defineProperty(P,{opacity:"opacity"},function(){return this.Gc},function(a){va D.defineProperty(P,{visible:"visible"},function(){return 0!==(this.T&1)},function(a){var b=0!==(this.T&1);b!==a&&(v&&D.h(a,"boolean",P,"visible"),this.T^=1,this.i("visible",b,a),b=this.Q,null!==b?b.K():this.Kj()&&this.Jd(a),this.qa(),$o(this))});D.defineProperty(P,{qg:"pickable"},function(){return 0!==(this.T&2)},function(a){var b=0!==(this.T&2);b!==a&&(v&&D.h(a,"boolean",P,"pickable"),this.T^=2,this.i("pickable",b,a))}); D.defineProperty(P,{JI:"fromLinkableDuplicates"},function(){return 0!==(this.T&4)},function(a){var b=0!==(this.T&4);b!==a&&(v&&D.h(a,"boolean",P,"fromLinkableDuplicates"),this.T^=4,this.i("fromLinkableDuplicates",b,a))});D.defineProperty(P,{KI:"fromLinkableSelfNode"},function(){return 0!==(this.T&8)},function(a){var b=0!==(this.T&8);b!==a&&(v&&D.h(a,"boolean",P,"fromLinkableSelfNode"),this.T^=8,this.i("fromLinkableSelfNode",b,a))}); D.defineProperty(P,{uK:"toLinkableDuplicates"},function(){return 0!==(this.T&16)},function(a){var b=0!==(this.T&16);b!==a&&(v&&D.h(a,"boolean",P,"toLinkableDuplicates"),this.T^=16,this.i("toLinkableDuplicates",b,a))});D.defineProperty(P,{vK:"toLinkableSelfNode"},function(){return 0!==(this.T&32)},function(a){var b=0!==(this.T&32);b!==a&&(v&&D.h(a,"boolean",P,"toLinkableSelfNode"),this.T^=32,this.i("toLinkableSelfNode",b,a))}); -D.defineProperty(P,{Hf:"isPanelMain"},function(){return 0!==(this.T&64)},function(a){var b=0!==(this.T&64);b!==a&&(v&&D.h(a,"boolean",P,"isPanelMain"),this.T^=64,this.K(),this.i("isPanelMain",b,a))});D.defineProperty(P,{su:"isActionable"},function(){return 0!==(this.T&128)},function(a){var b=0!==(this.T&128);b!==a&&(v&&D.h(a,"boolean",P,"isActionable"),this.T^=128,this.i("isActionable",b,a))}); +D.defineProperty(P,{Hf:"isPanelMain"},function(){return 0!==(this.T&64)},function(a){var b=0!==(this.T&64);b!==a&&(v&&D.h(a,"boolean",P,"isPanelMain"),this.T^=64,this.K(),this.i("isPanelMain",b,a))});D.defineProperty(P,{tu:"isActionable"},function(){return 0!==(this.T&128)},function(a){var b=0!==(this.T&128);b!==a&&(v&&D.h(a,"boolean",P,"isActionable"),this.T^=128,this.i("isActionable",b,a))}); D.defineProperty(P,{$l:"areaBackground"},function(){return this.ic},function(a){var b=this.ic;b!==a&&(v&&null!==a&&D.Xt(a,"GraphObject.areaBackground"),a instanceof Ba&&a.freeze(),this.ic=a,this.qa(),this.i("areaBackground",b,a))});D.defineProperty(P,{background:"background"},function(){return this.Lb},function(a){var b=this.Lb;b!==a&&(v&&null!==a&&D.Xt(a,"GraphObject.background"),a instanceof Ba&&a.freeze(),this.Lb=a,this.qa(),this.i("background",b,a))});function Uo(a,b){a.T=b?a.T|512:a.T&-513} function Fo(a){return 0!==(a.T&1024)}function ap(a,b){a.T=b?a.T|1024:a.T&-1025}function Vo(a,b){a.T=b?a.T|2048:a.T&-2049}function Wo(a,b){a.T=b?a.T|4096:a.T&-4097}function Jm(a){return 0!==(a.T&8192)}function hm(a,b){a.T=b?a.T|8192:a.T&-8193}function Km(a){return 0!==(a.T&16384)}function Lo(a,b){a.T=b?a.T|16384:a.T&-16385}D.w(P,{Y:"part"},function(){if(this.Kj())return this;if(null!==this.kn)return this.kn;var a;for(a=this.Q;a;){if(a instanceof F)return this.kn=a;a=a.Q}return null}); D.w(P,{Q:"panel"},function(){return this.Bh});P.prototype.xm=function(a){this.Bh=a};D.w(P,{layer:"layer"},function(){var a=this.Y;return null!==a?a.layer:null},{configurable:!0});D.w(P,{g:"diagram"},function(){var a=this.Y;return null!==a?a.g:null},{configurable:!0}); -D.defineProperty(P,{position:"position"},function(){return this.rb},function(a){v&&D.l(a,O,P,"position");var b=a.x,c=a.y,d=this.rb,e=d.x,g=d.y;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))?this.KB():(a=a.V(),this.JB(a,d)&&this.i("position",d,a))});P.prototype.KB=function(){};P.prototype.JB=function(a){this.rb=a;Xo(this);this.$i();return!0};P.prototype.Gy=function(a,b){this.rb.n(a,b);this.$i()};D.w(P,{$:"actualBounds"},function(){return this.bc}); +D.defineProperty(P,{position:"position"},function(){return this.rb},function(a){v&&D.l(a,O,P,"position");var b=a.x,c=a.y,d=this.rb,e=d.x,g=d.y;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))?this.KB():(a=a.V(),this.JB(a,d)&&this.i("position",d,a))});P.prototype.KB=function(){};P.prototype.JB=function(a){this.rb=a;Xo(this);this.$i();return!0};P.prototype.Jy=function(a,b){this.rb.n(a,b);this.$i()};D.w(P,{$:"actualBounds"},function(){return this.bc}); D.defineProperty(P,{scale:"scale"},function(){return this.Bb},function(a){var b=this.Bb;b!==a&&(v&&D.p(a,P,"scale"),0>=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Bb=a,this.$i(),this.K(),this.i("scale",b,a))});D.defineProperty(P,{angle:"angle"},function(){return this.tg},function(a){var b=this.tg;b!==a&&(v&&D.p(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.tg=a,this.K(),this.$i(),this.i("angle",b,a)))}); D.defineProperty(P,{Ea:"desiredSize"},function(){return this.Ye},function(a){v&&D.l(a,Ca,P,"desiredSize");var b=a.width,c=a.height,d=this.Ye,e=d.width,g=d.height;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))||(this.Ye=a=a.V(),this.K(),this instanceof z&&this.Re(),this.i("desiredSize",d,a),Fo(this)&&(a=this.Y,null!==a&&(Go(this,a,"width"),Go(this,a,"height"))))}); D.defineProperty(P,{width:"width"},function(){return this.Ye.width},function(a){var b=this.Ye.width;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",P,"width"),b=this.Ye,this.Ye=a=(new Ca(a,this.Ye.height)).freeze(),this.K(),this instanceof z&&this.Re(),this.i("desiredSize",b,a),Fo(this)&&(a=this.Y,null!==a&&Go(this,a,"width")))}); @@ -1109,46 +1109,46 @@ D.defineProperty(P,{ig:"minSize"},function(){return this.mi},function(a){var b=t D.w(P,{Fa:"measuredBounds"},function(){return this.Bd});D.w(P,{Ga:"naturalBounds"},function(){return this.ad},{configurable:!0});D.defineProperty(P,{margin:"margin"},function(){return this.cn},function(a){"number"===typeof a?a=new Ib(a):v&&D.l(a,Ib,P,"margin");var b=this.cn;b.P(a)||(this.cn=a=a.V(),this.K(),this.i("margin",b,a))});D.w(P,{transform:null},function(){0!==(this.T&2048)===!0&&So(this);return this.Ic});D.w(P,{Hh:null},function(){0!==(this.T&4096)===!0&&So(this);return this.Li}); D.defineProperty(P,{alignment:"alignment"},function(){return this.re},function(a){var b=this.re;b.P(a)||(v&&D.l(a,R,P,"alignment"),a.Zd()&&!a.ed()&&D.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.re=a=a.V(),Xo(this),this.i("alignment",b,a))});D.defineProperty(P,{column:"column"},function(){return this.pr},function(a){v&&D.p(a,P,"column");a=Math.round(a);var b=this.pr;b!==a&&(0>a&&D.ua(a,">= 0",P,"column"),this.pr=a,this.K(),this.i("column",b,a))}); D.defineProperty(P,{fI:"columnSpan"},function(){return this.Qi},function(a){v&&D.h(a,"number",P,"columnSpan");a=Math.round(a);var b=this.Qi;b!==a&&(1>a&&D.ua(a,">= 1",P,"columnSpan"),this.Qi=a,this.K(),this.i("columnSpan",b,a))});D.defineProperty(P,{$b:"row"},function(){return this.it},function(a){v&&D.p(a,P,"row");a=Math.round(a);var b=this.it;b!==a&&(0>a&&D.ua(a,">= 0",P,"row"),this.it=a,this.K(),this.i("row",b,a))}); -D.defineProperty(P,{rowSpan:"rowSpan"},function(){return this.rj},function(a){v&&D.h(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rj;b!==a&&(1>a&&D.ua(a,">= 1",P,"rowSpan"),this.rj=a,this.K(),this.i("rowSpan",b,a))});D.defineProperty(P,{Hy:"spanAllocation"},function(){return this.yt},function(a){var b=this.yt;b!==a&&(null!==a&&D.h(a,"function",P,"spanAllocation"),this.yt=a,this.K(),this.i("spanAllocation",b,a))}); +D.defineProperty(P,{rowSpan:"rowSpan"},function(){return this.rj},function(a){v&&D.h(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rj;b!==a&&(1>a&&D.ua(a,">= 1",P,"rowSpan"),this.rj=a,this.K(),this.i("rowSpan",b,a))});D.defineProperty(P,{Ky:"spanAllocation"},function(){return this.yt},function(a){var b=this.yt;b!==a&&(null!==a&&D.h(a,"function",P,"spanAllocation"),this.yt=a,this.K(),this.i("spanAllocation",b,a))}); D.defineProperty(P,{Gh:"alignmentFocus"},function(){return this.Hm},function(a){var b=this.Hm;b.P(a)||(v&&D.l(a,R,P,"alignmentFocus"),!a.Zd()||a.ed()||a.P(cc)&&this instanceof G||D.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Hm=a=a.V(),this.K(),this.i("alignmentFocus",b,a))}); D.defineProperty(P,{ud:"portId"},function(){return this.Ws},function(a){var b=this.Ws;if(b!==a){v&&null!==a&&D.h(a,"string",P,"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&&bp(c,this);this.Ws=a;if(null!==a&&c){c.Uk=!0;null===c.xe&&cp(c);var d=this.ud;null!==d&&c.xe.add(d,this)}this.i("portId",b,a)}});function dp(a){var b=a.Y;if(b instanceof G&&(null!==a.ud||a===b.port)){var c=b.g;null===c||c.ra.ob||Oo(b,a)}} function $o(a){var b=a.g;null===b||b.ra.ob||(a instanceof x?a instanceof G?a.gg():ep(a,a,function(a){dp(a)}):dp(a))}D.defineProperty(P,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Gk:cc},function(a){this.Wd();var b=this.Z.Gk;b.P(a)||(v&&D.l(a,R,P,"toSpot"),a=a.V(),this.Z.Gk=a,this.i("toSpot",b,a),dp(this))}); D.defineProperty(P,{Dm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Ek:10},function(a){this.Wd();var b=this.Z.Ek;b!==a&&(v&&D.h(a,"number",P,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",P,"toEndSegmentLength"),this.Z.Ek=a,this.i("toEndSegmentLength",b,a),dp(this))}); -D.defineProperty(P,{ev:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Dk:Do},function(a){this.Wd();var b=this.Z.Dk;b!==a&&(D.Pn("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,P,"toEndSegmentDirection"),this.Z.Dk=a,this.i("toEndSegmentDirection",b,a),dp(this))});D.defineProperty(P,{fv:"toShortLength"},function(){return null!==this.Z?this.Z.Fk:0},function(a){this.Wd();var b=this.Z.Fk;b!==a&&(v&&D.h(a,"number",P,"toShortLength"),this.Z.Fk=a,this.i("toShortLength",b,a),dp(this))}); +D.defineProperty(P,{fv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Dk:Do},function(a){this.Wd();var b=this.Z.Dk;b!==a&&(D.Pn("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,P,"toEndSegmentDirection"),this.Z.Dk=a,this.i("toEndSegmentDirection",b,a),dp(this))});D.defineProperty(P,{gv:"toShortLength"},function(){return null!==this.Z?this.Z.Fk:0},function(a){this.Wd();var b=this.Z.Fk;b!==a&&(v&&D.h(a,"number",P,"toShortLength"),this.Z.Fk=a,this.i("toShortLength",b,a),dp(this))}); D.defineProperty(P,{cH:"toLinkable"},function(){return null!==this.Z?this.Z.Gt:null},function(a){this.Wd();var b=this.Z.Gt;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"toLinkable"),this.Z.Gt=a,this.i("toLinkable",b,a))});D.defineProperty(P,{wK:"toMaxLinks"},function(){return null!==this.Z?this.Z.Ht:Infinity},function(a){this.Wd();var b=this.Z.Ht;b!==a&&(v&&D.h(a,"number",P,"toMaxLinks"),0>a&&D.ua(a,">= 0",P,"toMaxLinks"),this.Z.Ht=a,this.i("toMaxLinks",b,a))}); D.defineProperty(P,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.jk:cc},function(a){this.Wd();var b=this.Z.jk;b.P(a)||(v&&D.l(a,R,P,"fromSpot"),a=a.V(),this.Z.jk=a,this.i("fromSpot",b,a),dp(this))});D.defineProperty(P,{om:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.hk:10},function(a){this.Wd();var b=this.Z.hk;b!==a&&(v&&D.h(a,"number",P,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",P,"fromEndSegmentLength"),this.Z.hk=a,this.i("fromEndSegmentLength",b,a),dp(this))}); D.defineProperty(P,{mu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.gk:Do},function(a){this.Wd();var b=this.Z.gk;b!==a&&(D.Pn("GraphObject.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,P,"fromEndSegmentDirection"),this.Z.gk=a,this.i("fromEndSegmentDirection",b,a),dp(this))}); D.defineProperty(P,{nu:"fromShortLength"},function(){return null!==this.Z?this.Z.ik:0},function(a){this.Wd();var b=this.Z.ik;b!==a&&(v&&D.h(a,"number",P,"fromShortLength"),this.Z.ik=a,this.i("fromShortLength",b,a),dp(this))});D.defineProperty(P,{vF:"fromLinkable"},function(){return null!==this.Z?this.Z.Sr:null},function(a){this.Wd();var b=this.Z.Sr;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"fromLinkable"),this.Z.Sr=a,this.i("fromLinkable",b,a))}); D.defineProperty(P,{OA:"fromMaxLinks"},function(){return null!==this.Z?this.Z.Tr:Infinity},function(a){this.Wd();var b=this.Z.Tr;b!==a&&(v&&D.h(a,"number",P,"fromMaxLinks"),0>a&&D.ua(a,">= 0",P,"fromMaxLinks"),this.Z.Tr=a,this.i("fromMaxLinks",b,a))});D.defineProperty(P,{cursor:"cursor"},function(){return this.yr},function(a){var b=this.yr;b!==a&&(D.h(a,"string",P,"cursor"),this.yr=a,this.i("cursor",b,a))}); D.defineProperty(P,{click:"click"},function(){return null!==this.la?this.la.Pi:null},function(a){Ao(this);var b=this.la.Pi;b!==a&&(null!==a&&D.h(a,"function",P,"click"),this.la.Pi=a,this.i("click",b,a))});D.defineProperty(P,{cu:"doubleClick"},function(){return null!==this.la?this.la.Wi:null},function(a){Ao(this);var b=this.la.Wi;b!==a&&(null!==a&&D.h(a,"function",P,"doubleClick"),this.la.Wi=a,this.i("doubleClick",b,a))}); -D.defineProperty(P,{wA:"contextClick"},function(){return null!==this.la?this.la.Ri:null},function(a){Ao(this);var b=this.la.Ri;b!==a&&(null!==a&&D.h(a,"function",P,"contextClick"),this.la.Ri=a,this.i("contextClick",b,a))});D.defineProperty(P,{Hu:"mouseEnter"},function(){return null!==this.la?this.la.Gs:null},function(a){Ao(this);var b=this.la.Gs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseEnter"),this.la.Gs=a,this.i("mouseEnter",b,a))}); -D.defineProperty(P,{Iu:"mouseLeave"},function(){return null!==this.la?this.la.Hs:null},function(a){Ao(this);var b=this.la.Hs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseLeave"),this.la.Hs=a,this.i("mouseLeave",b,a))});D.defineProperty(P,{oB:"mouseOver"},function(){return null!==this.la?this.la.lj:null},function(a){Ao(this);var b=this.la.lj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseOver"),this.la.lj=a,this.i("mouseOver",b,a))}); +D.defineProperty(P,{xA:"contextClick"},function(){return null!==this.la?this.la.Ri:null},function(a){Ao(this);var b=this.la.Ri;b!==a&&(null!==a&&D.h(a,"function",P,"contextClick"),this.la.Ri=a,this.i("contextClick",b,a))});D.defineProperty(P,{Iu:"mouseEnter"},function(){return null!==this.la?this.la.Gs:null},function(a){Ao(this);var b=this.la.Gs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseEnter"),this.la.Gs=a,this.i("mouseEnter",b,a))}); +D.defineProperty(P,{Ju:"mouseLeave"},function(){return null!==this.la?this.la.Hs:null},function(a){Ao(this);var b=this.la.Hs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseLeave"),this.la.Hs=a,this.i("mouseLeave",b,a))});D.defineProperty(P,{oB:"mouseOver"},function(){return null!==this.la?this.la.lj:null},function(a){Ao(this);var b=this.la.lj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseOver"),this.la.lj=a,this.i("mouseOver",b,a))}); D.defineProperty(P,{nB:"mouseHover"},function(){return null!==this.la?this.la.kj:null},function(a){Ao(this);var b=this.la.kj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHover"),this.la.kj=a,this.i("mouseHover",b,a))});D.defineProperty(P,{mB:"mouseHold"},function(){return null!==this.la?this.la.jj:null},function(a){Ao(this);var b=this.la.jj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHold"),this.la.jj=a,this.i("mouseHold",b,a))}); D.defineProperty(P,{LJ:"mouseDragEnter"},function(){return null!==this.la?this.la.Es:null},function(a){Ao(this);var b=this.la.Es;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragEnter"),this.la.Es=a,this.i("mouseDragEnter",b,a))});D.defineProperty(P,{MJ:"mouseDragLeave"},function(){return null!==this.la?this.la.Fs:null},function(a){Ao(this);var b=this.la.Fs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragLeave"),this.la.Fs=a,this.i("mouseDragLeave",b,a))}); D.defineProperty(P,{lB:"mouseDrop"},function(){return null!==this.la?this.la.ij:null},function(a){Ao(this);var b=this.la.ij;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDrop"),this.la.ij=a,this.i("mouseDrop",b,a))});D.defineProperty(P,{BE:"actionDown"},function(){return null!==this.la?this.la.Yq:null},function(a){Ao(this);var b=this.la.Yq;b!==a&&(null!==a&&D.h(a,"function",P,"actionDown"),this.la.Yq=a,this.i("actionDown",b,a))}); D.defineProperty(P,{CE:"actionMove"},function(){return null!==this.la?this.la.Zq:null},function(a){Ao(this);var b=this.la.Zq;b!==a&&(null!==a&&D.h(a,"function",P,"actionMove"),this.la.Zq=a,this.i("actionMove",b,a))});D.defineProperty(P,{DE:"actionUp"},function(){return null!==this.la?this.la.$q:null},function(a){Ao(this);var b=this.la.$q;b!==a&&(null!==a&&D.h(a,"function",P,"actionUp"),this.la.$q=a,this.i("actionUp",b,a))}); D.defineProperty(P,{AE:"actionCancel"},function(){return null!==this.la?this.la.Xq:null},function(a){Ao(this);var b=this.la.Xq;b!==a&&(null!==a&&D.h(a,"function",P,"actionCancel"),this.la.Xq=a,this.i("actionCancel",b,a))});D.defineProperty(P,{TB:"toolTip"},function(){return null!==this.la?this.la.uj:null},function(a){Ao(this);var b=this.la.uj;b!==a&&(!v||null===a||a instanceof da||a instanceof fk||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.la.uj=a,this.i("toolTip",b,a))}); D.defineProperty(P,{contextMenu:"contextMenu"},function(){return null!==this.la?this.la.Si:null},function(a){Ao(this);var b=this.la.Si;b!==a&&(!v||a instanceof da||a instanceof fk||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.la.Si=a,this.i("contextMenu",b,a))});P.prototype.bind=P.prototype.bind=function(a){a.Qg=this;var b=this.mm();null!==b&&fp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Cc&&(this.Cc=new K(lh));this.Cc.add(a)}; -P.prototype.findTemplateBinder=P.prototype.mm=function(){for(var a=this instanceof x?this:this.Q;null!==a;){if(null!==a.rl)return a;a=a.Q}return null};P.prototype.setProperties=function(a){D.Yu(this,a)};var gp; +P.prototype.findTemplateBinder=P.prototype.mm=function(){for(var a=this instanceof x?this:this.Q;null!==a;){if(null!==a.rl)return a;a=a.Q}return null};P.prototype.setProperties=function(a){D.Zu(this,a)};var gp; P.make=gp=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=hp.na(a);"function"===typeof g?(c=D.dm(arguments),d=g(c),D.Ta(d)||D.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=aa[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.Ie=!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.Ie=!1,a.index=e);e=new la;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.Yu(a,e)}else D.Yu(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var hp=new ma("string","function"); +E?a.Vb=b:a instanceof I?a.Vb=b:D.k("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(b))for(c=0;ce)&&D.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.Ie=!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.Ie=!1,a.index=e);e=new la;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.Zu(a,e)}else D.Zu(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var hp=new ma("string","function"); P.getBuilders=function(){var a=new ma("string","function"),b;for(b in hp)if(b!==b.toLowerCase()){var c=hp.na(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var jp;P.defineBuilder=jp=function(a,b){D.h(a,"string",P,"defineBuilder:name");D.h(b,"function",P,"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);hp.add(a,b)};var kp; P.takeBuilderArgument=kp=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}; -jp("Button",function(){var a=new Ba(Cg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ba(Cg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=gp(x,Nl,{su:!0,lF:function(a,b){var e=a.Fd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},gp(z,{name:"ButtonBorder",Jb:"Rectangle",C:new R(0,0,2.761423749153968,2.761423749153968), -D:new R(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Hu=function(a,b){if(b.uu()){var e=b.Fd("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.Iu=function(a,b){if(b.uu()){var e=b.Fd("ButtonBorder");e instanceof z&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); -jp("TreeExpanderButton",function(){var a=gp("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},gp(z,{name:"ButtonIcon",Jb:"MinusLine",Ea:Zd},(new lh("figure","isTreeExpanded",function(a,c){var d=c.Q;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).ky()),{visible:!1},(new lh("visible","isTreeLeaf",function(a){return!a})).ky());a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.$f);if(d instanceof G){var e=d.g;if(null!==e){e=e.xb;if(d.td){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +jp("Button",function(){var a=new Ba(Cg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ba(Cg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=gp(x,Nl,{tu:!0,lF:function(a,b){var e=a.Fd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},gp(z,{name:"ButtonBorder",Jb:"Rectangle",C:new R(0,0,2.761423749153968,2.761423749153968), +D:new R(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Iu=function(a,b){if(b.vu()){var e=b.Fd("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.Ju=function(a,b){if(b.vu()){var e=b.Fd("ButtonBorder");e instanceof z&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); +jp("TreeExpanderButton",function(){var a=gp("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},gp(z,{name:"ButtonIcon",Jb:"MinusLine",Ea:Zd},(new lh("figure","isTreeExpanded",function(a,c){var d=c.Q;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).ny()),{visible:!1},(new lh("visible","isTreeLeaf",function(a){return!a})).ny());a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.$f);if(d instanceof G){var e=d.g;if(null!==e){e=e.xb;if(d.td){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; a.Mc=!0;d.td?e.collapseTree(d):e.expandTree(d)}}};return a}); -jp("SubGraphExpanderButton",function(){var a=gp("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},gp(z,{name:"ButtonIcon",Jb:"MinusLine",Ea:Zd},(new lh("figure","isSubGraphExpanded",function(a,c){var d=c.Q;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).ky()));a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.$f);if(d instanceof I){var e=d.g;if(null!==e){e=e.xb;if(d.Je){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Mc= +jp("SubGraphExpanderButton",function(){var a=gp("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},gp(z,{name:"ButtonIcon",Jb:"MinusLine",Ea:Zd},(new lh("figure","isSubGraphExpanded",function(a,c){var d=c.Q;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).ny()));a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.$f);if(d instanceof I){var e=d.g;if(null!==e){e=e.xb;if(d.Je){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Mc= !0;d.Je?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});jp("ContextMenuButton",function(){var a=gp("Button");a.stretch=wo;var b=a.Fd("ButtonBorder");b instanceof z&&(b.Jb="Rectangle",b.C=new R(0,0,2,3),b.D=new R(1,1,-2,-2));return a}); -jp("PanelExpanderButton",function(a){var b=kp(a,"COLLAPSIBLE"),c=gp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},gp(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new lh("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).ky(b)));a=c.Fd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.nb){var h=c.mm();null===h&&(h=c.Y);null!==h&&(h=h.Fd(b),null!==h&& +jp("PanelExpanderButton",function(a){var b=kp(a,"COLLAPSIBLE"),c=gp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},gp(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new lh("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).ny(b)));a=c.Fd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.nb){var h=c.mm();null===h&&(h=c.Y);null!==h&&(h=h.Fd(b),null!==h&& (g.ac("Collapse/Expand Panel"),h.visible=!h.visible,g.Td("Collapse/Expand Panel")))}};return c}); jp("CheckBoxButton",function(a){var b=kp(a);a=gp("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},gp(z,{name:"ButtonIcon",LI:"M0 4 L3 9 9 0",jb:2,stretch:pf,PA:Zj,visible:!1},""!==b?(new lh("visible",b)).AJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.nb||""!==b&&e.ga.nb)){a.Mc=!0;var g=d.Fd("ButtonIcon");e.ac("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Td("checkbox")}};return a}); -jp("CheckBox",function(a){a=kp(a);a=gp("CheckBoxButton",a,{name:"Button",margin:new Ib(0,1,0,0)});var b=gp(x,"Horizontal",a,{su:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Hu:a.Hu,Iu:a.Iu,click:a.click,_buttonClick:a.click});a.Hu=null;a.Iu=null;a.click=null;return b}); +jp("CheckBox",function(a){a=kp(a);a=gp("CheckBoxButton",a,{name:"Button",margin:new Ib(0,1,0,0)});var b=gp(x,"Horizontal",a,{tu:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Iu:a.Iu,Ju:a.Ju,click:a.click,_buttonClick:a.click});a.Iu=null;a.Ju=null;a.click=null;return b}); function Bo(){this.Pr=this.Si=this.uj=this.Xq=this.$q=this.Zq=this.Yq=this.ij=this.Fs=this.Es=this.jj=this.kj=this.lj=this.Hs=this.Gs=this.Ri=this.Wi=this.Pi=null}Bo.prototype.copy=function(){var a=new Bo;a.Pi=this.Pi;a.Wi=this.Wi;a.Ri=this.Ri;a.Gs=this.Gs;a.Hs=this.Hs;a.lj=this.lj;a.kj=this.kj;a.jj=this.jj;a.Es=this.Es;a.Fs=this.Fs;a.ij=this.ij;a.Yq=this.Yq;a.Zq=this.Zq;a.$q=this.$q;a.Xq=this.Xq;a.uj=this.uj;a.Si=this.Si;a.Pr=this.Pr;return a}; function x(a){P.call(this);void 0===a?this.ca=ck:(D.Da(a,x,x,"type"),this.ca=a);this.ya=new K(P);this.of=Sd;this.ca===Ql&&(this.$n=!0);this.Cr=Vc;this.Vi=uo;this.ca===ea&&lp(this);this.Yp=Zj;this.$r=ae;this.as=Gd;this.Xr=0;this.Wr=100;this.Zr=10;this.Yr=0;this.rl=this.Nd=this.kk=this.Pm=this.Rm=null;this.ms=NaN;this.Gg=this.cj=null;this.sp="category";this.Fg=null;this.wj=new B(NaN,NaN,NaN,NaN);this.Ck=this.jt=this.wn=null;this.$j=""}D.Sa(x,P);D.Bi(x);D.ja("Panel",x); function lp(a){a.dk=Sd;a.ci=1;a.Ui=null;a.Mm=null;a.bi=1;a.ai=null;a.Lm=null;a.he=[];a.de=[];a.nn=mp;a.Km=mp;a.vj=0;a.fj=0} @@ -1167,20 +1167,20 @@ this.i("defaultRowSeparatorDashArray",b,a)}}});D.defineProperty(x,{lL:"defaultCo D.defineProperty(x,{mL:"defaultColumnSeparatorStrokeWidth"},function(){return void 0===this.bi?1:this.bi},function(a){if(void 0!==this.bi){var b=this.bi;b!==a&&isFinite(a)&&0<=a&&(this.bi=a,this.K(),this.i("defaultColumnSeparatorStrokeWidth",b,a))}}); D.defineProperty(x,{kL:"defaultColumnSeparatorDashArray"},function(){return void 0===this.Lm?null:this.Lm},function(a){if(void 0!==this.Lm){var b=this.Lm;if(b!==a){null===a||Array.isArray(a)||D.hc(a,"Array",x,"defaultColumnSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.Nx,e=d.width,d=d.height,g=this.Ga,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.EF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.ya.o,q=p.length,r=0;r -e*u*c))){var s=n[r],t=!1,C=!0,A=w.ZG;null!==A&&(t=!0,C=a.IA(A,w.Af));if("LineV"===w.Jb){a.lineWidth=w.jb;To(this,a,w.stroke,!1,!1);a.beginPath();for(var N=y=Math.floor(-m.x/e);N<=y+k;N++){var H=N*e+m.x;0<=H&&H=e&&(e=1);d=c.$;h=this.ya.o;g=this.Rm;k=h.length;for(l=0;lthis.TA*q.interval*e))for(r=q.Fa,u=q.jb*q.scale,s=q.Gh,s.Zd()&&(s=ec),p=0;p=c&&(c=1);var d=this.Qx,e=d.width,d=d.height,g=this.Ga,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.EF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.ya.o,q=p.length,r=0;r +e*u*c))){var s=n[r],t=!1,C=!0,A=w.ZG;null!==A&&(t=!0,C=a.JA(A,w.Bf));if("LineV"===w.Jb){a.lineWidth=w.jb;To(this,a,w.stroke,!1,!1);a.beginPath();for(var N=y=Math.floor(-m.x/e);N<=y+k;N++){var H=N*e+m.x;0<=H&&H=e&&(e=1);d=c.$;h=this.ya.o;g=this.Rm;k=h.length;for(l=0;lthis.TA*q.interval*c.qf.Nx/this.pu*e))for(r=q.Fa,u=q.jb*q.scale,s=q.Gh,s.Zd()&&(s=ec),p=0;pg.height)continue}else if(l.position>g.width)continue;var m=l.Pq;isNaN(m)&&(m=c?a.ci:a.bi);var n=l.Oq;null===n&&(n=c?a.Ui:a.ai);0!==m&&null!==n&&(To(a,b,n,!1,!1),b.beginPath(),n=l.position+m,c?n>g.height&&(m-=n-g.height):n>g.width&&(m-=n-g.width),l=l.position+m/2,b.lineWidth=m,n=a.padding,c?(l+=n.top,m=n.left,n=g.width-n.right,b.moveTo(m,l),b.lineTo(n,l)):(l+= n.left,m=n.top,n=g.height-n.bottom,b.moveTo(l,m),b.lineTo(l,n)),b.stroke())}}} -function qp(a,b,c,d,e){for(var g=d.length,h=a.$,k=0;km)){var n=l.ff(),p=l.Pq;isNaN(p)&&(p=c?a.ci:a.bi);var q=l.Oq;null===q&&(q=c?a.Ui:a.ai);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Qa;p+n>m&&(n=m-p);0>=n||(m=a.padding,To(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,d,e){for(var g=d.length,h=a.$,k=0;km)){var n=l.ff(),p=l.Pq;isNaN(p)&&(p=c?a.ci:a.bi);var q=l.Oq;null===q&&(q=c?a.Ui:a.ai);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Qa;p+n>m&&(n=m-p);0>=n||(m=a.padding,To(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 op(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}; @@ -1204,24 +1204,24 @@ xh=D.tb(),qa=0;qaMd&&(fd=Math.max(Md-pc,0));var ig=0===$.Qa;$.Qa+=fd;Md=Math.max(Md-(fd+(ig?pc:0)),0)}1!==ca.Qi||oc!==Xj&&oc!==vo||($=this.le(mc),pc=$.ff(),fd=Math.max(ff-$.Qa,0),fd+pc>ed&&(fd=Math.max(ed-pc,0)),ig=0===$.Qa,$.Qa+=fd,ed=Math.max(ed-(fd+(ig?pc:0)),0));ni&&ca.wq()}}}D.Ba(bf);for(var Hc=0,Cb=0,Kb=this.eq,qa=0;qa=this.Mq);ab++)$=this.me(ca.$b+ab),Nd.height+=Math.max($.Qj,isNaN($.pf)?$.vf:Math.min($.pf,$.vf));for(ab=1;ab=this.eq);ab++)$=this.le(ca.column+ab),Nd.width+=Math.max($.Qj,isNaN($.pf)?$.vf:Math.min($.pf,$.vf));ob.width+=Nd.width;ob.height+=Nd.height;Ac=ca.margin;Hf=Ac.right+Ac.left;hg=Ac.top+Ac.bottom;Fk(ca,ob.width,ob.height,wj,xj);for(var If=ca.Fa,ff=Math.max(If.width+Hf,0),gf=Math.max(If.height+hg,0),Ch=0,ab=0;ab=this.Mq);ab++)$=this.me(ca.$b+ab),Ch+=$.total||0;if(Ch=nd)&&!(ca.$b+ab>=this.Mq);ab++){var $=this.me(ca.$b+ab),qc=$.Za||0,Od=zj(ca,$,jg);v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od);$.Qa=Math.min($.vf,qc+Od);$.Za!==qc&&(nd-=$.Za-qc)}for(;0qc&&($.Qa=Math.min($.vf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break;$=this.me($.index-1)}}for(var Lg= -0,ab=0;ab=this.eq);ab++)$=this.le(ca.column+ab),Lg+=$.total||0;if(Lg=nd)&&!(ca.column+ab>=this.eq);ab++)$=this.le(ca.column+ab),qc=$.Za||0,Od=zj(ca,$,jg),v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od),$.Qa=Math.min($.vf,qc+Od),$.Za!==qc&&(nd-=$.Za-qc);for(;0qc&&($.Qa=Math.min($.vf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break; +qa=0;qa=this.Mq);ab++)$=this.me(ca.$b+ab),Nd.height+=Math.max($.Qj,isNaN($.pf)?$.wf:Math.min($.pf,$.wf));for(ab=1;ab=this.eq);ab++)$=this.le(ca.column+ab),Nd.width+=Math.max($.Qj,isNaN($.pf)?$.wf:Math.min($.pf,$.wf));ob.width+=Nd.width;ob.height+=Nd.height;Ac=ca.margin;Hf=Ac.right+Ac.left;hg=Ac.top+Ac.bottom;Fk(ca,ob.width,ob.height,wj,xj);for(var If=ca.Fa,ff=Math.max(If.width+Hf,0),gf=Math.max(If.height+hg,0),Ch=0,ab=0;ab=this.Mq);ab++)$=this.me(ca.$b+ab),Ch+=$.total||0;if(Ch=nd)&&!(ca.$b+ab>=this.Mq);ab++){var $=this.me(ca.$b+ab),qc=$.Za||0,Od=zj(ca,$,jg);v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od);$.Qa=Math.min($.wf,qc+Od);$.Za!==qc&&(nd-=$.Za-qc)}for(;0qc&&($.Qa=Math.min($.wf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break;$=this.me($.index-1)}}for(var Lg= +0,ab=0;ab=this.eq);ab++)$=this.le(ca.column+ab),Lg+=$.total||0;if(Lg=nd)&&!(ca.column+ab>=this.eq);ab++)$=this.le(ca.column+ab),qc=$.Za||0,Od=zj(ca,$,jg),v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od),$.Qa=Math.min($.wf,qc+Od),$.Za!==qc&&(nd-=$.Za-qc);for(;0qc&&($.Qa=Math.min($.wf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break; $=this.le($.index-1)}}}D.Ba(Oe);D.Rk(Nd);D.Rk(ob);for(var kg=0,xe=0,oc=Ko(this,!0),pi=this.Ea,Ok=this.kf,Kf=Cb=Hc=0,jf=0,Kb=this.eq,qa=0;qasi)Fk(bc,Infinity,Infinity),ye=bc.Fa,lf.Xh(ye),this.ph.add(ye);else{var xd=bc.Te,wt=bc.DB,tp=bc.Gh;tp.Zd()&&(tp=hc);var lg=bc.Nq,jw=bc.EB,Tk=0,Uk=0,um=0;if(xd<-si||xd>=si){var xt=Rk.hG, -Lf=Rk.gG;lg!==uj&&(um=Rk.computeAngle(bc,lg,Lf),bc.tg=um);Tk=xt.x-Ng.x;Uk=xt.y-Ng.y}else{var Qd,mf;if(0<=xd)Qd=Fh.ea(xd),mf=xdzt+10?0<=xd?ui.Yb(Qd):Qd.Yb(ui):zt>yt+10?0<=xd?mf.Yb(vi):vi.Yb(mf):0<=xd?ui.Yb(vi):vi.Yb(ui)}else Lf=0<=xd?Qd.Yb(mf):mf.Yb(Qd);lg!== +Lf=Rk.gG;lg!==uj&&(um=Rk.computeAngle(bc,lg,Lf),bc.tg=um);Tk=xt.x-Ng.x;Uk=xt.y-Ng.y}else{var Qd,mf;if(0<=xd)Qd=Fh.ea(xd),mf=xdzt+10?0<=xd?ui.Yb(Qd):Qd.Yb(ui):zt>yt+10?0<=xd?mf.Yb(vi):vi.Yb(mf):0<=xd?ui.Yb(vi):vi.Yb(ui)}else Lf=0<=xd?Qd.Yb(mf):mf.Yb(Qd);lg!== uj&&(um=Rk.computeAngle(bc,lg,Lf),bc.tg=um);Tk=Qd.x+(mf.x-Qd.x)*wt-Ng.x;Uk=Qd.y+(mf.y-Qd.y)*wt-Ng.y}Fk(bc,Infinity,Infinity);var ye=bc.Fa,sm=bc.Ga,Vk=0;bc instanceof z&&(Vk=bc.jb);var wi=sm.width+Vk,Aj=sm.height+Vk;Og.reset();Og.translate(-ye.x,-ye.y);Og.scale(bc.scale,bc.scale);Og.rotate(lg===uj?bc.angle:Lf,wi/2,Aj/2);lg!==Vp&&lg!==Wp||Og.rotate(90,wi/2,Aj/2);lg!==Xp&&lg!==Yp||Og.rotate(-90,wi/2,Aj/2);lg===Zp&&(45Lf||225Lf)&&Og.rotate(-Lf,wi/2,Aj/2);var Fj=new B(0,0,wi,Aj);Sk.uo(Fj, tp);Og.wb(Sk);var kw=-Sk.x+Vk/2,lw=-Sk.y+Vk/2;Pg.assign(jw);isNaN(Pg.x)&&(Pg.x=0<=xd?wi/2+3:-(wi/2+3));isNaN(Pg.y)&&(Pg.y=-(Aj/2+3));Pg.rotate(Lf);Tk+=Pg.x;Uk+=Pg.y;Fj.set(ye);Fj.x=Tk+kw;Fj.y=Uk+lw;this.ph.add(Fj);lf.Xh(Fj)}}if(this instanceof J)for(var At=this.Jf;At.next();)Fk(At.value,Infinity,Infinity);this.wj=lf;var up=this.hj;up.n(up.x+lf.x,up.y+lf.y);xb(e,lf.width||0,lf.height||0);D.He(Og);D.A(Sk);D.A(Pg)}}}break;case "Grid":break;case "Graduated":var mw=a,nw=b,ow=c,pw=d,Qg=this.Vd();this.Pm= -[];var Gj=Qg.margin,qw=Gj.right+Gj.left,rw=Gj.top+Gj.bottom;Fk(Qg,mw,nw,ow,pw);var Bt=Qg.Fa,sw=Bt.height,tw=Math.max(Bt.width+qw,0),uw=Math.max(sw+rw,0),Ct=new B(-Gj.left,-Gj.top,tw,uw);this.Pm.push(Ct);e.assign(Ct);for(var Xk=Qg.Df,Dt=Qg.jb,vp=Xk.LA,Hj=Xk.Jx,xi=Xk.MA,vw=vp.length,wp=0,xp=0,Ij=D.tb(),yp=0;ypyd&&(yd+=360);Et.push(yd)}wp=Ft;xp=Gt}Ij.push(Et)}var Ht; +[];var Gj=Qg.margin,qw=Gj.right+Gj.left,rw=Gj.top+Gj.bottom;Fk(Qg,mw,nw,ow,pw);var Bt=Qg.Fa,sw=Bt.height,tw=Math.max(Bt.width+qw,0),uw=Math.max(sw+rw,0),Ct=new B(-Gj.left,-Gj.top,tw,uw);this.Pm.push(Ct);e.assign(Ct);for(var Xk=Qg.qf,Dt=Qg.jb,vp=Xk.MA,Hj=Xk.Mx,xi=Xk.Nx,vw=vp.length,wp=0,xp=0,Ij=D.tb(),yp=0;ypyd&&(yd+=360);Et.push(yd)}wp=Ft;xp=Gt}Ij.push(Et)}var Ht; if(null===this.kk){for(var It=[],Ap=this.ya.o,Jt=Ap.length,Bp=0;Bpxw&&Kt.push(Lt)}}}this.kk=It}Ht=this.kk;var Mt=this.ya.o,yw=Mt.length,Gh=0,Nt=0,Ot=xi;this.Rm=[];for(var vm=[],wm=0;wmQt*Pt*xi/this.Mx)){var fe=this.DF,Rt=Ht[wm],yi=Hj[0][0],Mf=0,zd=0,Nt=xi*Hh.CF-1E-4,Ot=xi*Hh.AF+1E-4,Kj=Qt*Pt;if(fethis.Tk+Kj&&(zi=Math.floor((fe-this.Tk)/Kj),fe-=zi*Kj);for(;fe<=this.SA;){var Dp;a:{for(var zw=Rt.length,Ep=0;Epxi&&(Gh=xi),Nt<=Gh&&Gh<=Ot)){for(var yd=Ij[Mf][zd],Lj=Hj[Mf][zd];Mf +if(!(2>Qt*Pt*xi/this.pu)){var fe=this.DF,Rt=Ht[wm],yi=Hj[0][0],Mf=0,zd=0,Nt=xi*Hh.CF-1E-4,Ot=xi*Hh.AF+1E-4,Kj=Qt*Pt;if(fethis.Tk+Kj&&(zi=Math.floor((fe-this.Tk)/Kj),fe-=zi*Kj);for(;fe<=this.SA;){var Dp;a:{for(var zw=Rt.length,Ep=0;Epxi&&(Gh=xi),Nt<=Gh&&Gh<=Ot)){for(var yd=Ij[Mf][zd],Lj=Hj[Mf][zd];Mf yi&&zdxm?0Dm;Dm++){switch(Dm){case 0:ge.n(Am,Bm);break;case 1:ge.n(Am+Ip,Bm);break;case 2:ge.n(Am,Bm+Jp);break;case 3:ge.n(Am+Ip,Bm+Jp)}ge.rotate(Zt+Ih.angle);ge.offset(Xt,Yt);0===Cm&&0===Dm?Bi.n(ge.x,ge.y,0,0):Bi.Ki(ge);ge.offset(-Xt,-Yt);ge.rotate(-Zt-Ih.angle)}D.A(ge);this.Pm.push(Bi);Pb(Cw, @@ -1229,7 +1229,7 @@ Bi.x,Bi.y,Bi.width,Bi.height)}else if(Ai instanceof na){var $k=Ai,$t=Gp,Fw=e;nul Sg.rotate(Jh===uj?Nf.angle:Rg,Oj/2,Pj/2);Jh!==Vp&&Jh!==Wp||Sg.rotate(90,Oj/2,Pj/2);Jh!==Xp&&Jh!==Yp||Sg.rotate(-90,Oj/2,Pj/2);Jh===Zp&&(45Rg||225Rg)&&Sg.rotate(-Rg,Oj/2,Pj/2);var au=D.sg(0,0,Oj,Pj),al=D.O();al.uo(au,Lp);Sg.wb(al);var Iw=-al.x,Jw=-al.y,Tg=D.O();Tg.assign(Gw);isNaN(Tg.x)&&(Tg.x=Oj/2+3);isNaN(Tg.y)&&(Tg.y=-(Pj/2+3));Tg.rotate(Rg);var Em=Em+(Tg.x+Iw),Fm=Fm+(Tg.y+Jw),Np=new B(Em,Fm,Kh.width,Kh.height),Kw=new B(Kh.x,Kh.y,Kh.width,Kh.height),Lw=new B(Nj.x,Nj.y,Nj.width, Nj.height),bu=new $p;bu.fq(Nf.hi);ng.push(Mp);ng.push(Nf.ue);ng.push(bu);ng.push(Np);ng.push(Kw);ng.push(Lw);0===Gm?Ci=Np.copy():Ci.Xh(Np);D.A(Tg);D.A(al);D.Kb(au);D.He(Sg)}this.Pm.push(Ci);Pb(Fw,Ci.x,Ci.y,Ci.width,Ci.height)}hm(Ai,!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 nf=e.width,of=e.height,Hm=this.padding,Mw=Hm.top+ Hm.bottom,nf=nf+(Hm.left+Hm.right),of=of+Mw;isFinite(g.width)&&(nf=g.width);isFinite(g.height)&&(of=g.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;xb(this.ad,nf,of);Ho(this,0,0,nf,of)};x.prototype.findMainElement=x.prototype.Vd=function(){if(null===this.wn){var a=this.ya.o,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.K(),Fk(this,n>c?c:n,p>d?d:p);break;case pf:this.K(!0);Fk(this,c+r,d+s,0,0);break;case wo:this.K(!0);Fk(this,c+r,p+s,0,0);break;case vo:this.K(!0),Fk(this,n+r,d+s,0,0)}}k=this.$;k.x=a;k.y=b; k.width=c;k.height=d;var u=this.ca.Xb;switch(u){case "Position":for(var t=g.length,y=e.x-this.padding.left,w=e.y-this.padding.top,C=0;C=ig){var Kg=this.hG,ob=this.gG;yj!==uj&&(Jg=this.computeAngle(pc,yj,ob),pc.angle=Jg);Ig=Kg.x;Jf=Kg.y}else{var Xb=void 0,Ic=void 0;if(0<=Cb)Xb=Hc.o[Cb],Ic=Cb +gf.value,ig=ff,Hc=If,Cb=pc.Te,oi=pc.DB,Hg=pc.Gh,yj=pc.Nq,rp=pc.EB,Ig=0,Jf=0,Jg=0;if(Cb<-ig||Cb>=ig){var Kg=this.hG,ob=this.gG;yj!==uj&&(Jg=this.computeAngle(pc,yj,ob),pc.angle=Jg);Ig=Kg.x;Jf=Kg.y}else{var Xb=void 0,Ic=void 0;if(0<=Cb)Xb=Hc.o[Cb],Ic=Cb nd+10?0<=Cb?Nd.Yb(Xb):Xb.Yb(Nd):nd>Ch+10?0<=Cb?Ic.Yb(ab):ab.Yb(Ic):0<=Cb?Nd.Yb(ab):ab.Yb(Nd)}else ob=0<=Cb?Xb.Yb(Ic):Ic.Yb(Xb);yj!==uj&&(Jg=this.computeAngle(pc,yj,ob),pc.angle=Jg);Ig=Xb.x+(Ic.x-Xb.x)*oi;Jf=Xb.y+(Ic.y-Xb.y)*oi}if(Hg.P(cc))pc.location=new O(Ig,Jf);else{Hg.Zd()&&(Hg=hc);var jg=D.Pf();jg.reset();jg.scale(pc.scale,pc.scale);jg.rotate(pc.angle,0,0);var zj=pc.Ga,qc=D.sg(0,0,zj.width,zj.height),Od=D.O();Od.uo(qc,Hg);jg.wb(Od);var Lg=-Od.x,kg=-Od.y,xe=rp.copy();isNaN(xe.x)&&(xe.x=0<=Cb?Od.x+ -3:-(Od.x+3));isNaN(xe.y)&&(xe.y=-(Od.y+3));xe.rotate(ob);Ig+=xe.x;Jf+=xe.y;jg.iH(qc);var Lg=Lg+qc.x,kg=kg+qc.y,pi=D.Fb(Ig+Lg,Jf+kg);pc.move(pi);D.A(pi);D.A(Od);D.Kb(qc);D.He(jg)}}this.Fu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Pm){var Ok=this.Vd(),Kf=this.Rm,jf=this.Pm,Dh=0,Pe=jf[Dh];Dh++;Ok.pc(Pe.x-e.x,Pe.y-e.y,Pe.width,Pe.height);for(var Pd=g.length,Mg=0;Mgq.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.Pf();q.set(h);if(null!==n?n.Qk(a,b,c,d,e,q):Jo(p,a,d, q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);D.He(q)}}}void 0===g&&D.He(h);return d}void 0===g&&D.He(h);return!1};function eq(a,b,c,d){for(var e=a.ya.o,g=e.length;g--;){var h=e[g];if(h.visible){var k=h.$,l=a.Ga;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof x&&eq(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} -f.Qn=function(a,b,c,d,e,g){if(!1===this.qg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ga,k=this.kh(),l=k?a:gb(D.Fb(a.x,a.y),this.transform),m=k?b:gb(D.Fb(b.x,b.y),this.transform),n=l.Cf(m),p=0u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.kh()?(s=r.transform,gb(k.set(a),s),gb(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof x?r:null,null!==r?!r.Qn(k,l,c,d,e,g):!s.sF(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||g.add(s))}}D.A(k);D.A(l)}return e? -p:h}return!1};function Qp(a){var b=null;a instanceof z&&(b=a.C,b===Vc&&(b=null),a=a.Df,null!==a&&null===b&&(b=a.C));null===b&&(b=dc);return b}function Rp(a){var b=null;a instanceof z&&(b=a.D,b===Vc&&(b=null),a=a.Df,null!==a&&null===b&&(b=a.D));null===b&&(b=uc);return b}x.prototype.add=x.prototype.add=function(a){D.l(a,P,x,"add:element");this.Xd(this.ya.count,a)};x.prototype.elt=x.prototype.ea=function(a){return this.ya.ea(a)}; -x.prototype.insertAt=x.prototype.Xd=function(a,b){b instanceof F&&D.k("Cannot add a Part to a Panel: "+b);if(this===b||this.tm(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.Q;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: "+ +p:h}return!1};function Qp(a){var b=null;a instanceof z&&(b=a.C,b===Vc&&(b=null),a=a.qf,null!==a&&null===b&&(b=a.C));null===b&&(b=dc);return b}function Rp(a){var b=null;a instanceof z&&(b=a.D,b===Vc&&(b=null),a=a.qf,null!==a&&null===b&&(b=a.D));null===b&&(b=uc);return b}x.prototype.add=x.prototype.add=function(a){D.l(a,P,x,"add:element");this.Xd(this.ya.count,a)};x.prototype.elt=x.prototype.ea=function(a){return this.ya.ea(a)}; +x.prototype.insertAt=x.prototype.Xd=function(a,b){b instanceof F&&D.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.tm(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.Q;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.ca!==Ql||b instanceof z||D.k("Can only add Shapes to a Grid Panel, not: "+b);this.ca!==np||b instanceof z||b instanceof na||D.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.xm(this);b.kn=null;if(null!==this.Yk){var d=b.data;null!==d&&"object"===typeof d&&(null===this.Fg&&(this.Fg=new ma(Object,x)),this.Fg.add(d,b))}var e=this.ya,d=-1;if(c===this){for(var g=-1,h=this.ya.o,k=h.length,l=0;l=e.count&& -a>=e.count)return;e.jd(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.Xd(a,b);this.K();b.K();null!==b.ud?this.Uk=!0:b instanceof x&&!0===b.Uk&&(this.Uk=!0);this.kk=null;c=this.Y;null!==c&&(c.Ll=null,c.tk=NaN,this.Uk&&c instanceof G&&(c.Uk=!0),c.Uk&&c instanceof G&&(c.xe=null),e=this.g,null!==e&&e.ra.ob||(-1!==d&&c.hd(og,"elements",this,b,null,d,null),c.hd(dg,"elements",this,null,b,null,a),this.uu()||fq(this,b,!1)))}; -D.defineProperty(x,{Uk:null},function(){return 0!==(this.T&8388608)},function(a){0!==(this.T&8388608)!==a&&(this.T^=8388608)});function gq(a,b){a.T=b?a.T|16777216:a.T&-16777217}x.prototype.remove=x.prototype.remove=function(a){D.l(a,P,x,"remove:element");for(var b=this.ya.o,c=b.length,d=-1,e=0;e=e.count)return;e.jd(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.Xd(a,b);this.K();b.K();null!==b.ud?this.Uk=!0:b instanceof x&&!0===b.Uk&&(this.Uk=!0);this.kk=null;c=this.Y;null!==c&&(c.Ll=null,c.tk=NaN,this.Uk&&c instanceof G&&(c.Uk=!0),c.Uk&&c instanceof G&&(c.xe=null),e=this.g,null!==e&&e.ra.ob||(-1!==d&&c.hd(og,"elements",this,b,null,d,null),c.hd(dg,"elements",this,null,b,null,a),this.vu()||fq(this,b,!1)))}; +D.defineProperty(x,{Uk:null},function(){return 0!==(this.T&8388608)},function(a){0!==(this.T&8388608)!==a&&(this.T^=8388608)});function gq(a,b){a.T=b?a.T|16777216:a.T&-16777217}x.prototype.remove=x.prototype.remove=function(a){D.l(a,P,x,"remove:element");for(var b=this.ya.o,c=b.length,d=-1,e=0;ea&&D.ua(a,">= 0",x,"getRowDefinition:idx");a=Math.round(a);var b=this.he;if(void 0===b[a]){var c=new fh;c.xm(this);c.Ie=!0;c.index=a;b[a]=c}return b[a]};x.prototype.removeRowDefinition=x.prototype.zG=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.he;this.hd(og,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; D.w(x,{eq:"columnCount"},function(){return void 0===this.de?0:this.de.length});x.prototype.getColumnDefinition=x.prototype.le=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.de;if(void 0===b[a]){var c=new fh;c.xm(this);c.Ie=!1;c.index=a;b[a]=c}return b[a]}; x.prototype.removeColumnDefinition=x.prototype.wG=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.de;this.hd(og,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; @@ -1274,68 +1274,68 @@ D.defineProperty(x,{fK:"rowSizing"},function(){return void 0===this.nn?mp:this.n D.defineProperty(x,{eI:"columnSizing"},function(){return void 0===this.Km?mp:this.Km},function(a){if(void 0!==this.Km){var b=this.Km;b!==a&&(a!==mp&&a!==Tp&&D.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Km=a,this.K(),this.i("columnSizing",b,a))}}); D.defineProperty(x,{fH:"topIndex"},function(){return void 0===this.vj?0:this.vj},function(a){if(void 0!==this.vj){var b=this.vj;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.vj=a,this.K(),this.i("topIndex",b,a))}}); D.defineProperty(x,{cG:"leftIndex"},function(){return void 0===this.fj?0:this.fj},function(a){if(void 0!==this.fj){var b=this.fj;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.fj=a,this.K(),this.i("leftIndex",b,a))}});x.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.he,d=c.length,e=this.vj;ea)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.de,d=c.length,e=this.fj;ea)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.de,d=c.length,e=this.fj;e=c.elements.count&&!(c instanceof F)){if(1===c.elements.count){var d=null!==c.Yk;if(!d)for(var e=b.j;e.next();)if("itemArray"=== -e.value.dv){d=!0;break}}d||(D.trace("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),hq=!0)}}))}var hq=!1;x.prototype.copyTemplate=function(){var a=this.copy();a.DK(function(a){a instanceof x&&(a.rl=null,a.Nd=null);var c=a.Cc;null!==c&&(a.Cc=null,c.each(function(c){a.bind(c.copy())}))});return a}; -x.prototype.updateTargetBindings=x.prototype.Nb=function(a){var b=this.rl;if(null!==b)for(void 0===a&&(a=""),b=b.j;b.next();){var c=b.value,d=c.WG;if(""===a||""===d||d===a)if(d=c.dv,null!==c.jI||""!==d){var d=this.data,e=c.Uq;if(null!==e)d=""===e?this:"/"===e?this:"."===e?this:".."===e?this:this.Fd(e);else{var g=this.g;null!==g&&c.Xx&&(d=g.ga.Zk)}if(null===d)v&&D.trace("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var g=this,h=c.Bm;if(-1!==h){if(g=this.Fx(h),null===g)continue}else null!== +k&&null!==k.Cc)for(var l=k.Cc.j;l.next();){var t=l.value;t.Qg=k;t.Dt=2;t.Vp=k.index;b.add(t)}}if(0=c.elements.count&&!(c instanceof F)){if(1===c.elements.count){var d=null!==c.Yk;if(!d)for(var e=b.j;e.next();)if("itemArray"=== +e.value.ev){d=!0;break}}d||(D.trace("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),hq=!0)}}))}var hq=!1;x.prototype.copyTemplate=function(){var a=this.copy();a.DK(function(a){a instanceof x&&(a.rl=null,a.Nd=null);var c=a.Cc;null!==c&&(a.Cc=null,c.each(function(c){a.bind(c.copy())}))});return a}; +x.prototype.updateTargetBindings=x.prototype.Nb=function(a){var b=this.rl;if(null!==b)for(void 0===a&&(a=""),b=b.j;b.next();){var c=b.value,d=c.WG;if(""===a||""===d||d===a)if(d=c.ev,null!==c.jI||""!==d){var d=this.data,e=c.Uq;if(null!==e)d=""===e?this:"/"===e?this:"."===e?this:".."===e?this:this.Fd(e);else{var g=this.g;null!==g&&c.$x&&(d=g.ga.Zk)}if(null===d)v&&D.trace("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var g=this,h=c.Bm;if(-1!==h){if(g=this.Ix(h),null===g)continue}else null!== c.Qg&&(g=c.Qg);"/"===e?d=g.Y:"."===e?d=g:".."===e&&(d=g.Q);e=c.Dt;if(0!==e){if(!(g instanceof x))continue;h=g;1===e?g=h.le(c.Vp):2===e&&(g=h.me(c.Vp))}void 0!==g&&c.lH(g,d)}}}}; D.defineProperty(x,{Yk:"itemArray"},function(){return this.cj},function(a){var b=this.cj;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&&Zm(c,this);this.cj=a;null!==c&&null!==a&&Vm(c,this);this.i("itemArray",b,a);null!==c&&c.ra.ob||this.yB()}});function rn(a){return a.type===Vj||a.type===Nl||a.type===rj||a.type===ea&&0a;)this.rf(this.ya.length-1);a=this.Yk;if(null!==a)for(var b=D.cb(a),c=0;ca;)this.sf(this.ya.length-1);a=this.Yk;if(null!==a)for(var b=D.cb(a),c=0;cc)){var d;d=iq(a,b);var e=a.pJ,g=null;null!==e&&(g=e.na(d));null===g&&(jq||(jq=!0,D.trace('No item template Panel found for category "'+d+'" on '+a),D.trace(" Using default item template."),d=new x,e=new na,e.bind(new lh("text","",ja)),d.add(e),kq=d),g=kq);d=g;null!==d&&(Oh(d),d=d.copy(),0!==(d.T&16777216)&&(e=a.mm(),null!==e&&gq(e,!0)),"object"===typeof b&&(null===a.Fg&&(a.Fg=new ma(Object,x)),a.Fg.add(b,d)),e=c,rn(a)&&e++,a.Xd(e,d),d.Nd=b,sn(a,e, -c),d.Nd=null,d.data=b)}}function sn(a,b,c){for(a=a.ya;ba&&D.ua(a,">= 0",fh,"height"),this.pf=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("height",b,a))});D.defineProperty(fh,{width:"width"},function(){return this.pf},function(a){var b=this.pf;b!==a&&(v&&D.h(a,"number",fh,"width"),0>a&&D.ua(a,">= 0",fh,"width"),this.pf=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("width",b,a))}); -D.defineProperty(fh,{Qj:"minimum"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(v&&D.h(a,"number",fh,"minimum"),(0>a||!isFinite(a))&&D.ua(a,">= 0",fh,"minimum"),this.vk=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("minimum",b,a))});D.defineProperty(fh,{vf:"maximum"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(v&&D.h(a,"number",fh,"maximum"),0>a&&D.ua(a,">= 0",fh,"maximum"),this.uk=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("maximum",b,a))}); +D.defineProperty(fh,{Qj:"minimum"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(v&&D.h(a,"number",fh,"minimum"),(0>a||!isFinite(a))&&D.ua(a,">= 0",fh,"minimum"),this.vk=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("minimum",b,a))});D.defineProperty(fh,{wf:"maximum"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(v&&D.h(a,"number",fh,"maximum"),0>a&&D.ua(a,">= 0",fh,"maximum"),this.uk=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("maximum",b,a))}); D.defineProperty(fh,{alignment:"alignment"},function(){return this.re},function(a){var b=this.re;b.P(a)||(v&&D.l(a,R,fh,"alignment"),this.re=a.V(),null!==this.Q&&this.Q.K(),this.rd("alignment",b,a))});D.defineProperty(fh,{stretch:"stretch"},function(){return this.Og},function(a){var b=this.Og;b!==a&&(v&&D.Da(a,P,fh,"stretch"),this.Og=a,null!==this.Q&&this.Q.K(),this.rd("stretch",b,a))}); D.defineProperty(fh,{QG:"separatorPadding"},function(){return this.zk},function(a){"number"===typeof a?a=new Ib(a):null!==a&&v&&D.l(a,Ib,fh,"separatorPadding");var b=this.zk;null!==a&&null!==b&&b.P(a)||(null!==a&&(a=a.V()),this.zk=a,null!==this.Q&&this.Q.K(),this.rd("separatorPadding",b,a))}); D.defineProperty(fh,{Oq:"separatorStroke"},function(){return this.qt},function(a){var b=this.qt;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.qt=a,null!==this.Q&&this.Q.K(),this.rd("separatorStroke",b,a))});D.defineProperty(fh,{Pq:"separatorStrokeWidth"},function(){return this.rt},function(a){var b=this.rt;b!==a&&(this.rt=a,null!==this.Q&&this.Q.K(),this.rd("separatorStrokeWidth",b,a))}); D.defineProperty(fh,{uM:"separatorDashArray"},function(){return this.oi},function(a){var b=this.oi;if(b!==a){null===a||Array.isArray(a)||D.hc(a,"Array",fh,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var g=d.Fa,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.tb(),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.Ba(t);return}e> q?(w=e-q,e=q):w=0;var C=Math.sqrt(e*e/(1+r*r));0>p&&(C=-C);k+=C;l+=r*C;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(g/2));0===w&&d.Pk(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.Ba(t);return}q=t[y];p=q[0];s=q[1];r=q[2];q=q[3];e=w}}D.Ba(t)}} -z.prototype.Pk=function(a,b){if(null!==this.yc||null!==this.Od){null!==this.Od&&To(this,a,this.Od,!0,!1);null!==this.yc&&To(this,a,this.yc,!1,!1);var c=this.Pg;if(0===c){var d=this.Y;d instanceof da&&d.type===rj&&"Selection"===d.Ed&&d.zb instanceof z&&d.$f.Vd()===d.zb&&(c=d.zb.jb)}a.lineWidth=c;a.lineJoin=this.Tp;a.lineCap=this.Rp;a.miterLimit=this.vn;var e=!1;this.Y&&b.Hj("drawShadows")&&(e=this.Y.Xk);var g=!0;null!==this.yc&&null===this.Od&&(g=!1);var d=!1,h=!0,k=this.ZG;null!==k&&(d=!0,h=a.IA(k, -this.Af));var l=this.pb;if(null!==l){if(l.ca===qf)a.beginPath(),d&&!h?Eo(a,l.xc,l.Hc,l.Ab,l.Ib,k,this.Af):(a.moveTo(l.xc,l.Hc),a.lineTo(l.Ab,l.Ib)),null!==this.Od&&a.Wg(this.Od),0!==c&&null!==this.yc&&a.Wj();else if(l.ca===rf){var m=l.xc,n=l.Hc,p=l.Ab,q=l.Ib,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.Od&&(a.beginPath(),a.rect(l,r,m,n),a.Wg(this.Od));if(null!==this.yc){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.tb(),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(),nq(a,h,k,this.Af),a.Wj(),D.Ba(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Wj());g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ca===sf)m=l.xc,n=l.Hc,p=l.Ab,q=l.Ib,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+Fd*l,n-r,m+l,n-Fd*r,m+l,n),a.bezierCurveTo(m+ -l,n+Fd*r,m+Fd*l,n+r,m,n+r),a.bezierCurveTo(m-Fd*l,n+r,m-l,n+Fd*r,m-l,n),a.bezierCurveTo(m-l,n-Fd*r,m-Fd*l,n-r,m,n-r),a.closePath(),null!==this.Od&&a.Wg(this.Od),d&&!h&&(h=D.tb(),Be(m,n-r,m+Fd*l,n-r,m+l,n-Fd*r,m+l,n,.5,h),Be(m+l,n,m+l,n+Fd*r,m+Fd*l,n+r,m,n+r,.5,h),Be(m,n+r,m-Fd*l,n+r,m-l,n+Fd*r,m-l,n,.5,h),Be(m-l,n,m-l,n-Fd*r,m-Fd*l,n-r,m,n-r,.5,h),a.beginPath(),nq(a,h,k,this.Af),D.Ba(h)),0!==c&&null!==this.yc&&(g&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= +z.prototype.Pk=function(a,b){if(null!==this.yc||null!==this.Od){null!==this.Od&&To(this,a,this.Od,!0,!1);null!==this.yc&&To(this,a,this.yc,!1,!1);var c=this.Pg;if(0===c){var d=this.Y;d instanceof da&&d.type===rj&&"Selection"===d.Ed&&d.zb instanceof z&&d.$f.Vd()===d.zb&&(c=d.zb.jb)}a.lineWidth=c;a.lineJoin=this.Tp;a.lineCap=this.Rp;a.miterLimit=this.vn;var e=!1;this.Y&&b.Hj("drawShadows")&&(e=this.Y.Xk);var g=!0;null!==this.yc&&null===this.Od&&(g=!1);var d=!1,h=!0,k=this.ZG;null!==k&&(d=!0,h=a.JA(k, +this.Bf));var l=this.pb;if(null!==l){if(l.ca===qf)a.beginPath(),d&&!h?Eo(a,l.xc,l.Hc,l.Ab,l.Ib,k,this.Bf):(a.moveTo(l.xc,l.Hc),a.lineTo(l.Ab,l.Ib)),null!==this.Od&&a.Wg(this.Od),0!==c&&null!==this.yc&&a.Wj();else if(l.ca===rf){var m=l.xc,n=l.Hc,p=l.Ab,q=l.Ib,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.Od&&(a.beginPath(),a.rect(l,r,m,n),a.Wg(this.Od));if(null!==this.yc){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.tb(),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(),nq(a,h,k,this.Bf),a.Wj(),D.Ba(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Wj());g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ca===sf)m=l.xc,n=l.Hc,p=l.Ab,q=l.Ib,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+Fd*l,n-r,m+l,n-Fd*r,m+l,n),a.bezierCurveTo(m+ +l,n+Fd*r,m+Fd*l,n+r,m,n+r),a.bezierCurveTo(m-Fd*l,n+r,m-l,n+Fd*r,m-l,n),a.bezierCurveTo(m-l,n-Fd*r,m-Fd*l,n-r,m,n-r),a.closePath(),null!==this.Od&&a.Wg(this.Od),d&&!h&&(h=D.tb(),Be(m,n-r,m+Fd*l,n-r,m+l,n-Fd*r,m+l,n,.5,h),Be(m+l,n,m+l,n+Fd*r,m+Fd*l,n+r,m,n+r,.5,h),Be(m,n+r,m-Fd*l,n+r,m-l,n+Fd*r,m-l,n,.5,h),Be(m-l,n,m-l,n-Fd*r,m-Fd*l,n-r,m,n-r,.5,h),a.beginPath(),nq(a,h,k,this.Bf),D.Ba(h)),0!==c&&null!==this.yc&&(g&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0,a.Wj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Wj());else if(l.ca===Ze){r=l.fk;n=r.length;for(q=0;qy.xf);else{var t=Rf(y,m),w=t.length;if(0===w){a.lineTo(y.oa,y.va);break}for(var C=0;Cy.yf);else{var t=Rf(y,m),w=t.length;if(0===w){a.lineTo(y.oa,y.va);break}for(var C=0;Ce)){var g=.001,h=c.length,k=b[0],l=b[1];if(4===e)Eo(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.tb(),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.Ba(s);return}p=s[u];n=p[0];q=p[1];p=p[2];g=t}else e=!e}D.Ba(s)}}}z.prototype.getDocumentPoint=z.prototype.eb=function(a,b){void 0===b&&(b=new O);if(a instanceof R){a.Zd()&&D.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ga,d=this.jb;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.wb(b);return b}; -z.prototype.Mk=function(a,b){var c=this.Df;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.mb,e=this.jb/2;c.type!==qf||b||(e+=2);var g=D.Of();g.assign(d);g.Ff(e+2,e+2);if(!g.Oa(a))return D.Kb(g),!1;d=e+1E-4;if(c.type===qf){if(null===this.stroke)return!1;d=(c.H-c.ma)*(a.x-c.ma)+(c.I-c.ka)*(a.y-c.ka);if(0>(c.ma-c.H)*(a.x-c.H)+(c.ka-c.I)*(a.y-c.I)||0>d)return!1;D.Kb(g);return re(c.ma,c.ka,c.H,c.I,e,a.x,a.y)}if(c.type===rf){var h=c.ma,k=c.ka,l=c.H,m=c.I;g.x=Math.min(h,l);g.y=Math.min(k, +z.prototype.Mk=function(a,b){var c=this.qf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.mb,e=this.jb/2;c.type!==qf||b||(e+=2);var g=D.Of();g.assign(d);g.Ff(e+2,e+2);if(!g.Oa(a))return D.Kb(g),!1;d=e+1E-4;if(c.type===qf){if(null===this.stroke)return!1;d=(c.H-c.ma)*(a.x-c.ma)+(c.I-c.ka)*(a.y-c.ka);if(0>(c.ma-c.H)*(a.x-c.H)+(c.ka-c.I)*(a.y-c.I)||0>d)return!1;D.Kb(g);return re(c.ma,c.ka,c.H,c.I,e,a.x,a.y)}if(c.type===rf){var h=c.ma,k=c.ka,l=c.H,m=c.I;g.x=Math.min(h,l);g.y=Math.min(k, m);g.width=Math.abs(l-h);g.height=Math.abs(m-k);if(null===this.fill){g.Ff(-d,-d);if(g.Oa(a))return D.Kb(g),!1;g.Ff(d,d)}null!==this.stroke&&g.Ff(e,e);e=g.Oa(a);D.Kb(g);return e}if(c.type===sf){var h=c.ma,k=c.ka,l=c.H,m=c.I,c=Math.min(h,l),n=Math.min(k,m),h=Math.abs(l-h)/2,k=Math.abs(m-k)/2,c=a.x-(c+h),n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return D.Kb(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);D.Kb(g);return 0>=h||0>=k?!1:1>=c*c/(h*h)+n*n/(k*k)}if(c.type=== Ze)return D.Kb(g),null===this.fill?Uf(c,a.x,a.y,e):c.Oa(a,e,1Math.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||zb(l.y,e))&&(l.ye||zb(l.x,e))&&(l.x=h&&d<=a}a=h&&g<=a} -z.prototype.sF=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.Mk(a,!0))return!0;var e=a.Cf(b);b=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.Mk(a,!0))return!0;var e=a.Df(b);b=e;1.5=e||jb(b,g,0,-p)>=e||jb(b,g,0,p)>=e||jb(b,g,n,0)>= e?!1:!0}else if(g.type===Ze){h=g.mb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&ib(a.x,a.y,k,l,m,l)>e&&ib(a.x,a.y,m,h,k,h)>e&&ib(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Uf(g,a.x,a.y,b):g.Oa(a,b,!0))return!0}else{c=g.lc;for(b=0;be)return!1;l=k.Db.o;m=l.length;for(h=0;he)return!1;break;case Df:g=D.tb(); Be(n,p,q.Bc,q.Xc,q.Sh,q.Th,q.H,q.I,.8,g);n=d(g,a);D.Ba(g);if(n)return!1;n=q.H;p=q.I;if(a.lq(n,p)>e)return!1;break;case Of:g=D.tb();Fe(n,p,q.Bc,q.Xc,q.H,q.I,.8,g);n=d(g,a);D.Ba(g);if(n)return!1;n=q.H;p=q.I;if(a.lq(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.oa;p=q.va;if(a.lq(n,p)>e)return!1;break}q=null;g=D.tb();for(b=0;b= 0",z,"strokeWidth:value")}); D.defineProperty(z,{zM:"strokeCap"},function(){return this.Rp},function(a){var b=this.Rp;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?D.ua(a,'"butt", "round", or "square"',z,"strokeCap"):(this.Rp=a,this.qa(),this.i("strokeCap",b,a)))}); D.defineProperty(z,{BM:"strokeJoin"},function(){return this.Tp},function(a){var b=this.Tp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?D.ua(a,'"miter", "bevel", or "round"',z,"strokeJoin"):(this.Tp=a,this.qa(),this.i("strokeJoin",b,a)))}); D.defineProperty(z,{CM:"strokeMiterLimit"},function(){return this.vn},function(a){var b=this.vn;if(b!==a)if(v&&D.p(a,z,"strokeMiterLimit"),1<=a){this.vn=a;this.qa();var c=this.Y;null!==c&&(c.tk=NaN);this.i("strokeMiterLimit",b,a)}else D.ua(a,"value >= 1",z,"strokeWidth:value")}); D.defineProperty(z,{ZG:"strokeDashArray"},function(){return this.Sp},function(a){var b=this.Sp;if(b!==a){null===a||Array.isArray(a)||D.hc(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:1n*l*l&&(h=!0);b.od!==a&&(h=!1);!1===b.Hj("textGreeking")&&(h=!1);n=this.ti;l=this.ui;switch(this.ju){case yo:a.translate(c, -0);a.scale(-1,1);break;case xo:a.translate(0,d);a.scale(1,-1);break;case zo:a.translate(c,d),a.scale(-1,-1)}var m=this.ue,p=(n+e+l)*m;d>p&&(k=this.Vl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.hi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,y=c,w=e,C=g,A=0;h?("left"===C?A=0:"right"===C?A=y-r:"center"===C&&(A=(y-r)/2),s.fillRect(0+A,t+.25*w,r,1)):("left"===C?A=0:"right"===C?A=y:"center"===C&&(A=y/2),s.fillText(u,0+A,t+w-.25*w),u=w/20|0,0===u&&(u=1),"right"===C?A-=r:"center"=== +na.prototype.Pk=function(a,b){if(null!==this.yc&&0!==this.Sd.length&&null!==this.zg){var c=this.Ga.width,d=this.Ga.height,e=Mq(this),g=a.textAlign=this.Rl,h=b.gs;"start"===g&&(g=h?"right":"left");"end"===g&&(g=h?"left":"right");To(this,a,this.yc,!0,!1);(this.qk||this.pk)&&To(this,a,this.yc,!1,!1);var k=0,h=!1,l=D.Fb(0,0);this.Hh.wb(l);var m=D.Fb(0,e);this.Hh.wb(m);var n=l.Df(m);D.A(l);D.A(m);l=b.scale;8>n*l*l&&(h=!0);b.od!==a&&(h=!1);!1===b.Hj("textGreeking")&&(h=!1);n=this.ti;l=this.ui;switch(this.ju){case yo:a.translate(c, +0);a.scale(-1,1);break;case xo:a.translate(0,d);a.scale(1,-1);break;case zo:a.translate(c,d),a.scale(-1,-1)}var m=this.ue,p=(n+e+l)*m;d>p&&(k=this.Vl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.hi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,y=c,w=e,C=g,A=0;h?("left"===C?A=0:"right"===C?A=y-r:"center"===C&&(A=(y-r)/2),s.fillRect(0+A,t+.25*w,r,1)):("left"===C?A=0:"right"===C?A=y:"center"===C&&(A=y/2),s.fillText(u,0+A,t+w-.25*w),u=w/20|0,0===u&&(u=1),"right"===C?A-=r:"center"=== C&&(A-=r/2),this.qk&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+A,t+w-.2*w),s.lineTo(0+A+r,t+w-.2*w),s.stroke()),this.pk&&(s.beginPath(),s.lineWidth=u,t=t+w-w/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.ju){case yo:a.scale(-1,1);a.translate(-c,0);break;case xo:a.scale(1,-1);a.translate(0,-d);break;case zo:a.scale(-1,-1),a.translate(-c,-d)}}}; na.prototype.computeAngle=function(a,b){var c=0;switch(a){default:case uj:c=0;break;case uq:c=b;break;case Vp:c=b+90;break;case Xp:c=b-90;break;case Nq:c=b+180;break;case Oq:c=Ue(b);90c&&(c-=180);break;case Wp:c=Ue(b+90);90c&&(c-=180);break;case Yp:c=Ue(b-90);90c&&(c-=180);break;case Zp:c=Ue(b);if(45c||225c)return 0;90c&&(c-=180)}return Ue(c)}; -na.prototype.jo=function(a,b,c,d){this.wp=a;var e=this.hi;e.reset();var g=0,h=0;if(isNaN(this.Ea.width)){g=this.Sd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.Wx){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.zg);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.zg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ea.width;null!==this.Q&&(g=Math.min(g, -this.Q.kf.width),g=Math.max(g,this.Q.ig.width));h=Lq(this,g,e);m=h=isNaN(this.Ea.height)?Math.min(h,b/this.scale):this.Ea.height;if(0!==e.nf&&1!==e.Xe.length&&this.nj===Iq&&(b=this.zg,l=this.nj===Iq?Qq(b):0,k=this.ti+this.ui,k=Math.max(0,Mq(this)+k),m=Math.min(this.CJ-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Xe.length))){k=e.Xe[m];for(a=Math.max(1,a-l);Pq(k,b)>a&&1h&&(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.zg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ea.width;null!==this.Q&&(g=Math.min(g, +this.Q.kf.width),g=Math.max(g,this.Q.ig.width));h=Lq(this,g,e);m=h=isNaN(this.Ea.height)?Math.min(h,b/this.scale):this.Ea.height;if(0!==e.nf&&1!==e.Xe.length&&this.nj===Iq&&(b=this.zg,l=this.nj===Iq?Qq(b):0,k=this.ti+this.ui,k=Math.max(0,Mq(this)+k),m=Math.min(this.CJ-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Xe.length))){k=e.Xe[m];for(a=Math.max(1,a-l);Pq(k,b)>a&&1=a.vh)return new Ca(0,l);if(a.Ik===Gq){c.xj=1;g=Pq(b,k);if(0===h||g<=d)return c.nf=g,c.yf.push(c.nf),c.Xe.push(b),new Ca(g,l);var m=Rq(b);b=b.substr(m.length);for(var n=Rq(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.yf[a.ue+p]=g,e=Math.max(e,g)):(c.yf[a.ue+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Xe[a.ue+p]=m.substr(0,n);p++;m=m.substr(n);if(a.ue+p>a.vh)break}n=Rq(b);for(g=Pq(m+n,k);0a.vh))break}c.xj=Math.min(a.vh,p);c.nf=Math.max(c.nf,e);return new Ca(c.nf,l*c.xj)}function Rq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} +function Kq(a,b,c,d){b=b.replace(/^\s+|\s+$/g,"");var e=0,g=0,h=0,k=a.zg,g=a.ti+a.ui,l=Math.max(0,Mq(a)+g),h=a.nj===Iq?Qq(k):0;if(a.ue>=a.vh)return new Ca(0,l);if(a.Ik===Gq){c.xj=1;g=Pq(b,k);if(0===h||g<=d)return c.nf=g,c.zf.push(c.nf),c.Xe.push(b),new Ca(g,l);var m=Rq(b);b=b.substr(m.length);for(var n=Rq(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.zf[a.ue+p]=g,e=Math.max(e,g)):(c.zf[a.ue+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Xe[a.ue+p]=m.substr(0,n);p++;m=m.substr(n);if(a.ue+p>a.vh)break}n=Rq(b);for(g=Pq(m+n,k);0a.vh))break}c.xj=Math.min(a.vh,p);c.nf=Math.max(c.nf,e);return new Ca(c.nf,l*c.xj)}function Rq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} function Pq(a,b){Eq!==b&&(Eq=Fq.font=b);return Fq.measureText(a).width}function Mq(a){if(null!==a.Om)return a.Om;var b=a.zg;Eq!==b&&(Eq=Fq.font=b);var c=0;void 0!==zq[b]&&5E3>Aq?c=zq[b]:(c=1.3*Fq.measureText("M").width,zq[b]=c,Aq++);return a.Om=c}function Qq(a){Eq!==a&&(Eq=Fq.font=a);var b=0;void 0!==Bq[a]&&5E3>Cq?b=Bq[a]:(b=Fq.measureText(Dq).width,Bq[a]=b,Cq++);return b} -function Lq(a,b,c){var d=a.Sd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.ti+a.ui,e=Math.max(0,Mq(a)+e);if(0===d.length)return c.nf=0,a.ue=1,e;if(!a.Wx){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.ue=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.Ik!==Gq?(c.xj=0,h=Kq(a,h,c,b),g+=h.height,a.ue+=c.xj):(Kq(a,h,c,b),g+=e,a.ue++),a.ue===a.vh&&(l=!0)),h=k+1;return a.pw=g} +function Lq(a,b,c){var d=a.Sd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.ti+a.ui,e=Math.max(0,Mq(a)+e);if(0===d.length)return c.nf=0,a.ue=1,e;if(!a.Zx){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.ue=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.Ik!==Gq?(c.xj=0,h=Kq(a,h,c,b),g+=h.height,a.ue+=c.xj):(Kq(a,h,c,b),g+=e,a.ue++),a.ue===a.vh&&(l=!0)),h=k+1;return a.qw=g} D.defineProperty(na,{RB:"textValidation"},function(){return this.Sl},function(a){var b=this.Sl;b!==a&&(null!==a&&D.h(a,"function",na,"textValidation"),this.Sl=a,this.i("textValidation",b,a))});D.defineProperty(na,{aH:"textEdited"},function(){return this.Et},function(a){var b=this.Et;b!==a&&(null!==a&&D.h(a,"function",na,"textEdited"),this.Et=a,this.i("textEdited",b,a))}); D.defineProperty(na,{wM:"spacingAbove"},function(){return this.ti},function(a){var b=this.ti;b!==a&&(v&&D.h(a,"number",na,"spacingAbove"),this.ti=a,this.i("spacingAbove",b,a))});D.defineProperty(na,{xM:"spacingBelow"},function(){return this.ui},function(a){var b=this.ui;b!==a&&(v&&D.h(a,"number",na,"spacingBelow"),this.ui=a,this.i("spacingBelow",b,a))}); D.defineProperty(na,{CJ:"maxLines"},function(){return this.vh},function(a){var b=this.vh;b!==a&&(v&&D.h(a,"number",na,"maxLines"),a=Math.floor(a),0>=a&&D.ua(a,"> 0",na,"maxLines"),this.vh=a,this.i("maxLines",b,a),this.K())});D.w(na,{XL:"metrics"},function(){return this.hi});D.defineProperty(na,{fL:"choices"},function(){return this.nr},function(a){var b=this.nr;b!==a&&(null===a||Array.isArray(a)||D.hc(a,"Array",na,"choices:value"),this.nr=a,this.i("choices",b,a))}); -function $p(){this.nf=this.xj=0;this.yf=[];this.Xe=[]}$p.prototype.reset=function(){this.nf=this.xj=0;this.yf=[];this.Xe=[]};$p.prototype.fq=function(a){this.xj=a.xj;this.nf=a.nf;this.yf=D.dm(a.yf);this.Xe=D.dm(a.Xe)};D.w($p,{cL:"arrSize"},function(){return this.yf});D.w($p,{dL:"arrText"},function(){return this.Xe});D.w($p,{WL:"maxLineWidth"},function(){return this.nf}); -function Fl(){P.call(this);this.Ze=null;this.xt="";this.Ak=ke;this.jp=pf;this.xi=this.$e=null;this.ip=hc;this.yg=Xj;this.Up=null;this.Hz=!1;this.dp=!0;this.nw=!1;this.Mp=null}D.Sa(Fl,P);D.ja("Picture",Fl);Fl.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.element=this.Ze;a.xt=this.xt;a.Ak=this.Ak.V();a.jp=this.jp;a.yg=this.yg;a.$e=this.$e;a.xi=this.xi;a.ip=this.ip.V();a.dp=this.dp;a.Mp=this.Mp}; +function $p(){this.nf=this.xj=0;this.zf=[];this.Xe=[]}$p.prototype.reset=function(){this.nf=this.xj=0;this.zf=[];this.Xe=[]};$p.prototype.fq=function(a){this.xj=a.xj;this.nf=a.nf;this.zf=D.dm(a.zf);this.Xe=D.dm(a.Xe)};D.w($p,{cL:"arrSize"},function(){return this.zf});D.w($p,{dL:"arrText"},function(){return this.Xe});D.w($p,{WL:"maxLineWidth"},function(){return this.nf}); +function Fl(){P.call(this);this.Ze=null;this.xt="";this.Ak=ke;this.jp=pf;this.xi=this.$e=null;this.ip=hc;this.yg=Xj;this.Up=null;this.Kz=!1;this.dp=!0;this.ow=!1;this.Mp=null}D.Sa(Fl,P);D.ja("Picture",Fl);Fl.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.element=this.Ze;a.xt=this.xt;a.Ak=this.Ak.V();a.jp=this.jp;a.yg=this.yg;a.$e=this.$e;a.xi=this.xi;a.ip=this.ip.V();a.dp=this.dp;a.Mp=this.Mp}; Fl.prototype.oc=function(a){a===Xj||a===Zj||a===ak?this.aJ=a:P.prototype.oc.call(this,a)};Fl.prototype.toString=function(){return"Picture("+this.source+")#"+D.Gd(this)};var Sq=new la,Tq=0,zl=[];function Uq(){var a=zl;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 pf:n=d.width;p=d.height;break;case Zj:case ak:var s=0;q===Zj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===ak&&(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.Gj()*b.scale,u=k*h/(n*q*p*q),s=Sq[this.source],q=null;if(void 0!==s&&16s.aq.length&&(Zq(s,4,l,m),Zq(s,16,l,m));for(var l=s.aq,m=l.length,q=l[0],t=0;ta)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.ib(!1);b=d.q;b.C=new R(0,a);b.D=uc;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);V(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=dc;b.D=new R(1,.6);D.u(a); return b},ExternalOrganization:function(a,b,c){a=a?a.Pc: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.ib(!1);b=d.q;b.C=new R(a/2,a/2);b.D=new R(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.ib(!1);b=a.q;b.C=new R(.25,.25);b.D=new R(.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.ib(!1);b=a.q;b.C=new R(0,.25);b.D=uc;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 R(0,.25);b.D=new R(.5,.75);D.u(a);return b},InternalStorage:function(a,b,c){var d=a?a.Pc:NaN;a=a?a.Pu: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.ib(!1);b=e.q;b.C=new R(d,a);b.D=uc;D.u(e);return b},Junction:function(a,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 R(0,.25);b.D=new R(.5,.75);D.u(a);return b},InternalStorage:function(a,b,c){var d=a?a.Pc:NaN;a=a?a.Qu: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.ib(!1);b=e.q;b.C=new R(d,a);b.D=uc;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*Fd;T(a,1*b,.5*c,!0);V(a,1*b,(.5+g)*c,(.5+g)*b,1*c,.5*b,1*c);V(a,(.5-g)*b,1*c,0,(.5+g)*c,0,.5*c);V(a,0,(.5-g)*c,(.5-g)*b,0,.5*b,0);V(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.ib(!1);b=a.q;b.je=Zj;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);V(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.ib(!1);b=a.q;b.C=new R(.1,0);b.D=new R(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 R(0,.25);b.D=uc;D.u(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=D.v();var d=.5*Fd;T(a,.5*b,1*c,!0);V(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);V(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);V(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);V(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 R(.15,.15);b.D=new R(.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 R(0,.25);b.D=uc;D.u(a);return b},MessageFromUser:function(a,b,c){a=a?a.Pc: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=dc;b.D=new R(a,1);D.u(d);return b}, @@ -1509,8 +1509,8 @@ MicroformProcessing:function(a,b,c){a=a?a.Pc:NaN;isNaN(a)&&(a=.25);var d=D.v();T T(a,b,0,!0);a.lineTo(b,.5*c);V(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);V(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);V(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.ib(!1);b=a.q;b.C=new R(0,.25);b.D=new R(.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.ib(!1);b=a.q;b.C=new R(0,.2);b.D=new R(.8,1);D.u(a);return b},OfflineStorage:function(a,b,c){a=a?a.Pc: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.ib(!1);b=e.q;b.C=new R(d/4+.5*a,a);b.D=new R(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=dc;b.D=new R(.75,1);D.u(a);return b},Or:function(a,b,c){a=D.v();var d=.5*Fd;T(a,1*b,.5*c,!0);V(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);V(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);V(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);V(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.ib(!1);b=a.q;b.je=Zj;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);V(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);V(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=new R(0,.49);b.D=new R(1,.75);D.u(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Pc:NaN;a=a?a.Pu: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 R(d,0);b.D=new R(1-a,1);D.u(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Pc:NaN;a=a?a.Pu: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 R(d,0);b.D=new R(1-a,1);D.u(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Pc: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, +(.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.ib(!1);b=a.q;b.je=Zj;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);V(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);V(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=new R(0,.49);b.D=new R(1,.75);D.u(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Pc:NaN;a=a?a.Qu: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 R(d,0);b.D=new R(1-a,1);D.u(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Pc:NaN;a=a?a.Qu: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 R(d,0);b.D=new R(1-a,1);D.u(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Pc: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.ib(!1);b=d.q;b.C=new R(a,0);b.D=new R(1-a,1);D.u(d);return b},Process:function(a,b,c){a=a?a.Pc: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.ib(!1);b=d.q;b.C=new R(a,0);b.D=uc;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.ib(!1);b=a.q;b.C=new R(.25,.25);b.D=new R(.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.ib(!1);b=a.q;b.C=new R(.25,0);b.D=new R(.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 R(.23,0); b.D=new R(.77,1);D.u(a);return b},TransmittalTape:function(a,b,c){a=a?a.Pc: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=dc;b.D=new R(1,1-a);D.u(d);return b},AndGate:function(a,b,c){a=D.v();var d=.5*Fd;T(a,0,0,!0);a.lineTo(.5*b,0);V(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);V(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=dc;b.D=new R(.55,1);D.u(a);return b},Buffer:function(a,b,c){a=D.v();T(a, @@ -1550,45 +1550,45 @@ TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 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 sq(a){var b=oe[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=oe[c];if(void 0===b){var d=null,e;for(e in vq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=wf(vq[d],!1),oe[d]=a,c!==d&&(oe[c]=d),d}}return"string"===typeof b?b:b instanceof Ye?a:null} -function F(a){x.call(this,a);this.S=2408959;this.Gl=this.Ni="";this.et=this.bt=this.nt=this.os=null;this.pt="";this.mh=this.bs=this.ot=this.rn=null;this.dt="";this.Ip=null;this.ct=je;this.ft="";this.Jp=null;this.Sd="";this.kw=this.qr=this.sl=null;this.hj=(new O(NaN,NaN)).freeze();this.ts="";this.Jl=null;this.us=dc;this.Cs=Vd;this.vs=Wd;this.Kr=null;this.ps=er;this.tn=Ud;this.sn="gray";this.Ng=4;this.xD=-1;this.Nt=NaN;this.tH=new B;this.Ll=null;this.tk=NaN}D.Sa(F,x);D.ja("Part",F); +function F(a){x.call(this,a);this.S=2408959;this.Gl=this.Ni="";this.et=this.bt=this.nt=this.os=null;this.pt="";this.mh=this.bs=this.ot=this.rn=null;this.dt="";this.Ip=null;this.ct=je;this.ft="";this.Jp=null;this.Sd="";this.lw=this.qr=this.sl=null;this.hj=(new O(NaN,NaN)).freeze();this.ts="";this.Jl=null;this.us=dc;this.Cs=Vd;this.vs=Wd;this.Kr=null;this.ps=er;this.tn=Ud;this.sn="gray";this.Ng=4;this.xD=-1;this.Nt=NaN;this.tH=new B;this.Ll=null;this.tk=NaN}D.Sa(F,x);D.ja("Part",F); F.prototype.cloneProtected=function(a){x.prototype.cloneProtected.call(this,a);a.S=this.S&-4097|49152;a.Ni=this.Ni;a.Gl=this.Gl;a.os=this.os;a.nt=this.nt;a.bt=this.bt;a.et=this.et;a.pt=this.pt;a.ot=this.ot;a.bs=this.bs;a.mh=null;a.dt=this.dt;a.ct=this.ct.V();a.ft=this.ft;a.Sd=this.Sd;a.qr=this.qr;a.hj.assign(this.hj);a.ts=this.ts;a.us=this.us.V();a.Cs=this.Cs.V();a.vs=this.vs.V();a.Kr=this.Kr;a.ps=this.ps;a.tn=this.tn.V();a.sn=this.sn;a.Ng=this.Ng;a.Nt=this.Nt}; -F.prototype.Ci=function(a){x.prototype.Ci.call(this,a);a.Vk();a.rn=null;a.Ip=null;a.Jp=null;a.Jl=null;a.Ll=null};F.prototype.toString=function(){var a=D.qf(Object.getPrototypeOf(this))+"#"+D.Gd(this);null!==this.data&&(a+="("+ja(this.data)+")");return a};F.LayoutNone=0;var Sm;F.LayoutAdded=Sm=1;var an;F.LayoutRemoved=an=2;F.LayoutShown=4;F.LayoutHidden=8;F.LayoutNodeSized=16;var Hn;F.LayoutGroupLayout=Hn=32;F.LayoutNodeReplaced=64;var er;F.LayoutStandard=er=Sm|an|28|Hn|64;F.LayoutAll=16777215; +F.prototype.Ci=function(a){x.prototype.Ci.call(this,a);a.Vk();a.rn=null;a.Ip=null;a.Jp=null;a.Jl=null;a.Ll=null};F.prototype.toString=function(){var a=D.rf(Object.getPrototypeOf(this))+"#"+D.Gd(this);null!==this.data&&(a+="("+ja(this.data)+")");return a};F.LayoutNone=0;var Sm;F.LayoutAdded=Sm=1;var an;F.LayoutRemoved=an=2;F.LayoutShown=4;F.LayoutHidden=8;F.LayoutNodeSized=16;var Hn;F.LayoutGroupLayout=Hn=32;F.LayoutNodeReplaced=64;var er;F.LayoutStandard=er=Sm|an|28|Hn|64;F.LayoutAll=16777215; F.prototype.ro=function(a,b,c,d,e,g,h){var k=this.g;null!==k&&(a===dg&&"elements"===b?e instanceof x?Tm(e,function(a){Vm(k,a);Um(k,a)}):e instanceof Fl&&tn(k,e):a===og&&"elements"===b&&(e instanceof x?Tm(e,function(a){Zm(k,a);Ym(k,a)}):e instanceof Fl&&un(k,e)),k.hd(a,b,c,d,e,g,h))};F.prototype.updateTargetBindings=F.prototype.Nb=function(a){x.prototype.Nb.call(this,a);if(null!==this.data){a=this.ya.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.righta&&(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.$d,a,b.Xa,this,b.ZB===Cl);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.$d,a,b.Xa,this,b.ZB===Cl);b.Ph=!1}};function Jr(a,b,c,d,e,g,h){for(var k=g===a?!1:a.td,l=c?a.Gx():a.Xg();l.next();){var m=l.value;m.Vc&&(k||m.lh||m.gc(),m=m.RA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Jd(!0),m.Vk(),h&&nl(e,m,g)),2a&&(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.$d,a,b.Xa,this,b.ZB===Cl);b.Ph=!1}};function Jr(a,b,c,d,e,g,h){for(var k=g===a?!1:a.td,l=c?a.Jx():a.Xg();l.next();){var m=l.value;m.Vc&&(k||m.lh||m.gc(),m=m.RA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Jd(!0),m.Vk(),h&&nl(e,m,g)),2a&&(a-=180);break;case Wp:a=Ue(c+90);90a&&(a-=180);break;case Yp:a=Ue(c-90);90a&&(a-=180);break;case Zp:a=Ue(c);if(45a||225a)return 0;90a&&(a-=180)}return Ue(a)}; @@ -1673,33 +1673,33 @@ D.defineProperty(J,{om:"fromEndSegmentLength"},function(){return null!==this.Z?t D.defineProperty(J,{mu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.gk:xr},function(a){this.Wd();var b=this.Z.gk;b!==a&&(D.Pn("Link.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"fromEndSegmentDirection"),this.Z.gk=a,this.i("fromEndSegmentDirection",b,a),this.gc())}); D.defineProperty(J,{nu:"fromShortLength"},function(){return null!==this.Z?this.Z.ik:NaN},function(a){this.Wd();var b=this.Z.ik;b!==a&&(v&&D.h(a,"number",J,"fromShortLength"),this.Z.ik=a,this.i("fromShortLength",b,a),this.gc())});D.defineProperty(J,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Gk:Vc},function(a){this.Wd();var b=this.Z.Gk;b.P(a)||(v&&D.l(a,R,J,"toSpot"),a=a.V(),this.Z.Gk=a,this.i("toSpot",b,a),this.gc())}); D.defineProperty(J,{Dm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Ek:NaN},function(a){this.Wd();var b=this.Z.Ek;b!==a&&(v&&D.h(a,"number",J,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",J,"toEndSegmentLength"),this.Z.Ek=a,this.i("toEndSegmentLength",b,a),this.gc())}); -D.defineProperty(J,{ev:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Dk:xr},function(a){this.Wd();var b=this.Z.Dk;b!==a&&(D.Pn("Link.toEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"toEndSegmentDirection"),this.Z.Dk=a,this.i("toEndSegmentDirection",b,a),this.gc())});D.defineProperty(J,{fv:"toShortLength"},function(){return null!==this.Z?this.Z.Fk:NaN},function(a){this.Wd();var b=this.Z.Fk;b!==a&&(v&&D.h(a,"number",J,"toShortLength"),this.Z.Fk=a,this.i("toShortLength",b,a),this.gc())}); -function wn(a){var b=a.aa,c=a.da;null!==b?null!==c?Rr(a,b.FI(c)):Rr(a,null):Rr(a,null)}function Rr(a,b){var c=a.sl;if(c!==b){null!==c&&rr(c,a);a.sl=b;null!==b&&sr(b,a);var d=a.TE;if(null!==d){var e=!0,g=a.g;null!==g&&(e=g.ab,g.ab=!0);d(a,c,b);null!==g&&(g.ab=e)}!a.lh||a.iE!==c&&a.jE!==c||a.gc()}}J.prototype.Vk=function(){var a=this.Pa;null!==a&&this.aa!==a&&this.da!==a&&a.tx&&F.prototype.Vk.call(this)}; -J.prototype.getOtherNode=J.prototype.RA=function(a){v&&D.l(a,G,J,"getOtherNode:node");var b=this.aa;return a===b?this.da:b};J.prototype.getOtherPort=function(a){v&&D.l(a,P,J,"getOtherPort:port");var b=this.Lc;return a===b?this.kd:b};D.w(J,{LL:"isLabeledLink"},function(){return null===this.zf?!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.Ki(g),h=2;h=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.Ki(g),h=2;hc&&(c=-c)):zb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Cf(d)),g.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}D.Ba(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,{gG:"midAngle"},function(){this.Ao();return this.computeMidAngle()}); +return a}e=0;g=D.tb();for(h=0;hc&&(c=-c)):zb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Df(d)),g.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}D.Ba(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,{gG:"midAngle"},function(){this.Ao();return this.computeMidAngle()}); J.prototype.computeMidAngle=function(){var a=this.ta;if(2>a)return NaN;if(this.computeCurve()===Sj&&4<=a&&!this.rc){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 rb(((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))?e>c+10?d.Yb(a):b.Yb(a):b.Yb(d);b=this.m(c-1);d=this.m(c);a=this.m(c+1);c=b.Cf(d);e=d.Cf(a);return c>e+10?b.Yb(d):e>c+10?d.Yb(a):b.Yb(a)}; +c=b.Df(d),e=d.Df(a),!(c>e+10))?e>c+10?d.Yb(a):b.Yb(a):b.Yb(d);b=this.m(c-1);d=this.m(c);a=this.m(c+1);c=b.Df(d);e=d.Df(a);return c>e+10?b.Yb(d):e>c+10?d.Yb(a):b.Yb(a)}; D.defineProperty(J,{points:"points"},function(){return this.bd},function(a){var b=this.bd;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>l?-1:1)*p+r,t=n*(u- @@ -1710,19 +1710,19 @@ m&&(A=g.eb(hc,D.O()),N=D.Fb(A.x+1E3*y,A.y+1E3*w),this.getLinkPointFromPoint(e,g, function Xr(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 O);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.Q;null===e||e.kh()||(e=e.Q);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.Xs;null===c&&(c=new Zr,c.port=b,c.Wc=b.Y,b.Xs=c);return $r(c,a)} -J.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new O);if(c.fd())return b.eb(c,k),k;if(c.Lj()){var l=Yr(this,b);if(null!==l){k.assign(l.Aq);if(e&&this.zy===Or){var m=Yr(this,h);if(null!==m&&l.Mn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.Jj(vc)||c.Jj(Bc))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);D.A(l);D.A(m)}}return k}}c=b.eb(hc,D.O());l=g=null;this.ta> +J.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new O);if(c.fd())return b.eb(c,k),k;if(c.Lj()){var l=Yr(this,b);if(null!==l){k.assign(l.Aq);if(e&&this.Cy===Or){var m=Yr(this,h);if(null!==m&&l.Mn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.Jj(vc)||c.Jj(Bc))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);D.A(l);D.A(m)}}return k}}c=b.eb(hc,D.O());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.O(),l=h.eb(hc,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.fd())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.O(),n=k.eb(hc,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.Zd()&&h.Ei(a)&&(c+=180,360<=c&&(c-=360));a=xr;a=e?this.mu:this.ev;a===xr&&(a=e?b.mu:b.ev);switch(a){case yr:b=b.Tn();c+=b;360<=c&&(c-=360);break;case xr:case Do:b=b.Tn();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.Lj()&&(a=Yr(this,b),null!==a))return a.Cx;a=NaN;a=d?this.om:this.Dm;null!==b&&isNaN(a)&&(a=d?b.om:b.Dm);isNaN(a)&&(a=10);return a};J.prototype.computeSpot=function(a){return a?Vr(this,this.Lc):Wr(this,this.kd)};function Vr(a,b){if(null===b)return hc;var c=a.Gb;c.ed()&&null!==b&&(c=b.Gb);return c===Vc?cc:c}function Wr(a,b){if(null===b)return hc;var c=a.Hb;c.ed()&&null!==b&&(c=b.Hb);return c===Vc?cc:c} -J.prototype.computeOtherPoint=function(a,b){var c=b.eb(hc),d;d=b.Xs;d=null!==d?$r(d,this):null;null!==d&&(c=d.Aq);return c};J.prototype.computeShortLength=function(a){if(a){if(a=this.nu,isNaN(a)){var b=this.Lc;null!==b&&(a=b.nu)}}else a=this.fv,isNaN(a)&&(b=this.kd,null!==b&&(a=b.fv));return isNaN(a)?0:a}; -J.prototype.Qk=function(a,b,c,d,e,g){if(!1===this.qg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.Pf(),h.reset());h.multiply(this.transform);if(this.Jn(a,h))return eq(this,b,c,e),void 0===g&&D.He(h),!0;if(this.fg(a,h)){var k=!1;if(!this.$n)for(var l=this.ya.o,m=l.length;m--;){var n=l[m];if(n.visible||n===this.uf){var p=n.$,q=this.Ga;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=D.Pf();p.set(h);if(n instanceof x)k=n.Qk(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.qg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.Jn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Nk(k.$))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,y=D.O(),w=D.O(),C=D.O(),A=D.Pf();A.set(t);A.pB(k.transform);A.Px();w.x=r;w.y=s;w.transform(A);y.x=q;y.y=s;y.transform(A);t=!1;rq(k,y,w,C)?t=!0:(y.x=r,y.y=u,y.transform(A),rq(k,y,w,C)?t=!0:(w.x=q,w.y=u,w.transform(A),rq(k,y,w,C)?t=!0:(y.x=q,y.y=s,y.transform(A),rq(k,y,w,C)&& +l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;D.A(l)}d.Zd()&&h.Ei(a)&&(c+=180,360<=c&&(c-=360));a=xr;a=e?this.mu:this.fv;a===xr&&(a=e?b.mu:b.fv);switch(a){case yr:b=b.Tn();c+=b;360<=c&&(c-=360);break;case xr:case Do:b=b.Tn();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.Lj()&&(a=Yr(this,b),null!==a))return a.Fx;a=NaN;a=d?this.om:this.Dm;null!==b&&isNaN(a)&&(a=d?b.om:b.Dm);isNaN(a)&&(a=10);return a};J.prototype.computeSpot=function(a){return a?Vr(this,this.Lc):Wr(this,this.kd)};function Vr(a,b){if(null===b)return hc;var c=a.Gb;c.ed()&&null!==b&&(c=b.Gb);return c===Vc?cc:c}function Wr(a,b){if(null===b)return hc;var c=a.Hb;c.ed()&&null!==b&&(c=b.Hb);return c===Vc?cc:c} +J.prototype.computeOtherPoint=function(a,b){var c=b.eb(hc),d;d=b.Xs;d=null!==d?$r(d,this):null;null!==d&&(c=d.Aq);return c};J.prototype.computeShortLength=function(a){if(a){if(a=this.nu,isNaN(a)){var b=this.Lc;null!==b&&(a=b.nu)}}else a=this.gv,isNaN(a)&&(b=this.kd,null!==b&&(a=b.gv));return isNaN(a)?0:a}; +J.prototype.Qk=function(a,b,c,d,e,g){if(!1===this.qg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.Pf(),h.reset());h.multiply(this.transform);if(this.Jn(a,h))return eq(this,b,c,e),void 0===g&&D.He(h),!0;if(this.fg(a,h)){var k=!1;if(!this.$n)for(var l=this.ya.o,m=l.length;m--;){var n=l[m];if(n.visible||n===this.vf){var p=n.$,q=this.Ga;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=D.Pf();p.set(h);if(n instanceof x)k=n.Qk(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.qg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.Jn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Nk(k.$))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,y=D.O(),w=D.O(),C=D.O(),A=D.Pf();A.set(t);A.pB(k.transform);A.Sx();w.x=r;w.y=s;w.transform(A);y.x=q;y.y=s;y.transform(A);t=!1;rq(k,y,w,C)?t=!0:(y.x=r,y.y=u,y.transform(A),rq(k,y,w,C)?t=!0:(w.x=q,w.y=u,w.transform(A),rq(k,y,w,C)?t=!0:(y.x=q,y.y=s,y.transform(A),rq(k,y,w,C)&& (t=!0))));D.He(A);D.A(y);D.A(w);D.A(C);k=t}}else k=k.Jn(r,q)}}else k=Jo(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.He(p)}}}void 0===g&&D.He(h);return k||null!==this.background||null!==this.$l}void 0===g&&D.He(h);return!1};D.w(J,{rc:"isOrthogonal"},function(){return 2===(this.mn.value&2)});D.w(J,{Oh:"isAvoiding"},function(){return 4===(this.mn.value&4)}); -J.prototype.computeCurve=function(){if(null===this.Yi){var a=this.Lc,b=this.rc;this.Yi=null!==a&&a===this.kd&&!b}return this.Yi?Sj:this.gf};J.prototype.computeCorner=function(){if(this.gf===Sj)return 0;var a=this.AA;if(isNaN(a)||0>a)a=10;return a};J.prototype.findMidLabel=function(){for(var a=this.path,b=this.ya.o,c=b.length,d=0;da)a=10;return a};J.prototype.findMidLabel=function(){for(var a=this.path,b=this.ya.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;zb(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.fh(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.fh(c,d)}}return!0;case Nr:g=this.m(a);p=this.m(c);if(!g.Tc(b)||!p.Tc(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.fh(a,b);for(a+=1;ah.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new O(a.x,Math.max((a.y+c.y)/2,a.y)),m=new O(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.Oa(a)||h.Oa(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 O(a.x,Math.min((a.y+c.y)/2,a.y)),m=new O(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=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.En/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.Fn/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.yj(g.x,u.y):this.yj(u.x,g.y));b=!0}else b=!1}}}else b=!1;b||(this.Ai(l),this.Ai(m))}};J.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2}; function Mi(a){if(null===a.g||!a.Oh)return!1;var b=a.points.o,c=b.length;if(4>c)return!1;a=ha(a.g,!0,a.Pa,null);for(var d=1;da)return new Ye(qf);var b=!1,c=this.g;null!==c&&Sr(this)&&c.ul.contains(this)&&null!==this.Hw&&(b=!0);var d=c=0,e=this.m(0).copy(),g=e.copy(),c=this.bd.o,h=this.computeCurve();if(h===Sj&&3<=a&&!zb(this.Sq,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.rc)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;ka)return new Ye(qf);var b=!1,c=this.g;null!==c&&Sr(this)&&c.ul.contains(this)&&null!==this.Kw&&(b=!0);var d=c=0,e=this.m(0).copy(),g=e.copy(),c=this.bd.o,h=this.computeCurve();if(h===Sj&&3<=a&&!zb(this.Sq,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.rc)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-A,u.y=q-A,t.x=w+s,t.y=q+s):(u.x=w-A,u.y=q+A,t.x=w+s,t.y=q-s):r>q?(u.x=w+A,u.y=q-A,t.x=w-s,t.y=q+s):(u.x=w+A,u.y=q+A,t.x=w-s,t.y=q-s));zb(y,w)&&zb(q,r)&&(q>p?(C>w?(u.x= w-A,u.y=q-A,t.x=w+s):(u.x=w+A,u.y=q-A,t.x=w-s),t.y=q+s):(C>w?(u.x=w-A,u.y=q+A,t.x=w+s):(u.x=w+A,u.y=q+A,t.x=w-s),t.y=q-s));if(zb(y,w)&&zb(w,C)||zb(p,q)&&zb(q,r))y=.5*(y+C),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&&zb(b.x,this.m(0).x)&&zb(b.y,this.m(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));V(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,Gd));k=.5*(k+g.x); b=.5*(b+g.y);V(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,Gd)),V(l,b.x-c,b.y-d,g.x-c,g.y-d,e.x-c,e.y-d);else{g=D.O();g.assign(this.m(0));for(k=1;k=a-1){g!==u&&(0!==this.computeShortLength(!1)&&(u=es(this,u.copy(),!1,Gd)),hs(this,l,-c,-d,g,u,b));break}k=fs(this,u,k+1,kp-10)m--,p=Math.max(q-5,g.x);else break;q=g.y-10+d;n=p+c; m;)if(q=h[m],q>p-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.gf===tj?T(b,n,p,!1,!1):V(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.P(c))return 0;for(e=e.co;e.next();){var g=e.value;if(null!==g&&g.visible)for(var g=g.qb.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,{iu:"firstPickIndex"},function(){var a;2>=this.ta?a=0:((a=this.rc)||(a=this.computeSpot(!0)!==cc),a=a?1:0);return a});D.w(J,{$x:"lastPickIndex"},function(){var a=this.ta;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.rc)||(b=this.computeSpot(!1)!==cc);a=b?a-2:a-1}return a});function Sr(a){a=a.gf;return a===sj||a===tj} -function Ur(a,b){if(b||Sr(a)){var c=a.g;null===c||c.ul.contains(a)||null===a.Hw||c.ul.add(a,a.Hw)}}function Bj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Uc){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.qb.o,k=g.length,l=0;lh&&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,{iu:"firstPickIndex"},function(){var a;2>=this.ta?a=0:((a=this.rc)||(a=this.computeSpot(!0)!==cc),a=a?1:0);return a});D.w(J,{ey:"lastPickIndex"},function(){var a=this.ta;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.rc)||(b=this.computeSpot(!1)!==cc);a=b?a-2:a-1}return a});function Sr(a){a=a.gf;return a===sj||a===tj} +function Ur(a,b){if(b||Sr(a)){var c=a.g;null===c||c.ul.contains(a)||null===a.Kw||c.ul.add(a,a.Kw)}}function Bj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Uc){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.qb.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.Wf=Math.floor((a.x-this.ce)/this.ce)*this.ce;this.Xf=Math.floor((b-this.Md)/this.Md)*this.Md;this.ws=Math.ceil((c+2*this.ce)/this.ce)*this.ce;this.xs=Math.ceil((d+2*this.Md)/this.Md)*this.Md;a=1+(Math.ceil((this.ws-this.Wf)/this.ce)|0);b=1+(Math.ceil((this.xs-this.Xf)/this.Md)|0);if(null===this.nd||this.yn=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case D.Zc|D.wd:return c>a&&c<=180+a?180:270;case D.wd|D.md:return c>180-a&&c<=360-a?270:0;case D.md|D.ld:return c>a&&c<=180+a?90:0;case D.ld|D.Zc:return c>180-a&&c<=360-a?180:90;case D.Zc|D.wd|D.md:return 90180+a&&c<=360- a?270:0;case D.wd|D.md|D.ld:return 180a&&180>=c?90:0;case D.md|D.ld|D.Zc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case D.ld|D.Zc|D.wd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(D.Zc|D.wd|D.md|D.ld)&&(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.vq=function(){this.lg.length=0}; function $r(a,b){var c=a.lg;if(0===c.length){a:if(!a.Cq){c=a.Cq;a.Cq=!0;var d,e=null,g=a.Wc,g=g instanceof I?g:null;if(null===g||g.Je)d=a.Wc.oF(a.port.ud);else{if(!g.$.F()){a.Cq=c;break a}e=g;d=e.nF()}var h=a.lg.length=0,k=a.port.eb(dc,D.O()),l=a.port.eb(uc,D.O()),g=D.sg(k.x,k.y,0,0);g.Ki(l);D.A(k);D.A(l);k=D.Fb(g.x+g.width/2,g.y+g.height/2);for(d=d.j;d.next();)if(l=d.value,l.isVisible()){var m=l.Lc===a.port||l.aa.Ei(e),n=l.computeSpot(m);if(n.Lj()&&(m=m?l.kd:l.Lc,null!==m)){var p=m.Y;if(null!==p){var m= -l.computeOtherPoint(p,m),p=k.Yb(m),n=os(g,n,p,l.rc),q=0;0===n?(q=D.md,180Math.abs(H)?(C=Math.abs(H)/ q,q=Math.abs(H)):C=1;break;case D.Zc:r>Math.abs(N)?(C=Math.abs(N)/r,r=Math.abs(N)):C=1;break;case D.wd:m>Math.abs(H)?(C=Math.abs(H)/m,m=Math.abs(H)):C=1;break;default:case D.md:p>Math.abs(N)?(C=Math.abs(N)/p,p=Math.abs(N)):C=1}w=0}var W=u.Aq;if(e===zr){t=u.link.computeThickness();t*=C;W.set(A);switch(y){case D.ld:W.x=A.x+H/2+q/2-w-t/2;break;case D.Zc:W.y=A.y+N/2+r/2-w-t/2;break;case D.wd:W.x=A.x+H/2-m/2+w+t/2;break;default:case D.md:W.y=A.y+N/2-p/2+w+t/2}w+=t}else t=.5,e===wr&&(t=(u.sq+1)/(u.Mn+1)), -W.x=A.x+H*t,W.y=A.y+N*t}D.A(k);D.A(d);D.A(l);D.A(n);A=a.lg;for(H=0;Hb.Ke?1:a.angleb.angle?1:0}; -Zr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Wc,this.port,cc,b.Lc===this.port),d=a.sq;if(0>d)return c;var e=a.Mn;if(1>=e||!b.rc)return c;var b=a.my,g=a.Aq;if(a.Ke===D.Zc||a.Ke===D.ld)d=e-1-d;return((a=a.Ke===D.Zc||a.Ke===D.md)?b.yb.Ke?1:a.angleb.angle?1:0}; +Zr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Wc,this.port,cc,b.Lc===this.port),d=a.sq;if(0>d)return c;var e=a.Mn;if(1>=e||!b.rc)return c;var b=a.py,g=a.Aq;if(a.Ke===D.Zc||a.Ke===D.ld)d=e-1-d;return((a=a.Ke===D.Zc||a.Ke===D.md)?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(Wj,{padding:"padding"},function(){return this.of},function(a){"number"===typeof a?a=new Ib(a):D.l(a,Ib,Wj,"padding");var b=this.of;b.P(a)||(this.of=a=a.V(),this.i("padding",b,a))});function Wg(){0e&&(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(Wj,{padding:"padding"},function(){return this.of},function(a){"number"===typeof a?a=new Ib(a):D.l(a,Ib,Wj,"padding");var b=this.of;b.P(a)||(this.of=a=a.V(),this.i("padding",b,a))});function Wg(){0=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.Td("Layout")}this.If=!0};Wg.prototype.oo=function(a){return!a.location.F()||a instanceof I&&a.oo?!0:!1}; -function ss(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.yq||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof G?l.tf||(l instanceof I?null===l.Vb?ss(a,b,l.Nc,!1,e,g,h,k):(ts(l),b.add(l)):(ts(l),b.add(l))):h&&l instanceof J?b.add(l):!k||!l.oe()||l instanceof G||(ts(l),b.add(l)))}}function ts(a){var b=a.$;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.hf()} +function ss(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.yq||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof G?l.uf||(l instanceof I?null===l.Vb?ss(a,b,l.Nc,!1,e,g,h,k):(ts(l),b.add(l)):(ts(l),b.add(l))):h&&l instanceof J?b.add(l):!k||!l.oe()||l instanceof G||(ts(l),b.add(l)))}}function ts(a){var b=a.$;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.hf()} Wg.prototype.collectParts=Wg.prototype.bI=function(a){var b=new L(F);a instanceof E?(ss(this,b,a.og,!0,null,!0,!0,!0),ss(this,b,a.links,!0,null,!0,!0,!0),ss(this,b,a.Gi,!0,null,!0,!0,!0)):a instanceof I?ss(this,b,a.Nc,!1,null,!0,!0,!0):ss(this,b,a.j,!1,null,!0,!0,!0);return b};D.defineProperty(Wg,{Ae:"arrangementOrigin"},function(){return this.fr},function(a){D.l(a,O,Wg,"arrangementOrigin");this.fr.P(a)||(this.fr.assign(a),this.N())}); Wg.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.eb(dc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; -function va(){D.uc(this);this.te=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(wa);this.edges=new L(xa);this.jy=new ma(G,wa);this.by=new ma(J,xa)}D.ja("LayoutNetwork",va); -va.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(wa);this.edges=new L(xa);this.jy=new ma(G,wa);this.by=new ma(J,xa)}; +function va(){D.uc(this);this.te=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(wa);this.edges=new L(xa);this.my=new ma(G,wa);this.hy=new ma(J,xa)}D.ja("LayoutNetwork",va); +va.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(wa);this.edges=new L(xa);this.my=new ma(G,wa);this.hy=new ma(J,xa)}; va.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Vb?"("+this.Vb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; wa.smartComparer=function(a,b){v&&D.l(a,wa,wa,"smartComparer:m");v&&D.l(b,wa,wa,"smartComparer:n");if(null!==a){if(null!==b){var c=a.Cd,d=b.Cd;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.ac("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 B(0,y,h+k,C)),w=0,t=u,y+=C,C=0;C=Math.max(C,N);N=0;switch(s){case Gs:N=-q.width;break;default:N=0}p.moveTo(t+N,y);switch(s){case Gs:t-=A;break; -default:t+=A}w++}d.push(new B(0,y,h+k,C));break;case zs:k=g;l=a;m=c;n=Math.max(this.bq.width,1);p=y=A=0;q=D.O();for(g=0;g=A&&(h-=A);for(var A=N=0,H=Math.max(this.bq.height,1),fa=p=0,S=!0,ba=D.O(),g=0;gk-1||0h){d.push(new B(0,S?w-p:w,h+l,fa+p+m));for(W=0;W=A&&(h-=A);for(var A=N=0,H=Math.max(this.bq.height,1),fa=p=0,S=!0,ba=D.O(),g=0;gk-1||0h){d.push(new B(0,S?w-p:w,h+l,fa+p+m));for(W=0;WA&&(e.width+=e.x-A,e.x=A)}for(k=g=h=e=0;kd?1:0}; Un.smartComparer=function(a,b){v&&D.l(a,F,Un,"standardComparer:a");v&&D.l(b,F,Un,"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.oa=0,a.va=0);else{var b=new K($s);b.Sc(a.j);a=new K($s);var c=new K($s),d;d=this.sort(b);var e=this.uz,g=this.aD,h=this.fe,k=this.ap,l=this.vz,m=this.Mr,b=this.vl,n=this.rE,p=this.Tg,q=this.Cv,e=this.ag,g=this.iy,h=this.UJ;if(!isFinite(h)|| -0>=h)h=NaN;k=this.VH;if(!isFinite(k)||0>=k)k=1;l=this.Le;isFinite(l)||(l=0);m=this.xf;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.ag);if((this.direction===Ss||this.direction===Ts)&&this.sorting!==Ms){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===Ss?(this.ag===Xs&&a.reverse(),d=new K($s),d.Sc(a),d.Sc(c)):(this.ag===Xs&&c.reverse(),d=new K($s),d.Sc(c),d.Sc(a))}for(var s= +Is.prototype.doLayout=function(a){null===a&&D.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.network.vertexes;if(1>=a.count)1===a.count&&(a=a.first(),a.oa=0,a.va=0);else{var b=new K($s);b.Sc(a.j);a=new K($s);var c=new K($s),d;d=this.sort(b);var e=this.xz,g=this.aD,h=this.fe,k=this.ap,l=this.yz,m=this.Mr,b=this.vl,n=this.rE,p=this.Tg,q=this.Dv,e=this.ag,g=this.ly,h=this.UJ;if(!isFinite(h)|| +0>=h)h=NaN;k=this.VH;if(!isFinite(k)||0>=k)k=1;l=this.Le;isFinite(l)||(l=0);m=this.yf;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.ag);if((this.direction===Ss||this.direction===Ts)&&this.sorting!==Ms){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===Ss?(this.ag===Xs&&a.reverse(),d=new K($s),d.Sc(a),d.Sc(c)):(this.ag===Xs&&c.reverse(),d=new K($s),d.Sc(c),d.Sc(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.uz=e;this.aD=g;this.fe=h;this.ap=k;this.vz=l;this.Mr=m;this.vl=b;this.rE=n;this.Tg=p;this.Cv=q;b=d;d=this.uz;e=this.fe;g=this.vz;k=this.Mr;l=this.vl;m=this.Tg;n=this.Cv;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+ +m*Math.PI/180);r>h?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.xz=e;this.aD=g;this.fe=h;this.ap=k;this.yz=l;this.Mr=m;this.vl=b;this.rE=n;this.Tg=p;this.Dv=q;b=d;d=this.xz;e=this.fe;g=this.yz;k=this.Mr;l=this.vl;m=this.Tg;n=this.Dv;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.If=!0}; function gt(a,b,c,d,e){var g=a.Mr,h=a.fe;a=a.Tg;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;180c){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.hn++;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.hn?a.fe-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.hn++;if(!(23a.hn?a.fe-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.hn++;if(!(23a.hn?a.fe-g/(2*Math.PI):a.fe-(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.fe,l=a.Tg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.vl;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.yu&&this.commitLinks()}; +function lt(a,b,c,d,e,g,h){var k=a.fe,l=a.Tg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.vl;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.zu&&this.commitLinks()}; Is.prototype.commitNodes=function(){for(var a=this.KH,b=this.network.vertexes.j;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};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.BH;if(.001>Math.abs(a.ap-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.ap-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}} @@ -1898,59 +1898,59 @@ b[e]++;for(g=g.qc;g.next();)e=a.indexOf(g.value.toVertex),0>e||0<=b[e]&&b[e]++}a else{for(var q=Infinity,r=Infinity,s=-1,u=[],p=0;pa[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;pN.indexOf(S)||baN.indexOf(S)|| ba=t?l+1:l)),w+=l=t&&l++,A>=t&&A++,l>A&&(N=A,A=l,l=N),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 g=!1;if(g)break;else b.push(c[0]),c.splice(0,1)}for(g=0;g=a?a:360,this.N())}); +D.defineProperty(Is,{VH:"aspectRatio"},function(){return this.hr},function(a){this.hr!==a&&(D.h(a,"number",Is,"aspectRatio"),0=a?a:360,this.N())}); D.defineProperty(Is,{ag:"arrangement"},function(){return this.xd},function(a){this.xd!==a&&(D.Da(a,Is,Is,"arrangement"),a===Xs||a===Js||a===Ws||a===Vs)&&(this.xd=a,this.N())});D.defineProperty(Is,{direction:"direction"},function(){return this.fa},function(a){this.fa!==a&&(D.Da(a,Is,Is,"direction"),a===Ls||a===Us||a===Ss||a===Ts)&&(this.fa=a,this.N())}); D.defineProperty(Is,{sorting:"sorting"},function(){return this.ri},function(a){this.ri!==a&&(D.Da(a,Is,Is,"sorting"),a===Qs||a===Rs||a===Os||Ps||a===Ms)&&(this.ri=a,this.N())});D.defineProperty(Is,{comparer:"comparer"},function(){return this.$h},function(a){this.$h!==a&&(D.h(a,"function",Is,"comparer"),this.$h=a,this.N())});D.defineProperty(Is,{spacing:"spacing"},function(){return this.si},function(a){this.si!==a&&(D.h(a,"number",Is,"spacing"),this.si=a,this.N())}); -D.defineProperty(Is,{iy:"nodeDiameterFormula"},function(){return this.Ns},function(a){this.Ns!==a&&(D.Da(a,Is,Is,"nodeDiameterFormula"),a===Ns||a===Ys)&&(this.Ns=a,this.N())});D.w(Is,{LH:"actualXRadius"},function(){return this.fe});D.w(Is,{MH:"actualYRadius"},function(){return this.Tg});D.w(Is,{GK:"actualSpacing"},function(){return this.vl});D.w(Is,{KH:"actualCenter"},function(){return isNaN(this.Ae.x)||isNaN(this.Ae.y)?new O(0,0):new O(this.Ae.x+this.LH,this.Ae.y+this.MH)});var Js; +D.defineProperty(Is,{ly:"nodeDiameterFormula"},function(){return this.Ns},function(a){this.Ns!==a&&(D.Da(a,Is,Is,"nodeDiameterFormula"),a===Ns||a===Ys)&&(this.Ns=a,this.N())});D.w(Is,{LH:"actualXRadius"},function(){return this.fe});D.w(Is,{MH:"actualYRadius"},function(){return this.Tg});D.w(Is,{GK:"actualSpacing"},function(){return this.vl});D.w(Is,{KH:"actualCenter"},function(){return isNaN(this.Ae.x)||isNaN(this.Ae.y)?new O(0,0):new O(this.Ae.x+this.LH,this.Ae.y+this.MH)});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.pq=-Infinity;this.Wq=this.Co=null} Ks.prototype.compare=function(a,b){if(0this.pq||Math.abs(a)a&&0g?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new O(n.x+n.width+d.width,n.y),l[1]=new O(n.x,n.y+n.height+d.height),g=2):(p=eu(l,g, e,k,n.width,n.height,d),q=l[p],r=new O(q.x+n.width+d.width,q.y),s=new O(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().mb,d=this.network.vertexes.j;d.next();){if(d.value.mb.fg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Sg?a.Sg=new K(ku):a.Sg.clear();a.Sg.Sc(a.network.vertexes);var c=a.Sg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.pg-a.pg});for(var d=c.count-1;0<=d&&1>=c.ea(d).pg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=qe((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.mb=new B(k-r.x-h,l-r.y-m,p+2*h,q+2*m);g.focus=new O(r.x+h,r.y+m)}a.network=d;return c}function ju(a,b,c){v&&(D.l(b,cu,vt,"popNetwork:oldnet"),D.p(c,vt,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.Vh){var e=d.Vh.ea(d.BB);d.pg=e.Oy;var g=e.hC,h=e.iC;d.mb=new B(d.oa-g,d.va-h,e.Py,e.Ny);d.focus=new O(g,h);d.BB--}}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,vt,"surroundNode:oldnet"),D.p(c,vt,"surroundNode:level"));var d=b.In;if(null!==d&&0!==d.count){c=b.oa;var e=b.va,g=b.width,h=b.height;null!==b.Vh&&0=p.pg?l++:(k=!0,m++,h+=Math.atan2(b.va-p.va,b.oa-p.oa))}if(0!==l)for(0=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=qe((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.mb=new B(k-r.x-h,l-r.y-m,p+2*h,q+2*m);g.focus=new O(r.x+h,r.y+m)}a.network=d;return c}function ju(a,b,c){v&&(D.l(b,cu,vt,"popNetwork:oldnet"),D.p(c,vt,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.Vh){var e=d.Vh.ea(d.BB);d.pg=e.Ry;var g=e.hC,h=e.iC;d.mb=new B(d.oa-g,d.va-h,e.Sy,e.Qy);d.focus=new O(g,h);d.BB--}}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,vt,"surroundNode:oldnet"),D.p(c,vt,"surroundNode:level"));var d=b.In;if(null!==d&&0!==d.count){c=b.oa;var e=b.va,g=b.width,h=b.height;null!==b.Vh&&0=p.pg?l++:(k=!0,m++,h+=Math.atan2(b.va-p.va,b.oa-p.oa))}if(0!==l)for(0>1)+m)*(0===k%2?1:-1);l.oa=c+n*Math.cos(p);l.va=e+n*Math.sin(p);k++}}} -function eu(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.yn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+g-k,e=e-l-h,qe(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,qe(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.oa,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.oa-b.oa}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.va-b.va});for(var h=a.ei,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.sy,null===n&&(a.sy=n=new Ia(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.R.right-k.R.x),n=(1+n)*m):dr?(p=Math.abs(e.R.bottom-k.R.y),p=(1+p)*s):ds?(n=a.sy,null===n&&(a.sy=n=new Ia(0)),m=n.random(),s= +b[c],l=k.R,q=k.W,d=l.x+q.x,l=l.y+q.y,n=k.charge*a.electricalFieldX(d,l),p=k.charge*a.electricalFieldY(d,l),n=n+k.mass*a.gravitationalFieldX(d,l),p=p+k.mass*a.gravitationalFieldY(d,l);k.forceX+=n;k.forceY+=p;for(q=c+1;qh||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.vy,null===n&&(a.vy=n=new Ia(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.R.right-k.R.x),n=(1+n)*m):dr?(p=Math.abs(e.R.bottom-k.R.y),p=(1+p)*s):ds?(n=a.vy,null===n&&(a.vy=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=Math.max(a.ei/20,50);for(e=0;ed&&(g=d),h<-d?h=-d:h>d&&(h=d),k.oa+=g,k.va+=h,c=Math.max(c,g*g+h*h));return c>a.mF*a.mF}vt.prototype.moveFixedVertex=function(){}; -vt.prototype.commitLayout=function(){this.IB();this.commitNodes();this.yu&&this.commitLinks()};vt.prototype.IB=function(){if(this.Qq)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Gb=Vc,b.Hb=Vc)}};vt.prototype.commitNodes=function(){var a=0,b=0;if(this.UH){var c=D.Of();this.Kh(this.network,c);b=this.Ae;a=b.x-c.x;b=b.y-c.y;D.Kb(c)}for(var c=D.Of(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.mb),c.x+=a,c.y+=b,e.mb=c;e.commit()}D.Kb(c)}; +vt.prototype.commitLayout=function(){this.IB();this.commitNodes();this.zu&&this.commitLinks()};vt.prototype.IB=function(){if(this.Qq)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Gb=Vc,b.Hb=Vc)}};vt.prototype.commitNodes=function(){var a=0,b=0;if(this.UH){var c=D.Of();this.Kh(this.network,c);b=this.Ae;a=b.x-c.x;b=b.y-c.y;D.Kb(c)}for(var c=D.Of(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.mb),c.x+=a,c.y+=b,e.mb=c;e.commit()}D.Kb(c)}; vt.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};vt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Xo:a};vt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Wo:a};vt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Uo:a};vt.prototype.electricalFieldX=function(){return 0};vt.prototype.electricalFieldY=function(){return 0}; vt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Vo:a};vt.prototype.gravitationalFieldX=function(){return 0};vt.prototype.gravitationalFieldY=function(){return 0};vt.prototype.isFixed=function(a){return a.isFixed};D.w(vt,{jL:"currentIteration"},function(){return this.ns});D.defineProperty(vt,{LE:"arrangementSpacing"},function(){return this.ug},function(a){D.l(a,Ca,vt,"arrangementSpacing");this.ug.P(a)||(this.ug.assign(a),this.N())}); D.defineProperty(vt,{UH:"arrangesToOrigin"},function(){return this.gr},function(a){this.gr!==a&&(D.h(a,"boolean",vt,"arrangesToOrigin"),this.gr=a,this.N())});D.defineProperty(vt,{Qq:"setsPortSpots"},function(){return this.qi},function(a){this.qi!==a&&(D.h(a,"boolean",vt,"setsPortSpots"),this.qi=a,this.N())});D.defineProperty(vt,{comments:"comments"},function(){return this.Zh},function(a){this.Zh!==a&&(D.h(a,"boolean",vt,"comments"),this.Zh=a,this.N())}); D.defineProperty(vt,{jB:"maxIterations"},function(){return this.Bp},function(a){this.Bp!==a&&(D.h(a,"number",vt,"maxIterations"),0<=a&&(this.Bp=a,this.N()))});D.defineProperty(vt,{mF:"epsilonDistance"},function(){return this.Qr},function(a){this.Qr!==a&&(D.h(a,"number",vt,"epsilonDistance"),0b.toVertex.index&&(a.yy(b),b.rev=!0);break;case ru:for(d=this.network.vertexes.j;d.next();)a=d.value,a.kq=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.Js=0;for(d.reset();d.next();)b=d.value,0===b.tc.count&&Bu(this,b);for(d.reset();d.next();)b=d.value,-1===b.kq&&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.kqb.toVertex.index&&(a.By(b),b.rev=!0);break;case ru:for(d=this.network.vertexes.j;d.next();)a=d.value,a.kq=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.Js=0;for(d.reset();d.next();)b=d.value,0===b.tc.count&&Bu(this,b);for(d.reset();d.next();)b=d.value,-1===b.kq&&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.kqu&&0u&&0d[this.Vf]&&(this.ow=d[b]-1,this.Vf=b),d[b]d[this.Vf]&&(this.pw=d[b]-1,this.Vf=b),d[b]c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Jg);a.Jg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Ou(a,b,a.Jg,-1,!0,!0),a.Jg++);var g=0;b=[];for(g=0;gc)for(k=a.Pb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -qu.prototype.commitLayout=function(){if(this.Qq)for(var a=Cu(this,!0),b=Cu(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.uA();this.yu&&this.commitLinks()};function Cu(a,b){return 270===a.fa?b?$c:id:90===a.fa?b?id:$c:180===a.fa?b?gd:hd:b?hd:gd} +qu.prototype.commitLayout=function(){if(this.Qq)for(var a=Cu(this,!0),b=Cu(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.vA();this.zu&&this.commitLinks()};function Cu(a,b){return 270===a.fa?b?$c:id:90===a.fa?b?id:$c:180===a.fa?b?gd:hd:b?hd:gd} qu.prototype.commitNodes=function(){this.Hg=[];this.Uf=[];this.Tf=[];this.Ub=[];for(var a=0;a<=this.yb;a++)this.Hg[a]=0,this.Uf[a]=0,this.Tf[a]=0,this.Ub[a]=0;for(a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;this.Hg[c]=Math.max(this.Hg[c],this.nodeMinLayerSpace(b,!0));this.Uf[c]=Math.max(this.Uf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.Zm,c=0;c<=this.yb;c++){var e=d;0>=this.Hg[c]+this.Uf[c]&&(e=0);0=l.R.right)be=(0===this.fa?hb:-mb)/2;b.B( sa,pa+hb)):270===this.fa?(b.B(U++,sa,pa+hb),S&&b.B(U++,sa,pa),b.B(U++,sa,pa-mb)):(b.B(U++,sa-mb,pa),S&&b.B(U++,sa,pa),b.B(U++,sa+hb,pa));l=ua}ba&&(Xa=b.m(U-1).x,pb=b.m(U-1).y,sa=b.m(U).x,pa=b.m(U).y,180===this.fa||0===this.fa?pb!==pa&&(lb=0===this.fa?Math.min(Math.max((sa+Xa)/2,this.Ub[m.layer]),sa):Math.max(Math.min((sa+Xa)/2,this.Ub[m.layer]),sa),b.B(U++,lb,pb),b.B(U++,lb,pa)):Xa!==sa&&(lb=90===this.fa?Math.min(Math.max((pa+pb)/2,this.Ub[m.layer]),pa):Math.max(Math.min((pa+pb)/2,this.Ub[m.layer]), pa),b.B(U++,Xa,lb),b.B(U++,sa,lb)))}if(null!==d&&S){if(null!==h){if(b.computeSpot(!0)===cc){var Ab=b.m(0),Ke=b.m(2);Ab.P(Ke)||b.ia(1,(Ab.x+Ke.x)/2,(Ab.y+Ke.y)/2)}fa=b.getLinkPoint(e,h,cc,!0,!1,g,k);fa.F()||fa.set(e.$.cm);b.ia(0,fa.x,fa.y)}null!==k&&(b.computeSpot(!1)===cc&&(Ab=b.m(b.ta-1),Ke=b.m(b.ta-3),Ab.P(Ke)||b.ia(b.ta-2,(Ab.x+Ke.x)/2,(Ab.y+Ke.y)/2)),fa=b.getLinkPoint(g,k,cc,!1,!1,e,h),fa.F()||fa.set(g.$.cm),b.ia(b.ta-1,fa.x,fa.y))}b.Bj();c.commit()}}}for(var ld=new K(J),eg=this.network.edges.j;eg.next();){var Ff= eg.value.link;null!==Ff&&Ff.rc&&!ld.contains(Ff)&&ld.add(Ff)}if(0ic.y&&(Gf=Qc.y>ic.y?0:ad.xic.y&&(Gf=Qc.y>ic.y?0:ad.x -Nb.x&&(tb=fi.x>Nb.x?0:Rc.yNb.x?0:Rc.yb.layer?1:a.efb.ef?1:a.Ceb.Ce?1:0:0};qu.prototype.MG=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.firstb.first||a.Jib.Ji||a.efb.ef?1:a.Ceb.Ce?1:0:0}; -qu.prototype.Ay=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.peb.pe||a.Jib.Ji||a.efb.ef?1:a.Ceb.Ce?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} +qu.prototype.Dy=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.peb.pe||a.Jib.Ji||a.efb.ef?1:a.Ceb.Ce?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.se[b];if(d>=a.xh.length){c=[];for(var e=0;ea&&(this.oj=a,this.N()))});D.defineProperty(qu,{Qq:"setsPortSpots"},function(){return this.qi},function(a){this.qi!==a&&(D.h(a,"boolean",qu,"setsPortSpots"),this.qi=a,this.N())});D.defineProperty(qu,{dG:"linkSpacing"},function(){return this.ss},function(a){this.ss!==a&&(D.h(a,"number",qu,"linkSpacing"),0<=a&&(this.ss=a,this.N()))});D.w(qu,{BJ:"maxLayer"},function(){return this.yb}); -D.w(qu,{UL:"maxIndex"},function(){return this.ow});D.w(qu,{TL:"maxColumn"},function(){return this.Pb});D.w(qu,{ZL:"minIndexLayer"},function(){return this.Bs});D.w(qu,{VL:"maxIndexLayer"},function(){return this.Vf});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; +D.w(qu,{UL:"maxIndex"},function(){return this.pw});D.w(qu,{TL:"maxColumn"},function(){return this.Pb});D.w(qu,{ZL:"minIndexLayer"},function(){return this.Bs});D.w(qu,{VL:"maxIndexLayer"},function(){return this.Vf});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.Ce=this.ef=this.pe=this.first=this.layer=0;this.link=null;this.Ji=0}D.ke(mv,{layer:!0,first:!0,pe:!0,ef:!0,Ce:!0,index:!0,link:!0,Ji:!0});function wu(){va.call(this)}D.Sa(wu,va);D.ja("LayeredDigraphNetwork",wu);wu.prototype.createVertex=function(){return new pv};wu.prototype.createEdge=function(){return new qv}; function pv(){wa.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.kq=NaN;this.Dn=0;this.qB=this.rB=null}D.Sa(pv,wa);D.ja("LayeredDigraphVertex",pv);function qv(){xa.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}D.Sa(qv,xa);D.ja("LayeredDigraphEdge",qv); -function Z(){0g?gw(a,k,ua,C,A):hw(a,k,ua,C,A);ua=A.x;C=A.width;A=A.height;break;case Vv:for(m=0;ms&&(ba< -h&&Ow(a,p,h-ba,0,kb,m-1),U++,Ua=0,kb=m,N=A,ba=0,ia=135Fa&&(Rw(a,-Fa,0,kb,m-1),Sw(H,-Fa,0),Sw(W,-Fa,0),Fa=0)}n.sa.n(Fa,ia);C=Math.max(C,fa);A=Math.max(A,N+(0===U?0:y)+Oa.height);ba=fa}else{0< -s&&0s&&(iaFa&&(Rw(a,0,-Fa,kb,m-1),Sw(H,0,-Fa),Sw(W,0,-Fa),Fa=0);n.sa.n(ba,Fa);A=Math.max(A,S);C=Math.max(C,N+(0===U?0:y)+Oa.width); +h&&Ow(a,p,h-ba,0,kb,m-1),U++,Ua=0,kb=m,N=A,ba=0,ia=135Fa&&(Rw(a,-Fa,0,kb,m-1),Sw(H,-Fa,0),Sw(W,-Fa,0),Fa=0)}n.sa.n(Fa,ia);C=Math.max(C,fa);A=Math.max(A,N+(0===U?0:y)+Oa.height);ba=fa}else{0< +s&&0s&&(iaFa&&(Rw(a,0,-Fa,kb,m-1),Sw(H,0,-Fa),Sw(W,0,-Fa),Fa=0);n.sa.n(ba,Fa);A=Math.max(A,S);C=Math.max(C,N+(0===U?0:y)+Oa.width); ia=S}Ua++}0q&&(q=0),135w&&(w=0),p===Wv&&(l+=u/2+a.W.y),k+=d+c):b?(null===a.comments?d>C&&(p=Ww(p,d-C,0),k=p.x,l=p.y,C=d,q=0):C=Uw(a,C,q),0>q&&(k-=q,q=0),135A&&(p=Ww(p,0,e-A),k=p.x,l=p.y,A=e,w=0):A=Vw(a,A,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[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].xd&&(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,za,Z,"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 O(b,c)}function Ow(a,b,c,d,e,g){v&&D.l(a,wv,Z,"shiftRelPosAlign:v");v&&D.l(b,za,Z,"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,Z,"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,Z,"recordMidPoints:v"),D.h(c,"number",Z,"recordMidPoints:x"),D.h(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Sf){case sv:for(a=b.tc;a.next();)b=a.value,b.fromVertex===e&&b.at.n(c,d);break;case zv:for(a=b.qc;a.next();)b=a.value,b.toVertex===e&&b.at.n(c,d);break;default:D.k("Unhandled path value "+a.Sf.toString())}}function Sw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m= +function Qw(a,b,c,d,e,g,h,k){v&&D.l(b,wv,Z,"mergeFringes:parent");v&&D.l(c,wv,Z,"mergeFringes:child");var l=bw(b),m=90===l||270===l,n=b.nodeSpacing;b=d;var p=e;d=g;e=h;var q=c.Bu,r=c.Wu;h=c.sb;var s=m?Math.max(e,h.height):Math.max(d,h.width);if(null===q||l!==bw(c))q=Nw(a,2),r=Nw(a,2),m?(q[0].n(0,0),q[1].n(0,h.height),r[0].n(h.width,0),r[1].n(r[0].x,q[1].y)):(q[0].n(0,0),q[1].n(h.width,0),r[0].n(0,h.height),r[1].n(q[1].x,r[0].y));if(m){c=d;d=9999999;if(!(null===p||2>p.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;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 ew(a){v&&D.l(a,wv,Z,"computeLayerSpacing:v");var b=bw(a),b=90===b||270===b,c=a.layerSpacing;if(0=a.length?a.push(c):a.splice(b,0,c):w.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Hg:function(a, -b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},sy:[],K:function(){var a=w.sy.pop();return void 0===a?new z:a},xb:function(a,b){var c=w.sy.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){w.sy.push(a)},JB:[],im:function(){var a=w.JB.pop();return void 0===a?new ha:a},Ak:function(a){w.JB.push(a)},ty:[],Ef:function(){var a=w.ty.pop();return void 0===a?new A:a},hg:function(a,b,c,d){var e=w.ty.pop(); -if(void 0===e)return new A(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Db:function(a){w.ty.push(a)},KB:[],Ff:function(){var a=w.KB.pop();return void 0===a?new ia:a},ue:function(a){w.KB.push(a)},uy:null,s:function(){var a=w.uy;return null!==a?(w.uy=null,a):new ja},q:function(a){a.reset();w.uy=a},IB:[],lb:function(){var a=w.IB.pop();return void 0===a?[]:a},wa:function(a){a.length=0;w.IB.push(a)},io:Object.freeze([]),mm:1,mc:function(a){a.__gohashid=w.mm++},Xp:function(a){var b=a.__gohashid; -void 0===b&&(b=w.mm++,a.__gohashid=b);return b},Kd:function(a){return a.__gohashid},fa:function(a,b){b.Dy=a;da[a]=b},La:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},ji:function(a){a.SG=!0},defineProperty:function(a,b,c,d,e){w.j(a,"function","Util.defineProperty:classfunc");w.j(b,"object","Util.defineProperty:propobj");w.j(c,"function","Util.defineProperty:getter");w.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d, +b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},vy:[],K:function(){var a=w.vy.pop();return void 0===a?new z:a},xb:function(a,b){var c=w.vy.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){w.vy.push(a)},JB:[],im:function(){var a=w.JB.pop();return void 0===a?new ha:a},Ak:function(a){w.JB.push(a)},wy:[],Ef:function(){var a=w.wy.pop();return void 0===a?new A:a},hg:function(a,b,c,d){var e=w.wy.pop(); +if(void 0===e)return new A(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Db:function(a){w.wy.push(a)},KB:[],Ff:function(){var a=w.KB.pop();return void 0===a?new ia:a},ue:function(a){w.KB.push(a)},xy:null,s:function(){var a=w.xy;return null!==a?(w.xy=null,a):new ja},q:function(a){a.reset();w.xy=a},IB:[],lb:function(){var a=w.IB.pop();return void 0===a?[]:a},wa:function(a){a.length=0;w.IB.push(a)},io:Object.freeze([]),mm:1,mc:function(a){a.__gohashid=w.mm++},Xp:function(a){var b=a.__gohashid; +void 0===b&&(b=w.mm++,a.__gohashid=b);return b},Kd:function(a){return a.__gohashid},fa:function(a,b){b.Gy=a;da[a]=b},La:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},ji:function(a){a.SG=!0},defineProperty:function(a,b,c,d,e){w.j(a,"function","Util.defineProperty:classfunc");w.j(b,"object","Util.defineProperty:propobj");w.j(c,"function","Util.defineProperty:getter");w.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d, enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,f,c);e=Object.getOwnPropertyDescriptor(a.prototype,f);b&&e&&Object.defineProperty(a.prototype,b,e);break}},WJ:!1,u:function(a,b,c,d){w.j(a,"function","Util.defineReadOnlyProperty:classfunc");w.j(b,"object","Util.defineReadOnlyProperty:propobj");w.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){w.k('The property "'+f+'" is read-only and cannot be set to '+ -a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);break}},$d:function(a,b){for(var c in b)b[c]=!0;a.prototype.OG=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?w.hf(a):null===a?"*":""},hf:function(a){if("function"===typeof a){if(a.Dy)return a.Dy;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9, -c).trim();if(""!==b)return a.Dy=b}else if("object"===typeof a&&a.constructor)return w.hf(a.constructor);return typeof a},p:function(a,b,c){w.j(a,"function","Util.defineEnumValue:classfunc");w.j(b,"string","Util.defineEnumValue:name");w.j(c,"number","Util.defineEnumValue:num");c=new ea(a,b,c);Object.freeze(c);a[b]=c;var d=a.Qu;d instanceof ka||(d=new ka("string",ea),a.Qu=d);d.add(b,c);return c},sb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute? -(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c},Ma: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){}},Eu:function(a,b){w.j(a,"object","Setting properties requires Objects as arguments");w.j(b,"object","Setting properties requires Objects as arguments");var c=a instanceof C,d=a instanceof D,e;for(e in b){""===e&&w.k("Setting properties requires non-empty property names");var f=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,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.Ig("7ca11abfd7330390")](w.Ig(c[d-1]),10,15*d+0);b[w.Ig("7ca11abfd022028846")]=w.Ig("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Ig("7ca11abfd7330390")](w.Ig(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 ea(a,b,2);Object.freeze(c);a[b]=c;var d=a.Qu;d instanceof ka||(d=new ka("string",ea),a.Qu=d);d.add(b,c);return c};return a}();function ea(a,b,c){w.mc(this);this.XB=a;this.Qb=b;this.WG=c}w.fa("EnumValue",ea);ea.prototype.toString=function(){return w.hf(this.XB)+"."+this.Qb};w.u(ea,{De:"classType"},function(){return this.XB});w.u(ea,{name:"name"},function(){return this.Qb});w.u(ea,{value:"value"},function(){return this.WG}); -var pa;ea.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.Qu;return c instanceof ka?c.ja(b):null};function ra(){this.VB=[]}ra.prototype.toString=function(){return this.VB.join("")};ra.prototype.add=function(a){""!==a&&this.VB.push(a)};function sa(){} -function ta(a){void 0===a&&(a=42);this.seed=a;this.ny=48271;this.Pu=2147483647;this.HB=this.Pu/this.ny;this.DG=this.Pu%this.ny;this.CG=1/this.Pu;this.random()}ta.prototype.random=function(){var a=this.seed%this.HB*this.ny-this.seed/this.HB*this.DG;this.seed=0this.key)return!1;w.Na(a)}var a=a.n,b=a.length,c=++this.uc,d=this.Wh;if(null!==d)for(;c=this.nd)return va;var a=this.Ob;return null!==a?(a.reset(),a):new Ba(this)});function Da(a){this.Fa=a;this.Ta=a.C;this.Va=null}w.$d(Da,{key:!0,value:!0});w.u(Da,{i:"iterator"},function(){return this});Da.prototype.reset=Da.prototype.reset=function(){this.Ta=this.Fa.C;this.Va=null}; Da.prototype.next=Da.prototype.next=function(){var a=this.Fa;if(a.C!==this.Ta){if(null===this.key)return!1;w.Na(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.value=this.key=a=b.key,!0;this.Hf();return!1};Da.prototype.hasNext=function(){return this.next()};Da.prototype.first=Da.prototype.first=function(){var a=this.Fa;this.Ta=a.C;a=a.Ca;return null!==a?(this.Va=a,this.value=this.key=a=a.key):null}; @@ -102,27 +102,27 @@ ka.prototype.copy=function(){var a=new ka(this.Qh,this.pt),b=this.od,c;for(c in w.u(ka,{i:"iterator"},function(){if(0>=this.count)return va;var a=this.Ob;return null!==a?(a.reset(),a):new Ga(this)});w.u(ka,{sF:"iteratorKeys"},function(){return 0>=this.count?va:new Da(this)});w.u(ka,{tF:"iteratorValues"},function(){if(0>=this.count)return va;var a=this.Mi;return null!==a?(a.reset(),a):new Fa(this)});function z(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b)}w.fa("Point",z);w.ji(z);w.$d(z,{x:!0,y:!0});z.prototype.assign=function(a){this.x=a.x;this.y=a.y}; z.prototype.setTo=z.prototype.m=function(a,b){this.x=a;this.y=b;return this};z.prototype.set=z.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};z.prototype.copy=function(){var a=new z;a.x=this.x;a.y=this.y;return a};z.prototype.Ga=function(){Object.freeze(this);return this};z.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};z.prototype.freeze=function(){return this};z.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; z.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new z(c,e)}return new z};z.stringify=function(a){return a.x.toString()+" "+a.y.toString()};z.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};z.prototype.equals=z.prototype.L=function(a){return a instanceof z?this.x===a.x&&this.y===a.y:!1}; -z.prototype.equalTo=z.prototype.bx=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Ic=function(a){return K(this.x,a.x)&&K(this.y,a.y)};z.prototype.add=z.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.$n=function(a){this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this}; -z.prototype.rotate=z.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.x=d*b-e*c;this.y=e*b+d*c;return this};z.prototype.scale=z.prototype.scale=function(a,b){this.x*=a;this.y*=b;return this};z.prototype.distanceSquaredPoint=z.prototype.uf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a}; +z.prototype.equalTo=z.prototype.hx=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Ic=function(a){return K(this.x,a.x)&&K(this.y,a.y)};z.prototype.add=z.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.$n=function(a){this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this}; +z.prototype.rotate=z.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.x=d*b-e*c;this.y=e*b+d*c;return this};z.prototype.scale=z.prototype.scale=function(a,b){this.x*=a;this.y*=b;return this};z.prototype.distanceSquaredPoint=z.prototype.vf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a}; z.prototype.distanceSquared=z.prototype.Rp=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};z.prototype.normalize=z.prototype.normalize=function(){var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}z.prototype.projectOntoLineSegment=function(a,b,c,d){Ia(a,b,c,d,this.x,this.y,this);return this};z.prototype.projectOntoLineSegmentPoint=function(a,b){Ia(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};z.prototype.snapToGrid=function(a,b,c,d){Ka(this.x,this.y,a,b,c,d,this);return this}; -z.prototype.snapToGridPoint=function(a,b){Ka(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Xn=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};z.prototype.setSpot=z.prototype.Gu=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};z.prototype.transform=function(a){a.nb(this);return this};function La(a,b){b.li(a);return a}var Ma; +z.prototype.snapToGridPoint=function(a,b){Ka(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Xn=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};z.prototype.setSpot=z.prototype.Hu=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};z.prototype.transform=function(a){a.nb(this);return this};function La(a,b){b.li(a);return a}var Ma; z.distanceLineSegmentSquared=Ma=function(a,b,c,d,e,f){var h=e-c,k=f-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=f-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var Na;z.distanceSquared=Na=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var Oa;z.direction=Oa=function(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}; z.prototype.isReal=z.prototype.H=function(){return isFinite(this.x)&&isFinite(this.y)};function ha(a,b){void 0===a?this.height=this.width=0:(this.width=a,this.height=b)}w.fa("Size",ha);w.ji(ha);w.$d(ha,{width:!0,height:!0});ha.prototype.assign=function(a){this.width=a.width;this.height=a.height};ha.prototype.setTo=ha.prototype.m=function(a,b){this.width=a;this.height=b;return this};ha.prototype.set=ha.prototype.set=function(a){this.width=a.width;this.height=a.height;return this}; ha.prototype.copy=function(){var a=new ha;a.width=this.width;a.height=this.height;return a};ha.prototype.Ga=function(){Object.freeze(this);return this};ha.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};ha.prototype.freeze=function(){return this};ha.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; ha.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new ha(c,e)}return new ha};ha.stringify=function(a){return a.width.toString()+" "+a.height.toString()};ha.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};ha.prototype.equals=ha.prototype.L=function(a){return a instanceof ha?this.width===a.width&&this.height===a.height:!1}; -ha.prototype.equalTo=ha.prototype.bx=function(a,b){return this.width===a&&this.height===b};ha.prototype.equalsApprox=ha.prototype.Ic=function(a){return K(this.width,a.width)&&K(this.height,a.height)};ha.prototype.isReal=ha.prototype.H=function(){return isFinite(this.width)&&isFinite(this.height)}; +ha.prototype.equalTo=ha.prototype.hx=function(a,b){return this.width===a&&this.height===b};ha.prototype.equalsApprox=ha.prototype.Ic=function(a){return K(this.width,a.width)&&K(this.height,a.height)};ha.prototype.isReal=ha.prototype.H=function(){return isFinite(this.width)&&isFinite(this.height)}; function A(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof z?b instanceof z?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof ha?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):w.k("Incorrect arguments supplied to Rect constructor"):(this.x=a,this.y=b,this.width=c,this.height=d)}w.fa("Rect",A);w.ji(A);w.$d(A,{x:!0,y:!0,width:!0,height:!0}); A.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};function Pa(a,b,c){a.width=b;a.height=c}A.prototype.setTo=A.prototype.m=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};A.prototype.set=A.prototype.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};A.prototype.setPoint=A.prototype.Ug=function(a){this.x=a.x;this.y=a.y;return this}; A.prototype.setSize=function(a){this.width=a.width;this.height=a.height;return this};A.prototype.copy=function(){var a=new A;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};A.prototype.Ga=function(){Object.freeze(this);return this};A.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};A.prototype.freeze=function(){return this};A.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; A.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new A(c,e,f,h)}return new A};A.stringify=function(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}; -A.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};A.prototype.equals=A.prototype.L=function(a){return a instanceof A?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};A.prototype.equalTo=A.prototype.bx=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};A.prototype.equalsApprox=A.prototype.Ic=function(a){return K(this.x,a.x)&&K(this.y,a.y)&&K(this.width,a.width)&&K(this.height,a.height)}; +A.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};A.prototype.equals=A.prototype.L=function(a){return a instanceof A?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};A.prototype.equalTo=A.prototype.hx=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};A.prototype.equalsApprox=A.prototype.Ic=function(a){return K(this.x,a.x)&&K(this.y,a.y)&&K(this.width,a.width)&&K(this.height,a.height)}; function Qa(a,b){return Va(a.x,b.x)&&Va(a.y,b.y)&&Va(a.width,b.width)&&Va(a.height,b.height)}A.prototype.containsPoint=A.prototype.Ha=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};A.prototype.containsRect=A.prototype.wk=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height}; -A.prototype.contains=A.prototype.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};A.prototype.reset=function(){this.height=this.width=this.y=this.x=0};A.prototype.offset=A.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this};A.prototype.inflate=A.prototype.xf=function(a,b){return Xa(this,b,a,b,a)};A.prototype.addMargin=A.prototype.Iw=function(a){return Xa(this,a.top,a.right,a.bottom,a.left)}; +A.prototype.contains=A.prototype.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};A.prototype.reset=function(){this.height=this.width=this.y=this.x=0};A.prototype.offset=A.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this};A.prototype.inflate=A.prototype.xf=function(a,b){return Xa(this,b,a,b,a)};A.prototype.addMargin=A.prototype.Lw=function(a){return Xa(this,a.top,a.right,a.bottom,a.left)}; A.prototype.subtractMargin=A.prototype.HJ=function(a){return Xa(this,-a.top,-a.right,-a.bottom,-a.left)};A.prototype.grow=function(a,b,c,d){return Xa(this,a,b,c,d)};function Xa(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}A.prototype.intersectRect=function(a){return Ya(this,a.x,a.y,a.width,a.height)};A.prototype.intersect=A.prototype.cF=function(a,b,c,d){return Ya(this,a,b,c,d)}; function Ya(a,b,c,d,e){var f=Math.max(a.x,b),h=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=h;a.width=Math.max(0,b-f);a.height=Math.max(0,c-h);return a}A.prototype.intersectsRect=A.prototype.Tf=function(a){return this.dF(a.x,a.y,a.width,a.height)}; A.prototype.intersects=A.prototype.dF=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function $a(a,b){var c=a.width,d=b.width+10+10,e=a.x,f=b.x-10;if(e>d+f||f>c+e)return!1;c=a.height;d=b.height+10+10;e=a.y;f=b.y-10;return e>d+f||f>c+e?!1:!0}A.prototype.unionPoint=A.prototype.ri=function(a){return ab(this,a.x,a.y,0,0)}; -A.prototype.unionRect=A.prototype.Gh=function(a){return ab(this,a.x,a.y,a.width,a.height)};A.prototype.union=A.prototype.wG=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return ab(this,a,b,c,d)};function ab(a,b,c,d,e){var f=Math.min(a.x,b),h=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=h;a.width=b-f;a.height=c-h;return a}A.prototype.setSpot=A.prototype.Gu=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this}; +A.prototype.unionRect=A.prototype.Gh=function(a){return ab(this,a.x,a.y,a.width,a.height)};A.prototype.union=A.prototype.wG=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return ab(this,a,b,c,d)};function ab(a,b,c,d,e){var f=Math.min(a.x,b),h=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=h;a.width=b-f;a.height=c-h;return a}A.prototype.setSpot=A.prototype.Hu=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this}; var cb;A.contains=cb=function(a,b,c,d,e,f,h,k){void 0===h&&(h=0);void 0===k&&(k=0);return a<=e&&e+h<=a+c&&b<=f&&f+k<=b+d};A.intersects=function(a,b,c,d,e,f,h,k){c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=f;return b>k||f>a?!1:!0};w.defineProperty(A,{left:"left"},function(){return this.x},function(a){this.x=a});w.defineProperty(A,{top:"top"},function(){return this.y},function(a){this.y=a});w.defineProperty(A,{right:"right"},function(){return this.x+this.width},function(a){this.x+=a-(this.x+this.width)}); w.defineProperty(A,{bottom:"bottom"},function(){return this.y+this.height},function(a){this.y+=a-(this.y+this.height)});w.defineProperty(A,{position:"position"},function(){return new z(this.x,this.y)},function(a){this.x=a.x;this.y=a.y});w.defineProperty(A,{size:"size"},function(){return new ha(this.width,this.height)},function(a){this.width=a.width;this.height=a.height}); w.defineProperty(A,{Hl:"center"},function(){return new z(this.x+this.width/2,this.y+this.height/2)},function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2});w.defineProperty(A,{ka:"centerX"},function(){return this.x+this.width/2},function(a){this.x=a-this.width/2});w.defineProperty(A,{ra:"centerY"},function(){return this.y+this.height/2},function(a){this.y=a-this.height/2});A.prototype.isReal=A.prototype.H=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)}; @@ -131,12 +131,12 @@ db.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a. db.prototype.Ga=function(){Object.freeze(this);return this};db.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};db.prototype.freeze=function(){return this};db.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; db.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new db;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new db(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new db(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new db(c,e):new db(c,e,f,h)}return new db}; db.stringify=function(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()};db.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};db.prototype.equals=db.prototype.L=function(a){return a instanceof db?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1}; -db.prototype.equalTo=db.prototype.bx=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};db.prototype.equalsApprox=db.prototype.Ic=function(a){return K(this.top,a.top)&&K(this.right,a.right)&&K(this.bottom,a.bottom)&&K(this.left,a.left)};db.prototype.isReal=db.prototype.H=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ia(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}w.ji(ia); +db.prototype.equalTo=db.prototype.hx=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};db.prototype.equalsApprox=db.prototype.Ic=function(a){return K(this.top,a.top)&&K(this.right,a.right)&&K(this.bottom,a.bottom)&&K(this.left,a.left)};db.prototype.isReal=db.prototype.H=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ia(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}w.ji(ia); w.$d(ia,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ia.prototype.set=ia.prototype.set=function(a){this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};ia.prototype.copy=function(){var a=new ia;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};ia.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; -ia.prototype.equals=ia.prototype.L=function(a){return a instanceof ia?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};ia.prototype.isIdentity=ia.prototype.bu=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};ia.prototype.reset=ia.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; +ia.prototype.equals=ia.prototype.L=function(a){return a instanceof ia?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};ia.prototype.isIdentity=ia.prototype.cu=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};ia.prototype.reset=ia.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; ia.prototype.multiply=ia.prototype.multiply=function(a){var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,e=this.m11*a.dx+this.m21*a.dy+this.dx,f=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=f;return this}; ia.prototype.multiplyInverted=ia.prototype.BF=function(a){var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,f=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*f;e=this.m12*e+this.m22*f;f=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=f;this.dy=h;return this}; -ia.prototype.invert=ia.prototype.px=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),f=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=f;return this}; +ia.prototype.invert=ia.prototype.tx=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),f=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=f;return this}; ia.prototype.rotate=ia.prototype.rotate=function(a,b,c){360<=a?a-=360:0>a&&(a+=360);if(0===a)return this;this.translate(b,c);var d=0,e=0;90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(e=a*Math.PI/180,d=Math.cos(e),e=Math.sin(e));a=this.m12*d+this.m22*e;var f=this.m11*-e+this.m21*d,h=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=f;this.m22=h;this.translate(-b,-c);return this}; ia.prototype.translate=ia.prototype.translate=function(a,b){this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};ia.prototype.scale=ia.prototype.scale=function(a,b){void 0===b&&(b=a);this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this};ia.prototype.transformPoint=ia.prototype.nb=function(a){var b=a.x,c=a.y;a.x=b*this.m11+c*this.m21+this.dx;a.y=b*this.m12+c*this.m22+this.dy;return a}; ia.prototype.invertedTransformPoint=ia.prototype.li=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),f=a.x,h=a.y;a.x=f*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.y=f*c+h*d+e;return a}; @@ -156,8 +156,8 @@ var tc;L.Right=tc=Ib;var yc;L.Bottom=yc=Kb;var Tb;L.TopSide=Tb=fb(new L(0,0,1,w. L.BottomLeftSides=cc=fb(new L(0,0,1,w.Zc|w.Rc),1).Ga();var dc;L.BottomRightSides=dc=fb(new L(0,0,1,w.Zc|w.$c),1).Ga();var ec;L.NotTopSide=ec=fb(new L(0,0,1,w.Rc|w.$c|w.Zc),1).Ga();var nc;L.NotLeftSide=nc=fb(new L(0,0,1,w.kd|w.$c|w.Zc),1).Ga();var oc;L.NotRightSide=oc=fb(new L(0,0,1,w.kd|w.Rc|w.Zc),1).Ga();var pc;L.NotBottomSide=pc=fb(new L(0,0,1,w.kd|w.Rc|w.$c),1).Ga();var qc;L.AllSides=qc=fb(new L(0,0,1,w.kd|w.Rc|w.$c|w.Zc),1).Ga();function Kc(){this.Tb=[1,0,0,1,0,0]} Kc.prototype.copy=function(){var a=new Kc;a.Tb[0]=this.Tb[0];a.Tb[1]=this.Tb[1];a.Tb[2]=this.Tb[2];a.Tb[3]=this.Tb[3];a.Tb[4]=this.Tb[4];a.Tb[5]=this.Tb[5];return a};Kc.prototype.translate=function(a,b){this.Tb[4]+=this.Tb[0]*a+this.Tb[2]*b;this.Tb[5]+=this.Tb[1]*a+this.Tb[3]*b};Kc.prototype.scale=function(a,b){this.Tb[0]*=a;this.Tb[1]*=a;this.Tb[2]*=b;this.Tb[3]*=b};function Lc(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.pE=[];this.pattern=null} Lc.prototype.addColorStop=function(a,b){this.pE.push({offset:a,color:b})}; -function Nc(a,b,c){this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.Jn=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.Bg=this.Ys=this.Xs=0;this.document=b||document;this.EE=c;this.Ax=null;this.path=[];this.uh=new Kc;this.stack=[];this.wf=[];this.$w=a;this.bJ="http://www.w3.org/2000/svg"; -this.width=this.$w.width;this.height=this.$w.height;this.gm=Oc(this,"svg",{width:this.width+"px",height:this.height+"px",UL:"0 0 "+this.$w.width+" "+this.$w.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");Pc(this,1,0,0,1,0,0);a=w.mm++;b=Oc(this,"clipPath",{id:"mainClip"+a});b.appendChild(Oc(this,"rect",{x:0,y:0,width:this.width,height:this.height})); +function Nc(a,b,c){this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.Jn=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.Bg=this.Ys=this.Xs=0;this.document=b||document;this.EE=c;this.Dx=null;this.path=[];this.uh=new Kc;this.stack=[];this.wf=[];this.ex=a;this.bJ="http://www.w3.org/2000/svg"; +this.width=this.ex.width;this.height=this.ex.height;this.gm=Oc(this,"svg",{width:this.width+"px",height:this.height+"px",UL:"0 0 "+this.ex.width+" "+this.ex.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");Pc(this,1,0,0,1,0,0);a=w.mm++;b=Oc(this,"clipPath",{id:"mainClip"+a});b.appendChild(Oc(this,"rect",{x:0,y:0,width:this.width,height:this.height})); this.gm.appendChild(b);this.wf[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}g=Nc.prototype;g.arc=function(a,b,c,d,e,f){Qc(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(){Rc(this,"clipPath",this.path,new Kc)};g.closePath=function(){this.path.push(["z"])};g.createLinearGradient=function(a,b,c,d){var e=new Lc("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 Lc("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"};Va(d,k)&&Va(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!== @@ -166,7 +166,7 @@ g.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"righ 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.Jn=a.Jn;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,Jn:this.Jn,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;b=2*Math.PI?(Qc(a,b,c,d,e,e+Math.PI,h),Qc(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 Pc(a,b,c,d,e,f,h){var k=new Kc;k.Tb=[b,c,d,e,f,h];b={};Sc(a,"g",b,k);k=a.addElement("g",b);a.wf.push(k)} g.$a=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+w.mm++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,f,h;c=Oc(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",JL:this.shadowBlur/2});d=Oc(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=Oc(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});f=Oc(this,"feOffset",{"in":"comp",result:"offsetBlur", dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=Oc(this,"feMerge",{});h.appendChild(Oc(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(Oc(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(f);b.appendChild(h);0b?(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.Sq?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.Sq?this.clip():this.fill()}; +g.transform=function(a,b,c,d,e,f){1===a&&0===b&&0===c&&1===d&&0===e&&0===f||this.ta.transform(a,b,c,d,e,f)};g.translate=function(a,b){this.ta.translate(a,b)};g.Jg=function(a){if(a instanceof ga&&a.type===bd){var b=a.so;a=a.Iy;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.Sq?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.Sq?this.clip():this.fill()}; g.Ej=function(){this.Sq||this.stroke()};w.defineProperty(Wc,{Jp:"clipInsteadOfFill"},function(){return this.Sq},function(a){this.Sq=a});g=Wc.prototype;g.lB=function(a,b,c){this.Xs=a;this.Ys=b;this.Bg=c};g.Yn=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.Zn=function(){this.shadowOffsetX=this.Xs;this.shadowOffsetY=this.Ys;this.shadowBlur=this.Bg}; -g.fA=function(a,b){var c=this.ta;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};g.cA=function(){var a=this.ta;void 0!==a.setLineDash?(a.setLineDash(w.io),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.io,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; -g.Ee=function(a){a&&(this.By="");this.Ay=this.Cy=""}; +g.gA=function(a,b){var c=this.ta;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};g.dA=function(){var a=this.ta;void 0!==a.setLineDash?(a.setLineDash(w.io),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.io,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; +g.Ee=function(a){a&&(this.Ey="");this.Dy=this.Fy=""}; var cd=(Math.sqrt(2)-1)/3*4,dd=(new z(0,0)).Ga(),ed=(new A(0,0,0,0)).Ga(),fd=(new db(0,0,0,0)).Ga(),kd=(new db(2,2,2,2)).Ga(),ld=(new z(6,6)).Ga(),md=(new z(-Infinity,-Infinity)).Ga(),nd=(new z(Infinity,Infinity)).Ga(),od=(new ha(0,0)).Ga(),pd=(new ha(1,1)).Ga(),yd=(new ha(6,6)).Ga(),zd=(new ha(8,8)).Ga(),Ad=(new ha(10,10)).Ga(),Bd=(new ha(Infinity,Infinity)).Ga(),Cd=(new z(NaN,NaN)).Ga(),Dd=(new ha(NaN,NaN)).Ga(),Nd=(new A(NaN,NaN,NaN,NaN)).Ga(),Od=(new L(.156,.156)).Ga(),Pd=(new L(.844,.844)).Ga(), Qd=new sa,Rd=new sa,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 K(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} @@ -211,171 +211,171 @@ function ve(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,0c,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.ia.toString()+" "+this.ga.toString()+"L"+this.D.toString()+" "+this.F.toString():"M"+this.ia.toFixed(a)+" "+this.ga.toFixed(a)+"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);case Fe:var b=new A(this.ia,this.ga,0,0);b.wG(this.D,this.F,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 Ne:b=new A(this.ia,this.ga,0,0);b.wG(this.D,this.F,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 Be:for(var b="",c=this.dc.n,d=c.length,e=0;e=u-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function e(){var a=new z(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function f(){return s=e()}function h(){return r=e()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new z(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&w.yd(a,"string",Ae,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/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=-1,n="",p="",q=new z(0,0),r=new z(0,0),s=new z(0, 0),u=l.length,t=w.s(),x=!1,v=!1,B=!0,y=null;!(m>=u-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":B=!0;v=x=!1;break;case "M":y=f();null===t.Vb||!0===B?(M(t,y.x,y.y,x,!1,!v),B=!1):t.moveTo(y.x,y.y);for(q=s;!c();)y=f(),t.lineTo(y.x,y.y);break;case "L":for(;!c();)y=f(),t.lineTo(y.x,y.y);break;case "H":for(;!c();)s=y=new z((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),t.lineTo(s.x,s.y);break;case "V":for(;!c();)s=y=new z(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),t.lineTo(s.x,s.y); break;case "C":for(;!c();){var H=e(),E=h(),y=f();N(t,H.x,H.y,E.x,E.y,y.x,y.y)}break;case "S":for(;!c();)H=k(),E=h(),y=f(),N(t,H.x,H.y,E.x,E.y,y.x,y.y);break;case "Q":for(;!c();)E=h(),y=f(),Se(t,E.x,E.y,y.x,y.y);break;case "T":for(;!c();)r=E=k(),y=f(),Se(t,E.x,E.y,y.x,y.y);break;case "B":for(;!c();){var y=parseFloat(d()),H=parseFloat(d()),E=parseFloat(d()),V=parseFloat(d()),ba=parseFloat(d()),Q=ba,$=!1;c()||(Q=parseFloat(d()),c()||($=0!==parseFloat(d())));n===n.toLowerCase()&&(E+=s.x,V+=s.y);t.arcTo(y, H,E,V,ba,Q,$)}break;case "A":for(;!c();)H=Math.abs(parseFloat(d())),E=Math.abs(parseFloat(d())),V=parseFloat(d()),ba=!!parseFloat(d()),Q=!!parseFloat(d()),y=f(),Te(t,H,E,V,ba,Q,y.x,y.y);break;case "Z":y=t.o.dc.n[t.o.dc.length-1];O(t);s=q;break;case "F":y="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Uu]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++;else{y=l[m+H];break}y.match(/[Mm]/)?x=!0:Ue(t);break;case "U":y="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Ff]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++; -else{y=l[m+H];break}y.match(/[Mm]/)?v=!0:t.$a(!1)}q=t.o;w.q(t);if(b)for(t=q.dc.i;t.next();)y=t.value,y.au=!0;return q};function Ve(a,b){for(var c=a.length,d=w.K(),e=0;eh&&(h+=360),s.ye+=h);0>a&&(s.ye=180-s.ye,s.of=-s.of);0>d&&(s.ye=-s.ye,s.of=-s.of);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.D;k=s.F;s.D=h* +h*a+k*c+e;s.Pc=h*b+k*d+f;h=s.Ah;k=s.Bh;s.Ah=h*a+k*c+e;s.Bh=h*b+k*d+f;h=s.D;k=s.F;s.D=h*a+k*c+e;s.F=h*b+k*d+f;break;case of:h=s.sc;k=s.Pc;s.sc=h*a+k*c+e;s.Pc=h*b+k*d+f;h=s.D;k=s.F;s.D=h*a+k*c+e;s.F=h*b+k*d+f;break;case pf:h=s.ka;k=s.ra;s.ka=h*a+k*c+e;s.ra=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.ye+=h);0>a&&(s.ye=180-s.ye,s.pf=-s.pf);0>d&&(s.ye=-s.ye,s.pf=-s.pf);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.D;k=s.F;s.D=h* a+k*c+e;s.F=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Hj+=h);0>a&&(s.Hj=180-s.Hj,s.Wl=!s.Wl);0>d&&(s.Hj=-s.Hj,s.Wl=!s.Wl);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.bb=!0;return this}; -Ae.prototype.Ha=function(a,b,c,d){var e=a.x,f=a.y,h=this.cb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.dc.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}; +Ae.prototype.getPointAlongPath=Ae.prototype.$H=function(a,b){0>a?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}; Ae.prototype.getFractionForPoint=Ae.prototype.WH=function(a){if(this.type===Ee){var b=this.ia,c=this.ga,d=this.D,e=this.F;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===Fe){if(b=this.ia,c=this.ga,d=this.D,e=this.F,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.iA,h=this.kx,k=this.jA,l=w.K(),c=Infinity,b=d=0,f=e.length,n=m=0,p=0;pa?0:1a?0:1a?"M"+this.ia.toString()+" "+this.ga.toString():"M"+this.ia.toFixed(a)+" "+this.ga.toFixed(a),c=this.vb.n,d=c.length,e=0;ea&&(a+=360),this.Bd=a,this.Ve=0,this.mh=Math.max(d,0),this.Ag=Math.max(e,0),this.Xo="boolean"===typeof h?!!h:!1,this.qo=!!k):(this.Bd=d,this.Ve=e,a===pf&&(f=Math.max(f,0)),this.mh=f,"number"===typeof h?(a===pf&&(h=Math.max(h,0)),this.Ag=h):this.Ag=0,this.qo=this.Xo=!1);this.Ph=!1;this.bb= !0;this.kg=null}w.fa("PathSegment",wf);w.ji(wf);wf.prototype.copy=function(){var a=new wf;a.ma=this.ma;a.yb=this.yb;a.Gb=this.Gb;a.Bd=this.Bd;a.Ve=this.Ve;a.mh=this.mh;a.Ag=this.Ag;a.Xo=this.Xo;a.qo=this.qo;a.Ph=this.Ph;a.bb=this.bb;return a}; -wf.prototype.equalsApprox=wf.prototype.Ic=function(a){if(!(a instanceof wf)||this.type!==a.type||this.sx!==a.sx)return!1;switch(this.type){case mf:case Pe:return K(this.D,a.D)&&K(this.F,a.F);case nf:return K(this.D,a.D)&&K(this.F,a.F)&&K(this.sc,a.sc)&&K(this.Pc,a.Pc)&&K(this.Ah,a.Ah)&&K(this.Bh,a.Bh);case of:return K(this.D,a.D)&&K(this.F,a.F)&&K(this.sc,a.sc)&&K(this.Pc,a.Pc);case pf:return K(this.ye,a.ye)&&K(this.of,a.of)&&K(this.ka,a.ka)&&K(this.ra,a.ra)&&K(this.radiusX,a.radiusX)&&K(this.radiusY, -a.radiusY);case qf:return this.Wl===a.Wl&&this.wx===a.wx&&K(this.Hj,a.Hj)&&K(this.D,a.D)&&K(this.F,a.F)&&K(this.radiusX,a.radiusX)&&K(this.radiusY,a.radiusY);default:return!1}};wf.prototype.gc=function(a){a.De===wf?this.type=a:w.Fj(this,a)}; +wf.prototype.equalsApprox=wf.prototype.Ic=function(a){if(!(a instanceof wf)||this.type!==a.type||this.vx!==a.vx)return!1;switch(this.type){case mf:case Pe:return K(this.D,a.D)&&K(this.F,a.F);case nf:return K(this.D,a.D)&&K(this.F,a.F)&&K(this.sc,a.sc)&&K(this.Pc,a.Pc)&&K(this.Ah,a.Ah)&&K(this.Bh,a.Bh);case of:return K(this.D,a.D)&&K(this.F,a.F)&&K(this.sc,a.sc)&&K(this.Pc,a.Pc);case pf:return K(this.ye,a.ye)&&K(this.pf,a.pf)&&K(this.ka,a.ka)&&K(this.ra,a.ra)&&K(this.radiusX,a.radiusX)&&K(this.radiusY, +a.radiusY);case qf:return this.Wl===a.Wl&&this.zx===a.zx&&K(this.Hj,a.Hj)&&K(this.D,a.D)&&K(this.F,a.F)&&K(this.radiusX,a.radiusX)&&K(this.radiusY,a.radiusY);default:return!1}};wf.prototype.gc=function(a){a.De===wf?this.type=a:w.Fj(this,a)}; wf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case mf:b=0>a?"M"+this.D.toString()+" "+this.F.toString():"M"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Pe:b=0>a?"L"+this.D.toString()+" "+this.F.toString():"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case nf:b=0>a?"C"+this.sc.toString()+" "+this.Pc.toString()+" "+this.Ah.toString()+" "+this.Bh.toString()+" "+this.D.toString()+" "+this.F.toString():"C"+this.sc.toFixed(a)+" "+this.Pc.toFixed(a)+" "+this.Ah.toFixed(a)+ -" "+this.Bh.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case of:b=0>a?"Q"+this.sc.toString()+" "+this.Pc.toString()+" "+this.D.toString()+" "+this.F.toString():"Q"+this.sc.toFixed(a)+" "+this.Pc.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case pf:b=0>a?"B"+this.ye.toString()+" "+this.of.toString()+" "+this.ka.toString()+" "+this.ra.toString()+" "+this.radiusX:"B"+this.ye.toFixed(a)+" "+this.of.toFixed(a)+" "+this.ka.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.radiusX; -break;case qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Hj.toString()+" "+(this.wx?1:0)+" "+(this.Wl?1:0)+" "+this.D.toString()+" "+this.F.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Hj.toFixed(a)+" "+(this.wx?1:0)+" "+(this.Wl?1:0)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;default:b=this.type.toString()}return b+(this.Ph?"z":"")};var mf;wf.Move=mf=w.p(wf,"Move",0);var Pe;wf.Line=Pe=w.p(wf,"Line",1);var nf; +" "+this.Bh.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case of:b=0>a?"Q"+this.sc.toString()+" "+this.Pc.toString()+" "+this.D.toString()+" "+this.F.toString():"Q"+this.sc.toFixed(a)+" "+this.Pc.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case pf:b=0>a?"B"+this.ye.toString()+" "+this.pf.toString()+" "+this.ka.toString()+" "+this.ra.toString()+" "+this.radiusX:"B"+this.ye.toFixed(a)+" "+this.pf.toFixed(a)+" "+this.ka.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.radiusX; +break;case qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Hj.toString()+" "+(this.zx?1:0)+" "+(this.Wl?1:0)+" "+this.D.toString()+" "+this.F.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Hj.toFixed(a)+" "+(this.zx?1:0)+" "+(this.Wl?1:0)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;default:b=this.type.toString()}return b+(this.Ph?"z":"")};var mf;wf.Move=mf=w.p(wf,"Move",0);var Pe;wf.Line=Pe=w.p(wf,"Line",1);var nf; wf.Bezier=nf=w.p(wf,"Bezier",2);var of;wf.QuadraticBezier=of=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.Q=!0;return this};wf.prototype.Ra=function(){this.Q=!1;return this};wf.prototype.close=wf.prototype.close=function(){this.Ph=!0;return this}; -function rf(a,b){if(null!==a.kg&&!1===b.bb)return a.kg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.kg=[],a.kg;var e=a.Bd,f=a.Ve,h=xe(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=xe(b>f?b:f,n,n+h,!0);f=w.Ff();f.reset();f.translate(c,d);f.rotate(a.Bd,0,0);f.scale(l,r);Ve(b,f);w.ue(f);a.kg=b;return a.kg} -w.defineProperty(wf,{sx:"isClosed"},function(){return this.Ph},function(a){this.Ph!==a&&(this.Ph=a,this.bb=!0)});w.defineProperty(wf,{type:"type"},function(){return this.ma},function(a){this.Q&&w.la(this,a);this.ma=a;this.bb=!0});w.defineProperty(wf,{D:"endX"},function(){return this.yb},function(a){this.Q&&w.la(this,a);this.yb=a;this.bb=!0});w.defineProperty(wf,{F:"endY"},function(){return this.Gb},function(a){this.Q&&w.la(this,a);this.Gb=a;this.bb=!0}); +w.defineProperty(wf,{vx:"isClosed"},function(){return this.Ph},function(a){this.Ph!==a&&(this.Ph=a,this.bb=!0)});w.defineProperty(wf,{type:"type"},function(){return this.ma},function(a){this.Q&&w.la(this,a);this.ma=a;this.bb=!0});w.defineProperty(wf,{D:"endX"},function(){return this.yb},function(a){this.Q&&w.la(this,a);this.yb=a;this.bb=!0});w.defineProperty(wf,{F:"endY"},function(){return this.Gb},function(a){this.Q&&w.la(this,a);this.Gb=a;this.bb=!0}); w.defineProperty(wf,{sc:"point1X"},function(){return this.Bd},function(a){this.Q&&w.la(this,a);this.Bd=a;this.bb=!0});w.defineProperty(wf,{Pc:"point1Y"},function(){return this.Ve},function(a){this.Q&&w.la(this,a);this.Ve=a;this.bb=!0});w.defineProperty(wf,{Ah:"point2X"},function(){return this.mh},function(a){this.Q&&w.la(this,a);this.mh=a;this.bb=!0});w.defineProperty(wf,{Bh:"point2Y"},function(){return this.Ag},function(a){this.Q&&w.la(this,a);this.Ag=a;this.bb=!0}); w.defineProperty(wf,{ka:"centerX"},function(){return this.Bd},function(a){this.Q&&w.la(this,a);this.Bd=a;this.bb=!0});w.defineProperty(wf,{ra:"centerY"},function(){return this.Ve},function(a){this.Q&&w.la(this,a);this.Ve=a;this.bb=!0});w.defineProperty(wf,{radiusX:"radiusX"},function(){return this.mh},function(a){0>a&&w.Ea(a,">= zero",wf,"radiusX");this.Q&&w.la(this,a);this.mh=a;this.bb=!0}); -w.defineProperty(wf,{radiusY:"radiusY"},function(){return this.Ag},function(a){0>a&&w.Ea(a,">= zero",wf,"radiusY");this.Q&&w.la(this,a);this.Ag=a;this.bb=!0});w.defineProperty(wf,{ye:"startAngle"},function(){return this.yb},function(a){this.yb!==a&&(this.Q&&w.la(this,a),a%=360,0>a&&(a+=360),this.yb=a,this.bb=!0)});w.defineProperty(wf,{of:"sweepAngle"},function(){return this.Gb},function(a){this.Q&&w.la(this,a);360a&&(a=-360);this.Gb=a;this.bb=!0}); -w.defineProperty(wf,{Wl:"isClockwiseArc"},function(){return this.qo},function(a){this.Q&&w.la(this,a);this.qo=a;this.bb=!0});w.defineProperty(wf,{wx:"isLargeArc"},function(){return this.Xo},function(a){this.Q&&w.la(this,a);this.Xo=a;this.bb=!0});w.defineProperty(wf,{Hj:"xAxisRotation"},function(){return this.Bd},function(a){a%=360;0>a&&(a+=360);this.Q&&w.la(this,a);this.Bd=a;this.bb=!0}); -function yf(){this.Z=null;this.Jz=(new z(0,0)).freeze();this.Oy=(new z(0,0)).freeze();this.dv=this.aw=0;this.ev=1;this.Qv="";this.Dw=this.sv=!1;this.pv=this.fv=0;this.Jj=this.Bv=this.Mv=!1;this.tr=null;this.Bw=0;this.Dg=this.Aw=null}w.fa("InputEvent",yf); -yf.prototype.copy=function(){var a=new yf;a.Z=this.Z;a.Jz.assign(this.bf);a.Oy.assign(this.ca);a.aw=this.aw;a.dv=this.dv;a.ev=this.ev;a.Qv=this.Qv;a.sv=this.sv;a.Dw=this.Dw;a.fv=this.fv;a.pv=this.pv;a.Mv=this.Mv;a.Bv=this.Bv;a.Jj=this.Jj;a.tr=this.tr;a.Bw=this.Bw;a.Aw=this.Aw;a.Dg=this.Dg;return a}; -yf.prototype.toString=function(){var a="^";0!==this.wd&&(a+="M:"+this.wd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Fe&&(a+="C:"+this.Fe);0!==this.Nl&&(a+="D:"+this.Nl);this.Ac&&(a+="h");this.bubbles&&(a+="b");null!==this.ca&&(a+="@"+this.ca.toString());return a};w.defineProperty(yf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(yf,{bf:"viewPoint"},function(){return this.Jz},function(a){w.G(a,z,yf,"viewPoint");this.Jz.assign(a)}); -w.defineProperty(yf,{ca:"documentPoint"},function(){return this.Oy},function(a){w.G(a,z,yf,"documentPoint");this.Oy.assign(a)});yf.prototype.getMultiTouchViewPoint=yf.prototype.mx=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.vB(b));return b};w.defineProperty(yf,{wd:"modifiers"},function(){return this.aw},function(a){this.aw=a}); -w.defineProperty(yf,{button:"button"},function(){return this.dv},function(a){this.dv=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.ev},function(a){this.ev=a});w.defineProperty(yf,{key:"key"},function(){return this.Qv},function(a){this.Qv=a});w.defineProperty(yf,{Ol:"down"},function(){return this.sv},function(a){this.sv=a}); -w.defineProperty(yf,{up:"up"},function(){return this.Dw},function(a){this.Dw=a});w.defineProperty(yf,{Fe:"clickCount"},function(){return this.fv},function(a){this.fv=a});w.defineProperty(yf,{Nl:"delta"},function(){return this.pv},function(a){this.pv=a});w.defineProperty(yf,{cu:"isMultiTouch"},function(){return this.Mv},function(a){this.Mv=a});w.defineProperty(yf,{Ac:"handled"},function(){return this.Bv},function(a){this.Bv=a}); -w.defineProperty(yf,{bubbles:"bubbles"},function(){return this.Jj},function(a){this.Jj=a});w.defineProperty(yf,{event:"event"},function(){return this.tr},function(a){this.tr=a});w.u(yf,{vj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});w.u(yf,{Fk:"isMac"},function(){return w.Fk});w.defineProperty(yf,{timestamp:"timestamp"},function(){return this.Bw},function(a){this.Bw=a}); -w.defineProperty(yf,{Vg:"targetDiagram"},function(){return this.Aw},function(a){this.Aw=a});w.defineProperty(yf,{Pe:"targetObject"},function(){return this.Dg},function(a){this.Dg=a});w.defineProperty(yf,{control:"control"},function(){return 0!==(this.wd&1)},function(a){this.wd=a?this.wd|1:this.wd&-2});w.defineProperty(yf,{shift:"shift"},function(){return 0!==(this.wd&4)},function(a){this.wd=a?this.wd|4:this.wd&-5}); -w.defineProperty(yf,{alt:"alt"},function(){return 0!==(this.wd&2)},function(a){this.wd=a?this.wd|2:this.wd&-3});w.defineProperty(yf,{lu:"meta"},function(){return 0!==(this.wd&8)},function(a){this.wd=a?this.wd|8:this.wd&-9});w.defineProperty(yf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); +w.defineProperty(wf,{radiusY:"radiusY"},function(){return this.Ag},function(a){0>a&&w.Ea(a,">= zero",wf,"radiusY");this.Q&&w.la(this,a);this.Ag=a;this.bb=!0});w.defineProperty(wf,{ye:"startAngle"},function(){return this.yb},function(a){this.yb!==a&&(this.Q&&w.la(this,a),a%=360,0>a&&(a+=360),this.yb=a,this.bb=!0)});w.defineProperty(wf,{pf:"sweepAngle"},function(){return this.Gb},function(a){this.Q&&w.la(this,a);360a&&(a=-360);this.Gb=a;this.bb=!0}); +w.defineProperty(wf,{Wl:"isClockwiseArc"},function(){return this.qo},function(a){this.Q&&w.la(this,a);this.qo=a;this.bb=!0});w.defineProperty(wf,{zx:"isLargeArc"},function(){return this.Xo},function(a){this.Q&&w.la(this,a);this.Xo=a;this.bb=!0});w.defineProperty(wf,{Hj:"xAxisRotation"},function(){return this.Bd},function(a){a%=360;0>a&&(a+=360);this.Q&&w.la(this,a);this.Bd=a;this.bb=!0}); +function yf(){this.Z=null;this.Kz=(new z(0,0)).freeze();this.Ry=(new z(0,0)).freeze();this.ev=this.bw=0;this.fv=1;this.Rv="";this.Gw=this.tv=!1;this.qv=this.gv=0;this.Jj=this.Cv=this.Nv=!1;this.tr=null;this.Ew=0;this.Dg=this.Dw=null}w.fa("InputEvent",yf); +yf.prototype.copy=function(){var a=new yf;a.Z=this.Z;a.Kz.assign(this.bf);a.Ry.assign(this.ca);a.bw=this.bw;a.ev=this.ev;a.fv=this.fv;a.Rv=this.Rv;a.tv=this.tv;a.Gw=this.Gw;a.gv=this.gv;a.qv=this.qv;a.Nv=this.Nv;a.Cv=this.Cv;a.Jj=this.Jj;a.tr=this.tr;a.Ew=this.Ew;a.Dw=this.Dw;a.Dg=this.Dg;return a}; +yf.prototype.toString=function(){var a="^";0!==this.wd&&(a+="M:"+this.wd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Fe&&(a+="C:"+this.Fe);0!==this.Nl&&(a+="D:"+this.Nl);this.Ac&&(a+="h");this.bubbles&&(a+="b");null!==this.ca&&(a+="@"+this.ca.toString());return a};w.defineProperty(yf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(yf,{bf:"viewPoint"},function(){return this.Kz},function(a){w.G(a,z,yf,"viewPoint");this.Kz.assign(a)}); +w.defineProperty(yf,{ca:"documentPoint"},function(){return this.Ry},function(a){w.G(a,z,yf,"documentPoint");this.Ry.assign(a)});yf.prototype.getMultiTouchViewPoint=yf.prototype.qx=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.vB(b));return b};w.defineProperty(yf,{wd:"modifiers"},function(){return this.bw},function(a){this.bw=a}); +w.defineProperty(yf,{button:"button"},function(){return this.ev},function(a){this.ev=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.fv},function(a){this.fv=a});w.defineProperty(yf,{key:"key"},function(){return this.Rv},function(a){this.Rv=a});w.defineProperty(yf,{Ol:"down"},function(){return this.tv},function(a){this.tv=a}); +w.defineProperty(yf,{up:"up"},function(){return this.Gw},function(a){this.Gw=a});w.defineProperty(yf,{Fe:"clickCount"},function(){return this.gv},function(a){this.gv=a});w.defineProperty(yf,{Nl:"delta"},function(){return this.qv},function(a){this.qv=a});w.defineProperty(yf,{du:"isMultiTouch"},function(){return this.Nv},function(a){this.Nv=a});w.defineProperty(yf,{Ac:"handled"},function(){return this.Cv},function(a){this.Cv=a}); +w.defineProperty(yf,{bubbles:"bubbles"},function(){return this.Jj},function(a){this.Jj=a});w.defineProperty(yf,{event:"event"},function(){return this.tr},function(a){this.tr=a});w.u(yf,{vj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});w.u(yf,{Fk:"isMac"},function(){return w.Fk});w.defineProperty(yf,{timestamp:"timestamp"},function(){return this.Ew},function(a){this.Ew=a}); +w.defineProperty(yf,{Vg:"targetDiagram"},function(){return this.Dw},function(a){this.Dw=a});w.defineProperty(yf,{Pe:"targetObject"},function(){return this.Dg},function(a){this.Dg=a});w.defineProperty(yf,{control:"control"},function(){return 0!==(this.wd&1)},function(a){this.wd=a?this.wd|1:this.wd&-2});w.defineProperty(yf,{shift:"shift"},function(){return 0!==(this.wd&4)},function(a){this.wd=a?this.wd|4:this.wd&-5}); +w.defineProperty(yf,{alt:"alt"},function(){return 0!==(this.wd&2)},function(a){this.wd=a?this.wd|2:this.wd&-3});w.defineProperty(yf,{mu:"meta"},function(){return 0!==(this.wd&8)},function(a){this.wd=a?this.wd|8:this.wd&-9});w.defineProperty(yf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); w.defineProperty(yf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});w.defineProperty(yf,{mL:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5}); -function Af(){this.Z=null;this.Qb="";this.hw=this.yw=null;this.Pq=!1}w.fa("DiagramEvent",Af);Af.prototype.copy=function(){var a=new Af;a.Z=this.Z;a.Qb=this.Qb;a.yw=this.yw;a.hw=this.hw;a.Pq=this.Pq;return a};Af.prototype.toString=function(){var a="*"+this.name;null!==this.nB&&(a+=":"+this.nB.toString());null!==this.SA&&(a+="("+this.SA.toString()+")");return a};w.defineProperty(Af,{g:"diagram"},function(){return this.Z},function(a){this.Z=a}); -w.defineProperty(Af,{name:"name"},function(){return this.Qb},function(a){this.Qb=a});w.defineProperty(Af,{nB:"subject"},function(){return this.yw},function(a){this.yw=a});w.defineProperty(Af,{SA:"parameter"},function(){return this.hw},function(a){this.hw=a});w.defineProperty(Af,{cancel:"cancel"},function(){return this.Pq},function(a){this.Pq!==a&&w.Ft("DiagramEvent.cancel","2.0");this.Pq=a});function Bf(){this.Qq=Mf;this.Tm=this.$v="";this.ps=this.qs=this.us=this.vs=this.ts=this.Z=this.ke=null} +function Af(){this.Z=null;this.Qb="";this.kw=this.Bw=null;this.Pq=!1}w.fa("DiagramEvent",Af);Af.prototype.copy=function(){var a=new Af;a.Z=this.Z;a.Qb=this.Qb;a.Bw=this.Bw;a.kw=this.kw;a.Pq=this.Pq;return a};Af.prototype.toString=function(){var a="*"+this.name;null!==this.nB&&(a+=":"+this.nB.toString());null!==this.SA&&(a+="("+this.SA.toString()+")");return a};w.defineProperty(Af,{g:"diagram"},function(){return this.Z},function(a){this.Z=a}); +w.defineProperty(Af,{name:"name"},function(){return this.Qb},function(a){this.Qb=a});w.defineProperty(Af,{nB:"subject"},function(){return this.Bw},function(a){this.Bw=a});w.defineProperty(Af,{SA:"parameter"},function(){return this.kw},function(a){this.kw=a});w.defineProperty(Af,{cancel:"cancel"},function(){return this.Pq},function(a){this.Pq!==a&&w.Ft("DiagramEvent.cancel","2.0");this.Pq=a});function Bf(){this.Qq=Mf;this.Tm=this.aw="";this.ps=this.qs=this.us=this.vs=this.ts=this.Z=this.ke=null} w.fa("ChangedEvent",Bf);var Nf;Bf.Transaction=Nf=w.p(Bf,"Transaction",-1);var Mf;Bf.Property=Mf=w.p(Bf,"Property",0);var Of;Bf.Insert=Of=w.p(Bf,"Insert",1);var Pf;Bf.Remove=Pf=w.p(Bf,"Remove",2);Bf.prototype.clear=Bf.prototype.clear=function(){this.ps=this.qs=this.us=this.vs=this.ts=this.Z=this.ke=null}; -Bf.prototype.copy=function(){var a=new Bf;a.Qq=this.Qq;a.$v=this.$v;a.Tm=this.Tm;a.ke=this.ke;a.Z=this.Z;a.ts=this.ts;var b=this.vs;a.vs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.us;a.us=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.qs;a.qs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.ps;a.ps=w.Qa(b)&&"function"===typeof b.S?b.S():b;return a};Bf.prototype.gc=function(a){a.De===Bf?this.yc=a:w.Fj(this,a)}; -Bf.prototype.toString=function(){var a="",a=this.yc===Nf?a+"* ":this.yc===Mf?a+(null!==this.ba?"!m":"!d"):a+((null!==this.ba?"!m":"!d")+this.yc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.nf&&this.nf!==this.propertyName&&(a+=" "+this.nf);a+=": ";this.yc===Nf?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qf(this.object)),null!==this.oldValue&&(a+=" old: "+Qf(this.oldValue)),null!==this.Bj&&(a+=" "+this.Bj),null!==this.newValue&& +Bf.prototype.copy=function(){var a=new Bf;a.Qq=this.Qq;a.aw=this.aw;a.Tm=this.Tm;a.ke=this.ke;a.Z=this.Z;a.ts=this.ts;var b=this.vs;a.vs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.us;a.us=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.qs;a.qs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.ps;a.ps=w.Qa(b)&&"function"===typeof b.S?b.S():b;return a};Bf.prototype.gc=function(a){a.De===Bf?this.yc=a:w.Fj(this,a)}; +Bf.prototype.toString=function(){var a="",a=this.yc===Nf?a+"* ":this.yc===Mf?a+(null!==this.ba?"!m":"!d"):a+((null!==this.ba?"!m":"!d")+this.yc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.of&&this.of!==this.propertyName&&(a+=" "+this.of);a+=": ";this.yc===Nf?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qf(this.object)),null!==this.oldValue&&(a+=" old: "+Qf(this.oldValue)),null!==this.Bj&&(a+=" "+this.Bj),null!==this.newValue&& (a+=" new: "+Qf(this.newValue)),null!==this.Aj&&(a+=" "+this.Aj));return a};Bf.prototype.getValue=Bf.prototype.ja=function(a){return a?this.oldValue:this.newValue};Bf.prototype.getParam=function(a){return a?this.Bj:this.Aj};Bf.prototype.canUndo=Bf.prototype.canUndo=function(){return null!==this.ba||null!==this.g?!0:!1};Bf.prototype.undo=Bf.prototype.undo=function(){this.canUndo()&&(null!==this.ba?this.ba.nn(this,!0):null!==this.g&&this.g.nn(this,!0))}; Bf.prototype.canRedo=Bf.prototype.canRedo=function(){return null!==this.ba||null!==this.g?!0:!1};Bf.prototype.redo=Bf.prototype.redo=function(){this.canRedo()&&(null!==this.ba?this.ba.nn(this,!1):null!==this.g&&this.g.nn(this,!1))};w.defineProperty(Bf,{ba:"model"},function(){return this.ke},function(a){this.ke=a});w.defineProperty(Bf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(Bf,{yc:"change"},function(){return this.Qq},function(a){this.Qq=a}); -w.defineProperty(Bf,{nf:"modelChange"},function(){return this.$v},function(a){this.$v=a});w.defineProperty(Bf,{propertyName:"propertyName"},function(){return this.Tm},function(a){this.Tm=a});w.u(Bf,{rF:"isTransactionFinished"},function(){return this.Qq===Nf&&("CommittedTransaction"===this.Tm||"FinishedUndo"===this.Tm||"FinishedRedo"===this.Tm)});w.defineProperty(Bf,{object:"object"},function(){return this.ts},function(a){this.ts=a}); +w.defineProperty(Bf,{of:"modelChange"},function(){return this.aw},function(a){this.aw=a});w.defineProperty(Bf,{propertyName:"propertyName"},function(){return this.Tm},function(a){this.Tm=a});w.u(Bf,{rF:"isTransactionFinished"},function(){return this.Qq===Nf&&("CommittedTransaction"===this.Tm||"FinishedUndo"===this.Tm||"FinishedRedo"===this.Tm)});w.defineProperty(Bf,{object:"object"},function(){return this.ts},function(a){this.ts=a}); w.defineProperty(Bf,{oldValue:"oldValue"},function(){return this.vs},function(a){this.vs=a});w.defineProperty(Bf,{Bj:"oldParam"},function(){return this.us},function(a){this.us=a});w.defineProperty(Bf,{newValue:"newValue"},function(){return this.qs},function(a){this.qs=a});w.defineProperty(Bf,{Aj:"newParam"},function(){return this.ps},function(a){this.ps=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.Ou=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.Ou(a.valueOf()):w.isArray(a)?Wf(this,a):w.Qa(a)?Tf(this,a):"function"===typeof a?"null":a.toString()}; -function Wf(a,b,c){void 0===c&&(c=!1);var d=w.Ya(b);if(0>=d)return"[]";var e=new ra;e.add("[ ");c&&1=d)return"[]";var e=new ra;e.add("[ ");c&&1d)return;w.Hg(a.Ce,d)}tg(a,"nodeDataArray",Pf,"nodeDataArray",a,b,null,d,null);a.Mu(b)} -F.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.Ya(a),c=0;cd)return;w.Hg(a.Ce,d)}tg(a,"nodeDataArray",Pf,"nodeDataArray",a,b,null,d,null);a.Nu(b)} +F.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.Ya(a),c=0;cb&&(b=w.Ya(a));w.qh(a,b,c);tg(this,"",Of,"",a,null,c,null,b)};F.prototype.removeArrayItem=F.prototype.NF=function(a,b){void 0===b&&(b=-1);a===this.Ce&&w.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.Ya(a)-1);var c=w.Da(a,b);w.Hg(a,b);tg(this,"",Pf,"",a,c,null,b,null)}; w.defineProperty(F,{Tn:"nodeCategoryProperty"},function(){return this.Om},function(a){var b=this.Om;b!==a&&(ug(a,F,"nodeCategoryProperty"),this.Om=a,this.h("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.nA=function(a){if(null===a)return"";var b=this.Om;if(""===b)return"";b=w.sb(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.ay=function(a,b){w.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.Om;if(""!==c)if(this.Ge(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"nodeCategory",Mf,c,a,d,b))}else w.Ma(a,c,b)}}; +F.prototype.setCategoryForNodeData=F.prototype.gy=function(a,b){w.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.Om;if(""!==c)if(this.Ge(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"nodeCategory",Mf,c,a,d,b))}else w.Ma(a,c,b)}}; function P(a,b){F.call(this);2w.Fl(d,a.newValue)&&w.qh(d,c,a.newValue));return}}else if(a.yc=== -Pf){c=a.Bj;if("linkDataArray"===a.nf){d=a.oldValue;w.Qa(d)&&"number"===typeof c&&(e=this.Sf(d),b?(this.Pi.add(d),w.Da(this.df,c)!==d&&w.qh(this.df,c,d),void 0!==e&&this.ad.add(e,d)):(this.Pi.remove(d),w.Da(this.df,c)===d&&w.Hg(this.df,c),void 0!==e&&this.ad.remove(e)));return}if("linkLabelKeys"===a.nf){d=this.Bk(a.object);w.isArray(d)&&"number"===typeof c&&(b?0>w.Fl(d,a.newValue)&&w.qh(d,c,a.newValue):(c=w.Fl(d,a.newValue),0<=c&&w.Hg(d,c)));return}}F.prototype.nn.call(this,a,b)}; -w.defineProperty(P,{Qz:"archetypeNodeData"},function(){return this.pm},function(a){var b=this.pm;b!==a&&(null!==a&&w.G(a,Object,P,"archetypeNodeData"),this.pm=a,this.h("archetypeNodeData",b,a))});P.prototype.Mn=function(a){if(void 0!==a){var b=this.pm;if(null!==b){var c=this.te(a);null===c&&(c=this.copyNodeData(b),w.Ma(c,this.fk,a),this.Cl(c))}return a}}; +f=new ka,h=a.Ng,k=0;kw.Fl(d,a.newValue)&&w.qh(d,c,a.newValue));return}}else if(a.yc=== +Pf){c=a.Bj;if("linkDataArray"===a.of){d=a.oldValue;w.Qa(d)&&"number"===typeof c&&(e=this.Sf(d),b?(this.Pi.add(d),w.Da(this.df,c)!==d&&w.qh(this.df,c,d),void 0!==e&&this.ad.add(e,d)):(this.Pi.remove(d),w.Da(this.df,c)===d&&w.Hg(this.df,c),void 0!==e&&this.ad.remove(e)));return}if("linkLabelKeys"===a.of){d=this.Bk(a.object);w.isArray(d)&&"number"===typeof c&&(b?0>w.Fl(d,a.newValue)&&w.qh(d,c,a.newValue):(c=w.Fl(d,a.newValue),0<=c&&w.Hg(d,c)));return}}F.prototype.nn.call(this,a,b)}; +w.defineProperty(P,{Rz:"archetypeNodeData"},function(){return this.pm},function(a){var b=this.pm;b!==a&&(null!==a&&w.G(a,Object,P,"archetypeNodeData"),this.pm=a,this.h("archetypeNodeData",b,a))});P.prototype.Mn=function(a){if(void 0!==a){var b=this.pm;if(null!==b){var c=this.te(a);null===c&&(c=this.copyNodeData(b),w.Ma(c,this.fk,a),this.Cl(c))}return a}}; w.defineProperty(P,{Kn:"linkFromKeyProperty"},function(){return this.Sh},function(a){var b=this.Sh;b!==a&&(ug(a,P,"linkFromKeyProperty"),this.Sh=a,this.h("linkFromKeyProperty",b,a))});P.prototype.getFromKeyForLinkData=P.prototype.Tl=function(a){if(null!==a){var b=this.Sh;if(""!==b&&(b=w.sb(a,b),void 0!==b)){if(vg(b))return b;w.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; P.prototype.setFromKeyForLinkData=P.prototype.dB=function(a,b){null===b&&(b=void 0);void 0===b||vg(b)||w.yd(b,"number or string",P,"setFromKeyForLinkData:key");if(null!==a){var c=this.Sh;if(""!==c)if(b=this.Mn(b),this.th(a)){var d=w.sb(a,c);d!==b&&(Rg(this,d,a),w.Ma(a,c,b),null===this.te(b)&&zg(this,b,a),tg(this,"linkFromKey",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}}; w.defineProperty(P,{Ln:"linkToKeyProperty"},function(){return this.Th},function(a){var b=this.Th;b!==a&&(ug(a,P,"linkToKeyProperty"),this.Th=a,this.h("linkToKeyProperty",b,a))});P.prototype.getToKeyForLinkData=P.prototype.Ul=function(a){if(null!==a){var b=this.Th;if(""!==b&&(b=w.sb(a,b),void 0!==b)){if(vg(b))return b;w.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; P.prototype.setToKeyForLinkData=P.prototype.jB=function(a,b){null===b&&(b=void 0);void 0===b||vg(b)||w.yd(b,"number or string",P,"setToKeyForLinkData:key");if(null!==a){var c=this.Th;if(""!==c)if(b=this.Mn(b),this.th(a)){var d=w.sb(a,c);d!==b&&(Rg(this,d,a),w.Ma(a,c,b),null===this.te(b)&&zg(this,b,a),tg(this,"linkToKey",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(P,{hu:"linkFromPortIdProperty"},function(){return this.Jm},function(a){var b=this.Jm;b!==a&&(ug(a,P,"linkFromPortIdProperty"),a!==this.Kn&&a!==this.Ln||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Jm=a,this.h("linkFromPortIdProperty",b,a))});P.prototype.getFromPortIdForLinkData=P.prototype.XH=function(a){if(null===a)return"";var b=this.Jm;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; +w.defineProperty(P,{iu:"linkFromPortIdProperty"},function(){return this.Jm},function(a){var b=this.Jm;b!==a&&(ug(a,P,"linkFromPortIdProperty"),a!==this.Kn&&a!==this.Ln||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Jm=a,this.h("linkFromPortIdProperty",b,a))});P.prototype.getFromPortIdForLinkData=P.prototype.XH=function(a){if(null===a)return"";var b=this.Jm;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; P.prototype.setFromPortIdForLinkData=P.prototype.eB=function(a,b){w.j(b,"string",P,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.Jm;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"linkFromPortId",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(P,{ju:"linkToPortIdProperty"},function(){return this.Km},function(a){var b=this.Km;b!==a&&(ug(a,P,"linkToPortIdProperty"),a!==this.Kn&&a!==this.Ln||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Km=a,this.h("linkToPortIdProperty",b,a))});P.prototype.getToPortIdForLinkData=P.prototype.aI=function(a){if(null===a)return"";var b=this.Km;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; -P.prototype.setToPortIdForLinkData=P.prototype.kB=function(a,b){w.j(b,"string",P,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Km;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"linkToPortId",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}};w.defineProperty(P,{iu:"linkLabelKeysProperty"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(ug(a,P,"linkLabelKeysProperty"),this.wg=a,this.h("linkLabelKeysProperty",b,a))}); +w.defineProperty(P,{ku:"linkToPortIdProperty"},function(){return this.Km},function(a){var b=this.Km;b!==a&&(ug(a,P,"linkToPortIdProperty"),a!==this.Kn&&a!==this.Ln||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Km=a,this.h("linkToPortIdProperty",b,a))});P.prototype.getToPortIdForLinkData=P.prototype.aI=function(a){if(null===a)return"";var b=this.Km;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; +P.prototype.setToPortIdForLinkData=P.prototype.kB=function(a,b){w.j(b,"string",P,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Km;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"linkToPortId",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}};w.defineProperty(P,{ju:"linkLabelKeysProperty"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(ug(a,P,"linkLabelKeysProperty"),this.wg=a,this.h("linkLabelKeysProperty",b,a))}); P.prototype.getLabelKeysForLinkData=P.prototype.Bk=function(a){if(null===a)return w.io;var b=this.wg;if(""===b)return w.io;a=w.sb(a,b);return void 0===a?w.io:a}; -P.prototype.setLabelKeysForLinkData=P.prototype.gG=function(a,b){w.Sz(b,P,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.wg;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d=w.io);if(d!==b){for(var e=w.Ya(d),f=0;fe||(w.Hg(d,e),this.th(a)&&(Rg(this,b,a),tg(this,"linkLabelKeys",Pf,c,a,b,null,e,null)))}else void 0!==d&&w.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -w.defineProperty(P,{Ng:"linkDataArray"},function(){return this.df},function(a){var b=this.df;if(b!==a){w.Sz(a,P,"linkDataArray");this.ad.clear();for(var c=w.Ya(a),d=0;dd)return;w.Hg(a.df,d)}tg(a,"linkDataArray",Pf,"linkDataArray",a,b,null,d,null);c=a.Tl(b);Rg(a,c,b);c=a.Ul(b);Rg(a,c,b);d=a.Bk(b);if(w.isArray(d))for(var e=w.Ya(d),f=0;fd)return;w.Hg(a.df,d)}tg(a,"linkDataArray",Pf,"linkDataArray",a,b,null,d,null);c=a.Tl(b);Rg(a,c,b);c=a.Ul(b);Rg(a,c,b);d=a.Bk(b);if(w.isArray(d))for(var e=w.Ya(d),f=0;fa.Fh&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Fh;d&&b&&a.cd("CommittingTransaction",c,a.lj);var e=0;if(0a.qj;e--)f=d.da(e),null!==f&&f.clear(), -d.Yc(e),a.hz=!0;e=a.xF;0===e&&(e=1);0=e&&(f=d.da(0),null!==f&&f.clear(),d.Yc(0),a.dh--);d.add(b);a.dh++;d.freeze();f=b}a.cd("CommittedTransaction",c,f)}else{a.Ki=!0;try{a.isEnabled&&null!==f&&(f.Zt=!0,f.undo())}finally{a.cd("RolledBackTransaction",c,f),a.Ki=!1}null!==f&&f.clear()}a.ov=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Qf;for(b=c.count-1;b>=a;b--)d=c.da(b),null!==d&&d.undo(),c.Ra(),c.Yc(b);c.freeze()}return!1} +function ch(a,b,c){if(a.gb)return!1;a.Uz&&1>a.Fh&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Fh;d&&b&&a.cd("CommittingTransaction",c,a.lj);var e=0;if(0a.qj;e--)f=d.da(e),null!==f&&f.clear(), +d.Yc(e),a.kz=!0;e=a.xF;0===e&&(e=1);0=e&&(f=d.da(0),null!==f&&f.clear(),d.Yc(0),a.dh--);d.add(b);a.dh++;d.freeze();f=b}a.cd("CommittedTransaction",c,f)}else{a.Ki=!0;try{a.isEnabled&&null!==f&&(f.$t=!0,f.undo())}finally{a.cd("RolledBackTransaction",c,f),a.Ki=!1}null!==f&&f.clear()}a.pv=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Qf;for(b=c.count-1;b>=a;b--)d=c.da(b),null!==d&&d.undo(),c.Ra(),c.Yc(b);c.freeze()}return!1} Rf.prototype.canUndo=Rf.prototype.canUndo=function(){if(!this.isEnabled||0=this.Fh&&!this.Yy&&(a=a.g,null!==a&&!1===a.Hn||w.trace("Change not within a transaction: "+c.toString()))}}; -Rf.prototype.skipsEvent=function(a){if(null===a||0>a.yc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Kc)return!0}else if(a instanceof og&&a.Kc)return!0;return!1};w.u(Rf,{VI:"models"},function(){return this.mz.i});w.defineProperty(Rf,{isEnabled:"isEnabled"},function(){return this.cf},function(a){this.cf=a});w.u(Rf,{tG:"transactionToUndo"},function(){return 0<=this.qj&&this.qj<=this.history.count-1?this.history.da(this.qj):null}); -w.u(Rf,{sG:"transactionToRedo"},function(){return this.qj=this.Fh&&!this.az&&(a=a.g,null!==a&&!1===a.Hn||w.trace("Change not within a transaction: "+c.toString()))}}; +Rf.prototype.skipsEvent=function(a){if(null===a||0>a.yc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Kc)return!0}else if(a instanceof og&&a.Kc)return!0;return!1};w.u(Rf,{VI:"models"},function(){return this.pz.i});w.defineProperty(Rf,{isEnabled:"isEnabled"},function(){return this.cf},function(a){this.cf=a});w.u(Rf,{tG:"transactionToUndo"},function(){return 0<=this.qj&&this.qj<=this.history.count-1?this.history.da(this.qj):null}); +w.u(Rf,{sG:"transactionToRedo"},function(){return this.qjb.xh||(b.scale=a))};qg.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.my);w.Fd(a,qg,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Gl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Pw}; -qg.prototype.increaseZoom=function(a){void 0===a&&(a=this.my);w.Fd(a,qg,"increaseZoom:factor");var b=this.g;null!==b&&b.Gl===mh&&(a*=b.scale,ab.xh||(b.scale=a))};qg.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.my);w.Fd(a,qg,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Gl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Pw};qg.prototype.resetZoom=function(a){void 0===a&&(a=this.Xw);w.Fd(a,qg,"resetZoom:newscale");var b=this.g;null===b||ab.xh||(b.scale=a)}; -qg.prototype.canResetZoom=function(a){void 0===a&&(a=this.Xw);w.Fd(a,qg,"canResetZoom:newscale");var b=this.g;return null===b||ab.xh?!1:b.Pw};qg.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.Mz&&!isNaN(this.iz)&&a.qe.L(this.Lz)?(a.scale=this.iz,a.position=this.WC,this.Mz=NaN,this.Lz=ed):(this.iz=b,this.WC=c.copy(),a.zoomToFit(),this.Mz=a.scale,this.Lz=a.qe.copy())}};qg.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Pw}; +""}};qg.prototype.canPasteSelection=function(){var a=this.g;return null===a||a.eb||a.yf||!a.Fp||!a.Pz||null===dh||eh!==a.ba.Ll?!1:!0};qg.prototype.undo=function(){var a=this.g;null!==a&&a.oa.undo()};qg.prototype.canUndo=function(){var a=this.g;return null===a||a.eb||a.yf?!1:a.iE&&a.oa.canUndo()};qg.prototype.redo=function(){var a=this.g;null!==a&&a.oa.redo()};qg.prototype.canRedo=function(){var a=this.g;return null===a||a.eb||a.yf?!1:a.iE&&a.oa.canRedo()}; +qg.prototype.decreaseZoom=function(a){void 0===a&&(a=1/this.py);w.Fd(a,qg,"decreaseZoom:factor");var b=this.g;null!==b&&b.Gl===mh&&(a*=b.scale,ab.xh||(b.scale=a))};qg.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.py);w.Fd(a,qg,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Gl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Sw}; +qg.prototype.increaseZoom=function(a){void 0===a&&(a=this.py);w.Fd(a,qg,"increaseZoom:factor");var b=this.g;null!==b&&b.Gl===mh&&(a*=b.scale,ab.xh||(b.scale=a))};qg.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.py);w.Fd(a,qg,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Gl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Sw};qg.prototype.resetZoom=function(a){void 0===a&&(a=this.$w);w.Fd(a,qg,"resetZoom:newscale");var b=this.g;null===b||ab.xh||(b.scale=a)}; +qg.prototype.canResetZoom=function(a){void 0===a&&(a=this.$w);w.Fd(a,qg,"canResetZoom:newscale");var b=this.g;return null===b||ab.xh?!1:b.Sw};qg.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.Nz&&!isNaN(this.lz)&&a.qe.L(this.Mz)?(a.scale=this.lz,a.position=this.WC,this.Nz=NaN,this.Mz=ed):(this.lz=b,this.WC=c.copy(),a.zoomToFit(),this.Nz=a.scale,this.Mz=a.qe.copy())}};qg.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Sw}; qg.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w.G(a,S,qg,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.bj&&(this.bj.next()?a=this.bj.value:this.bj=null)}catch(c){this.bj=null}null===a&&(0e||Math.abs(b.y-a.y)>d};w.u(pg,{g:"diagram"},function(){return this.Z});w.defineProperty(pg,{name:"name"},function(){return this.Qb},function(a){w.j(a,"string",pg,"name");this.Qb=a}); w.defineProperty(pg,{isEnabled:"isEnabled"},function(){return this.cf},function(a){w.j(a,"boolean",pg,"isEnabled");this.cf=a});w.defineProperty(pg,{sa:"isActive"},function(){return this.JC},function(a){w.j(a,"boolean",pg,"isActive");this.JC=a});w.defineProperty(pg,{Gf:"transactionResult"},function(){return this.UD},function(a){null!==a&&w.j(a,"string",pg,"transactionResult");this.UD=a}); -function lh(){pg.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.bc){var c=a.g;if(!(null===c||b&&(c.eb||c.yf))&&null!==a.Xb){var d=c.oa;d.isEnabled&&d.mF?null!==d.lj&&0c.qa)){var d=a.g;if(null!==d&&!d.eb){var e=a.$i;if(null!==e){var f=null,h=null;null===c.Y&&(f=Ni(a,c.l(0),!1),null!==f&&(h=f.U));var k=null,l=null;null===c.$&&(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.fm=!1,c.Y=h,null!==f&&(c.Lg=f.Qd),c.$=l,null!==k&&(c.Eh=k.Qd),c.Jc!==a.pz&&d.Aa("LinkRelinked",c,a.pz),c.jd!==a.qz&&d.Aa("LinkRelinked",c,a.qz)):Oi(e,h,f,l,k):Oi(e,null,null,null,null)}}}} +function Ni(a,b,c){var d=a.$i;if(null===d)return null;var e=a.g.wn(b,d.KF,function(a){return d.findValidLinkablePort(a,c)});a=w.K();for(var f=Infinity,h=null,e=e.i;e.next();){var k=e.value;if(null!==k.U){var l=k.Wa(Gb,a),l=b.vf(l);lc.qa)){var d=a.g;if(null!==d&&!d.eb){var e=a.$i;if(null!==e){var f=null,h=null;null===c.Y&&(f=Ni(a,c.l(0),!1),null!==f&&(h=f.U));var k=null,l=null;null===c.$&&(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.fm=!1,c.Y=h,null!==f&&(c.Lg=f.Qd),c.$=l,null!==k&&(c.Eh=k.Qd),c.Jc!==a.ew&&d.Aa("LinkRelinked",c,a.ew),c.jd!==a.fw&&d.Aa("LinkRelinked",c,a.fw)):Oi(e,h,f,l,k):Oi(e,null,null,null,null)}}}} lh.prototype.doDragOver=function(){}; function Pi(a,b){var c=a.g;if(null!==c){a.nj&&Ki(a,!0);Vh(a);var d=Li(c,b,null,function(b){return!Ii(a,b)}),e=c.R;e.Pe=d;if(null!==d){e.Ac=!1;for(var f=d;null!==f;){var h=f.KA;if(null!==h&&(h(e,f),e.Ac))break;f=Mi(f)}}else f=c.KA,null!==f&&f(e);if(a.sa||null!==Oh){for(e=(a.bc||a.Xb).i;e.next();)f=e.key,f instanceof T&&f.fe.each(function(a){a.fm=!1});a.doDropOnto(b,d);if(a.sa||null!==Oh){d=w.Ef();for(e=c.selection.i;e.next();)f=e.value,f instanceof T&&Qi(c,f.getAvoidableRect(d));w.Db(d)}}}} lh.prototype.doDropOnto=function(){};lh.prototype.doMouseMove=function(){if(this.sa){var a=this.g;if(null!==a&&null!==this.un&&null!==this.Xb){var b=!1,c=!1;this.mayCopy()?(b=!0,a.cc="copy",Di(this,!1),Nh(this,this.bc),Ei(this,this.bc,!1),Wh(this,this.bc)):this.mayMove()?(c=!0,a.cc="default",Zh(this),Ei(this,this.Xb,!0)):this.mayDragOut()?(a.cc="no-drop",Di(this,!1),Ei(this,this.bc,!1)):Zh(this);Ji(this,a.R.ca,c,b)}}}; @@ -532,26 +532,26 @@ lh.prototype.mayDragOut=function(){if(!this.hF)return!1;var a=this.g;if(null===a lh.prototype.getDraggingSource=function(){return Oh};lh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.hE||a.eb||a.yf||!a.Fp)return!1;var b=Oh;return null===b||null===b.g||b.g.ba.Ll!==a.ba.Ll?!1:!0};lh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Pa.pi();Ri(a);a=Oh;null!==a&&null!==a.g&&(a.g.cc="copy")}};lh.prototype.doSimulatedDragLeave=function(){var a=Oh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; lh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Oh;null!==b&&null!==b.Xb&&this.mayDragIn()&&(a.cc="copy",Si(this,b.Xb.Gj(),!1),Ei(this,this.bc,!1),Ji(this,a.R.ca,!1,!0))}}; lh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Oh;if(null!==b){var c=b.g;b.or=!0;Zh(this);this.mayDragIn()&&(this.Ub("Drop"),Si(this,b.Xb.Gj(),!0),Ei(this,this.bc,!1),null!==this.bc&&a.cG(this.bc.Gj()),Pi(this,a.R.ca),a.rc(),b=a.selection,null!==this.bc?this.Gf="ExternalCopy":b=new J(S),this.bc=null,a.doFocus(),a.Aa("ExternalObjectsDropped",b,c),this.Lk())}}}; -function Si(a,b,c){if(null===a.bc){var d=a.g;if(null!==d&&!d.eb&&!d.yf){d.wb=!c;d.Eq=!c;a.Kk=d.R.ca;d=d.Mp(b,d,!0);c=w.Ef();Ci(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;w.Db(c);var h=a.ww;c=new ka(S);var k=w.K();for(b=b.i;b.next();){var l=b.value,m=d.ja(l);l.de()&&l.canCopy()?(l=l.location,k.m(h.x-(e-l.x),h.y-(f-l.y)),m.location=k,m.Ze(),c.add(m,Sh(k))):l instanceof W&&l.canCopy()&&m.Hk(h.x-e,h.y-f)}w.v(k);for(d=d.i;d.next();)e=d.value,e instanceof W&&e.canCopy()&&c.add(e,Sh());a.bc=c;Mh(a,c.Gj()); +function Si(a,b,c){if(null===a.bc){var d=a.g;if(null!==d&&!d.eb&&!d.yf){d.wb=!c;d.Eq=!c;a.Kk=d.R.ca;d=d.Mp(b,d,!0);c=w.Ef();Ci(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;w.Db(c);var h=a.zw;c=new ka(S);var k=w.K();for(b=b.i;b.next();){var l=b.value,m=d.ja(l);l.de()&&l.canCopy()?(l=l.location,k.m(h.x-(e-l.x),h.y-(f-l.y)),m.location=k,m.Ze(),c.add(m,Sh(k))):l instanceof W&&l.canCopy()&&m.Hk(h.x-e,h.y-f)}w.v(k);for(d=d.i;d.next();)e=d.value,e instanceof W&&e.canCopy()&&c.add(e,Sh());a.bc=c;Mh(a,c.Gj()); null!==a.ed&&(c=a.ed,d=c.Wn,c.Hk(a.Kk.x-(d.x+d.width/2),a.Kk.y-(d.y+d.height/2)))}}}lh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.cc="":a.cc="no-drop")};function Th(a){this.point=a;this.hG=dd}w.fa("DraggingInfo",Th);function Fi(a,b,c){this.Oc=a;this.info=b;this.dI=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(Gb,w.K()),m=c.x-l.x,n=c.y-l.y;w.v(l);l=m*m+n*n;lc){if(null!==this.kc&&a===this.Pg&&b===this.Qg)return!0;var d=b.Qd;null===d&&(d="");if(a.hx(d).count>=c)return!1}return!0}; +Ti.prototype.findTargetPort=function(a){var b=this.g,c=b.R.ca,d=this.KF;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(Gb,w.K()),m=c.x-l.x,n=c.y-l.y;w.v(l);l=m*m+n*n;lc){if(null!==this.kc&&a===this.Pg&&b===this.Qg)return!0;var d=b.Qd;null===d&&(d="");if(a.kx(d).count>=c)return!1}return!0}; Ti.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.cq;if(null!==this.g&&this.g.Za===this&&(null!==a.layer&&!a.layer.zt||!0!==b.pG))return!1;var c=b.NJ;if(Infinity>c){if(null!==this.kc&&a===this.Rg&&b===this.Sg)return!0;var d=b.Qd;null===d&&(d="");if(a.Kg(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.Qd;null===d&&(d="");var e=b.U;if(!(e instanceof T))return!1;var f=b.Qd;null===f&&(f="");for(e=e.Kg(f);e.next();)if(f=e.value,f.Y===c&&f.Lg===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.UH&&d.MJ||!this.isInSameNode(b,d))&&(b.TH&&d.LJ||!this.isLinked(b,d)))||null!==this.kc&&(null!==a&&this.isLabelDependentOnLink(a,this.kc)||null!==c&&this.isLabelDependentOnLink(c,this.kc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.kc))return!1;if(null!==a){var e=a.Fx;if(null!==e&&!e(a,b,c,d,this.kc))return!1}if(null!== -c&&(e=c.Fx,null!==e&&!e(a,b,c,d,this.kc)))return!1;e=this.Fx;return null!==e?e(a,b,c,d,this.kc):!0};Ti.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Mc;if(null===c)return!1;if(c===b)return!0;var d=new J(T);d.add(a);return Ui(this,c,b,d)};function Ui(a,b,c,d){if(b===c)return!0;var e=b.Y;if(null!==e&&e.lf&&(d.add(e),Ui(a,e.Mc,c,d)))return!0;b=b.$;return null!==b&&b.lf&&(d.add(b),Ui(a,b.Mc,c,d))?!0:!1} +Ti.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.UH&&d.MJ||!this.isInSameNode(b,d))&&(b.TH&&d.LJ||!this.isLinked(b,d)))||null!==this.kc&&(null!==a&&this.isLabelDependentOnLink(a,this.kc)||null!==c&&this.isLabelDependentOnLink(c,this.kc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.kc))return!1;if(null!==a){var e=a.Ix;if(null!==e&&!e(a,b,c,d,this.kc))return!1}if(null!== +c&&(e=c.Ix,null!==e&&!e(a,b,c,d,this.kc)))return!1;e=this.Ix;return null!==e?e(a,b,c,d,this.kc):!0};Ti.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Mc;if(null===c)return!1;if(c===b)return!0;var d=new J(T);d.add(a);return Ui(this,c,b,d)};function Ui(a,b,c,d){if(b===c)return!0;var e=b.Y;if(null!==e&&e.mf&&(d.add(e),Ui(a,e.Mc,c,d)))return!0;b=b.$;return null!==b&&b.mf&&(d.add(b),Ui(a,b.Mc,c,d))?!0:!1} Ti.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.TJ:Vi;if(d!==Vi){if(d===Wi){if(null!==c&&!c.Lc)return!0;for(d=b.fe;d.next();){var e=d.value;if(e!==c&&e.Lc&&e.$===b)return!1}return!Xi(this,a,b,c,!0)}if(d===Yi){if(null!==c&&!c.Lc)return!0;for(d=a.fe;d.next();)if(e=d.value,e!==c&&e.Lc&&e.Y===a)return!1;return!Xi(this,a,b,c,!0)}if(d===Zi)return a===b?a=!0:(d=new J(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 J(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.fe;f.next();){var h=f.value;if(h!==d&&(!e||h.Lc)&&h.$===b&&(h=h.Y,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.fe;f.next();){var h=f.value;if(h!==e&&h.$===c&&(h=h.Y,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.fe;f.next();){var h=f.value;if(h!==e){var k=h.Y,h=h.$,k=k===c?h:k;if(k!==c&&cj(a,b,k,d,e))return!0}}return!1}w.defineProperty(Ti,{Fx:"linkValidation"},function(){return this.ol},function(a){null!==a&&w.j(a,"function",Ti,"linkValidation");this.ol=a});w.defineProperty(Ti,{Px:"portTargeted"},function(){return this.uD},function(a){null!==a&&w.j(a,"function",Ti,"portTargeted");this.uD=a}); +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.fe;f.next();){var h=f.value;if(h!==e){var k=h.Y,h=h.$,k=k===c?h:k;if(k!==c&&cj(a,b,k,d,e))return!0}}return!1}w.defineProperty(Ti,{Ix:"linkValidation"},function(){return this.ol},function(a){null!==a&&w.j(a,"function",Ti,"linkValidation");this.ol=a});w.defineProperty(Ti,{Sx:"portTargeted"},function(){return this.uD},function(a){null!==a&&w.j(a,"function",Ti,"portTargeted");this.uD=a}); function dj(){0b.Nt+1&&cb.Nt+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(Kj,{Ut:"handleArchetype"},function(){return this.dl},function(a){null!==a&&w.G(a,G,Kj,"handleArchetype");this.dl=a});w.u(Kj,{handle:"handle"},function(){return this.fc});w.defineProperty(Kj,{rb:"adornedObject"},function(){return this.Dc},function(a){null!==a&&w.G(a,G,Kj,"adornedObject");this.Dc=a}); +"ne-resize":"e-resize"}else if(a instanceof C)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};w.defineProperty(Kj,{Vt:"handleArchetype"},function(){return this.dl},function(a){null!==a&&w.G(a,G,Kj,"handleArchetype");this.dl=a});w.u(Kj,{handle:"handle"},function(){return this.fc});w.defineProperty(Kj,{rb:"adornedObject"},function(){return this.Dc},function(a){null!==a&&w.G(a,G,Kj,"adornedObject");this.Dc=a}); Kj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.eb&&a.At&&a.R.left?null!==this.findToolHandleAt(a.zc.ca,this.name):!1}; -Kj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.fc=this.findToolHandleAt(a.zc.ca,this.name),null!==this.fc&&(this.Dc=this.fc.U.rb,this.hp.set(this.rb.Wa(this.handle.alignment.FF())),this.pD.set(this.Dc.U.location),this.kD.set(this.Dc.Ba),this.Uy=this.computeCellSize(),this.Wy=this.computeMinSize(),this.Vy=this.computeMaxSize(),a.$e=!0,this.hD=a.Pa.isEnabled,a.Pa.isEnabled=!1,this.Ub(this.name),this.sa=!0))}; -Kj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.Lk(),this.Dc=this.fc=null,this.sa=a.$e=!1,a.Pa.isEnabled=this.hD)};Kj.prototype.doCancel=function(){null!==this.rb&&(this.rb.Ba=this.GF,this.rb.U.location=this.cJ);this.stopTool()};Kj.prototype.doMouseMove=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Wy,c=this.Vy,d=this.Uy,e=this.rb.RE(a.R.ca,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.Zf();w.v(e)}}; -Kj.prototype.doMouseUp=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Wy,c=this.Vy,d=this.Uy,e=this.rb.RE(a.R.ca,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);w.v(e);a.rc();this.Gf=this.name;a.Aa("PartResized",this.rb,this.GF)}this.stopTool()}; +Kj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.fc=this.findToolHandleAt(a.zc.ca,this.name),null!==this.fc&&(this.Dc=this.fc.U.rb,this.hp.set(this.rb.Wa(this.handle.alignment.FF())),this.pD.set(this.Dc.U.location),this.kD.set(this.Dc.Ba),this.Xy=this.computeCellSize(),this.Zy=this.computeMinSize(),this.Yy=this.computeMaxSize(),a.$e=!0,this.hD=a.Pa.isEnabled,a.Pa.isEnabled=!1,this.Ub(this.name),this.sa=!0))}; +Kj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.Lk(),this.Dc=this.fc=null,this.sa=a.$e=!1,a.Pa.isEnabled=this.hD)};Kj.prototype.doCancel=function(){null!==this.rb&&(this.rb.Ba=this.GF,this.rb.U.location=this.cJ);this.stopTool()};Kj.prototype.doMouseMove=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Zy,c=this.Yy,d=this.Xy,e=this.rb.RE(a.R.ca,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.Zf();w.v(e)}}; +Kj.prototype.doMouseUp=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Zy,c=this.Yy,d=this.Xy,e=this.rb.RE(a.R.ca,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);w.v(e);a.rc();this.Gf=this.name;a.Aa("PartResized",this.rb,this.GF)}this.stopTool()}; Kj.prototype.resize=function(a){if(null!==this.g){var b=this.rb,c=b.U;b.Ba=a.size;c.Ze();a=this.rb.Wa(this.handle.alignment.FF());c instanceof U?(a=c.position.copy().$n(a).add(this.hp),c.move(a)):c.location=c.location.copy().$n(a).add(this.hp)}}; Kj.prototype.computeResize=function(a,b,c,d,e,f){b.Od()&&(b=Gb);var h=this.rb.Ia,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();Ka(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};Kj.prototype.computeReshape=function(){var a=Nj;this.rb instanceof X&&(a=Oj(this.rb));return!(a===Pj||a===Qj||null!==this.g&&this.g.R.shift)};Kj.prototype.computeMinSize=function(){var a=this.rb.zh.copy(),b=this.zh;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; Kj.prototype.computeMaxSize=function(){var a=this.rb.Bf.copy(),b=this.Bf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.DJ),180),c=Math.min(Math.abs(this.CJ),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(Rj,{DJ:"snapAngleMultiple"},function(){return this.AD},function(a){w.j(a,"number",Rj,"snapAngleMultiple");this.AD=a}); -w.defineProperty(Rj,{CJ:"snapAngleEpsilon"},function(){return this.zD},function(a){w.j(a,"number",Rj,"snapAngleEpsilon");this.zD=a});w.u(Rj,{tL:"originalAngle"},function(){return this.dw});function Tj(){pg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.R.Fe?!1:!0};fk.prototype.doStart=function(){this.sa||null===this.Xg||this.doActivate()}; +fk.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;if(null===a||a.eb||!a.R.left||this.isBeyondDragSize())return!1;var b=a.Je(a.R.ca,null,function(a){return a instanceof Hh});if(null===b||!b.fA||!b.U.canEdit())return!1;b=b.U;return null===b||this.lG===gk&&!b.fb||this.lG===nk&&2>a.R.Fe?!1:!0};fk.prototype.doStart=function(){this.sa||null===this.Xg||this.doActivate()}; fk.prototype.doActivate=function(){if(!this.sa){var a=this.g;if(null!==a){var b=this.Xg;null===b&&(b=a.Je(a.R.ca,function(a){return a instanceof Hh?a:null}));if(null!==b&&(this.Xg=b,null!==b.U)){this.sa=!0;this.Ta=ok;var c=this.GH;null!==b.oG&&(c=b.oG);this.lk=this.Xg.copy();var d=new A(this.Xg.Wa(xb),this.Xg.Wa(Lb));a.vJ(d);if(c instanceof Wj)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();"function"=== -typeof c.focus&&c.focus();"function"===typeof c.select&&this.$x&&(c.select(),c.setSelectionRange(0,9999));a.mj.appendChild(c)}this.kj=c}}}};fk.prototype.doCancel=function(){null!==this.sl&&this.kj instanceof HTMLElement&&(this.kj.style.border=this.sl,this.sl=null);this.stopTool()};fk.prototype.doMouseUp=function(){!this.sa&&this.canStart()&&this.doActivate()};fk.prototype.doMouseDown=function(){this.sa&&this.acceptText(kk)}; -fk.prototype.acceptText=function(a){switch(a){case kk:if(this.Ta===sk)this.kj instanceof HTMLElement&&this.kj.focus();else if(this.Ta===ok||this.Ta===rk||this.Ta===pk)this.Ta=qk,vk(this);break;case jk:case mk:case lk:if(mk===a&&!0===this.Fz.xx)break;if(this.Ta===ok||this.Ta===rk||this.Ta===pk)this.Ta=qk,vk(this)}}; -function vk(a){var b=a.Xg,c=a.g,d=a.kj;if(null!==b&&null!==d){var e=b.text,f="";d instanceof Wj?null!==d.zB&&(f=d.zB()):(f=d.value,f="function"===typeof f?f():f);a.isValidText(b,e,f)?(a.Ub(a.name),a.Ta=sk,d instanceof Wj?d.show(b,c,a):null!==a.sl&&(d.style.border=a.sl,a.sl=null),a.Gf=a.name,b.text=f,null!==b.nG&&b.nG(b,e,f),null!==c&&c.Aa("TextEdited",b,e),a.Lk(),a.stopTool(),null!==c&&c.doFocus()):(a.Ta=rk,null!==b.gA&&b.gA(a,e,f),d instanceof Wj?d.show(b,c,a):(null===a.sl&&(a.sl=d.style.border, +typeof c.focus&&c.focus();"function"===typeof c.select&&this.ey&&(c.select(),c.setSelectionRange(0,9999));a.mj.appendChild(c)}this.kj=c}}}};fk.prototype.doCancel=function(){null!==this.sl&&this.kj instanceof HTMLElement&&(this.kj.style.border=this.sl,this.sl=null);this.stopTool()};fk.prototype.doMouseUp=function(){!this.sa&&this.canStart()&&this.doActivate()};fk.prototype.doMouseDown=function(){this.sa&&this.acceptText(kk)}; +fk.prototype.acceptText=function(a){switch(a){case kk:if(this.Ta===sk)this.kj instanceof HTMLElement&&this.kj.focus();else if(this.Ta===ok||this.Ta===rk||this.Ta===pk)this.Ta=qk,vk(this);break;case jk:case mk:case lk:if(mk===a&&!0===this.Gz.Ax)break;if(this.Ta===ok||this.Ta===rk||this.Ta===pk)this.Ta=qk,vk(this)}}; +function vk(a){var b=a.Xg,c=a.g,d=a.kj;if(null!==b&&null!==d){var e=b.text,f="";d instanceof Wj?null!==d.zB&&(f=d.zB()):(f=d.value,f="function"===typeof f?f():f);a.isValidText(b,e,f)?(a.Ub(a.name),a.Ta=sk,d instanceof Wj?d.show(b,c,a):null!==a.sl&&(d.style.border=a.sl,a.sl=null),a.Gf=a.name,b.text=f,null!==b.nG&&b.nG(b,e,f),null!==c&&c.Aa("TextEdited",b,e),a.Lk(),a.stopTool(),null!==c&&c.doFocus()):(a.Ta=rk,null!==b.hA&&b.hA(a,e,f),d instanceof Wj?d.show(b,c,a):(null===a.sl&&(a.sl=d.style.border, d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}}fk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.Ta=hk;this.Xg=null;if(null!==this.kj){var b=this.kj;if(b instanceof Wj)b.En(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.mj.removeChild(b)}}this.sa=!1}};fk.prototype.doFocus=function(){tk(this)};fk.prototype.doBlur=function(){uk(this)}; -function tk(a){if(null!==a.kj){var b=a.Jy;a.Ta===ok&&(a.Ta=pk);"function"===typeof b.select&&a.$x&&(b.select(),b.setSelectionRange(0,9999))}}function uk(a){if(null!==a.kj){var b=a.Jy;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.$x&&(b.select(),b.setSelectionRange(0,9999))}}fk.prototype.isValidText=function(a,b,c){w.G(a,Hh,fk,"isValidText:textblock");var d=this.pB;if(null!==d&&!d(a,b,c))return!1;d=a.pB;return null===d||d(a,b,c)?!0:!1}; -w.defineProperty(fk,{pB:"textValidation"},function(){return this.xl},function(a){null!==a&&w.j(a,"function",fk,"textValidation");this.xl=a});w.defineProperty(fk,{AF:"minimumEditorScale"},function(){return this.bD},function(a){null!==a&&w.j(a,"number",fk,"minimumEditorScale");this.bD=a});w.defineProperty(fk,{$x:"selectsTextOnActivate"},function(){return this.xD},function(a){null!==a&&w.j(a,"boolean",fk,"selectsTextOnActivate");this.xD=a}); -w.defineProperty(fk,{state:"state"},function(){return this.Ta},function(a){this.Ta!==a&&(w.mb(a,fk,fk,"starting"),this.Ta=a)});fk.prototype.measureTemporaryTextBlock=fk.prototype.QI=function(a){var b=this.lk;b.text=a;wk(b,this.Xg.Yo,Infinity);return b};function fh(){pg.call(this);this.name="ToolManager";this.KG=new I(pg);this.LG=new I(pg);this.MG=new I(pg);this.GC=this.HC=850;this.wC=(new ha(2,2)).Ga();this.RD=5E3;this.fD=Lh;this.EC=xk;this.nv=this.kC=null;this.en=-1}w.La(fh,pg); -w.fa("ToolManager",fh);var Lh;fh.WheelScroll=Lh=w.p(fh,"WheelScroll",0);var Kh;fh.WheelZoom=Kh=w.p(fh,"WheelZoom",1);fh.WheelNone=w.p(fh,"WheelNone",2);var xk;fh.GestureZoom=xk=w.p(fh,"GestureZoom",3);var yk;fh.GestureCancel=yk=w.p(fh,"GestureCancel",4);var zk;fh.GestureNone=zk=w.p(fh,"GestureNone",5);w.defineProperty(fh,{ou:"mouseWheelBehavior"},function(){return this.fD},function(a){w.mb(a,fh,fh,"mouseWheelBehavior");this.fD=a}); -w.defineProperty(fh,{Wp:"gestureBehavior"},function(){return this.EC},function(a){w.mb(a,fh,fh,"gestureBehavior");this.EC=a});fh.prototype.initializeStandardTools=function(){this.XG=new Uj;this.MF=new Qh;this.HI=new mj;this.XF=new Kj;this.sJ=new Rj;this.wF=new dj;this.re=new lh;this.LH=new dk;this.dJ=new ek;this.Xz=new Yj;this.oB=new fk;this.nH=new Vj;this.oH=new Tj}; -fh.prototype.updateAdornments=function(a){var b=this.Kl;if(b instanceof hh&&this.nv===a){var c=b.rb;(null!==a?c.U===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -fh.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.R;b.vj&&this.Wp===yk&&(b.bubbles=!1);if(b.cu){this.cancelWaitAfter();if(this.Wp===zk){b.bubbles=!0;return}if(this.Wp===yk)return;if(a.Za.canStartMultiTouch()){a.Za.standardPinchZoomStart();return}}var c=a.oa;c.Tz&&0!==c.Fh&&w.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.af.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(Ug,{sK:"animationReasons"},function(){return this.$u}); -Ug.prototype.canStart=function(){return!0};Ug.prototype.prepareAutomaticAnimation=Ug.prototype.Un=function(a){this.cf&&(this.Xj||this.Z.Hn)&&(this.$u.add(a),this.canStart(a)&&(this.Wj&&this.pi(),this.pc=!0))};function Ek(a){if(a.cf&&(a.$u.clear(),a.pc))if(!a.no)a.pc=!1;else if(0===a.mo){var b=+new Date;a.mo=b;requestAnimationFrame(function(){if(!1!==a.pc&&!a.Wj&&a.mo===b){var c=a.Z;c.pj("temporaryPixelRatio")&&(c.kk=1);Fk(c);a.pc=!1;c.Aa("AnimationStarting");Gk(a,b)}})}} -function Hk(a,b,c,d,e,f){if(!(!a.pc||"position"===c&&d.L(e)||b instanceof S&&!b.fF)){var h=a.Pm;if(h.contains(b)){var h=h.ja(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=Tk(d));h.Uw&&void 0!==l[c]?h.It[c]=Tk(e):(f||(h.It[c]=Tk(e)),l[c]=Tk(e));f&&0===c.indexOf("position:")&&b instanceof S&&(h.It.location=Tk(b.location))}else k=new sa,l=new sa,k[c]=Tk(d),l[c]=Tk(e),d=l,e=k.position,e instanceof z&&!e.H()&&a.$u.contains("Expand SubGraph")&&e.assign(d.position),k=new Dk(k,l,f),f&&0===c.indexOf("position:")&& +function Ug(){this.lC=Ck;this.jr=this.kr=this.Z=null;this.mo=this.lr=this.mr=0;this.no=this.pc=this.To=this.Wj=!1;this.Xj=this.cf=!0;this.mv=this.lv=this.gC=null;this.fC=0;this.nv=null;this.av=new J("string");this.Uy=600;this.NG=new z(0,0);this.UB=this.TB=this.VD=!1;this.Pm=new ka(G,Dk)}w.fa("AnimationManager",Ug);Ug.prototype.Qc=function(a){this.Z=a};function Ck(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}w.u(Ug,{sK:"animationReasons"},function(){return this.av}); +Ug.prototype.canStart=function(){return!0};Ug.prototype.prepareAutomaticAnimation=Ug.prototype.Un=function(a){this.cf&&(this.Xj||this.Z.Hn)&&(this.av.add(a),this.canStart(a)&&(this.Wj&&this.pi(),this.pc=!0))};function Ek(a){if(a.cf&&(a.av.clear(),a.pc))if(!a.no)a.pc=!1;else if(0===a.mo){var b=+new Date;a.mo=b;requestAnimationFrame(function(){if(!1!==a.pc&&!a.Wj&&a.mo===b){var c=a.Z;c.pj("temporaryPixelRatio")&&(c.kk=1);Fk(c);a.pc=!1;c.Aa("AnimationStarting");Gk(a,b)}})}} +function Hk(a,b,c,d,e,f){if(!(!a.pc||"position"===c&&d.L(e)||b instanceof S&&!b.fF)){var h=a.Pm;if(h.contains(b)){var h=h.ja(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=Tk(d));h.Xw&&void 0!==l[c]?h.It[c]=Tk(e):(f||(h.It[c]=Tk(e)),l[c]=Tk(e));f&&0===c.indexOf("position:")&&b instanceof S&&(h.It.location=Tk(b.location))}else k=new sa,l=new sa,k[c]=Tk(d),l[c]=Tk(e),d=l,e=k.position,e instanceof z&&!e.H()&&a.av.contains("Expand SubGraph")&&e.assign(d.position),k=new Dk(k,l,f),f&&0===c.indexOf("position:")&& b instanceof S&&(k.It.location=Tk(b.location)),h.add(b,k);a.no=!0}}function Tk(a){return a instanceof z?a.copy():a instanceof ha?a.copy():a} -function Gk(a,b){var c;function d(){if(!1!==f.Wj&&f.mo===b){var a=+new Date,c=a>s?m:a-r;Zk(f);$k(f,e,q,h,c,m);f.kv&&f.kv();Ri(e);al(f);a>s?bl(f):requestAnimationFrame(d)}}void 0===c&&(c=new sa);var e=a.Z;if(null!==e){a.Wj=!0;var f=a,h=c.RK||a.lC,k=c.rL||null,l=c.sL||null,m=c.duration||a.Ry,n=a.NG;for(c=a.Pm.i;c.next();){var p=c.value.start.position;p instanceof z&&(p.H()||p.assign(n))}a.gC=h;a.kv=k;a.lv=l;a.fC=m;a.mv=a.Pm;var q=a.mv;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l= -k["position:placeholder"],n=l.Wa(xb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);Zk(a);$k(a,e,q,h,0,m);Ri(a.Z);al(a);var r=+new Date,s=r+m;f.mo===b&&requestAnimationFrame(function(){d()})}}function Zk(a){if(!a.To){var b=a.Z;a.VD=b.wb;a.TB=b.Ne;a.UB=b.Iu;b.wb=!0;b.Ne=!0;b.Iu=!0;a.To=!0}}function al(a){var b=a.Z;b.wb=a.VD;b.Ne=a.TB;b.Iu=a.UB;a.To=!1} +function Gk(a,b){var c;function d(){if(!1!==f.Wj&&f.mo===b){var a=+new Date,c=a>s?m:a-r;Zk(f);$k(f,e,q,h,c,m);f.lv&&f.lv();Ri(e);al(f);a>s?bl(f):requestAnimationFrame(d)}}void 0===c&&(c=new sa);var e=a.Z;if(null!==e){a.Wj=!0;var f=a,h=c.RK||a.lC,k=c.rL||null,l=c.sL||null,m=c.duration||a.Uy,n=a.NG;for(c=a.Pm.i;c.next();){var p=c.value.start.position;p instanceof z&&(p.H()||p.assign(n))}a.gC=h;a.lv=k;a.mv=l;a.fC=m;a.nv=a.Pm;var q=a.nv;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l= +k["position:placeholder"],n=l.Wa(xb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);Zk(a);$k(a,e,q,h,0,m);Ri(a.Z);al(a);var r=+new Date,s=r+m;f.mo===b&&requestAnimationFrame(function(){d()})}}function Zk(a){if(!a.To){var b=a.Z;a.VD=b.wb;a.TB=b.Ne;a.UB=b.Ju;b.wb=!0;b.Ne=!0;b.Ju=!0;a.To=!0}}function al(a){var b=a.Z;b.wb=a.VD;b.Ne=a.TB;b.Ju=a.UB;a.To=!1} function $k(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!==cl[m])cl[m](h,l[m],k[m],d,e,f)}d=b.yA;b.yA=!0;m=a.lC;0!==a.mr&&0!==a.lr&&(c=a.mr,b.tb=m(e,c,a.lr-c,f));null!==a.kr&&null!==a.jr&&(c=a.kr,a=a.jr,b.ib=new z(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.yA=d}Ug.prototype.stopAnimation=Ug.prototype.pi=function(){!0===this.pc&&(this.pc=!1,this.no&&this.Z.Le());this.Wj&&this.cf&&bl(this)}; -function bl(a){a.Wj=!1;a.no=!1;Zk(a);for(var b=a.Z,c=a.gC,d=a.fC,e=a.mv.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.It,n;for(n in l)if(void 0!==cl[n]){var p=n;!h.Uw||"position:node"!==p&&"position:placeholder"!==p||(p="position");cl[p](f,k[n],void 0!==m[n]?m[n]:h.Uw?k[n]:l[n],c,d,d)}h.Uw&&void 0!==m.location&&f instanceof S&&(f.location=m.location);h.Tx&&f instanceof S&&f.vd(!1)}for(c=a.Z.links;c.next();)d=c.value,null!==d.mp&&(d.points=d.mp,d.mp=null);b.Gx.clear();b.kk=null;b.rc();b.na(); -b.Zf();dl(b);al(a);a.lv&&a.lv();a.mo=0;a.mv=null;a.lv=null;a.kv=null;a.kr=null;a.jr=null;a.mr=0;a.lr=0;a.Pm=new ka(G,Dk);b.Aa("AnimationFinished");b.Le()} +function bl(a){a.Wj=!1;a.no=!1;Zk(a);for(var b=a.Z,c=a.gC,d=a.fC,e=a.nv.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.It,n;for(n in l)if(void 0!==cl[n]){var p=n;!h.Xw||"position:node"!==p&&"position:placeholder"!==p||(p="position");cl[p](f,k[n],void 0!==m[n]?m[n]:h.Xw?k[n]:l[n],c,d,d)}h.Xw&&void 0!==m.location&&f instanceof S&&(f.location=m.location);h.Wx&&f instanceof S&&f.vd(!1)}for(c=a.Z.links;c.next();)d=c.value,null!==d.mp&&(d.points=d.mp,d.mp=null);b.Jx.clear();b.kk=null;b.rc();b.na(); +b.Zf();dl(b);al(a);a.mv&&a.mv();a.mo=0;a.nv=null;a.mv=null;a.lv=null;a.kr=null;a.jr=null;a.mr=0;a.lr=0;a.Pm=new ka(G,Dk);b.Aa("AnimationFinished");b.Le()} function el(a,b,c){var d=b.W,e=c.W,f=null;c instanceof U&&(f=c.placeholder);null!==f?(d=f.Wa(xb),d.x+=f.padding.left,d.y+=f.padding.top,Hk(a,b,"position",d,b.position,!1)):Hk(a,b,"position",new z(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Hk(a,b,"scale",.01,b.scale,!1);if(b instanceof U)for(b=b.Nc;b.next();)f=b.value,f instanceof T&&el(a,f,c)} -function fl(a,b,c){if(b.isVisible()){var d=null;c instanceof U&&(d=c.placeholder);null!==d?Hk(a,b,"position:placeholder",b.position,d,!0):Hk(a,b,"position:node",b.position,c,!0);Hk(a,b,"scale",b.scale,.01,!0);a.pc&&(d=a.Pm,d.contains(b)&&(d.ja(b).Tx=!0));if(b instanceof U)for(b=b.Nc;b.next();)d=b.value,d instanceof T&&fl(a,d,c)}}function gl(a,b,c){a.pc&&(null===a.kr&&b.H()&&null===a.jr&&(a.kr=b.copy()),a.jr=c.copy(),a.no=!0)} -function hl(a,b,c){a.pc&&a.Z.Hn&&(0===a.mr&&0===a.lr&&(a.mr=b),a.lr=c,a.no=!0)}w.defineProperty(Ug,{isEnabled:"isEnabled"},function(){return this.cf},function(a){w.j(a,"boolean",Ug,"isEnabled");this.cf=a});w.defineProperty(Ug,{duration:"duration"},function(){return this.Ry},function(a){w.j(a,"number",Ug,"duration");1>a&&w.Ea(a,">= 1",Ug,"duration");this.Ry=a});w.u(Ug,{kf:"isAnimating"},function(){return this.Wj});w.u(Ug,{yI:"isTicking"},function(){return this.To}); -w.defineProperty(Ug,{nF:"isInitial"},function(){return this.Xj},function(a){w.j(a,"boolean",Ug,"isInitial");this.Xj=a});function Dk(a,b,c){this.start=a;this.end=b;this.It=new sa;this.Uw=c;this.Tx=!1} -var cl={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.gy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new z(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.W,k=c.W;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.gy(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f)):a.position=new z(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.gy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)): -a.position=new z(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 og(){0a&&w.Ea(a,">= 1",Ug,"duration");this.Uy=a});w.u(Ug,{lf:"isAnimating"},function(){return this.Wj});w.u(Ug,{yI:"isTicking"},function(){return this.To}); +w.defineProperty(Ug,{nF:"isInitial"},function(){return this.Xj},function(a){w.j(a,"boolean",Ug,"isInitial");this.Xj=a});function Dk(a,b,c){this.start=a;this.end=b;this.It=new sa;this.Xw=c;this.Wx=!1} +var cl={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.jy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new z(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.W,k=c.W;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.jy(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f)):a.position=new z(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.jy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)): +a.position=new z(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 og(){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 U?e++:l instanceof T?d++:l instanceof W?f++:l instanceof hh?h++:c++}k="";0=d.count)a=d.count;else if(d.da(a)===b)return-1;d.Md(a,b);b.Vt(c);d=this.g;null!==d&&(c?d.na():d.Zp(b));nl(this,a,b);return a}; -g.jf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.jf(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.da(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Wt(c);d.Yc(a);d=this.g;null!==d&&(c?d.na():d.jf(b));b.Rv=null;return a}; +c(q)),null===q||null!==d&&!d(q)||(f instanceof J&&f.add(q),f instanceof I&&f.add(q)))}}w.v(k);w.v(l);return f};g=og.prototype;g.Cf=function(a,b){if(this.visible){var c;c=void 0===b?a.pb:b;for(var d=this.zb.n,e=d.length,f=0;f=d.count)a=d.count;else if(d.da(a)===b)return-1;d.Md(a,b);b.Wt(c);d=this.g;null!==d&&(c?d.na():d.Zp(b));nl(this,a,b);return a}; +g.kf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.kf(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.da(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Xt(c);d.Yc(a);d=this.g;null!==d&&(c?d.na():d.kf(b));b.Sv=null;return a}; function nl(a,b,c){b=ol(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.ho)){if(0!==c.Nc.count){for(var d=-1,e=a.zb.n,f=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 f=b-1,h=NaN;0<=f;){h=a.da(f).ho;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.Yc(b);a.Md(f,c);return f}for(h=NaN;0<=--f&&(h=a.da(f).ho,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.Yc(b);a.Md(k,c);return k}for(l=NaN;++ka||1a||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.Zw.licenseKey=!0);this.ll=1;this.Gm=0;this.XC=new z;this.TD=500;this.bv=new z;this.Zs=null;this.il=!1;this.preventDefault=this.Sx=this.IF=this.JF=this.HF=this.Qn=this.Og=this.Rn=this.On=this.Pn=this.BB=this.sB=this.tB=this.uB=this.vl=this.Ms=this.ul=this.Ls=null;this.fl=new Bl;void 0!==a&&Cl(this,a);this.Lv=!1;this.gD=1;this.Sc=!1}w.fa("Diagram",D); -D.prototype.clear=D.prototype.clear=function(){var a=null;null!==this.pd&&(a=this.pd.U);this.ba.clear();for(var b=this.ac.length,c=0;cparseInt(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.bx.licenseKey=!0);this.ll=1;this.Gm=0;this.XC=new z;this.TD=500;this.cv=new z;this.Zs=null;this.il=!1;this.preventDefault=this.Vx=this.IF=this.JF=this.HF=this.Qn=this.Og=this.Rn=this.On=this.Pn=this.BB=this.sB=this.tB=this.uB=this.vl=this.Ms=this.ul=this.Ls=null;this.fl=new Bl;void 0!==a&&Cl(this,a);this.Mv=!1;this.gD=1;this.Sc=!1}w.fa("Diagram",D); +D.prototype.clear=D.prototype.clear=function(){var a=null;null!==this.pd&&(a=this.pd.U);this.ba.clear();for(var b=this.ac.length,c=0;c=a)return b;for(var c=this.ac.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.Z instanceof D?b.Z:null}; w.defineProperty(D,{mj:"div"},function(){return this.Mb},function(a){null!==a&&w.G(a,HTMLDivElement,D,"div");if(this.Mb!==a){ql=[];var b=this.Mb;null!==b?(b.Z=void 0,b.innerHTML="",null!==this.Fb&&(this.Fb.removeEventListener("touchstart",this.uB,!1),this.Fb.removeEventListener("touchmove",this.tB,!1),this.Fb.removeEventListener("touchend",this.sB,!1),this.Fb.Hd.Z=null),b=this.ab,null!==b&&(b.af.each(function(a){a.cancelWaitAfter()}),b.$f.each(function(a){a.cancelWaitAfter()}),b.ag.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.Za.doCancel(),this.qf=this.Fb=null,window.removeEventListener("resize",this.BB,!1),window.removeEventListener("mousemove",this.Pn,!0),window.removeEventListener("mousedown",this.On,!0),window.removeEventListener("mouseup",this.Rn,!0),window.removeEventListener("mousewheel",this.Og,!0),window.removeEventListener("DOMMouseScroll",this.Og,!0),window.removeEventListener("mouseout",this.Qn,!0)):this.eh=!1;this.Mb=null;if(null!==a){if(b=a.Z)b.mj=null;Cl(this,a);this.Rx()}}}); +b.cancelWaitAfter(),this.Za.doCancel(),this.rf=this.Fb=null,window.removeEventListener("resize",this.BB,!1),window.removeEventListener("mousemove",this.Pn,!0),window.removeEventListener("mousedown",this.On,!0),window.removeEventListener("mouseup",this.Rn,!0),window.removeEventListener("mousewheel",this.Og,!0),window.removeEventListener("DOMMouseScroll",this.Og,!0),window.removeEventListener("mouseout",this.Qn,!0)):this.eh=!1;this.Mb=null;if(null!==a){if(b=a.Z)b.mj=null;Cl(this,a);this.Ux()}}}); function Fl(a){var b=a.Fb;b.addEventListener("touchstart",a.uB,!1);b.addEventListener("touchmove",a.tB,!1);b.addEventListener("touchend",a.sB,!1);b.addEventListener("mousemove",a.Pn,!1);b.addEventListener("mousedown",a.On,!1);b.addEventListener("mouseup",a.Rn,!1);b.addEventListener("mousewheel",a.Og,!1);b.addEventListener("DOMMouseScroll",a.Og,!1);b.addEventListener("mouseout",a.Qn,!1);b.addEventListener("keydown",a.AI,!1);b.addEventListener("keyup",a.BI,!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.ab.Wp===yk&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.HF,!1);b.addEventListener("pointermove",a.JF,!1);b.addEventListener("pointerleave",a.IF,!1);window.addEventListener("resize",a.BB,!1)}D.prototype.computePixelRatio=function(){return null!==this.kk?this.kk:this.gD};D.prototype.doMouseMove=function(){this.Za.doMouseMove()}; D.prototype.doMouseDown=function(){this.Za.doMouseDown()};D.prototype.doMouseUp=function(){this.Za.doMouseUp()};D.prototype.doMouseWheel=function(){this.Za.doMouseWheel()};D.prototype.doKeyDown=function(){this.Za.doKeyDown()};D.prototype.doKeyUp=function(){this.Za.doKeyUp()};D.prototype.doFocus=function(){this.focus()};D.prototype.focus=D.prototype.focus=function(){this.Fb&&this.Fb.focus()}; -function Fk(a){if(null!==a.Fb){var b=a.Mb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.el?a.Dd:0,d=a.Uj?a.Dd:0,e=a.Ad;a.Ad=a.computePixelRatio();a.Ad!==e&&(a.Gr=!0,a.Le());if(b.clientWidth!==a.Ib+c||b.clientHeight!==a.Lb+d)a.Am=!0,a.Be=!0,b=a.Sb,null!==b&&b.zx&&a.Gl===mh&&b.J(),a.Xd||a.Le()}}} -function zl(a){var b=new og;b.name="Background";a.tt(b);b=new og;b.name="";a.tt(b);b=new og;b.name="Foreground";a.tt(b);b=new og;b.name="Adornment";b.Kc=!0;a.tt(b);b=new og;b.name="Tool";b.Kc=!0;b.gF=!0;a.tt(b);b=new og;b.name="Grid";b.tf=!1;b.Tg=!1;b.Kc=!0;a.bH(b,a.Kt("Background"))} +function Fk(a){if(null!==a.Fb){var b=a.Mb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.el?a.Dd:0,d=a.Uj?a.Dd:0,e=a.Ad;a.Ad=a.computePixelRatio();a.Ad!==e&&(a.Gr=!0,a.Le());if(b.clientWidth!==a.Ib+c||b.clientHeight!==a.Lb+d)a.Am=!0,a.Be=!0,b=a.Sb,null!==b&&b.Cx&&a.Gl===mh&&b.J(),a.Xd||a.Le()}}} +function zl(a){var b=new og;b.name="Background";a.tt(b);b=new og;b.name="";a.tt(b);b=new og;b.name="Foreground";a.tt(b);b=new og;b.name="Adornment";b.Kc=!0;a.tt(b);b=new og;b.name="Tool";b.Kc=!0;b.gF=!0;a.tt(b);b=new og;b.name="Grid";b.uf=!1;b.Tg=!1;b.Kc=!0;a.bH(b,a.Kt("Background"))} function Gl(a){a.pd=new C(Hl);a.pd.name="GRID";var b=new X;b.Cb="LineH";b.stroke="lightgray";b.kb=.5;b.interval=1;a.pd.add(b);b=new X;b.Cb="LineH";b.stroke="gray";b.kb=.5;b.interval=5;a.pd.add(b);b=new X;b.Cb="LineH";b.stroke="gray";b.kb=1;b.interval=10;a.pd.add(b);b=new X;b.Cb="LineV";b.stroke="lightgray";b.kb=.5;b.interval=1;a.pd.add(b);b=new X;b.Cb="LineV";b.stroke="gray";b.kb=.5;b.interval=5;a.pd.add(b);b=new X;b.Cb="LineV";b.stroke="gray";b.kb=1;b.interval=10;a.pd.add(b);b=new S;b.add(a.pd); -b.Xf="Grid";b.ho=0;b.AA=!1;b.fF=!1;b.Tg=!1;b.EA="GRID";a.add(b);a.zb.remove(b);a.pd.visible=!1}function Il(){this.Z.isEnabled?this.Z.KH(this):Jl(this.Z)}function Kl(a){this.Z.isEnabled?(this.Z.xz=!0,this.Z.zz=a.target.scrollTop,this.Z.yz=a.target.scrollLeft):Jl(this.Z)} -D.prototype.diagramScroll=D.prototype.KH=function(a){if(this.xz&&null!==this.Fb){this.nw=!0;var b=this.qe,c=this.pb,d=b.width,e=c.width,f=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.Kr)switch(this.vz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;el&&(this.position=s.m(-(this.rw.scrollWidth-this.Ib)+u-this.Ib/r+k,this.position.y))),a.RG&&this.ne&&(bn&&(this.position=s.m(this.position.x,-(this.rw.scrollHeight-this.Lb)+a.scrollTop-this.Lb/r+m))),w.v(s),Ll(this),this.Am=this.nw=!1,b=this.qe,c=this.pb,k=b.right,l=c.right, +b.Xf="Grid";b.ho=0;b.AA=!1;b.fF=!1;b.Tg=!1;b.EA="GRID";a.add(b);a.zb.remove(b);a.pd.visible=!1}function Il(){this.Z.isEnabled?this.Z.KH(this):Jl(this.Z)}function Kl(a){this.Z.isEnabled?(this.Z.yz=!0,this.Z.Az=a.target.scrollTop,this.Z.zz=a.target.scrollLeft):Jl(this.Z)} +D.prototype.diagramScroll=D.prototype.KH=function(a){if(this.yz&&null!==this.Fb){this.qw=!0;var b=this.qe,c=this.pb,d=b.width,e=c.width,f=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.Kr)switch(this.wz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;el&&(this.position=s.m(-(this.uw.scrollWidth-this.Ib)+u-this.Ib/r+k,this.position.y))),a.RG&&this.ne&&(bn&&(this.position=s.m(this.position.x,-(this.uw.scrollHeight-this.Lb)+a.scrollTop-this.Lb/r+m))),w.v(s),Ll(this),this.Am=this.qw=!1,b=this.qe,c=this.pb,k=b.right,l=c.right, m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,e>=d&&p>=q&&k<=l&&(this.Qs.style.width="1px"),h>=f&&b>=c&&m<=n&&(this.Qs.style.height="1px"))}};D.prototype.computeBounds=D.prototype.sh=function(){0c&&(e=c),ea.xh&&(e=a.xh),e):b===Sl?(e=l>k?(h-a.Dd)/d:(f-a.Dd)/e,e>c&&(e=c),ea.xh&&(e=a.xh),e):a.scale}D.prototype.zoomToFit=D.prototype.zoomToFit=function(){this.scale=Ol(this,Rl)}; +function Nl(a,b){if((b||a.eh)&&!a.Sc&&null!==a.Fb&&!a.Pa.lf&&a.qe.H()){a.Sc=!0;var c=a.qm;b&&a.gl!==mh&&(c=a.gl);var d=c!==mh?Ol(a,c):a.scale,c=a.pb.copy(),e=a.Ib/d,f=a.Lb/d,h=null,k=a.Pa;k.pc&&(h=a.ib.copy());a.position.Ra();var l=a.to;b&&!l.fd()&&a.No.fd()&&(l=a.No);Pl(a,a.ib,a.qe,e,f,l,b);a.position.freeze();null!==h&&gl(k,h,a.ib);e=a.scale;a.scale=d;a.Sc=!1;d=a.pb;d.Ic(c)||a.uu(c,d,e,a.scale,!1)}} +function Ol(a,b){var c=a.ob.$w;if(null===a.Fb)return c;a.Vj&&Ql(a,a.sh());var d=a.qe;if(!d.H())return c;var e=d.width,d=d.height,f=a.Ib,h=a.Lb,k=f/e,l=h/d;return b===Rl?(e=Math.min(l,k),e>c&&(e=c),ea.xh&&(e=a.xh),e):b===Sl?(e=l>k?(h-a.Dd)/d:(f-a.Dd)/e,e>c&&(e=c),ea.xh&&(e=a.xh),e):a.scale}D.prototype.zoomToFit=D.prototype.zoomToFit=function(){this.scale=Ol(this,Rl)}; D.prototype.zoomToRect=function(a,b){void 0===b&&(b=Rl);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Rl||b===Sl)if(isNaN(c))e=this.pb.height*this.scale/d;else if(isNaN(d))e=this.pb.width*this.scale/c;else var e=this.Ib,f=this.Lb,e=b===Sl?f/d>e/c?(f-(this.Uj?this.Dd:0))/d:(e-(this.el?this.Dd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new z(a.x,a.y)}};w.defineProperty(D,{yA:null},function(){return this.Sc},function(a){this.Sc=a}); D.prototype.alignDocument=function(a,b){this.Vj&&Ql(this,this.sh());var c=this.qe,d=this.pb;this.position=new z(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 Pl(a,b,c,d,e,f,h){var k=b.x,l=b.y;if(h||a.$A===rl)f.fd()&&(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.$F,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.touches.length)&&b.preventDefault();b.cancelBubble=!0;return!1} D.prototype.AI=function(a){if(!this.Z.isEnabled)return!1;var b=this.Z.Pb;Tl(this.Z,this.Z,a,b,!1);b.key=String.fromCharCode(a.which);b.Ol=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= "Add";break;case 189:case 173:case 109:b.key="Subtract";break;case 27:b.key="Esc"}this.Z.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?Xl(b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; D.prototype.BI=function(a){if(!this.Z.isEnabled)return!1;var b=this.Z.Pb;Tl(this.Z,this.Z,a,b,!1);b.key=String.fromCharCode(a.which);b.up=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 93:a.preventDefault()}this.Z.doKeyUp(); return Xl(b,a)};D.prototype.yr=function(a){var b=this.Fb;if(null===b)return new z(0,0);var c=this.Ib,d=this.Lb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.dd?(a=new z(c,a),La(a,this.dd),a):new z(c,a)};function Ul(a,b,c){var d=a.Fb,e=a.Ib,f=a.Lb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-e/d.width*d.left,k=b.clientY-f/d.height*d.top);c.bf.m(h,k);null!==a.dd?(b=w.xb(h,k),a.dd.li(b),c.ca.assign(b),w.v(b)):c.ca.m(h,k)} function zf(a,b,c,d){var e=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Zi[0])e=a.Zi[c];else return;c=a.Fb;b=a.Ib;a=a.Lb;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.rc=function(){this.Vj||(this.Vj=!0,this.Le(!0))};function dl(a){a.Xd||Hi(a);a.Vj&&Ql(a,a.sh())} -D.prototype.redraw=D.prototype.Rx=function(){this.Sc||this.Xd||(this.na(),Yl(this),Ll(this),this.rc(),this.Zf())};D.prototype.isUpdateRequested=function(){return this.Nf};D.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Pa,c=b.isEnabled;b.pi();b.isEnabled=!1;Ri(this);this.eh=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)}; -D.prototype.requestUpdate=D.prototype.Le=function(a){void 0===a&&(a=!1);if(!0!==this.Nf&&!(this.Sc||!1===a&&this.Xd)){this.Nf=!0;var b=this;requestAnimationFrame(function(){b.Nf&&b.Zf()})}};D.prototype.maybeUpdate=D.prototype.Zf=function(){if(!this.Io||this.Nf)this.Io&&(this.Io=!1),Ri(this)};function Zl(a,b){a.Pa.kf||a.Sc||!a.Am||Jl(a)||(b&&Hi(a),Nl(a,!1))} -function Ri(a){if(!a.Xd&&(a.Nf=!1,null!==a.Mb)){a.Xd=!0;var b=a.Pa,c=a.sz;if(!b.To&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.sg.i;if(null===c||0===a.sg.count)break;a.sg=new J(S);a.yB(c,a.sg)}a.eg.each(function(a){a instanceof U&&0!==(a.ya&65536)!==!1&&(a.ya^=65536)})}} +function Hi(a){if((a.Xd||!a.Pa.lf)&&0!==a.sg.count){for(var b=0;23>b;b++){var c=a.sg.i;if(null===c||0===a.sg.count)break;a.sg=new J(S);a.yB(c,a.sg)}a.eg.each(function(a){a instanceof U&&0!==(a.ya&65536)!==!1&&(a.ya^=65536)})}} D.prototype.yB=function(a,b){for(a.reset();a.next();){var c=a.value;!c.de()||c instanceof U||(c.Yl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof U&&c.isVisible()&&em(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.Yl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof hh&&c.isVisible()&&(c.Yl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c))}; -function em(a,b){for(var c=w.lb(),d=w.lb(),e=b.Nc;e.next();){var f=e.value;f.isVisible()&&(f instanceof U?(hm(f)||Bm(f)||Cm(f))&&em(a,f):f instanceof W?f.Y===b||f.$===b?d.push(f):c.push(f):(wk(f,Infinity,Infinity),f.hc()))}for(var e=c.length,h=0;hx+1&& (H=Math.max((t-x)*c+a.Ib,H)),q+k+1p+1&&(k=Math.max((y-p)*c+a.Lb,k)),r+l+1x+1&&(H=Math.max((t-x)*c+a.Ib,H)),q+1p+1&&(k=Math.max((y-p)*c+V,k)),r+1x+1&&(l=a.position.x*c));if(a.Kr)switch(a.vz){case "negative":l=-(b.scrollWidth-l-b.clientWidth);break;case "reverse":l=b.scrollWidth-l-b.clientWidth}b.scrollLeft=l;a.tA&&a.ne&&(r+1p+1&&(b.scrollTop=a.position.y*c));h&&(a.Gr=!0);m=a.Ib;n=a.Lb;b.style.width=m+(a.el?a.Dd:0)+ -"px";b.style.height=n+(a.Uj?a.Dd:0)+"px";a.xz=!1;return d!==m||e!==n||a.Pa.pc?(p=a.pb,a.tu(f,p,c,a.scale,h),!1):!0} -D.prototype.add=D.prototype.add=function(a){w.G(a,S,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.Eq&&(a.ml="Tool");var c=a.Xf,b=this.Kt(c);null===b&&(b=this.Kt(""));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.Xc(Of,"parts",b,null,a,null,c),b.Kc||this.rc(),a.J(Jm),c=a.Cx,null!== +a.ne&&(k=1,v+1p+1&&(k=Math.max((y-p)*c+V,k)),r+1x+1&&(l=a.position.x*c));if(a.Kr)switch(a.wz){case "negative":l=-(b.scrollWidth-l-b.clientWidth);break;case "reverse":l=b.scrollWidth-l-b.clientWidth}b.scrollLeft=l;a.tA&&a.ne&&(r+1p+1&&(b.scrollTop=a.position.y*c));h&&(a.Gr=!0);m=a.Ib;n=a.Lb;b.style.width=m+(a.el?a.Dd:0)+ +"px";b.style.height=n+(a.Uj?a.Dd:0)+"px";a.yz=!1;return d!==m||e!==n||a.Pa.pc?(p=a.pb,a.uu(f,p,c,a.scale,h),!1):!0} +D.prototype.add=D.prototype.add=function(a){w.G(a,S,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.Eq&&(a.ml="Tool");var c=a.Xf,b=this.Kt(c);null===b&&(b=this.Kt(""));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.Xc(Of,"parts",b,null,a,null,c),b.Kc||this.rc(),a.J(Jm),c=a.Fx,null!== c&&c(a,null,b))}}; D.prototype.Zp=function(a){if(a instanceof T){if(this.gp.add(a),a instanceof U){var b=a.Ka;null===b?this.yl.add(a):b.dp.add(a);b=a.Sb;null!==b&&(b.g=this)}}else a instanceof W?this.$o.add(a):a instanceof hh||this.zb.add(a);var c=this;Km(a,function(a){Lm(c,a)});(a instanceof hh||a instanceof U&&null!==a.Kb)&&a.I();b=a.data;null!==b&&(a instanceof hh||(a instanceof W?this.Lj.add(b,a):this.Ai.add(b,a)),Km(a,function(a){Mm(c,a)}));!0!==Bm(a)&&!0!==Cm(a)||this.sg.add(a);Nm(a,!0,this);Om(a)?(a.W.H()&&this.na(ml(a, a.W)),this.rc()):a.isVisible()&&a.W.H()&&this.na(ml(a,a.W));this.Le()}; -D.prototype.jf=function(a){a.Bt();if(a instanceof T){if(this.gp.remove(a),a instanceof U){var b=a.Ka;null===b?this.yl.remove(a):b.dp.remove(a);b=a.Sb;null!==b&&(b.g=null)}}else a instanceof W?this.$o.remove(a):a instanceof hh||this.zb.remove(a);var c=this;Km(a,function(a){Pm(c,a)});b=a.data;null!==b&&(a instanceof hh||(a instanceof W?this.Lj.remove(b):this.Ai.remove(b)),Km(a,function(a){Qm(c,a)}));this.sg.remove(a);Om(a)?(a.W.H()&&this.na(ml(a,a.W)),this.rc()):a.isVisible()&&a.W.H()&&this.na(ml(a, -a.W));this.Le()};D.prototype.remove=D.prototype.remove=function(a){w.G(a,S,D,"remove:part");Rm(this,a,!0)};function Rm(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.fb=!1,b.Mg=!1,b.J(Sm),c&&b.vn(),c=d.jf(-1,b,!1),0<=c&&a.Xc(Pf,"parts",d,b,null,c,null),a=b.Cx,null!==a&&a(b,d,null))} +D.prototype.kf=function(a){a.Bt();if(a instanceof T){if(this.gp.remove(a),a instanceof U){var b=a.Ka;null===b?this.yl.remove(a):b.dp.remove(a);b=a.Sb;null!==b&&(b.g=null)}}else a instanceof W?this.$o.remove(a):a instanceof hh||this.zb.remove(a);var c=this;Km(a,function(a){Pm(c,a)});b=a.data;null!==b&&(a instanceof hh||(a instanceof W?this.Lj.remove(b):this.Ai.remove(b)),Km(a,function(a){Qm(c,a)}));this.sg.remove(a);Om(a)?(a.W.H()&&this.na(ml(a,a.W)),this.rc()):a.isVisible()&&a.W.H()&&this.na(ml(a, +a.W));this.Le()};D.prototype.remove=D.prototype.remove=function(a){w.G(a,S,D,"remove:part");Rm(this,a,!0)};function Rm(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.fb=!1,b.Mg=!1,b.J(Sm),c&&b.vn(),c=d.kf(-1,b,!1),0<=c&&a.Xc(Pf,"parts",d,b,null,c,null),a=b.Fx,null!==a&&a(b,d,null))} D.prototype.removeParts=D.prototype.XA=function(a,b){if(w.isArray(a))for(var c=w.Ya(a),d=0;dd&&this.rc()}; D.prototype.addLayerAfter=function(a,b){Tm(this,a,b);a.Qc(this);var c=this.ac,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ke&&this.Xc(Pf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.rc()}; -D.prototype.removeLayer=function(a){w.G(a,og,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.ac,c=b.indexOf(a);if(b.remove(a)){for(b=a.zb.copy().i;b.next();){var d=b.value,e=d.Xf;d.Xf=e!==a.name?e:""}null!==this.ke&&this.Xc(Pf,"layers",this,a,null,c,null);this.na();this.rc()}}};D.prototype.findLayer=D.prototype.Kt=function(a){for(var b=this.Dx;b.next();){var c=b.value;if(c.name===a)return c}return null}; -D.prototype.addModelChangedListener=D.prototype.dH=function(a){w.j(a,"function",D,"addModelChangedListener:listener");null===this.gh&&(this.gh=new I("function"));this.gh.add(a);this.ba.fn(a)};D.prototype.removeModelChangedListener=function(a){w.j(a,"function",D,"removeModelChangedListener:listener");null!==this.gh&&(this.gh.remove(a),0===this.gh.count&&(this.gh=null));this.ba.wu(a)}; -D.prototype.addChangedListener=D.prototype.fn=function(a){w.j(a,"function",D,"addChangedListener:listener");null===this.vi&&(this.vi=new I("function"));this.vi.add(a)};D.prototype.removeChangedListener=D.prototype.wu=function(a){w.j(a,"function",D,"removeChangedListener:listener");null!==this.vi&&(this.vi.remove(a),0===this.vi.count&&(this.vi=null))}; -D.prototype.Qw=function(a){this.wb||this.oa.$E(a);a.yc!==Nf&&(this.ni=!0);if(null!==this.vi){var b=this.vi,c=b.length;if(1===c)b=b.da(0),b(a);else if(0!==c)for(var d=b.ec(),e=0;ea.xh&&(c=a.xh);e=w.xb(a.ib.x+h/b-h/c,a.ib.y+k/b-k/c);a.position=e;w.v(e);a.tb=c;a.tu(d,a.pb,b,c,!1);a.Sc=!1;Nl(a, +function Um(a,b,c){if(a.Sc||a.Xd)a.tb=c,c=a.Pa,c.pc&&hl(c,b,a.tb);else if(a.Sc=!0,null===a.Fb)a.tb=c;else{var d=a.pb.copy(),e=a.Ib,f=a.Lb;d.width=a.Ib/b;d.height=a.Lb/b;var h=a.lm.x,k=a.lm.y,l=a.tE;isNaN(h)&&(l.uj()?l.rj(Ub)?h=0:l.rj(Vb)&&(h=e-1):h=l.fd()?l.x*(e-1):e/2);isNaN(k)&&(l.uj()?l.rj(Tb)?k=0:l.rj(Wb)&&(k=f-1):k=l.fd()?l.y*(f-1):f/2);null!==a.ZF&&(c=a.ZF(a,c));ca.xh&&(c=a.xh);e=w.xb(a.ib.x+h/b-h/c,a.ib.y+k/b-k/c);a.position=e;w.v(e);a.tb=c;a.uu(d,a.pb,b,c,!1);a.Sc=!1;Nl(a, !1);c=a.Pa;c.pc&&hl(c,b,a.tb);a.na();Yl(a)}} -D.prototype.tu=function(a,b,c,d,e){a.L(b)||(void 0===e&&(e=!1),e||Yl(this),Ll(this),d=this.Sb,null===d||!d.zx||this.Gl!==mh||e||a.width===b.width&&a.height===b.height||d.J(),d=this.Za,!0===this.Cm&&d instanceof fh&&(this.R.ca=this.vB(this.R.bf),Ak(d,this)),this.Sc||this.eF(a,b),am(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.BA&&this.links.each(function(a){a.sj&&a.W.Tf(b)&&a.Yb()}))}; -function am(a,b){void 0===b&&(b=null);var c=a.pd;if(null!==c&&c.visible){for(var d=w.im(),e=1,f=1,h=c.xa.n,k=h.length,l=0;ln||(Vm(m.Cb)?f=f*n/ye(f,n):e=e*n/ye(e,n))}h=c.ox;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.Ef();f=a.pb;e.m(f.x,f.y,f.width,f.height);for(h=a.gw.i;h.next();)f=h.value.pb,f.H()&&ab(e,f.x,f.y,f.width,f.height);if(!e.H()){w.Db(e);return}k=e.width;l=e.height;f=e.x;h=e.y;w.Db(e)}c.width=k+2*d.width;c.height= -l+2*d.height;e=w.K();Ka(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.Ak(d);c.U.location=e;w.v(e)}}D.prototype.clearSelection=D.prototype.Rw=function(){var a=0n||(Vm(m.Cb)?f=f*n/ye(f,n):e=e*n/ye(e,n))}h=c.sx;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.Ef();f=a.pb;e.m(f.x,f.y,f.width,f.height);for(h=a.jw.i;h.next();)f=h.value.pb,f.H()&&ab(e,f.x,f.y,f.width,f.height);if(!e.H()){w.Db(e);return}k=e.width;l=e.height;f=e.x;h=e.y;w.Db(e)}c.width=k+2*d.width;c.height= +l+2*d.height;e=w.K();Ka(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.Ak(d);c.U.location=e;w.v(e)}}D.prototype.clearSelection=D.prototype.Uw=function(){var a=0a&&w.Ea(a,">= 0",D,"scrollHorizontalLineChange"),this.ow=a,this.h("scrollHorizontalLineChange",b,a))}); -w.defineProperty(D,{Cu:"scrollVerticalLineChange"},function(){return this.sw},function(a){var b=this.sw;b!==a&&(w.j(a,"number",D,"scrollVerticalLineChange"),0>a&&w.Ea(a,">= 0",D,"scrollVerticalLineChange"),this.sw=a,this.h("scrollVerticalLineChange",b,a))});w.defineProperty(D,{R:"lastInput"},function(){return this.Pb},function(a){this.Pb=a});w.defineProperty(D,{zc:"firstInput"},function(){return this.Hi},function(a){this.Hi=a}); -w.defineProperty(D,{cc:"currentCursor"},function(){return this.jv},function(a){""===a&&(a=this.ir);var b=this.jv;if(b!==a){w.j(a,"string",D,"currentCursor");var c=this.Fb,d=this.Mb;null!==c&&(this.jv=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))))}}); +w.defineProperty(D,{Ow:"allowReshape"},function(){return this.Sk},function(a){var b=this.Sk;b!==a&&(w.j(a,"boolean",D,"allowReshape"),this.Sk=a,this.h("allowReshape",b,a))});w.defineProperty(D,{At:"allowResize"},function(){return this.Tk},function(a){var b=this.Tk;b!==a&&(w.j(a,"boolean",D,"allowResize"),this.Tk=a,this.h("allowResize",b,a))}); +w.defineProperty(D,{Pw:"allowRotate"},function(){return this.Uk},function(a){var b=this.Uk;b!==a&&(w.j(a,"boolean",D,"allowRotate"),this.Uk=a,this.h("allowRotate",b,a))});w.defineProperty(D,{uf:"allowSelect"},function(){return this.Vk},function(a){var b=this.Vk;b!==a&&(w.j(a,"boolean",D,"allowSelect"),this.Vk=a,this.h("allowSelect",b,a))}); +w.defineProperty(D,{iE:"allowUndo"},function(){return this.Yu},function(a){var b=this.Yu;b!==a&&(w.j(a,"boolean",D,"allowUndo"),this.Yu=a,this.h("allowUndo",b,a))});w.defineProperty(D,{Sw:"allowZoom"},function(){return this.$u},function(a){var b=this.$u;b!==a&&(w.j(a,"boolean",D,"allowZoom"),this.$u=a,this.h("allowZoom",b,a))}); +w.defineProperty(D,{tA:"hasVerticalScrollbar"},function(){return this.Ev},function(a){var b=this.Ev;b!==a&&(w.j(a,"boolean",D,"hasVerticalScrollbar"),this.Ev=a,Yl(this),this.na(),this.h("hasVerticalScrollbar",b,a),Nl(this,!1))});w.defineProperty(D,{sA:"hasHorizontalScrollbar"},function(){return this.Dv},function(a){var b=this.Dv;b!==a&&(w.j(a,"boolean",D,"hasHorizontalScrollbar"),this.Dv=a,Yl(this),this.na(),this.h("hasHorizontalScrollbar",b,a),Nl(this,!1))}); +w.defineProperty(D,{me:"allowHorizontalScroll"},function(){return this.Wu},function(a){var b=this.Wu;b!==a&&(w.j(a,"boolean",D,"allowHorizontalScroll"),this.Wu=a,this.h("allowHorizontalScroll",b,a),Nl(this,!1))});w.defineProperty(D,{ne:"allowVerticalScroll"},function(){return this.Zu},function(a){var b=this.Zu;b!==a&&(w.j(a,"boolean",D,"allowVerticalScroll"),this.Zu=a,this.h("allowVerticalScroll",b,a),Nl(this,!1))}); +w.defineProperty(D,{Cu:"scrollHorizontalLineChange"},function(){return this.rw},function(a){var b=this.rw;b!==a&&(w.j(a,"number",D,"scrollHorizontalLineChange"),0>a&&w.Ea(a,">= 0",D,"scrollHorizontalLineChange"),this.rw=a,this.h("scrollHorizontalLineChange",b,a))}); +w.defineProperty(D,{Du:"scrollVerticalLineChange"},function(){return this.vw},function(a){var b=this.vw;b!==a&&(w.j(a,"number",D,"scrollVerticalLineChange"),0>a&&w.Ea(a,">= 0",D,"scrollVerticalLineChange"),this.vw=a,this.h("scrollVerticalLineChange",b,a))});w.defineProperty(D,{R:"lastInput"},function(){return this.Pb},function(a){this.Pb=a});w.defineProperty(D,{zc:"firstInput"},function(){return this.Hi},function(a){this.Hi=a}); +w.defineProperty(D,{cc:"currentCursor"},function(){return this.kv},function(a){""===a&&(a=this.ir);var b=this.kv;if(b!==a){w.j(a,"string",D,"currentCursor");var c=this.Fb,d=this.Mb;null!==c&&(this.kv=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))))}}); w.defineProperty(D,{FK:"defaultCursor"},function(){return this.ir},function(a){""===a&&(a="auto");var b=this.ir;b!==a&&(w.j(a,"string",D,"defaultCursor"),this.ir=a,this.h("defaultCursor",b,a))});w.defineProperty(D,{click:"click"},function(){return this.wi},function(a){var b=this.wi;b!==a&&(null!==a&&w.j(a,"function",D,"click"),this.wi=a,this.h("click",b,a))}); -w.defineProperty(D,{Gt:"doubleClick"},function(){return this.Ei},function(a){var b=this.Ei;b!==a&&(null!==a&&w.j(a,"function",D,"doubleClick"),this.Ei=a,this.h("doubleClick",b,a))});w.defineProperty(D,{Wz:"contextClick"},function(){return this.yi},function(a){var b=this.yi;b!==a&&(null!==a&&w.j(a,"function",D,"contextClick"),this.yi=a,this.h("contextClick",b,a))}); +w.defineProperty(D,{Gt:"doubleClick"},function(){return this.Ei},function(a){var b=this.Ei;b!==a&&(null!==a&&w.j(a,"function",D,"doubleClick"),this.Ei=a,this.h("doubleClick",b,a))});w.defineProperty(D,{Xz:"contextClick"},function(){return this.yi},function(a){var b=this.yi;b!==a&&(null!==a&&w.j(a,"function",D,"contextClick"),this.yi=a,this.h("contextClick",b,a))}); w.defineProperty(D,{NA:"mouseOver"},function(){return this.Vi},function(a){var b=this.Vi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseOver"),this.Vi=a,this.h("mouseOver",b,a))});w.defineProperty(D,{MA:"mouseHover"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHover"),this.Ui=a,this.h("mouseHover",b,a))}); -w.defineProperty(D,{LA:"mouseHold"},function(){return this.Ti},function(a){var b=this.Ti;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHold"),this.Ti=a,this.h("mouseHold",b,a))});w.defineProperty(D,{YI:"mouseDragOver"},function(){return this.bw},function(a){var b=this.bw;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDragOver"),this.bw=a,this.h("mouseDragOver",b,a))}); +w.defineProperty(D,{LA:"mouseHold"},function(){return this.Ti},function(a){var b=this.Ti;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHold"),this.Ti=a,this.h("mouseHold",b,a))});w.defineProperty(D,{YI:"mouseDragOver"},function(){return this.cw},function(a){var b=this.cw;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDragOver"),this.cw=a,this.h("mouseDragOver",b,a))}); w.defineProperty(D,{KA:"mouseDrop"},function(){return this.Si},function(a){var b=this.Si;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDrop"),this.Si=a,this.h("mouseDrop",b,a))});w.defineProperty(D,{rB:"toolTip"},function(){return this.dj},function(a){var b=this.dj;b!==a&&(this.dj=a,this.h("toolTip",b,a))});w.defineProperty(D,{contextMenu:"contextMenu"},function(){return this.zi},function(a){var b=this.zi;b!==a&&(this.zi=a,this.h("contextMenu",b,a))}); -w.defineProperty(D,{ob:"commandHandler"},function(){return this.Ey},function(a){var b=this.Ey;b!==a&&(w.G(a,qg,D,"commandHandler"),null!==a.g&&w.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Qc(null),this.Ey=a,a.Qc(this))});w.defineProperty(D,{ab:"toolManager"},function(){return this.Gz},function(a){var b=this.Gz;b!==a&&(w.G(a,fh,D,"toolManager"),null!==a.g&&w.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Qc(null),this.Gz=a,a.Qc(this))}); -w.defineProperty(D,{Et:"defaultTool"},function(){return this.Ky},function(a){var b=this.Ky;b!==a&&(w.G(a,pg,D,"defaultTool"),this.Ky=a,this.Za===b&&(this.Za=a))});w.defineProperty(D,{Za:"currentTool"},function(){return this.Hy},function(a){var b=this.Hy;null!==b&&(b.sa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.Et);null!==a&&(w.G(a,pg,D,"currentTool"),this.Hy=a,a.Qc(this),a.doStart())});w.u(D,{selection:"selection"},function(){return this.uw}); -w.defineProperty(D,{OI:"maxSelectionCount"},function(){return this.Yv},function(a){var b=this.Yv;if(b!==a)if(w.j(a,"number",D,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Yv=a,this.h("maxSelectionCount",b,a),!this.oa.gb&&(a=this.selection.count-a,0= 0",D,"maxSelectionCount")}); -w.defineProperty(D,{aJ:"nodeSelectionAdornmentTemplate"},function(){return this.cw},function(a){var b=this.cw;b!==a&&(w.G(a,hh,D,"nodeSelectionAdornmentTemplate"),this.cw=a,this.h("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(D,{eI:"groupSelectionAdornmentTemplate"},function(){return this.Av},function(a){var b=this.Av;b!==a&&(w.G(a,hh,D,"groupSelectionAdornmentTemplate"),this.Av=a,this.h("groupSelectionAdornmentTemplate",b,a))}); -w.defineProperty(D,{II:"linkSelectionAdornmentTemplate"},function(){return this.Tv},function(a){var b=this.Tv;b!==a&&(w.G(a,hh,D,"linkSelectionAdornmentTemplate"),this.Tv=a,this.h("linkSelectionAdornmentTemplate",b,a))});w.u(D,{Vl:"highlighteds"},function(){return this.Ev}); -w.defineProperty(D,{ni:"isModified"},function(){var a=this.oa;return a.isEnabled?null!==a.lj?!0:this.Lv&&this.dh!==a.qj:this.Lv},function(a){if(this.Lv!==a){w.j(a,"boolean",D,"isModified");this.Lv=a;var b=this.oa;!a&&b.isEnabled&&(this.dh=b.qj);a||Ym(this)}});function Ym(a){var b=a.ni;a.YD!==b&&(a.YD=b,a.Aa("Modified"))} -w.defineProperty(D,{ba:"model"},function(){return this.ke},function(a){var b=this.ke;if(b!==a){w.G(a,F,D,"model");this.Za.doCancel();null!==b&&b.oa!==a.oa&&b.oa.mF&&w.k("Do not replace a Diagram.model while a transaction is in progress.");this.Pa.pi();this.Rw();this.eh=!1;this.Io=!0;this.dh=-2;this.Nf=!1;var c=this.Xd;this.Xd=!0;this.Pa.Un("Model");null!==b&&(null!==this.gh&&this.gh.each(function(a){b.wu(a)}),b.wu(this.dD),b instanceof P&&Zm(this,b.Ng),Zm(this,b.dg));this.ke=a;a.fn(this.cD);$m(this, -a.dg);a instanceof P&&an(this,a.Ng);a.wu(this.cD);a.fn(this.dD);null!==this.gh&&this.gh.each(function(b){a.fn(b)});this.Xd=c;this.Sc||this.na();null!==b&&(a.oa.isEnabled=b.oa.isEnabled)}});w.defineProperty(D,{Ua:null},function(){return this.VC},function(a){this.VC=a});w.u(D,{Gx:null},function(){return this.JG}); -function vl(a,b){if(b.ba===a.ba){var c=b.yc,d=b.propertyName;if(c===Nf&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ab,c.af.each(function(b){b.Qc(a)}),c.$f.each(function(b){b.Qc(a)}),c.ag.each(function(b){b.Qc(a)}),a.Xd||a.eh||(a.qv=!0,a.Io&&(a.Nf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Pa;e.kf&&!a.wb&&e.pi();a.Aa("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Pa,e.kf&&!a.wb&&e.pi());else if(a.Ua){a.Ua=!1;try{var f=b.nf;if(""!==f)if(c===Mf){if("linkFromKey"===f){var h= +w.defineProperty(D,{ob:"commandHandler"},function(){return this.Hy},function(a){var b=this.Hy;b!==a&&(w.G(a,qg,D,"commandHandler"),null!==a.g&&w.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Qc(null),this.Hy=a,a.Qc(this))});w.defineProperty(D,{ab:"toolManager"},function(){return this.Hz},function(a){var b=this.Hz;b!==a&&(w.G(a,fh,D,"toolManager"),null!==a.g&&w.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Qc(null),this.Hz=a,a.Qc(this))}); +w.defineProperty(D,{Et:"defaultTool"},function(){return this.Ny},function(a){var b=this.Ny;b!==a&&(w.G(a,pg,D,"defaultTool"),this.Ny=a,this.Za===b&&(this.Za=a))});w.defineProperty(D,{Za:"currentTool"},function(){return this.Ky},function(a){var b=this.Ky;null!==b&&(b.sa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.Et);null!==a&&(w.G(a,pg,D,"currentTool"),this.Ky=a,a.Qc(this),a.doStart())});w.u(D,{selection:"selection"},function(){return this.xw}); +w.defineProperty(D,{OI:"maxSelectionCount"},function(){return this.Zv},function(a){var b=this.Zv;if(b!==a)if(w.j(a,"number",D,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Zv=a,this.h("maxSelectionCount",b,a),!this.oa.gb&&(a=this.selection.count-a,0= 0",D,"maxSelectionCount")}); +w.defineProperty(D,{aJ:"nodeSelectionAdornmentTemplate"},function(){return this.dw},function(a){var b=this.dw;b!==a&&(w.G(a,hh,D,"nodeSelectionAdornmentTemplate"),this.dw=a,this.h("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(D,{eI:"groupSelectionAdornmentTemplate"},function(){return this.Bv},function(a){var b=this.Bv;b!==a&&(w.G(a,hh,D,"groupSelectionAdornmentTemplate"),this.Bv=a,this.h("groupSelectionAdornmentTemplate",b,a))}); +w.defineProperty(D,{II:"linkSelectionAdornmentTemplate"},function(){return this.Uv},function(a){var b=this.Uv;b!==a&&(w.G(a,hh,D,"linkSelectionAdornmentTemplate"),this.Uv=a,this.h("linkSelectionAdornmentTemplate",b,a))});w.u(D,{Vl:"highlighteds"},function(){return this.Fv}); +w.defineProperty(D,{ni:"isModified"},function(){var a=this.oa;return a.isEnabled?null!==a.lj?!0:this.Mv&&this.dh!==a.qj:this.Mv},function(a){if(this.Mv!==a){w.j(a,"boolean",D,"isModified");this.Mv=a;var b=this.oa;!a&&b.isEnabled&&(this.dh=b.qj);a||Ym(this)}});function Ym(a){var b=a.ni;a.YD!==b&&(a.YD=b,a.Aa("Modified"))} +w.defineProperty(D,{ba:"model"},function(){return this.ke},function(a){var b=this.ke;if(b!==a){w.G(a,F,D,"model");this.Za.doCancel();null!==b&&b.oa!==a.oa&&b.oa.mF&&w.k("Do not replace a Diagram.model while a transaction is in progress.");this.Pa.pi();this.Uw();this.eh=!1;this.Io=!0;this.dh=-2;this.Nf=!1;var c=this.Xd;this.Xd=!0;this.Pa.Un("Model");null!==b&&(null!==this.gh&&this.gh.each(function(a){b.xu(a)}),b.xu(this.dD),b instanceof P&&Zm(this,b.Ng),Zm(this,b.dg));this.ke=a;a.fn(this.cD);$m(this, +a.dg);a instanceof P&&an(this,a.Ng);a.xu(this.cD);a.fn(this.dD);null!==this.gh&&this.gh.each(function(b){a.fn(b)});this.Xd=c;this.Sc||this.na();null!==b&&(a.oa.isEnabled=b.oa.isEnabled)}});w.defineProperty(D,{Ua:null},function(){return this.VC},function(a){this.VC=a});w.u(D,{Jx:null},function(){return this.JG}); +function vl(a,b){if(b.ba===a.ba){var c=b.yc,d=b.propertyName;if(c===Nf&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ab,c.af.each(function(b){b.Qc(a)}),c.$f.each(function(b){b.Qc(a)}),c.ag.each(function(b){b.Qc(a)}),a.Xd||a.eh||(a.rv=!0,a.Io&&(a.Nf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Pa;e.lf&&!a.wb&&e.pi();a.Aa("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Pa,e.lf&&!a.wb&&e.pi());else if(a.Ua){a.Ua=!1;try{var f=b.of;if(""!==f)if(c===Mf){if("linkFromKey"===f){var h= b.object,k=a.Rf(h);if(null!==k){var l=b.newValue,m=a.Ie(l);k.Y=m}}else if("linkToKey"===f)h=b.object,k=a.Rf(h),null!==k&&(l=b.newValue,m=a.Ie(l),k.$=m);else if("linkFromPortId"===f){if(h=b.object,k=a.Rf(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Lg=n)}}else if("linkToPortId"===f)h=b.object,k=a.Rf(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.Eh=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.Ie(q);p.Ka=r instanceof U?r: -null}else p.Ka=null}}else if("linkLabelKeys"===f){if(h=b.object,k=a.Rf(h),null!==k){var s=b.oldValue,u=b.newValue;if(w.isArray(s))for(var t=w.Ya(s),x=0;xl)){var m=l;hn(k)&&m++;k.jf(m);jn(k,m,l)}}}}function Mm(a,b){var c=b.$j;if(w.isArray(c)){var d=a.Em.ja(c);if(null===d)d=[],d.push(b),a.Em.add(c,d);else{for(c=0;cl)){var m=l;hn(k)&&m++;k.kf(m);jn(k,m,l)}}}}function Mm(a,b){var c=b.$j;if(w.isArray(c)){var d=a.Em.ja(c);if(null===d)d=[],d.push(b),a.Em.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):w.Ea(a,"> 0",D,"minScale"))});w.defineProperty(D,{xh:"maxScale"},function(){return this.Xv},function(a){w.Fd(a,D,"maxScale");var b=this.Xv;b!==a&&(0 0",D,"maxScale"))}); -w.defineProperty(D,{lm:"zoomPoint"},function(){return this.Hw},function(a){this.Hw.L(a)||(w.G(a,z,D,"zoomPoint"),this.Hw=a=a.S())});w.defineProperty(D,{tE:"contentAlignment"},function(){return this.to},function(a){var b=this.to;b.L(a)||(w.G(a,L,D,"contentAlignment"),this.to=a=a.S(),this.h("contentAlignment",b,a),Nl(this,!1))}); +w.defineProperty(D,{oI:"initialViewportSpot"},function(){return this.Jv},function(a){var b=this.Jv;b!==a&&(w.G(a,L,D,"initialViewportSpot"),a.fd()||w.k("initialViewportSpot must be a specific Spot: "+a),this.Jv=a,this.h("initialViewportSpot",b,a))});w.defineProperty(D,{lI:"initialDocumentSpot"},function(){return this.Gv},function(a){var b=this.Gv;b!==a&&(w.G(a,L,D,"initialDocumentSpot"),a.fd()||w.k("initialViewportSpot must be a specific Spot: "+a),this.Gv=a,this.h("initialDocumentSpot",b,a))}); +w.defineProperty(D,{yh:"minScale"},function(){return this.$v},function(a){w.Fd(a,D,"minScale");var b=this.$v;b!==a&&(0this.scale&&(this.scale=a)):w.Ea(a,"> 0",D,"minScale"))});w.defineProperty(D,{xh:"maxScale"},function(){return this.Yv},function(a){w.Fd(a,D,"maxScale");var b=this.Yv;b!==a&&(0 0",D,"maxScale"))}); +w.defineProperty(D,{lm:"zoomPoint"},function(){return this.Kw},function(a){this.Kw.L(a)||(w.G(a,z,D,"zoomPoint"),this.Kw=a=a.S())});w.defineProperty(D,{tE:"contentAlignment"},function(){return this.to},function(a){var b=this.to;b.L(a)||(w.G(a,L,D,"contentAlignment"),this.to=a=a.S(),this.h("contentAlignment",b,a),Nl(this,!1))}); w.defineProperty(D,{WK:"initialContentAlignment"},function(){return this.No},function(a){var b=this.No;b.L(a)||(w.G(a,L,D,"initialContentAlignment"),this.No=a=a.S(),this.h("initialContentAlignment",b,a))});w.defineProperty(D,{padding:"padding"},function(){return this.ff},function(a){"number"===typeof a?a=new db(a):w.G(a,db,D,"padding");var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.rc(),this.h("padding",b,a))});w.u(D,{eg:"nodes"},function(){return this.gp.i});w.u(D,{links:"links"},function(){return this.$o.i}); w.u(D,{Jk:"parts"},function(){return this.zb.i});D.prototype.findTopLevelNodesAndLinks=function(){for(var a=new J(S),b=this.gp.i;b.next();){var c=b.value;c.bq&&a.add(c)}for(b=this.$o.i;b.next();)c=b.value,c.bq&&a.add(c);return a.i};D.prototype.findTopLevelGroups=function(){return this.yl.i}; -w.defineProperty(D,{Sb:"layout"},function(){return this.ie},function(a){var b=this.ie;b!==a&&(w.G(a,rg,D,"layout"),null!==b&&(b.g=null,b.group=null),this.ie=a,a.g=this,a.group=null,this.av=!0,this.h("layout",b,a),this.Le())});D.prototype.layoutDiagram=function(a){Hi(this);a&&on(this,!0);bm(this,!1)};function on(a,b){for(var c=a.yl.i;c.next();)wn(a,c.value,b);null!==a.Sb&&(b?a.Sb.zf=!1:a.Sb.J())} -function wn(a,b,c){if(null!==b){for(var d=b.dp.i;d.next();)wn(a,d.value,c);null!==b.Sb&&(c?b.Sb.zf=!1:b.Sb.J())}}function bm(a,b){if(!a.Ly){var c=a.Sb,d=a.Ua;a.Ua=!0;try{var e=a.oa.Fh;0===e&&a.Ub("Layout");var f=a.Pa;1!==a.oa.Fh||f.kf||f.pc||b||f.Un("Layout");for(var h=a.yl.i;h.next();)xn(a,h.value,b);c.zf||b&&!c.qF&&0!==e||(c.doLayout(a),Hi(a),c.zf=!0)}finally{0===e&&a.Gd("Layout"),a.av=!c.zf,a.Ua=d}}} -function xn(a,b,c){if(null!==b){for(var d=b.dp.i;d.next();)xn(a,d.value,c);d=b.Sb;null===d||d.zf||c&&!d.qF||(b.Sn=!b.location.H(),d.doLayout(b),b.J(yn),d.zf=!0,em(a,b))}}w.defineProperty(D,{Pd:"isTreePathToChildren"},function(){return this.Ov},function(a){var b=this.Ov;if(b!==a&&(w.j(a,"boolean",D,"isTreePathToChildren"),this.Ov=a,this.h("isTreePathToChildren",b,a),!this.oa.gb))for(a=this.eg;a.next();)zn(a.value)}); -D.prototype.findTreeRoots=function(){for(var a=new I(T),b=this.eg;b.next();){var c=b.value;c.bq&&null===c.xn()&&a.add(c)}return a.i};w.defineProperty(D,{wB:"treeCollapsePolicy"},function(){return this.Cw},function(a){var b=this.Cw;b!==a&&(a!==tl&&a!==Wm&&a!==Xm&&w.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Cw=a,this.h("treeCollapsePolicy",b,a))});w.defineProperty(D,{wh:null},function(){return this.KC},function(a){this.KC=a}); +w.defineProperty(D,{Sb:"layout"},function(){return this.ie},function(a){var b=this.ie;b!==a&&(w.G(a,rg,D,"layout"),null!==b&&(b.g=null,b.group=null),this.ie=a,a.g=this,a.group=null,this.bv=!0,this.h("layout",b,a),this.Le())});D.prototype.layoutDiagram=function(a){Hi(this);a&&on(this,!0);bm(this,!1)};function on(a,b){for(var c=a.yl.i;c.next();)wn(a,c.value,b);null!==a.Sb&&(b?a.Sb.zf=!1:a.Sb.J())} +function wn(a,b,c){if(null!==b){for(var d=b.dp.i;d.next();)wn(a,d.value,c);null!==b.Sb&&(c?b.Sb.zf=!1:b.Sb.J())}}function bm(a,b){if(!a.Oy){var c=a.Sb,d=a.Ua;a.Ua=!0;try{var e=a.oa.Fh;0===e&&a.Ub("Layout");var f=a.Pa;1!==a.oa.Fh||f.lf||f.pc||b||f.Un("Layout");for(var h=a.yl.i;h.next();)xn(a,h.value,b);c.zf||b&&!c.qF&&0!==e||(c.doLayout(a),Hi(a),c.zf=!0)}finally{0===e&&a.Gd("Layout"),a.bv=!c.zf,a.Ua=d}}} +function xn(a,b,c){if(null!==b){for(var d=b.dp.i;d.next();)xn(a,d.value,c);d=b.Sb;null===d||d.zf||c&&!d.qF||(b.Sn=!b.location.H(),d.doLayout(b),b.J(yn),d.zf=!0,em(a,b))}}w.defineProperty(D,{Pd:"isTreePathToChildren"},function(){return this.Pv},function(a){var b=this.Pv;if(b!==a&&(w.j(a,"boolean",D,"isTreePathToChildren"),this.Pv=a,this.h("isTreePathToChildren",b,a),!this.oa.gb))for(a=this.eg;a.next();)zn(a.value)}); +D.prototype.findTreeRoots=function(){for(var a=new I(T),b=this.eg;b.next();){var c=b.value;c.bq&&null===c.xn()&&a.add(c)}return a.i};w.defineProperty(D,{wB:"treeCollapsePolicy"},function(){return this.Fw},function(a){var b=this.Fw;b!==a&&(a!==tl&&a!==Wm&&a!==Xm&&w.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Fw=a,this.h("treeCollapsePolicy",b,a))});w.defineProperty(D,{wh:null},function(){return this.KC},function(a){this.KC=a}); function sl(a){function b(a){var b=a.toLowerCase(),h=new I("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ka("string",I),d=new ka("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.Ny=c;a.My=d} -function oa(a,b){var c=a.My.ja(b);return null!==c?c:a.My.ja(b.toLowerCase())}function An(a,b){var c=a.Ny.ja(b);if(null!==c)return c;c=a.Ny.ja(b.toLowerCase());if(null!==c)return c;w.k("Unknown DiagramEvent name: "+b);return null}D.prototype.addDiagramListener=D.prototype.Nz=function(a,b){w.j(a,"string",D,"addDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=An(this,a);null!==c&&c.add(b)}; +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.Qy=c;a.Py=d} +function oa(a,b){var c=a.Py.ja(b);return null!==c?c:a.Py.ja(b.toLowerCase())}function An(a,b){var c=a.Qy.ja(b);if(null!==c)return c;c=a.Qy.ja(b.toLowerCase());if(null!==c)return c;w.k("Unknown DiagramEvent name: "+b);return null}D.prototype.addDiagramListener=D.prototype.Oz=function(a,b){w.j(a,"string",D,"addDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=An(this,a);null!==c&&c.add(b)}; D.prototype.removeDiagramListener=D.prototype.PF=function(a,b){w.j(a,"string",D,"removeDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=An(this,a);null!==c&&c.remove(b)};D.prototype.raiseDiagramEvent=D.prototype.Aa=function(a,b,c){var d=An(this,a),e=new Af;e.g=this;a=oa(this,a);null!==a&&(e.name=a);void 0!==b&&(e.nB=b);void 0!==c&&(e.SA=c);b=d.length;if(1===b)d=d.da(0),d(e);else if(0!==b)for(c=d.ec(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.pb,f=a.scale,e=w.hg(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.Bu,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.Cu,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.Ic(dd)||(c=new z(c.x+h.x/f,c.y+h.y/f));w.Db(e);w.v(h);return c}D.prototype.makeSvg=D.prototype.makeSVG=function(a){void 0===a&&(a=new sa);a.context="svg";a=In(this,a);return null!==a?a.gm:null}; +function Qi(a,b){var c=!1;a.pb.wk(b)&&(c=!0);c=a.iA(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.sj&&d.Yb()}}D.prototype.isUnoccupied=D.prototype.$l=function(a,b){void 0===b&&(b=null);return Bn(this,!1,null,b).$l(a.x,a.y,a.width,a.height)};D.prototype.computeOccupiedArea=function(){return this.BA?this.pb.copy():this.Vj?Ml(this):this.qe.copy()}; +function Bn(a,b,c,d){null===a.Cd&&(a.Cd=new Cn);if(a.Cd.Yt||a.Cd.group!==c||a.Cd.mB!==d){if(null===c){b=a.computeOccupiedArea();b.xf(100,100);a.Cd.initialize(b);b=w.Ef();for(var e=a.eg;e.next();){var f=e.value,h=f.layer;null!==h&&h.visible&&!h.Kc&&Dn(a,f,d,b)}}else for(c.W.H()||c.Ze(),b=c.W.copy(),b.xf(20,20),a.Cd.initialize(b),b=w.Ef(),e=c.Nc;e.next();)f=e.value,f instanceof T&&Dn(a,f,d,b);w.Db(b);a.Cd.group=c;a.Cd.mB=d;a.Cd.Yt=!1}else b&&En(a.Cd);return a.Cd} +function Dn(a,b,c,d){if(b!==c)if(b.isVisible()&&b.Sz&&!b.mf){c=b.getAvoidableRect(d);d=a.Cd.mn;b=a.Cd.ln;for(var e=c.x+c.width,f=c.y+c.height,h=c.x;h=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.pb,f=a.scale,e=w.hg(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.Cu,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.Du,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.Ic(dd)||(c=new z(c.x+h.x/f,c.y+h.y/f));w.Db(e);w.v(h);return c}D.prototype.makeSvg=D.prototype.makeSVG=function(a){void 0===a&&(a=new sa);a.context="svg";a=In(this,a);return null!==a?a.gm:null}; D.prototype.makeImage=function(a){void 0===a&&(a=new sa);var b=(a.document||document).createElement("img");b.src=this.JI(a);return b}; D.prototype.makeImageData=D.prototype.JI=function(a){void 0===a&&(a=new sa);var b=In(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.xk.getImageData(0,0,b.width,b.height);case "blob":b=b.Hd;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 Jn=!1; function In(a,b){a.Pa.pi();a.Zf();if(null===a.Fb)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 ha(Infinity,Infinity):new ha(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 db(l):l instanceof db||(l=new db(0));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.Eo=!1;a.qf.Ee(!0);var s=new Vc(null,p),u=s.xk;if(!(d||e||k||h)){s.width=a.Ib+Math.ceil(l.left+l.right);s.height=a.Lb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new Nc(s.Hd,p,q),Gm(a,u,l,new ha(s.width, -s.height),a.tb,a.ib,k,m,r,n),a.Eo=!0,u;Gm(a,u,l,new ha(s.width,s.height),a.tb,a.ib,k,m,r,n);a.Eo=!0;return s}var t=a.ob.Xw,x=new z(0,0),v=a.qe.copy();v.HJ(a.padding);if(r)for(var B=!0,B=a.ac.n,y=B.length,H=0;Ht?(e=t,h=v.width,$=v.height):(h=f.width,$=f.height)):(h=v.width*e,$=v.height*e):(e=t,h=v.width,$=v.height);null!==l?(h+=Q,$+=B):l=new db(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!Jn&&(h>d||$>f)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil($)+" vs 2000x2000) Consider increasing the max size."), -Jn=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&($=Math.min($,f)));s.width=Math.ceil(h);s.height=Math.ceil($);if("svg"===b.context)return u=new Nc(s.Hd,p,q),Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n),a.Eo=!0,u;Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n);a.Eo=!0;return s}D.inherit=function(a,b){w.j(a,"function",D,"inherit");w.j(b,"function",D,"inherit");b.SG&&w.k("Cannot inherit from "+w.hf(b));w.La(a,b)}; +Jn=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&($=Math.min($,f)));s.width=Math.ceil(h);s.height=Math.ceil($);if("svg"===b.context)return u=new Nc(s.Hd,p,q),Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n),a.Eo=!0,u;Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n);a.Eo=!0;return s}D.inherit=function(a,b){w.j(a,"function",D,"inherit");w.j(b,"function",D,"inherit");b.SG&&w.k("Cannot inherit from "+w.jf(b));w.La(a,b)}; function Bl(){this.FD=null;this.UG="63ad05bbe23a1786468a4c741b6d2";this.Fi=this.UG===this._tk?!0:null} function Kn(a){var b="f",c=window[w.Ig("76a715b2f73f148a")][w.Ig("72ba13b5")],d=w.Ig;if(window[d("7da7")]&&window[d("7da7")][d("76a115b6ed251eaf4692")]){a.Fi=!0;var e=window[d("7da7")][d("76a115b6ed251eaf4692")],e=d(e).split(d("39e9"));if(6>e.length)return;var f=d(e[1]).split(".");if("7da71ca0"!==e[4])return;var h=d(w[d("6cae19")]).split(".");if(f[0]>h[0]||f[0]===h[0]&&f[1]>=h[1]){f=c[d("76ad18b4f73e")];for(h=c[d("73a612b6fb191d")](d("35e7"))+2;h f&&d(e[2])!==d("7da71ca0ad381e90")&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));0>f&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Fi=!(0<=f&&ff&&d(w.adym)!==d("7da71ca0ad381e90")&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Fi=!(0<=f&&fb.timeStamp-a.Gm)b.preventDefault();else if(a.il)b.preventDefault();else{a.Uc=a.Pb;a.Pb=c;Tl(a,a,b,c,!0);c.Ol=!0;c.Fe=b.detail;if(w.jF||w.kF)b.timeStamp-a.Gmb.timeStamp-a.Gm){b.preventDefault();return}a.Gm=b.timeStamp}if(w.Fn&&null!==a.Zs)a.Zs=null,b.preventDefault();else{a.Uc=a.Pb;a.Pb=c;Tl(a, a,b,c,!0);c.up=!0;c.Fe=b.detail;if(w.jF||w.kF)c.Fe=a.ll;c.bubbles=b.bubbles;b.target.Z&&(c.Vg=b.target.Z);a.simulatedMouseUp(b,null,new z,c.Vg)||(a.doMouseUp(),Uh(a),Xl(c,b))}}};a.Og=function(b){if(a.isEnabled){var c=a.Uc;a.Uc=a.Pb;a.Pb=c;Tl(a,a,b,c,!0);c.bubbles=!0;c.Nl=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();Xl(c,b)}};a.Qn=function(){if(a.isEnabled){a.Cm=!1;var b=a.Za;b.cancelWaitAfter();b instanceof fh&&b.hideToolTip()}};a.uB=function(b){if(a.isEnabled){a.gt=!1;a.il=!0; var c=a.Uc;a.Uc=a.Pb;a.Pb=c;Vl(a,b,b.targetTouches[0],c,1a.jw)){var c=a.Zi;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Uc,a.Uc=a.Pb,a.Pb=c,Wl(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.Vg)||(a.doMouseMove(),Xl(c,b)))}};a.IF=function(b){if("touch"===b.pointerType){var c=a.sD;void 0!==c[b.pointerId]&&(a.jw--,delete c[b.pointerId],c=a.Zi,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};d.Ee(!0);Fl(a)} +Date.now();c.Vg=null===d?b.target.Z:d.Z?d.Z:null;c.Pe=null;a.simulatedMouseUp(e?e:b,null,new z,c.Vg)||a.doMouseUp();Xl(c,b);a.il=!1}}};a.HF=function(b){if("touch"===b.pointerType){var c=a.sD;void 0===c[b.pointerId]&&(a.mw++,c[b.pointerId]=b);a.Zi[0]=null;a.Zi[1]=null;for(var d in c)if(null===a.Zi[0])a.Zi[0]=c[d];else if(null===a.Zi[1]){a.Zi[1]=c[d];break}a.isEnabled&&(a.gt=!1,a.il=!0,c=a.Uc,a.Uc=a.Pb,a.Pb=c,Vl(a,b,b,c,1a.mw)){var c=a.Zi;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Uc,a.Uc=a.Pb,a.Pb=c,Wl(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.Vg)||(a.doMouseMove(),Xl(c,b)))}};a.IF=function(b){if("touch"===b.pointerType){var c=a.sD;void 0!==c[b.pointerId]&&(a.mw--,delete c[b.pointerId],c=a.Zi,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};d.Ee(!0);Fl(a)} function Ln(a){1a)&&w.Ea(a,"0 <= loc <= 1",ga,"addColorStop:loc");w.j(b,"string",ga,"addColorStop:color");null===this.ah&&(this.ah=new ka("number","string"));this.ah.add(a,b);this.ma===mg&&(this.type=ng);this.bh=null}; w.defineProperty(ga,{type:"type"},function(){return this.ma},function(a){this.Q&&w.la(this,a);w.mb(a,ga,ga,"type");this.ma=a;this.start.Od()&&(a===ng?this.start=yb:a===bd&&(this.start=Gb));this.end.Od()&&(a===ng?this.end=Kb:a===bd&&(this.end=Gb));this.bh=null});w.defineProperty(ga,{color:"color"},function(){return this.ro},function(a){this.Q&&w.la(this,a);this.ro=a;this.bh=null}); -w.defineProperty(ga,{start:"start"},function(){return this.rp},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"start");this.rp=a.S();this.bh=null});w.defineProperty(ga,{end:"end"},function(){return this.Go},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"end");this.Go=a.S();this.bh=null});w.defineProperty(ga,{Ju:"startRadius"},function(){return this.xw},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"startRadius");0>a&&w.Ea(a,">= zero",ga,"startRadius");this.xw=a;this.bh=null}); -w.defineProperty(ga,{Ht:"endRadius"},function(){return this.vv},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"endRadius");0>a&&w.Ea(a,">= zero",ga,"endRadius");this.vv=a;this.bh=null});w.defineProperty(ga,{uk:"colorStops"},function(){return this.ah},function(a){this.Q&&w.la(this,a);this.ah=a;this.bh=null});w.defineProperty(ga,{pattern:"pattern"},function(){return this.iw},function(a){this.Q&&w.la(this,a);this.iw=a;this.bh=null}); +w.defineProperty(ga,{start:"start"},function(){return this.rp},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"start");this.rp=a.S();this.bh=null});w.defineProperty(ga,{end:"end"},function(){return this.Go},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"end");this.Go=a.S();this.bh=null});w.defineProperty(ga,{Ku:"startRadius"},function(){return this.Aw},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"startRadius");0>a&&w.Ea(a,">= zero",ga,"startRadius");this.Aw=a;this.bh=null}); +w.defineProperty(ga,{Ht:"endRadius"},function(){return this.wv},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"endRadius");0>a&&w.Ea(a,">= zero",ga,"endRadius");this.wv=a;this.bh=null});w.defineProperty(ga,{uk:"colorStops"},function(){return this.ah},function(a){this.Q&&w.la(this,a);this.ah=a;this.bh=null});w.defineProperty(ga,{pattern:"pattern"},function(){return this.lw},function(a){this.Q&&w.la(this,a);this.lw=a;this.bh=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 Vn=(new Vc(null)).xk,fa; ga.isValidColor=fa=function(a){if("black"===a)return!0;if(""===a)return!1;Vn.fillStyle="#000000";var b=Vn.fillStyle;Vn.fillStyle=a;if(Vn.fillStyle!==b)return!0;Vn.fillStyle="#FFFFFF";b=Vn.fillStyle;Vn.fillStyle=a;return Vn.fillStyle!==b};var Wn=new Rn,Xn=new Rn,Yn=new Rn,Zn=new Rn;ga.lighten=function(a){return $n(a)}; ga.prototype.lightenBy=function(a,b){this.Q&&w.la(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Tn:b;if(this.type===mg)ao(this.color),this.color=bo(c,d);else if((this.type===ng||this.type===bd)&&null!==this.uk)for(var e=this.uk.i;e.next();)ao(e.value),this.addColorStop(e.key,bo(c,d));return this};var $n;ga.lightenBy=$n=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Tn:c;ao(a);return bo(b,c)};ga.darken=function(a){return co(a)}; @@ -987,16 +987,16 @@ Zn.cg;c=-.969266*Yn.Bc+1.8760108*Yn.xd+.041556*Yn.Wc;d=.0556434*Yn.Bc+-.2040259* function ao(a){Vn.clearRect(0,0,1,1);Vn.fillStyle="#000000";var b=Vn.fillStyle;Vn.fillStyle=a;Vn.fillStyle!==b?(Vn.fillRect(0,0,1,1),a=Vn.getImageData(0,0,1,1).data,Wn.Bc=a[0],Wn.xd=a[1],Wn.Wc=a[2],Wn.cg=a[3]/255):(Vn.fillStyle="#FFFFFF",Vn.fillStyle=a,Wn.Bc=0,Wn.xd=0,Wn.Wc=0,Wn.cg=1)}function eo(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var ko=216/24389,jo=24389/27,ho=[95.047,100,108.883]; function fo(a){return a>ko?Math.pow(a,1/3):(jo*a+16)/116}function io(a){var b=a*a*a;return b>ko?b:(116*a-16)/jo} function G(){w.mc(this);this.P=4225027;this.wc=1;this.lh=null;this.Qb="";this.$b=this.Eb=null;this.ib=(new z(NaN,NaN)).freeze();this.Re=Dd;this.Vh=od;this.Uh=Bd;this.dd=new ia;this.om=new ia;this.Qi=new ia;this.tb=this.Do=1;this.ig=0;this.Cg=mo;this.Lm=fd;this.qd=(new A(NaN,NaN,NaN,NaN)).freeze();this.nc=(new A(NaN,NaN,NaN,NaN)).freeze();this.Tc=(new A(0,0,NaN,NaN)).freeze();this.V=this.As=this.Bs=null;this.nm=this.ge=rc;this.Ns=0;this.aj=1;this.Tq=0;this.xi=1;this.ct=null;this.Rs=-Infinity;this.Wm= -0;this.Xm=dd;this.Ym=kj;this.br="";this.tc=this.ha=null;this.po=-1;this.bn=this.lg=this.$k=this.qp=null;this.uz=nj;this.Sm=null}w.ji(G);w.fa("GraphObject",G); +0;this.Xm=dd;this.Ym=kj;this.br="";this.tc=this.ha=null;this.po=-1;this.bn=this.lg=this.$k=this.qp=null;this.vz=nj;this.Sm=null}w.ji(G);w.fa("GraphObject",G); G.prototype.cloneProtected=function(a){a.P=this.P|6144;a.wc=this.wc;a.Qb=this.Qb;a.Eb=this.Eb;a.$b=this.$b;a.ib.assign(this.ib);a.Re=this.Re.S();a.Vh=this.Vh.S();a.Uh=this.Uh.S();a.Qi=this.Qi.copy();a.tb=this.tb;a.ig=this.ig;a.Cg=this.Cg;a.Lm=this.Lm.S();a.qd.assign(this.qd);a.nc.assign(this.nc);a.Tc.assign(this.Tc);a.As=this.As;null!==this.V&&(a.V=this.V.copy());a.ge=this.ge.S();a.nm=this.nm.S();a.Ns=this.Ns;a.aj=this.aj;a.Tq=this.Tq;a.xi=this.xi;a.ct=this.ct;a.Rs=this.Rs;a.Wm=this.Wm;a.Xm=this.Xm.S(); a.Ym=this.Ym;a.br=this.br;null!==this.ha&&(a.ha=this.ha.copy());a.tc=this.tc;a.po=this.po;null!==this.$k&&(a.$k=w.Il(this.$k));null!==this.lg&&(a.lg=this.lg.copy());a.bn=this.bn};G.prototype.addCopyProperty=G.prototype.aH=function(a){var b=this.$k;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.Xc=function(a,b,c,d,e,f,h){var k=this.U;if(null!==k&&(k.Vn(a,b,c,d,e,f,h),xo(this)&&c===this&&a===Mf&&yo(this,k,b),c===k&&0!==(k.P&16777216)&&null!==k.data))for(a=this.xa.n,c=a.length,d=0;dd&&(f=b);isFinite(c)&& c>e&&(k=c);break;case oo:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case no:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.Bf,m=a.zh;f>l.width&&m.widthl.height&&m.heighta.height||this.Oi.ef>a.width))&&(c=!0);this.P=c?this.P|256:this.P&-257;this.nc.H()|| -w.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.nc.toString());this.Kx(f,this.nc);Do(this,!1);w.Db(f)};g.ij=function(){}; +g.hc=function(a,b,c,d,e){this.Ii();var f=w.Ef();f.assign(this.nc);this.nc.Ra();if(!1===Bm(this)){var h=this.nc;h.x=a;h.y=b;h.width=c;h.height=d}else this.ij(a,b,c,d);this.nc.freeze();this.lg=void 0===e?null:e;c=!1;void 0!==e?c=!0:null!==this.O&&(e=this.O.Tc,d=this.za,null!==this.jn&&(d=this.nc),c=b+d.height,d=a+d.width,c=!(0<=a+.05&&d<=e.width+.05&&0<=b+.05&&c<=e.height+.05),this instanceof Hh&&(a=this.Tc,this.Xv>a.height||this.Oi.ef>a.width))&&(c=!0);this.P=c?this.P|256:this.P&-257;this.nc.H()|| +w.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.nc.toString());this.Nx(f,this.nc);Do(this,!1);w.Db(f)};g.ij=function(){}; function Eo(a,b,c,d,e){var f=a.W;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.Ba.H()){f=a.qd;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=Co(a,!0);c===d&&f===e&&(b=Nj);switch(b){case Nj:if(c>d||f>e)$l(a,!0),wk(a,c>d?d:c,f>e?e:f);break;case De:$l(a,!0);wk(a,d,e,0,0);break;case oo:$l(a,!0);wk(a,d,f,0,0);break;case no:$l(a,!0),wk(a,c,e,0,0)}}} -g.Kx=function(a,b){var c=this.U;null!==c&&null!==c.g&&(c.Du!==this&&c.VF!==this&&c.YF!==this||Fo(c,!0),this.na(),Qa(a,b)||(c.Ek(),this.ss(c)))};g.ss=function(a){null!==this.Qd&&(Fo(a,!0),a instanceof T&&Go(a,this))};w.defineProperty(G,{uq:"shadowVisible"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(this.bn=a,this.na(),this.h("shadowVisible",b,a))}); -G.prototype.se=function(a,b){if(this.visible){var c=this.nc;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 Nc)a:{if(this.visible){var f=null,h=a.Ax;if(this instanceof C&&(this.type===Ho||this.type===Io))Jo(this,a,b);else{var k=this.nc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.O;0!==(this.P&4096)===!0&&Ko(this);var c=0!==(this.P&256),n=!1;this instanceof +g.Nx=function(a,b){var c=this.U;null!==c&&null!==c.g&&(c.Eu!==this&&c.VF!==this&&c.YF!==this||Fo(c,!0),this.na(),Qa(a,b)||(c.Ek(),this.ss(c)))};g.ss=function(a){null!==this.Qd&&(Fo(a,!0),a instanceof T&&Go(a,this))};w.defineProperty(G,{uq:"shadowVisible"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(this.bn=a,this.na(),this.h("shadowVisible",b,a))}); +G.prototype.se=function(a,b){if(this.visible){var c=this.nc;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 Nc)a:{if(this.visible){var f=null,h=a.Dx;if(this instanceof C&&(this.type===Ho||this.type===Io))Jo(this,a,b);else{var k=this.nc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.O;0!==(this.P&4096)===!0&&Ko(this);var c=0!==(this.P&256),n=!1;this instanceof Hh&&(a.font=this.font);if(c){n=m.Yg()?m.Ia:m.W;if(null!==this.lg)var p=this.lg,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;Pc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.tj()){var u=this;if(!u.isVisible())break a}a.uh.Tb=[1,0,0,1,0,0];q=!1;this.tj()&&this.Zl&&b.pj("drawShadows")&&(r=this.an,a.lB(r.x* b.scale*b.Ad,r.y*b.scale*b.Ad,u.Bg),a.Zn(),a.shadowColor=u.$m);u=!1;this.U&&b.pj("drawShadows")&&(u=this.U.Zl);!0===this.uq?(a.Zn(),!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0)):!1===this.uq&&a.Yn();null!==this.$b&&(Lo(this,a,this.$b,!0,!0),!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0),this.$b instanceof ga&&this.$b.type===bd?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Jg(this.$b)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof C?Pc(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.uh.Tb=[l.m11,l.m12, l.m21,l.m22,l.dx,l.dy];null!==this.Eb&&(!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0),s=this.Ia,l=k=0,r=s.width,s=s.height,p=0,this instanceof X&&(s=this.hb.cb,k=s.x,l=s.y,r=s.width,s=s.height,p=this.fi),Lo(this,a,this.Eb,!0,!1),this.Eb instanceof ga&&this.Eb.type===bd?(a.beginPath(),a.rect(k-p/2,l-p/2,r+p,s+p),a.Jg(this.Eb)):a.fillRect(k-p/2,l-p/2,r+p,s+p));u&&(null!==this.Eb||null!==this.$b||null!==m&&0!==(m.P&512)||null!==m&&(m.type===El||m.type===Lj)&&m.Jd()!==this)?(Mo(this,!0),null===this.uq&& -a.Yn()):Mo(this,!1);this.yk(a,b);u&&0!==(this.P&512)===!0&&a.Zn();this.tj()&&u&&a.Yn();c&&(a.restore(),n&&a.wf.pop());this instanceof C&&(f=a.wf.pop());!0===q&&a.wf.pop();null!==a.EE&&(null===f&&(h===a.Ax?(Pc(a,1,0,0,1,0,0),f=a.wf.pop()):f=a.Ax),a.EE(this,f))}}}}else{if(this instanceof C&&(this.type===Ho||this.type===Io)){Jo(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof W&&this.ku(!1);f=this.transform;h=this.O;0!==(this.P&4096)===!0&&Ko(this);m=0!==(this.P&256);a.Jp&&(m=!1);this instanceof +a.Yn()):Mo(this,!1);this.yk(a,b);u&&0!==(this.P&512)===!0&&a.Zn();this.tj()&&u&&a.Yn();c&&(a.restore(),n&&a.wf.pop());this instanceof C&&(f=a.wf.pop());!0===q&&a.wf.pop();null!==a.EE&&(null===f&&(h===a.Dx?(Pc(a,1,0,0,1,0,0),f=a.wf.pop()):f=a.Dx),a.EE(this,f))}}}}else{if(this instanceof C&&(this.type===Ho||this.type===Io)){Jo(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof W&&this.lu(!1);f=this.transform;h=this.O;0!==(this.P&4096)===!0&&Ko(this);m=0!==(this.P&256);a.Jp&&(m=!1);this instanceof Hh&&(a.font=this.font);if(m){n=h.Yg()?h.Ia:h.W;null!==this.lg?(q=this.lg,k=q.x,l=q.y,u=q.width,q=q.height):(k=Math.max(c.x,n.x),l=Math.max(c.y,n.y),u=Math.min(c.right,n.right)-k,q=Math.min(c.bottom,n.bottom)-l);if(k>c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.tj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.Zl&&b.pj("drawShadows")&&(n=this.an,a.lB(n.x*b.scale*b.Ad,n.y*b.scale* -b.Ad,this.Bg),a.Zn(),a.shadowColor=this.$m)}n=!1;this.U&&b.pj("drawShadows")&&(n=this.U.Zl);!0===this.uq?a.Zn():!1===this.uq&&a.Yn();null!==this.$b&&(Lo(this,a,this.$b,!0,!0),this.$b instanceof ga&&this.$b.type===bd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Jg(this.$b)):a.fillRect(c.x,c.y,c.width,c.height));f.bu()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Eb&&(u=this.Ia,k=c=0,l=u.width,u=u.height,q=0,this instanceof X&&(u=this.hb.cb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.fi), -Lo(this,a,this.Eb,!0,!1),this.Eb instanceof ga&&this.Eb.type===bd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Jg(this.Eb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));n&&(null!==this.Eb||null!==this.$b||null!==h&&0!==(h.P&512)||null!==h&&(h.type===El||h.type===Lj)&&h.Jd()!==this)?(Mo(this,!0),null===this.uq&&a.Yn()):Mo(this,!1);this.yk(a,b);n&&0!==(this.P&512)===!0&&a.Zn();this.tj()&&n&&a.Yn();m?(a.restore(),this instanceof C?a.Ee(!0):a.Ee(!1)):f.bu()||(h=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*h,-f.m12* +b.Ad,this.Bg),a.Zn(),a.shadowColor=this.$m)}n=!1;this.U&&b.pj("drawShadows")&&(n=this.U.Zl);!0===this.uq?a.Zn():!1===this.uq&&a.Yn();null!==this.$b&&(Lo(this,a,this.$b,!0,!0),this.$b instanceof ga&&this.$b.type===bd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Jg(this.$b)):a.fillRect(c.x,c.y,c.width,c.height));f.cu()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Eb&&(u=this.Ia,k=c=0,l=u.width,u=u.height,q=0,this instanceof X&&(u=this.hb.cb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.fi), +Lo(this,a,this.Eb,!0,!1),this.Eb instanceof ga&&this.Eb.type===bd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Jg(this.Eb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));n&&(null!==this.Eb||null!==this.$b||null!==h&&0!==(h.P&512)||null!==h&&(h.type===El||h.type===Lj)&&h.Jd()!==this)?(Mo(this,!0),null===this.uq&&a.Yn()):Mo(this,!1);this.yk(a,b);n&&0!==(this.P&512)===!0&&a.Zn();this.tj()&&n&&a.Yn();m?(a.restore(),this instanceof C?a.Ee(!0):a.Ee(!1)):f.cu()||(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 Jo(a,b,c){var d=a.nc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.$b&&(Lo(a,b,a.$b,!0,!0),a.$b instanceof ga&&a.$b.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Jg(a.$b)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Eb&&(Lo(a,b,a.Eb,!0,!1),a.Eb instanceof ga&&a.Eb.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Jg(a.Eb)):b.fillRect(d.x,d.y,d.width,d.height)),a.yk(b,c))}G.prototype.yk=function(){}; -function Lo(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===mg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ia,f=h.width,h=h.height;if(e)var l=a.W,f=l.width,h=l.height;var m=b instanceof Wc;if(m&&c.bh&&(c.type===Sn||c.so===f&&c.Fy===h))k=c.bh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.W,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===ng)k=b.createLinearGradient(l,n,p,q);else if(c.type===bd)s=isNaN(c.Ht)?Math.max(f,h)/2:c.Ht,isNaN(c.Ju)?(r=0,s=Math.max(f,h)/2):r=c.Ju,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===Sn)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else w.yd(c.type,"Brush type");if(c.type!==Sn&&(e=c.uk,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.bh=k,null!==k&&(c.so=f,c.Fy=h),null===k&&c.type===Sn&&-1!==c.so)){c.so=-1;var t=a.g;null!==t&& --1===c.so&&w.setTimeout(function(){t.Rx()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.Xl=function(a){if(a instanceof C)a:{if(this!==a&&null!==a)for(var b=this.O;null!==b;){if(b===a){a=!0;break a}b=b.O}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.xj=function(){if(!this.visible)return!1;var a=this.O;return null!==a?a.xj():!0}; -G.prototype.isEnabledObject=G.prototype.$t=function(){for(var a=this instanceof C?this:this.O;null!==a&&a.isEnabled;)a=a.O;return null===a};w.defineProperty(G,{FE:"enabledChanged"},function(){return null!==this.ha?this.ha.rr:null},function(a){so(this);var b=this.ha.rr;b!==a&&(null!==a&&w.j(a,"function",G,"enabledChanged"),this.ha.rr=a,this.h("enabledChanged",b,a))}); +function Lo(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===mg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ia,f=h.width,h=h.height;if(e)var l=a.W,f=l.width,h=l.height;var m=b instanceof Wc;if(m&&c.bh&&(c.type===Sn||c.so===f&&c.Iy===h))k=c.bh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.W,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===ng)k=b.createLinearGradient(l,n,p,q);else if(c.type===bd)s=isNaN(c.Ht)?Math.max(f,h)/2:c.Ht,isNaN(c.Ku)?(r=0,s=Math.max(f,h)/2):r=c.Ku,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===Sn)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else w.yd(c.type,"Brush type");if(c.type!==Sn&&(e=c.uk,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.bh=k,null!==k&&(c.so=f,c.Iy=h),null===k&&c.type===Sn&&-1!==c.so)){c.so=-1;var t=a.g;null!==t&& +-1===c.so&&w.setTimeout(function(){t.Ux()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.Xl=function(a){if(a instanceof C)a:{if(this!==a&&null!==a)for(var b=this.O;null!==b;){if(b===a){a=!0;break a}b=b.O}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.xj=function(){if(!this.visible)return!1;var a=this.O;return null!==a?a.xj():!0}; +G.prototype.isEnabledObject=G.prototype.au=function(){for(var a=this instanceof C?this:this.O;null!==a&&a.isEnabled;)a=a.O;return null===a};w.defineProperty(G,{FE:"enabledChanged"},function(){return null!==this.ha?this.ha.rr:null},function(a){so(this);var b=this.ha.rr;b!==a&&(null!==a&&w.j(a,"function",G,"enabledChanged"),this.ha.rr=a,this.h("enabledChanged",b,a))}); function Ko(a){if(0!==(a.P&2048)===!0){var b=a.dd;b.reset();if(!a.nc.H()||!a.qd.H()){No(a,!1);return}b.translate(a.nc.x,a.nc.y);b.translate(-a.za.x,-a.za.y);var c=a.Ia;Ao(a,b,c.x,c.y,c.width,c.height);No(a,!1);Oo(a,!0)}0!==(a.P&4096)===!0&&(b=a.O,null===b?(a.om.set(a.dd),a.Do=a.scale,Oo(a,!1)):null!==b.ph&&(c=a.om,c.reset(),b.Yg()?c.multiply(b.om):null!==b.O&&c.multiply(b.O.om),c.multiply(a.dd),a.Do=a.scale*b.Do,Oo(a,!1)))} -function Ao(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Gb;a.tj()&&a.Af.fd()&&(h=a.Af);var k=w.K();if(a instanceof S&&a.Yf!==a)for(c=a.Yf,d=c.Ia,k.Gu(d.x,d.y,d.width,d.height,h),c.Qi.nb(k),k.offset(-c.za.x,-c.za.y),h=c.O;null!==h&&h!==a;)h.Qi.nb(k),k.offset(-h.za.x,-h.za.y),h=h.O;else k.Gu(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);w.v(k)}}g=G.prototype;g.I=function(a){void 0===a&&(a=!1);if(!0!==hm(this)){$l(this,!0);Do(this,!0);var b=this.O;null===b||a||b.I()}}; +function Ao(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Gb;a.tj()&&a.Af.fd()&&(h=a.Af);var k=w.K();if(a instanceof S&&a.Yf!==a)for(c=a.Yf,d=c.Ia,k.Hu(d.x,d.y,d.width,d.height,h),c.Qi.nb(k),k.offset(-c.za.x,-c.za.y),h=c.O;null!==h&&h!==a;)h.Qi.nb(k),k.offset(-h.za.x,-h.za.y),h=h.O;else k.Hu(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);w.v(k)}}g=G.prototype;g.I=function(a){void 0===a&&(a=!1);if(!0!==hm(this)){$l(this,!0);Do(this,!0);var b=this.O;null===b||a||b.I()}}; g.aq=function(){!0!==hm(this)&&($l(this,!0),Do(this,!0))};function Po(a){if(!1===Bm(a)){var b=a.O;null!==b?b.I():a.tj()&&(b=a.g,null!==b&&(b.sg.add(a),a instanceof T&&a.Uf(),b.Le()));Do(a,!0)}}g.Ii=function(){0!==(this.P&2048)===!1&&(No(this,!0),Oo(this,!0))};g.wA=function(){Oo(this,!0)};g.na=function(){var a=this.U;null!==a&&a.na()}; function Co(a,b){var c=a.stretch,d=a.O;if(null!==d&&d.ma===Qo)return Ro(a,d.be(a.Zb),d.ae(a.column),b);if(null!==d&&d.ma===El&&d.Jd()===a)return So(a,De,b);if(c===mo){if(null!==d){if(d.ma===Lj&&d.Jd()===a)return So(a,De,b);c=d.Zd;return c===mo?So(a,Nj,b):So(a,c,b)}return So(a,Nj,b)}return So(a,c,b)} function Ro(a,b,c,d){var e=a.stretch;if(e!==mo)return So(a,e,d);var f=e=null;switch(b.stretch){case no:f=!0;break;case De:f=!0}switch(c.stretch){case oo:e=!0;break;case De:e=!0}b=a.O.Zd;null===e&&(e=b===oo||b===De);null===f&&(f=b===no||b===De);return!0===e&&!0===f?So(a,De,d):!0===e?So(a,oo,d):!0===f?So(a,no,d):So(a,Nj,d)} @@ -1037,10 +1037,10 @@ w.defineProperty(G,{name:"name"},function(){return this.Qb},function(a){var b=th w.defineProperty(G,{visible:"visible"},function(){return 0!==(this.P&1)},function(a){var b=0!==(this.P&1);b!==a&&(this.P^=1,this.h("visible",b,a),b=this.O,null!==b?b.I():this.tj()&&this.vd(a),this.na(),To(this))});w.defineProperty(G,{Tg:"pickable"},function(){return 0!==(this.P&2)},function(a){var b=0!==(this.P&2);b!==a&&(this.P^=2,this.h("pickable",b,a))}); w.defineProperty(G,{TH:"fromLinkableDuplicates"},function(){return 0!==(this.P&4)},function(a){var b=0!==(this.P&4);b!==a&&(this.P^=4,this.h("fromLinkableDuplicates",b,a))});w.defineProperty(G,{UH:"fromLinkableSelfNode"},function(){return 0!==(this.P&8)},function(a){var b=0!==(this.P&8);b!==a&&(this.P^=8,this.h("fromLinkableSelfNode",b,a))}); w.defineProperty(G,{LJ:"toLinkableDuplicates"},function(){return 0!==(this.P&16)},function(a){var b=0!==(this.P&16);b!==a&&(this.P^=16,this.h("toLinkableDuplicates",b,a))});w.defineProperty(G,{MJ:"toLinkableSelfNode"},function(){return 0!==(this.P&32)},function(a){var b=0!==(this.P&32);b!==a&&(this.P^=32,this.h("toLinkableSelfNode",b,a))});w.defineProperty(G,{Vf:"isPanelMain"},function(){return 0!==(this.P&64)},function(a){var b=0!==(this.P&64);b!==a&&(this.P^=64,this.I(),this.h("isPanelMain",b,a))}); -w.defineProperty(G,{qx:"isActionable"},function(){return 0!==(this.P&128)},function(a){var b=0!==(this.P&128);b!==a&&(this.P^=128,this.h("isActionable",b,a))});w.defineProperty(G,{jn:"areaBackground"},function(){return this.$b},function(a){var b=this.$b;b!==a&&(a instanceof ga&&a.freeze(),this.$b=a,this.na(),this.h("areaBackground",b,a))}); +w.defineProperty(G,{ux:"isActionable"},function(){return 0!==(this.P&128)},function(a){var b=0!==(this.P&128);b!==a&&(this.P^=128,this.h("isActionable",b,a))});w.defineProperty(G,{jn:"areaBackground"},function(){return this.$b},function(a){var b=this.$b;b!==a&&(a instanceof ga&&a.freeze(),this.$b=a,this.na(),this.h("areaBackground",b,a))}); w.defineProperty(G,{background:"background"},function(){return this.Eb},function(a){var b=this.Eb;b!==a&&(a instanceof ga&&a.freeze(),this.Eb=a,this.na(),this.h("background",b,a))});function Mo(a,b){a.P=b?a.P|512:a.P&-513}function xo(a){return 0!==(a.P&1024)}function Uo(a,b){a.P=b?a.P|1024:a.P&-1025}function No(a,b){a.P=b?a.P|2048:a.P&-2049}function Oo(a,b){a.P=b?a.P|4096:a.P&-4097}function hm(a){return 0!==(a.P&8192)}function $l(a,b){a.P=b?a.P|8192:a.P&-8193} function Bm(a){return 0!==(a.P&16384)}function Do(a,b){a.P=b?a.P|16384:a.P&-16385}w.u(G,{U:"part"},function(){if(this.tj())return this;if(null!==this.Sm)return this.Sm;var a;for(a=this.O;a;){if(a instanceof S)return this.Sm=a;a=a.O}return null});w.u(G,{O:"panel"},function(){return this.lh});G.prototype.dm=function(a){this.lh=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.ib},function(a){var b=a.x,c=a.y,d=this.ib,e=d.x,f=d.y;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))?this.iB():(a=a.S(),this.hB(a,d)&&this.h("position",d,a))});G.prototype.iB=function(){};G.prototype.hB=function(a){this.ib=a;Po(this);this.Ii();return!0};G.prototype.gy=function(a,b){this.ib.m(a,b);this.Ii()};w.u(G,{W:"actualBounds"},function(){return this.nc}); +w.defineProperty(G,{position:"position"},function(){return this.ib},function(a){var b=a.x,c=a.y,d=this.ib,e=d.x,f=d.y;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))?this.iB():(a=a.S(),this.hB(a,d)&&this.h("position",d,a))});G.prototype.iB=function(){};G.prototype.hB=function(a){this.ib=a;Po(this);this.Ii();return!0};G.prototype.jy=function(a,b){this.ib.m(a,b);this.Ii()};w.u(G,{W:"actualBounds"},function(){return this.nc}); w.defineProperty(G,{scale:"scale"},function(){return this.tb},function(a){var b=this.tb;b!==a&&(0>=a&&w.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.tb=a,this.Ii(),this.I(),this.h("scale",b,a))});w.defineProperty(G,{angle:"angle"},function(){return this.ig},function(a){var b=this.ig;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.ig=a,this.I(),this.Ii(),this.h("angle",b,a)))}); w.defineProperty(G,{Ba:"desiredSize"},function(){return this.Re},function(a){var b=a.width,c=a.height,d=this.Re,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Re=a=a.S(),this.I(),this instanceof X&&this.Ke(),this.h("desiredSize",d,a),xo(this)&&(a=this.U,null!==a&&(yo(this,a,"width"),yo(this,a,"height"))))}); w.defineProperty(G,{width:"width"},function(){return this.Re.width},function(a){var b=this.Re.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Re,this.Re=a=(new ha(a,this.Re.height)).freeze(),this.I(),this instanceof X&&this.Ke(),this.h("desiredSize",b,a),xo(this)&&(a=this.U,null!==a&&yo(this,a,"width")))}); @@ -1049,45 +1049,45 @@ w.defineProperty(G,{zh:"minSize"},function(){return this.Vh},function(a){var b=t w.u(G,{Ia:"naturalBounds"},function(){return this.Tc},{configurable:!0});w.defineProperty(G,{margin:"margin"},function(){return this.Lm},function(a){"number"===typeof a&&(a=new db(a));var b=this.Lm;b.L(a)||(this.Lm=a=a.S(),this.I(),this.h("margin",b,a))});w.u(G,{transform:null},function(){0!==(this.P&2048)===!0&&Ko(this);return this.dd});w.u(G,{ph:null},function(){0!==(this.P&4096)===!0&&Ko(this);return this.om}); w.defineProperty(G,{alignment:"alignment"},function(){return this.ge},function(a){var b=this.ge;b.L(a)||(a.Od()&&!a.Vc()&&w.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.ge=a=a.S(),Po(this),this.h("alignment",b,a))});w.defineProperty(G,{column:"column"},function(){return this.Tq},function(a){a=Math.round(a);var b=this.Tq;b!==a&&(0>a&&w.Ea(a,">= 0",G,"column"),this.Tq=a,this.I(),this.h("column",b,a))}); w.defineProperty(G,{tH:"columnSpan"},function(){return this.xi},function(a){a=Math.round(a);var b=this.xi;b!==a&&(1>a&&w.Ea(a,">= 1",G,"columnSpan"),this.xi=a,this.I(),this.h("columnSpan",b,a))});w.defineProperty(G,{Zb:"row"},function(){return this.Ns},function(a){a=Math.round(a);var b=this.Ns;b!==a&&(0>a&&w.Ea(a,">= 0",G,"row"),this.Ns=a,this.I(),this.h("row",b,a))}); -w.defineProperty(G,{rowSpan:"rowSpan"},function(){return this.aj},function(a){a=Math.round(a);var b=this.aj;b!==a&&(1>a&&w.Ea(a,">= 1",G,"rowSpan"),this.aj=a,this.I(),this.h("rowSpan",b,a))});w.defineProperty(G,{hy:"spanAllocation"},function(){return this.ct},function(a){var b=this.ct;b!==a&&(null!==a&&w.j(a,"function",G,"spanAllocation"),this.ct=a,this.I(),this.h("spanAllocation",b,a))}); +w.defineProperty(G,{rowSpan:"rowSpan"},function(){return this.aj},function(a){a=Math.round(a);var b=this.aj;b!==a&&(1>a&&w.Ea(a,">= 1",G,"rowSpan"),this.aj=a,this.I(),this.h("rowSpan",b,a))});w.defineProperty(G,{ky:"spanAllocation"},function(){return this.ct},function(a){var b=this.ct;b!==a&&(null!==a&&w.j(a,"function",G,"spanAllocation"),this.ct=a,this.I(),this.h("spanAllocation",b,a))}); w.defineProperty(G,{oh:"alignmentFocus"},function(){return this.nm},function(a){var b=this.nm;b.L(a)||(!a.Od()||a.Vc()||a.L(tb)&&this instanceof T||w.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.nm=a=a.S(),this.I(),this.h("alignmentFocus",b,a))}); w.defineProperty(G,{Qd:"portId"},function(){return this.As},function(a){var b=this.As;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&&Vo(c,this);this.As=a;if(null!==a&&c){c.Dk=!0;null===c.le&&Wo(c);var d=this.Qd;null!==d&&c.le.add(d,this)}this.h("portId",b,a)}});function Xo(a){var b=a.U;if(b instanceof T&&(null!==a.Qd||a===b.port)){var c=b.g;null===c||c.oa.gb||Go(b,a)}} function To(a){var b=a.g;null===b||b.oa.gb||(a instanceof C?a instanceof T?a.Uf():Yo(a,a,function(a){Xo(a)}):Xo(a))}w.defineProperty(G,{Bb:"toSpot"},function(){return null!==this.V?this.V.pk:tb},function(a){this.Ld();var b=this.V.pk;b.L(a)||(a=a.S(),this.V.pk=a,this.h("toSpot",b,a),Xo(this))}); -w.defineProperty(G,{jm:"toEndSegmentLength"},function(){return null!==this.V?this.V.nk:10},function(a){this.Ld();var b=this.V.nk;b!==a&&(0>a&&w.Ea(a,">= 0",G,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),Xo(this))});w.defineProperty(G,{Ku:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:vo},function(a){this.Ld();var b=this.V.mk;b!==a&&(w.Ft("GraphObject.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),Xo(this))}); -w.defineProperty(G,{Lu:"toShortLength"},function(){return null!==this.V?this.V.ok:0},function(a){this.Ld();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),Xo(this))});w.defineProperty(G,{pG:"toLinkable"},function(){return null!==this.V?this.V.kt:null},function(a){this.Ld();var b=this.V.kt;b!==a&&(this.V.kt=a,this.h("toLinkable",b,a))}); +w.defineProperty(G,{jm:"toEndSegmentLength"},function(){return null!==this.V?this.V.nk:10},function(a){this.Ld();var b=this.V.nk;b!==a&&(0>a&&w.Ea(a,">= 0",G,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),Xo(this))});w.defineProperty(G,{Lu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:vo},function(a){this.Ld();var b=this.V.mk;b!==a&&(w.Ft("GraphObject.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),Xo(this))}); +w.defineProperty(G,{Mu:"toShortLength"},function(){return null!==this.V?this.V.ok:0},function(a){this.Ld();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),Xo(this))});w.defineProperty(G,{pG:"toLinkable"},function(){return null!==this.V?this.V.kt:null},function(a){this.Ld();var b=this.V.kt;b!==a&&(this.V.kt=a,this.h("toLinkable",b,a))}); w.defineProperty(G,{NJ:"toMaxLinks"},function(){return null!==this.V?this.V.lt:Infinity},function(a){this.Ld();var b=this.V.lt;b!==a&&(0>a&&w.Ea(a,">= 0",G,"toMaxLinks"),this.V.lt=a,this.h("toMaxLinks",b,a))});w.defineProperty(G,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Sj:tb},function(a){this.Ld();var b=this.V.Sj;b.L(a)||(a=a.S(),this.V.Sj=a,this.h("fromSpot",b,a),Xo(this))}); w.defineProperty(G,{Sl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Qj:10},function(a){this.Ld();var b=this.V.Qj;b!==a&&(0>a&&w.Ea(a,">= 0",G,"fromEndSegmentLength"),this.V.Qj=a,this.h("fromEndSegmentLength",b,a),Xo(this))});w.defineProperty(G,{Rt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Pj:vo},function(a){this.Ld();var b=this.V.Pj;b!==a&&(w.Ft("GraphObject.fromEndSegmentDirection","2.0"),this.V.Pj=a,this.h("fromEndSegmentDirection",b,a),Xo(this))}); w.defineProperty(G,{St:"fromShortLength"},function(){return null!==this.V?this.V.Rj:0},function(a){this.Ld();var b=this.V.Rj;b!==a&&(this.V.Rj=a,this.h("fromShortLength",b,a),Xo(this))});w.defineProperty(G,{PE:"fromLinkable"},function(){return null!==this.V?this.V.ur:null},function(a){this.Ld();var b=this.V.ur;b!==a&&(this.V.ur=a,this.h("fromLinkable",b,a))}); w.defineProperty(G,{lA:"fromMaxLinks"},function(){return null!==this.V?this.V.vr:Infinity},function(a){this.Ld();var b=this.V.vr;b!==a&&(0>a&&w.Ea(a,">= 0",G,"fromMaxLinks"),this.V.vr=a,this.h("fromMaxLinks",b,a))});w.defineProperty(G,{cursor:"cursor"},function(){return this.br},function(a){var b=this.br;b!==a&&(w.j(a,"string",G,"cursor"),this.br=a,this.h("cursor",b,a))}); w.defineProperty(G,{click:"click"},function(){return null!==this.ha?this.ha.wi:null},function(a){so(this);var b=this.ha.wi;b!==a&&(null!==a&&w.j(a,"function",G,"click"),this.ha.wi=a,this.h("click",b,a))});w.defineProperty(G,{Gt:"doubleClick"},function(){return null!==this.ha?this.ha.Ei:null},function(a){so(this);var b=this.ha.Ei;b!==a&&(null!==a&&w.j(a,"function",G,"doubleClick"),this.ha.Ei=a,this.h("doubleClick",b,a))}); -w.defineProperty(G,{Wz:"contextClick"},function(){return null!==this.ha?this.ha.yi:null},function(a){so(this);var b=this.ha.yi;b!==a&&(null!==a&&w.j(a,"function",G,"contextClick"),this.ha.yi=a,this.h("contextClick",b,a))});w.defineProperty(G,{mu:"mouseEnter"},function(){return null!==this.ha?this.ha.ks:null},function(a){so(this);var b=this.ha.ks;b!==a&&(null!==a&&w.j(a,"function",G,"mouseEnter"),this.ha.ks=a,this.h("mouseEnter",b,a))}); -w.defineProperty(G,{nu:"mouseLeave"},function(){return null!==this.ha?this.ha.ls:null},function(a){so(this);var b=this.ha.ls;b!==a&&(null!==a&&w.j(a,"function",G,"mouseLeave"),this.ha.ls=a,this.h("mouseLeave",b,a))});w.defineProperty(G,{NA:"mouseOver"},function(){return null!==this.ha?this.ha.Vi:null},function(a){so(this);var b=this.ha.Vi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseOver"),this.ha.Vi=a,this.h("mouseOver",b,a))}); +w.defineProperty(G,{Xz:"contextClick"},function(){return null!==this.ha?this.ha.yi:null},function(a){so(this);var b=this.ha.yi;b!==a&&(null!==a&&w.j(a,"function",G,"contextClick"),this.ha.yi=a,this.h("contextClick",b,a))});w.defineProperty(G,{nu:"mouseEnter"},function(){return null!==this.ha?this.ha.ks:null},function(a){so(this);var b=this.ha.ks;b!==a&&(null!==a&&w.j(a,"function",G,"mouseEnter"),this.ha.ks=a,this.h("mouseEnter",b,a))}); +w.defineProperty(G,{ou:"mouseLeave"},function(){return null!==this.ha?this.ha.ls:null},function(a){so(this);var b=this.ha.ls;b!==a&&(null!==a&&w.j(a,"function",G,"mouseLeave"),this.ha.ls=a,this.h("mouseLeave",b,a))});w.defineProperty(G,{NA:"mouseOver"},function(){return null!==this.ha?this.ha.Vi:null},function(a){so(this);var b=this.ha.Vi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseOver"),this.ha.Vi=a,this.h("mouseOver",b,a))}); w.defineProperty(G,{MA:"mouseHover"},function(){return null!==this.ha?this.ha.Ui:null},function(a){so(this);var b=this.ha.Ui;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHover"),this.ha.Ui=a,this.h("mouseHover",b,a))});w.defineProperty(G,{LA:"mouseHold"},function(){return null!==this.ha?this.ha.Ti:null},function(a){so(this);var b=this.ha.Ti;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHold"),this.ha.Ti=a,this.h("mouseHold",b,a))}); w.defineProperty(G,{WI:"mouseDragEnter"},function(){return null!==this.ha?this.ha.hs:null},function(a){so(this);var b=this.ha.hs;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragEnter"),this.ha.hs=a,this.h("mouseDragEnter",b,a))});w.defineProperty(G,{XI:"mouseDragLeave"},function(){return null!==this.ha?this.ha.js:null},function(a){so(this);var b=this.ha.js;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragLeave"),this.ha.js=a,this.h("mouseDragLeave",b,a))}); w.defineProperty(G,{KA:"mouseDrop"},function(){return null!==this.ha?this.ha.Si:null},function(a){so(this);var b=this.ha.Si;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDrop"),this.ha.Si=a,this.h("mouseDrop",b,a))});w.defineProperty(G,{bE:"actionDown"},function(){return null!==this.ha?this.ha.Bq:null},function(a){so(this);var b=this.ha.Bq;b!==a&&(null!==a&&w.j(a,"function",G,"actionDown"),this.ha.Bq=a,this.h("actionDown",b,a))}); w.defineProperty(G,{cE:"actionMove"},function(){return null!==this.ha?this.ha.Cq:null},function(a){so(this);var b=this.ha.Cq;b!==a&&(null!==a&&w.j(a,"function",G,"actionMove"),this.ha.Cq=a,this.h("actionMove",b,a))});w.defineProperty(G,{dE:"actionUp"},function(){return null!==this.ha?this.ha.Dq:null},function(a){so(this);var b=this.ha.Dq;b!==a&&(null!==a&&w.j(a,"function",G,"actionUp"),this.ha.Dq=a,this.h("actionUp",b,a))}); w.defineProperty(G,{aE:"actionCancel"},function(){return null!==this.ha?this.ha.Aq:null},function(a){so(this);var b=this.ha.Aq;b!==a&&(null!==a&&w.j(a,"function",G,"actionCancel"),this.ha.Aq=a,this.h("actionCancel",b,a))});w.defineProperty(G,{rB:"toolTip"},function(){return null!==this.ha?this.ha.dj:null},function(a){so(this);var b=this.ha.dj;b!==a&&(this.ha.dj=a,this.h("toolTip",b,a))}); w.defineProperty(G,{contextMenu:"contextMenu"},function(){return null!==this.ha?this.ha.zi:null},function(a){so(this);var b=this.ha.zi;b!==a&&(this.ha.zi=a,this.h("contextMenu",b,a))});G.prototype.bind=G.prototype.bind=function(a){a.Dg=this;var b=this.Ql();null!==b&&Zo(b)&&w.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.tc&&(this.tc=new I(Zg));this.tc.add(a)}; -G.prototype.findTemplateBinder=G.prototype.Ql=function(){for(var a=this instanceof C?this:this.O;null!==a;){if(null!==a.Yk)return a;a=a.O}return null};G.prototype.setProperties=function(a){w.Eu(this,a)};var $o; +G.prototype.findTemplateBinder=G.prototype.Ql=function(){for(var a=this instanceof C?this:this.O;null!==a;){if(null!==a.Yk)return a;a=a.O}return null};G.prototype.setProperties=function(a){w.Fu(this,a)};var $o; G.make=$o=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=ap.ja(a);"function"===typeof f?(c=w.Il(arguments),d=f(c),w.Qa(d)||w.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=da[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.ve=!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.ve=!1,a.index=e);e=new sa;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.Eu(a,e)}else w.Eu(a,b);else w.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var ap=new ka("string","function"); +D?a.Sb=b:a instanceof U?a.Sb=b:w.k("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(b))for(c=0;ce)&&w.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.ve=!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.ve=!1,a.index=e);e=new sa;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.Fu(a,e)}else w.Fu(a,b);else w.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var ap=new ka("string","function"); G.getBuilders=function(){var a=new ka("string","function"),b;for(b in ap)if(b!==b.toLowerCase()){var c=ap.ja(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var cp;G.defineBuilder=cp=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);ap.add(a,b)};var dp; G.takeBuilderArgument=dp=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}; -cp("Button",function(){var a=new ga(ng);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ga(ng);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=$o(C,El,{qx:!0,FE:function(a,b){var e=a.ud("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},$o(X,{name:"ButtonBorder",Cb:"Rectangle",A:new L(0,0,2.761423749153968,2.761423749153968), -B:new L(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.mu=function(a,b){if(b.$t()){var e=b.ud("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.nu=function(a,b){if(b.$t()){var e=b.ud("ButtonBorder");e instanceof X&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); -cp("TreeExpanderButton",function(){var a=$o("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},$o(X,{name:"ButtonIcon",Cb:"MinusLine",Ba:yd},(new Zg("figure","isTreeExpanded",function(a,c){var d=c.O;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Jx()),{visible:!1},(new Zg("visible","isTreeLeaf",function(a){return!a})).Jx());a.click=function(a,c){var d=c.U;d instanceof hh&&(d=d.Of);if(d instanceof T){var e=d.g;if(null!==e){e=e.ob;if(d.gd){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +cp("Button",function(){var a=new ga(ng);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ga(ng);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=$o(C,El,{ux:!0,FE:function(a,b){var e=a.ud("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},$o(X,{name:"ButtonBorder",Cb:"Rectangle",A:new L(0,0,2.761423749153968,2.761423749153968), +B:new L(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.nu=function(a,b){if(b.au()){var e=b.ud("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.ou=function(a,b){if(b.au()){var e=b.ud("ButtonBorder");e instanceof X&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); +cp("TreeExpanderButton",function(){var a=$o("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},$o(X,{name:"ButtonIcon",Cb:"MinusLine",Ba:yd},(new Zg("figure","isTreeExpanded",function(a,c){var d=c.O;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Mx()),{visible:!1},(new Zg("visible","isTreeLeaf",function(a){return!a})).Mx());a.click=function(a,c){var d=c.U;d instanceof hh&&(d=d.Of);if(d instanceof T){var e=d.g;if(null!==e){e=e.ob;if(d.gd){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; a.Ac=!0;d.gd?e.collapseTree(d):e.expandTree(d)}}};return a}); -cp("SubGraphExpanderButton",function(){var a=$o("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},$o(X,{name:"ButtonIcon",Cb:"MinusLine",Ba:yd},(new Zg("figure","isSubGraphExpanded",function(a,c){var d=c.O;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Jx()));a.click=function(a,c){var d=c.U;d instanceof hh&&(d=d.Of);if(d instanceof U){var e=d.g;if(null!==e){e=e.ob;if(d.we){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Ac= +cp("SubGraphExpanderButton",function(){var a=$o("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},$o(X,{name:"ButtonIcon",Cb:"MinusLine",Ba:yd},(new Zg("figure","isSubGraphExpanded",function(a,c){var d=c.O;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Mx()));a.click=function(a,c){var d=c.U;d instanceof hh&&(d=d.Of);if(d instanceof U){var e=d.g;if(null!==e){e=e.ob;if(d.we){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Ac= !0;d.we?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});cp("ContextMenuButton",function(){var a=$o("Button");a.stretch=oo;var b=a.ud("ButtonBorder");b instanceof X&&(b.Cb="Rectangle",b.A=new L(0,0,2,3),b.B=new L(1,1,-2,-2));return a}); -cp("PanelExpanderButton",function(a){var b=dp(a,"COLLAPSIBLE"),c=$o("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},$o(X,"TriangleUp",{name:"ButtonIcon",Ba:new ha(6,4)},(new Zg("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Jx(b)));a=c.ud("ButtonBorder");a instanceof X&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var f=c.g;if(null!==f&&!f.eb){var h=c.Ql();null===h&&(h=c.U);null!==h&&(h=h.ud(b),null!==h&& +cp("PanelExpanderButton",function(a){var b=dp(a,"COLLAPSIBLE"),c=$o("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},$o(X,"TriangleUp",{name:"ButtonIcon",Ba:new ha(6,4)},(new Zg("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Mx(b)));a=c.ud("ButtonBorder");a instanceof X&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var f=c.g;if(null!==f&&!f.eb){var h=c.Ql();null===h&&(h=c.U);null!==h&&(h=h.ud(b),null!==h&& (f.Ub("Collapse/Expand Panel"),h.visible=!h.visible,f.Gd("Collapse/Expand Panel")))}};return c}); cp("CheckBoxButton",function(a){var b=dp(a);a=$o("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},$o(X,{name:"ButtonIcon",VH:"M0 4 L3 9 9 0",kb:2,stretch:De,mA:Pj,visible:!1},""!==b?(new Zg("visible",b)).KI():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.eb||""!==b&&e.ba.eb)){a.Ac=!0;var f=d.ud("ButtonIcon");e.Ub("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Gd("checkbox")}};return a}); -cp("CheckBox",function(a){a=dp(a);a=$o("CheckBoxButton",a,{name:"Button",margin:new db(0,1,0,0)});var b=$o(C,"Horizontal",a,{qx:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,mu:a.mu,nu:a.nu,click:a.click,_buttonClick:a.click});a.mu=null;a.nu=null;a.click=null;return b}); +cp("CheckBox",function(a){a=dp(a);a=$o("CheckBoxButton",a,{name:"Button",margin:new db(0,1,0,0)});var b=$o(C,"Horizontal",a,{ux:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,nu:a.nu,ou:a.ou,click:a.click,_buttonClick:a.click});a.nu=null;a.ou=null;a.click=null;return b}); function to(){this.rr=this.zi=this.dj=this.Aq=this.Dq=this.Cq=this.Bq=this.Si=this.js=this.hs=this.Ti=this.Ui=this.Vi=this.ls=this.ks=this.yi=this.Ei=this.wi=null}to.prototype.copy=function(){var a=new to;a.wi=this.wi;a.Ei=this.Ei;a.yi=this.yi;a.ks=this.ks;a.ls=this.ls;a.Vi=this.Vi;a.Ui=this.Ui;a.Ti=this.Ti;a.hs=this.hs;a.js=this.js;a.Si=this.Si;a.Bq=this.Bq;a.Cq=this.Cq;a.Dq=this.Dq;a.Aq=this.Aq;a.dj=this.dj;a.zi=this.zi;a.rr=this.rr;return a}; function C(a){G.call(this);void 0===a?this.ma=Sj:(w.mb(a,C,C,"type"),this.ma=a);this.xa=new I(G);this.ff=fd;this.ma===Hl&&(this.Gn=!0);this.fr=rc;this.Ci=mo;this.ma===Qo&&ep(this);this.Dp=Pj;this.Dr=Ad;this.Er=dd;this.Ar=0;this.zr=100;this.Cr=10;this.Br=0;this.Yk=this.Vd=this.Tj=this.xm=this.zm=null;this.Qr=NaN;this.ug=this.$j=null;this.Vo="category";this.tg=null;this.fj=new A(NaN,NaN,NaN,NaN);this.lk=this.Os=this.dn=null;this.Ij=""}w.La(C,G);w.ji(C);w.fa("Panel",C); function ep(a){a.Mj=fd;a.Mh=1;a.Bi=null;a.um=null;a.Lh=1;a.Kh=null;a.tm=null;a.Yd=[];a.Td=[];a.Vm=fp;a.sm=fp;a.ej=0;a.Ni=0} @@ -1106,23 +1106,23 @@ this.h("defaultRowSeparatorDashArray",b,a)}}});w.defineProperty(C,{DK:"defaultCo w.defineProperty(C,{EK:"defaultColumnSeparatorStrokeWidth"},function(){return void 0===this.Lh?1:this.Lh},function(a){if(void 0!==this.Lh){var b=this.Lh;b!==a&&isFinite(a)&&0<=a&&(this.Lh=a,this.I(),this.h("defaultColumnSeparatorStrokeWidth",b,a))}}); w.defineProperty(C,{CK:"defaultColumnSeparatorDashArray"},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)||w.yd(a,"Array",C,"defaultColumnSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.ox,e=d.width,d=d.height,f=this.Ia,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.YE;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))){var s=n[r],t=!1,B=!0,y=v.mG;null!==y&&(t=!0,B=a.fA(y,v.sf));if("LineV"===v.Cb){a.lineWidth=v.kb;Lo(this,a,v.stroke,!1,!1);a.beginPath();for(var H=x=Math.floor(-m.x/e);H<=x+k;H++){var E=H*e+m.x;0<=E&&E=e&&(e=1);d=c.W;h=this.xa.n;f=this.zm;k=h.length;for(l=0;lthis.qA*q.interval*e))for(r=q.za,u=q.kb*q.scale,s=q.oh,s.Od()&&(s=yb),p=0;p=c&&(c=1);var d=this.sx,e=d.width,d=d.height,f=this.Ia,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.YE;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))){var s=n[r],t=!1,B=!0,y=v.mG;null!==y&&(t=!0,B=a.gA(y,v.tf));if("LineV"===v.Cb){a.lineWidth=v.kb;Lo(this,a,v.stroke,!1,!1);a.beginPath();for(var H=x=Math.floor(-m.x/e);H<=x+k;H++){var E=H*e+m.x;0<=E&&E=e&&(e=1);d=c.W;h=this.xa.n;f=this.zm;k=h.length;for(l=0;lthis.qA*q.interval*c.hf.ox/this.Ut*e))for(r=q.za,u=q.kb*q.scale,s=q.oh,s.Od()&&(s=yb),p=0;pf.height)continue}else if(l.position>f.width)continue;var m=l.sq;isNaN(m)&&(m=c?a.Mh:a.Lh);var n=l.rq;null===n&&(n=c?a.Bi:a.Kh);0!==m&&null!==n&&(Lo(a,b,n,!1,!1),b.beginPath(),n=l.position+m,c?n>f.height&&(m-=n-f.height):n>f.width&&(m-=n-f.width),l=l.position+m/2,b.lineWidth=m,n=a.padding,c?(l+=n.top,m=n.left,n=f.width-n.right,b.moveTo(m,l),b.lineTo(n,l)):(l+= n.left,m=n.top,n=f.height-n.bottom,b.moveTo(l,m),b.lineTo(l,n)),b.stroke())}}} -function jp(a,b,c,d,e){for(var f=d.length,h=a.W,k=0;km)){var n=l.Xe(),p=l.sq;isNaN(p)&&(p=c?a.Mh:a.Lh);var q=l.rq;null===q&&(q=c?a.Bi:a.Kh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ja;p+n>m&&(n=m-p);0>=n||(m=a.padding,Lo(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,d,e){for(var f=d.length,h=a.W,k=0;km)){var n=l.Xe(),p=l.sq;isNaN(p)&&(p=c?a.Mh:a.Lh);var q=l.rq;null===q&&(q=c?a.Bi:a.Kh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ja;p+n>m&&(n=m-p);0>=n||(m=a.padding,Lo(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 hp(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}; +k)*(l-k)+(d-a)*(d-a);c=!1;p=this.xa.n;r=p.length;n=w.K();q=null;b=Infinity;var s=null;this.Zt&&(s=w.K(),q=this.Jd(),(c=q.Bn(k,a,l,d,s))&&(b=(k-s.x)*(k-s.x)+(a-s.y)*(a-s.y)));for(var u=0;um&&e.set(s),w.v(s));w.v(n);f&&e.transform(h)}return c}; g.I=function(a){G.prototype.I.call(this,a);if(this.ma===El||this.ma===hj)a=this.Jd(),null!==a&&a.I(!0);a=this.xa.n;for(var b=a.length,c=0;cId&&(ad=Math.max(Id-lc,0));var fg=0===Z.Ja;Z.Ja+=ad;Id=Math.max(Id-(ad+(fg?lc:0)),0)}1!==aa.xi||kc!==Nj&&kc!==no||(Z=this.ae(ic),lc=Z.Xe(),ad=Math.max(bf-Z.Ja,0),ad+lc>$c&&(ad=Math.max($c-lc,0)),fg=0===Z.Ja,Z.Ja+=ad,$c=Math.max($c-(ad+(fg?lc:0)),0));li&&aa.aq()}}}w.wa(Ye);for(var Ec=0,wb=0,Eb=this.Kp,ma=0;ma=this.pq);Za++)Z=this.be(aa.Zb+Za),Jd.height+=Math.max(Z.zj,isNaN(Z.gf)?Z.mf:Math.min(Z.gf,Z.mf));for(Za=1;Za=this.Kp);Za++)Z=this.ae(aa.column+Za),Jd.width+=Math.max(Z.zj,isNaN(Z.gf)?Z.mf:Math.min(Z.gf,Z.mf));kb.width+=Jd.width;kb.height+= -Jd.height;wc=aa.margin;Ff=wc.right+wc.left;eg=wc.top+wc.bottom;wk(aa,kb.width,kb.height,qj,rj);for(var Gf=aa.za,bf=Math.max(Gf.width+Ff,0),cf=Math.max(Gf.height+eg,0),yh=0,Za=0;Za=this.pq);Za++)Z=this.be(aa.Zb+Za),yh+=Z.total||0;if(yh=jd)&&!(aa.Zb+Za>=this.pq);Za++){var Z=this.be(aa.Zb+Za),mc=Z.Sa||0,ef=tj(aa,Z,gg);Z.Ja=Math.min(Z.mf,mc+ef);Z.Sa!==mc&&(jd-=Z.Sa-mc)}for(;0mc&&(Z.Ja=Math.min(Z.mf,mc+jd),Z.Sa!==mc&&(jd-=Z.Sa-mc));if(0===Z.index)break;Z=this.be(Z.index-1)}}for(var Ig=0,Za=0;Za=this.Kp);Za++)Z=this.ae(aa.column+Za),Ig+=Z.total||0;if(Ig=jd)&&!(aa.column+Za>=this.Kp);Za++)Z=this.ae(aa.column+Za),mc=Z.Sa||0,ef=tj(aa,Z,gg),Z.Ja=Math.min(Z.mf,mc+ef),Z.Sa!==mc&&(jd-=Z.Sa-mc);for(;0mc&&(Z.Ja=Math.min(Z.mf,mc+jd),Z.Sa!==mc&& +Hf*sj:null!==se[aa.Zb]?Id:qb.Ja||Id,Fc=Math.max(0,Fc-qb.Xe()));kb.m(Math.max(rb.zj,Math.min(Sb,rb.nf)),Math.max(qb.zj,Math.min(Fc,qb.nf)));kc=Ro(aa,qb,rb,!1);switch(kc){case oo:kb.height=Math.max(kb.height,qb.Ja+Id);break;case no:kb.width=Math.max(kb.width,rb.Ja+$c)}wc=aa.margin;Ff=wc.right+wc.left;eg=wc.top+wc.bottom;aa.aq();wk(aa,kb.width,kb.height,rb.zj,qb.zj);Gf=aa.za;bf=Math.max(Gf.width+Ff,0);cf=Math.max(Gf.height+eg,0);isFinite($c)&&(bf=Math.min(bf,kb.width));isFinite(Id)&&(cf=Math.min(cf, +kb.height));var df=0,df=qb.Ja;qb.Ja=Math.max(qb.Ja,cf);ad=qb.Ja-df;Id=Math.max(Id-ad,0);df=rb.Ja;rb.Ja=Math.max(rb.Ja,bf);ad=rb.Ja-df;$c=Math.max($c-ad,0)}w.wa(Ze);for(var Jd=w.im(),Eb=Le.length,ma=0;ma=this.pq);Za++)Z=this.be(aa.Zb+Za),Jd.height+=Math.max(Z.zj,isNaN(Z.gf)?Z.nf:Math.min(Z.gf,Z.nf));for(Za=1;Za=this.Kp);Za++)Z=this.ae(aa.column+Za),Jd.width+=Math.max(Z.zj,isNaN(Z.gf)?Z.nf:Math.min(Z.gf,Z.nf));kb.width+=Jd.width;kb.height+= +Jd.height;wc=aa.margin;Ff=wc.right+wc.left;eg=wc.top+wc.bottom;wk(aa,kb.width,kb.height,qj,rj);for(var Gf=aa.za,bf=Math.max(Gf.width+Ff,0),cf=Math.max(Gf.height+eg,0),yh=0,Za=0;Za=this.pq);Za++)Z=this.be(aa.Zb+Za),yh+=Z.total||0;if(yh=jd)&&!(aa.Zb+Za>=this.pq);Za++){var Z=this.be(aa.Zb+Za),mc=Z.Sa||0,ef=tj(aa,Z,gg);Z.Ja=Math.min(Z.nf,mc+ef);Z.Sa!==mc&&(jd-=Z.Sa-mc)}for(;0mc&&(Z.Ja=Math.min(Z.nf,mc+jd),Z.Sa!==mc&&(jd-=Z.Sa-mc));if(0===Z.index)break;Z=this.be(Z.index-1)}}for(var Ig=0,Za=0;Za=this.Kp);Za++)Z=this.ae(aa.column+Za),Ig+=Z.total||0;if(Ig=jd)&&!(aa.column+Za>=this.Kp);Za++)Z=this.ae(aa.column+Za),mc=Z.Sa||0,ef=tj(aa,Z,gg),Z.Ja=Math.min(Z.nf,mc+ef),Z.Sa!==mc&&(jd-=Z.Sa-mc);for(;0mc&&(Z.Ja=Math.min(Z.nf,mc+jd),Z.Sa!==mc&& (jd-=Z.Sa-mc));if(0===Z.index)break;Z=this.ae(Z.index-1)}}}w.wa(Le);w.Ak(Jd);w.Ak(kb);for(var hg=0,te=0,kc=Co(this,!0),ni=this.Ba,Lk=this.Bf,If=wb=Ec=0,ff=0,Eb=this.Kp,ma=0;maqi)wk(Yb,Infinity,Infinity),ue=Yb.za,hf.Gh(ue),this.$g.add(ue);else{var vd=Yb.Me,rt=Yb.aB,np=Yb.oh;np.Od()&&(np=Gb);var ig=Yb.qq,cw=Yb.bB,Qk=0,Rk=0, -om=0;if(vd<-qi||vd>=qi){var st=Ok.zF,Jf=Ok.yF;ig!==kj&&(om=Ok.computeAngle(Yb,ig,Jf),Yb.ig=om);Qk=st.x-Kg.x;Rk=st.y-Kg.y}else{var Ld,jf;if(0<=vd)Ld=Bh.da(vd),jf=vdut+10?0<=vd?si.Rb(Ld):Ld.Rb(si):ut>tt+10?0<=vd?jf.Rb(ti):ti.Rb(jf):0<=vd?si.Rb(ti):ti.Rb(si)}else Jf= +qi=pi.qa;this.lu(!1);var ot=Kg.width,pt=Kg.height;this.Ri.m(Kg.x,Kg.y);null===this.$g&&(this.$g=new I(A));this.$g.clear();null!==nm&&(Op(nm,ot,pt,this),ue=nm.za,hf.Gh(ue),this.$g.add(ue));for(var Lg=w.Ff(),Pk=w.K(),Mg=w.K(),mp=0;mpqi)wk(Yb,Infinity,Infinity),ue=Yb.za,hf.Gh(ue),this.$g.add(ue);else{var vd=Yb.Me,rt=Yb.aB,np=Yb.oh;np.Od()&&(np=Gb);var ig=Yb.qq,cw=Yb.bB,Qk=0,Rk=0, +om=0;if(vd<-qi||vd>=qi){var st=Ok.zF,Jf=Ok.yF;ig!==kj&&(om=Ok.computeAngle(Yb,ig,Jf),Yb.ig=om);Qk=st.x-Kg.x;Rk=st.y-Kg.y}else{var Ld,jf;if(0<=vd)Ld=Bh.da(vd),jf=vdut+10?0<=vd?si.Rb(Ld):Ld.Rb(si):ut>tt+10?0<=vd?jf.Rb(ti):ti.Rb(jf):0<=vd?si.Rb(ti):ti.Rb(si)}else Jf= 0<=vd?Ld.Rb(jf):jf.Rb(Ld);ig!==kj&&(om=Ok.computeAngle(Yb,ig,Jf),Yb.ig=om);Qk=Ld.x+(jf.x-Ld.x)*rt-Kg.x;Rk=Ld.y+(jf.y-Ld.y)*rt-Kg.y}wk(Yb,Infinity,Infinity);var ue=Yb.za,mm=Yb.Ia,Sk=0;Yb instanceof X&&(Sk=Yb.kb);var ui=mm.width+Sk,uj=mm.height+Sk;Lg.reset();Lg.translate(-ue.x,-ue.y);Lg.scale(Yb.scale,Yb.scale);Lg.rotate(ig===kj?Yb.angle:Jf,ui/2,uj/2);ig!==Pp&&ig!==Qp||Lg.rotate(90,ui/2,uj/2);ig!==Rp&&ig!==Sp||Lg.rotate(-90,ui/2,uj/2);ig===Tp&&(45Jf||225Jf)&&Lg.rotate(-Jf,ui/2,uj/ 2);var zj=new A(0,0,ui,uj);Pk.Xn(zj,np);Lg.nb(Pk);var dw=-Pk.x+Sk/2,ew=-Pk.y+Sk/2;Mg.assign(cw);isNaN(Mg.x)&&(Mg.x=0<=vd?ui/2+3:-(ui/2+3));isNaN(Mg.y)&&(Mg.y=-(uj/2+3));Mg.rotate(Jf);Qk+=Mg.x;Rk+=Mg.y;zj.set(ue);zj.x=Qk+dw;zj.y=Rk+ew;this.$g.add(zj);hf.Gh(zj)}}if(this instanceof W)for(var vt=this.Wf;vt.next();)wk(vt.value,Infinity,Infinity);this.fj=hf;var op=this.Ri;op.m(op.x+hf.x,op.y+hf.y);Pa(e,hf.width||0,hf.height||0);w.ue(Lg);w.v(Pk);w.v(Mg)}}}break;case "Grid":break;case "Graduated":var fw= -a,gw=b,hw=c,iw=d,Ng=this.Jd();this.xm=[];var Aj=Ng.margin,jw=Aj.right+Aj.left,kw=Aj.top+Aj.bottom;wk(Ng,fw,gw,hw,iw);var wt=Ng.za,lw=wt.height,mw=Math.max(wt.width+jw,0),nw=Math.max(lw+kw,0),xt=new A(-Aj.left,-Aj.top,mw,nw);this.xm.push(xt);e.assign(xt);for(var Uk=Ng.vf,yt=Ng.kb,pp=Uk.iA,Bj=Uk.kx,vi=Uk.jA,ow=pp.length,qp=0,rp=0,Cj=w.lb(),sp=0;sp +a,gw=b,hw=c,iw=d,Ng=this.Jd();this.xm=[];var Aj=Ng.margin,jw=Aj.right+Aj.left,kw=Aj.top+Aj.bottom;wk(Ng,fw,gw,hw,iw);var wt=Ng.za,lw=wt.height,mw=Math.max(wt.width+jw,0),nw=Math.max(lw+kw,0),xt=new A(-Aj.left,-Aj.top,mw,nw);this.xm.push(xt);e.assign(xt);for(var Uk=Ng.hf,yt=Ng.kb,pp=Uk.jA,Bj=Uk.nx,vi=Uk.ox,ow=pp.length,qp=0,rp=0,Cj=w.lb(),sp=0;sp wd&&(wd+=360);zt.push(wd)}qp=At;rp=Bt}Cj.push(zt)}var Ct;if(null===this.Tj){for(var Dt=[],up=this.xa.n,Et=up.length,vp=0;vpqw&&Ft.push(Gt)}}}this.Tj=Dt}Ct=this.Tj;var Ht=this.xa.n,rw=Ht.length,Ch=0,It=0,Jt=vi;this.zm=[];for(var pm=[],qm=0;qmLt*Kt*vi/this.nx)){var be=this.XE,Mt=Ct[qm],wi=Bj[0][0],Kf=0,xd=0,It=vi*Dh.WE-1E-4,Jt=vi*Dh.UE+1E-4,Ej=Lt*Kt;if(bethis.Ck+Ej&&(xi=Math.floor((be-this.Ck)/Ej),be-=xi*Ej);for(;be<=this.pA;){var xp;a:{for(var sw=Mt.length,yp=0;ypvi&&(Ch=vi),It<=Ch&& +[];if(Dh.visible&&Dh!==Ng){var Kt=Dh.interval,Lt=this.qA;if(!(2>Lt*Kt*vi/this.Ut)){var be=this.XE,Mt=Ct[qm],wi=Bj[0][0],Kf=0,xd=0,It=vi*Dh.WE-1E-4,Jt=vi*Dh.UE+1E-4,Ej=Lt*Kt;if(bethis.Ck+Ej&&(xi=Math.floor((be-this.Ck)/Ej),be-=xi*Ej);for(;be<=this.pA;){var xp;a:{for(var sw=Mt.length,yp=0;ypvi&&(Ch=vi),It<=Ch&& Ch<=Jt)){for(var wd=Cj[Kf][xd],Fj=Bj[Kf][xd];Kfwi&&xdrm?0wm;wm++){switch(wm){case 0:ce.m(tm,um);break;case 1:ce.m(tm+Dp,um);break;case 2:ce.m(tm,um+Ep);break;case 3:ce.m(tm+Dp,um+Ep)}ce.rotate(Ut+Eh.angle);ce.offset(St,Tt);0===vm&&0===wm?zi.m(ce.x,ce.y,0,0):zi.ri(ce);ce.offset(-St,-Tt);ce.rotate(-Ut- @@ -1182,96 +1182,96 @@ jc=ph.alignment;ji.fd()&&(ae=ji.x,ii=ji.offsetX);jc.fd()&&(dg=jc.y,ic=jc.offsetY Le),Z=Le+se;h.x+=h.width*ae-(Ye+re)*ae+ii+Ze.left;h.y+=h.height*dg-Z*dg+ic+Ze.top;pb.visible&&(cb(Eb,sh,th,ma,h.x,h.y,$d.width,$d.height)?pb.hc(h.x,h.y,Ye,Le):pb.hc(h.x,h.y,Ye,Le,new A(Eb,sh,th,ma)))}else{pb.Ii();pb.nc.Ra();var ud=pb.nc,vh=w.hg(ud.x,ud.y,ud.width,ud.height);ud.x=id.type===Ho?Ie:Xb;ud.y=id.type===Io?fc:Dc;ud.width=$d.width;ud.height=$d.height;pb.nc.freeze();Do(pb,!1);if(!Qa(vh,ud)){var ki=pb.U;null!==ki&&(ki.Ek(),pb.ss(ki))}w.Db(vh)}}}}w.Ak(Je);for(Ta=0;Ta=fg){var Hg=this.zF,kb=this.yF;sj!==kj&&(Gg=this.computeAngle(lc,sj,kb),lc.angle=Gg);Fg=Hg.x;Hf=Hg.y}else{var Sb=void 0,Fc=void 0;if(0<=wb)Sb=Ec.n[wb],Fc=wb +cf.value,fg=bf,Ec=Gf,wb=lc.Me,mi=lc.aB,Eg=lc.oh,sj=lc.qq,lp=lc.bB,Fg=0,Hf=0,Gg=0;if(wb<-fg||wb>=fg){var Hg=this.zF,kb=this.yF;sj!==kj&&(Gg=this.computeAngle(lc,sj,kb),lc.angle=Gg);Fg=Hg.x;Hf=Hg.y}else{var Sb=void 0,Fc=void 0;if(0<=wb)Sb=Ec.n[wb],Fc=wb jd+10?0<=wb?Jd.Rb(Sb):Sb.Rb(Jd):jd>yh+10?0<=wb?Fc.Rb(Za):Za.Rb(Fc):0<=wb?Jd.Rb(Za):Za.Rb(Jd)}else kb=0<=wb?Sb.Rb(Fc):Fc.Rb(Sb);sj!==kj&&(Gg=this.computeAngle(lc,sj,kb),lc.angle=Gg);Fg=Sb.x+(Fc.x-Sb.x)*mi;Hf=Sb.y+(Fc.y-Sb.y)*mi}if(Eg.L(tb))lc.location=new z(Fg,Hf);else{Eg.Od()&&(Eg=Gb);var gg=w.Ff();gg.reset();gg.scale(lc.scale,lc.scale);gg.rotate(lc.angle,0,0);var tj=lc.Ia,mc=w.hg(0,0,tj.width,tj.height),ef=w.K();ef.Xn(mc,Eg);gg.nb(ef);var Ig=-ef.x,hg=-ef.y,te=lp.copy();isNaN(te.x)&&(te.x=0<=wb?ef.x+ -3:-(ef.x+3));isNaN(te.y)&&(te.y=-(ef.y+3));te.rotate(kb);Fg+=te.x;Hf+=te.y;gg.vG(mc);var Ig=Ig+mc.x,hg=hg+mc.y,ni=w.xb(Fg+Ig,Hf+hg);lc.move(ni);w.v(ni);w.v(ef);w.Db(mc);w.ue(gg)}}this.ku(!1)}break;case "Grid":break;case "Graduated":if(null!==this.xm){var Lk=this.Jd(),If=this.zm,ff=this.xm,zh=0,Me=ff[zh];zh++;Lk.hc(Me.x-e.x,Me.y-e.y,Me.width,Me.height);for(var Kd=f.length,Jg=0;Jgq.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.Ff();q.set(h);if(null!==n?n.zk(a,b,c,d,e,q):Bo(p,a,d, q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);w.ue(q)}}}void 0===f&&w.ue(h);return d}void 0===f&&w.ue(h);return!1};function Zp(a,b,c,d){for(var e=a.xa.n,f=e.length;f--;){var h=e[f];if(h.visible){var k=h.W,l=a.Ia;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof C&&Zp(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.Tg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ia,k=this.Yg(),l=k?a:La(w.xb(a.x,a.y),this.transform),m=k?b:La(w.xb(b.x,b.y),this.transform),n=l.uf(m),p=0u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.Yg()?(s=r.transform,La(k.set(a),s),La(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof C?r:null,null!==r?!r.wn(k,l,c,d,e,f):!s.ME(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||f.add(s))}}w.v(k);w.v(l)}return e? -p:h}return!1};function Kp(a){var b=null;a instanceof X&&(b=a.A,b===rc&&(b=null),a=a.vf,null!==a&&null===b&&(b=a.A));null===b&&(b=xb);return b}function Lp(a){var b=null;a instanceof X&&(b=a.B,b===rc&&(b=null),a=a.vf,null!==a&&null===b&&(b=a.B));null===b&&(b=Lb);return b}C.prototype.add=C.prototype.add=function(a){w.G(a,G,C,"add:element");this.Md(this.xa.count,a)};C.prototype.elt=C.prototype.da=function(a){return this.xa.da(a)}; -C.prototype.insertAt=C.prototype.Md=function(a,b){b instanceof S&&w.k("Cannot add a Part to a Panel: "+b);if(this===b||this.Xl(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.O;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: "+ +p:h}return!1};function Kp(a){var b=null;a instanceof X&&(b=a.A,b===rc&&(b=null),a=a.hf,null!==a&&null===b&&(b=a.A));null===b&&(b=xb);return b}function Lp(a){var b=null;a instanceof X&&(b=a.B,b===rc&&(b=null),a=a.hf,null!==a&&null===b&&(b=a.B));null===b&&(b=Lb);return b}C.prototype.add=C.prototype.add=function(a){w.G(a,G,C,"add:element");this.Md(this.xa.count,a)};C.prototype.elt=C.prototype.da=function(a){return this.xa.da(a)}; +C.prototype.insertAt=C.prototype.Md=function(a,b){b instanceof S&&w.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.Xl(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.O;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.ma!==Hl||b instanceof X||w.k("Can only add Shapes to a Grid Panel, not: "+b);this.ma!==gp||b instanceof X||b instanceof Hh||w.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.dm(this);b.Sm=null;if(null!==this.dq){var d=b.data;null!==d&&"object"===typeof d&&(null===this.tg&&(this.tg=new ka(Object,C)),this.tg.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.Yc(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.Md(a,b);this.I();b.I();null!==b.Qd?this.Dk=!0:b instanceof C&&!0===b.Dk&&(this.Dk=!0);this.Tj=null;c=this.U;null!==c&&(c.Nm=null,c.ck=NaN,this.Dk&&c instanceof T&&(c.Dk=!0),c.Dk&&c instanceof T&&(c.le=null),e=this.g,null!==e&&e.oa.gb||(-1!==d&&c.Xc(Pf,"elements",this,b,null,d,null),c.Xc(Of,"elements",this,null,b,null,a),this.$t()||$p(this,b,!1)))}; -w.defineProperty(C,{Dk:null},function(){return 0!==(this.P&8388608)},function(a){0!==(this.P&8388608)!==a&&(this.P^=8388608)});function aq(a,b){a.P=b?a.P|16777216:a.P&-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;e=e.count)return;e.Yc(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.Md(a,b);this.I();b.I();null!==b.Qd?this.Dk=!0:b instanceof C&&!0===b.Dk&&(this.Dk=!0);this.Tj=null;c=this.U;null!==c&&(c.Nm=null,c.ck=NaN,this.Dk&&c instanceof T&&(c.Dk=!0),c.Dk&&c instanceof T&&(c.le=null),e=this.g,null!==e&&e.oa.gb||(-1!==d&&c.Xc(Pf,"elements",this,b,null,d,null),c.Xc(Of,"elements",this,null,b,null,a),this.au()||$p(this,b,!1)))}; +w.defineProperty(C,{Dk:null},function(){return 0!==(this.P&8388608)},function(a){0!==(this.P&8388608)!==a&&(this.P^=8388608)});function aq(a,b){a.P=b?a.P|16777216:a.P&-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.Ea(a,">= 0",C,"getRowDefinition:idx");a=Math.round(a);var b=this.Yd;if(void 0===b[a]){var c=new Tg;c.dm(this);c.ve=!0;c.index=a;b[a]=c}return b[a]};C.prototype.removeRowDefinition=C.prototype.RF=function(a){0>a&&w.Ea(a,">= 0",C,"removeRowDefinition:idx");a=Math.round(a);var b=this.Yd;this.Xc(Pf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.I()};w.u(C,{Kp:"columnCount"},function(){return void 0===this.Td?0:this.Td.length}); C.prototype.getColumnDefinition=C.prototype.ae=function(a){0>a&&w.Ea(a,">= 0",C,"getColumnDefinition:idx");a=Math.round(a);var b=this.Td;if(void 0===b[a]){var c=new Tg;c.dm(this);c.ve=!1;c.index=a;b[a]=c}return b[a]};C.prototype.removeColumnDefinition=C.prototype.OF=function(a){0>a&&w.Ea(a,">= 0",C,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Td;this.Xc(Pf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.I()}; w.defineProperty(C,{uJ:"rowSizing"},function(){return void 0===this.Vm?fp:this.Vm},function(a){if(void 0!==this.Vm){var b=this.Vm;b!==a&&(a!==fp&&a!==Np&&w.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Vm=a,this.I(),this.h("rowSizing",b,a))}}); w.defineProperty(C,{sH:"columnSizing"},function(){return void 0===this.sm?fp:this.sm},function(a){if(void 0!==this.sm){var b=this.sm;b!==a&&(a!==fp&&a!==Np&&w.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.sm=a,this.I(),this.h("columnSizing",b,a))}}); w.defineProperty(C,{RL:"topIndex"},function(){return void 0===this.ej?0:this.ej},function(a){if(void 0!==this.ej){var b=this.ej;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.ej=a,this.I(),this.h("topIndex",b,a))}}); w.defineProperty(C,{dL:"leftIndex"},function(){return void 0===this.Ni?0:this.Ni},function(a){if(void 0!==this.Ni){var b=this.Ni;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Ni=a,this.I(),this.h("leftIndex",b,a))}});C.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==Qo)return NaN;for(var b=0,c=this.Yd,d=c.length,e=this.ej;ea)return-1;if(this.type!==Qo)return NaN;for(var b=0,c=this.Td,d=c.length,e=this.Ni;ea)return-1;if(this.type!==Qo)return NaN;for(var b=0,c=this.Td,d=c.length,e=this.Ni;ea;)this.jf(this.xa.length-1);a=this.dq;if(null!==a)for(var b=w.Ya(a),c=0;ca;)this.kf(this.xa.length-1);a=this.dq;if(null!==a)for(var b=w.Ya(a),c=0;cc)){var d;d=bq(a,b);var e=a.zI,f=null;null!==e&&(f=e.ja(d));null===f&&(cq||(cq=!0,w.trace('No item template Panel found for category "'+d+'" on '+a),w.trace(" Using default item template."),d=new C,e=new Hh,e.bind(new Zg("text","",Qf)),d.add(e),dq=d),f=dq);d=f;null!==d&&(jh(d),d=d.copy(),0!==(d.P&16777216)&&(e=a.Ql(),null!==e&&aq(e,!0)),"object"===typeof b&&(null===a.tg&&(a.tg=new ka(Object,C)),a.tg.add(b,d)),e=c,hn(a)&&e++,a.Md(e,d),d.Vd=b,jn(a,e, -c),d.Vd=null,d.data=b)}}function jn(a,b,c){for(a=a.xa;ba&&w.Ea(a,">= 0",Tg,"height"),this.gf=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("height",b,a))});w.defineProperty(Tg,{width:"width"},function(){return this.gf},function(a){var b=this.gf;b!==a&&(0>a&&w.Ea(a,">= 0",Tg,"width"),this.gf=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("width",b,a))}); -w.defineProperty(Tg,{zj:"minimum"},function(){return this.ek},function(a){var b=this.ek;b!==a&&((0>a||!isFinite(a))&&w.Ea(a,">= 0",Tg,"minimum"),this.ek=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("minimum",b,a))});w.defineProperty(Tg,{mf:"maximum"},function(){return this.dk},function(a){var b=this.dk;b!==a&&(0>a&&w.Ea(a,">= 0",Tg,"maximum"),this.dk=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("maximum",b,a))}); +w.defineProperty(Tg,{zj:"minimum"},function(){return this.ek},function(a){var b=this.ek;b!==a&&((0>a||!isFinite(a))&&w.Ea(a,">= 0",Tg,"minimum"),this.ek=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("minimum",b,a))});w.defineProperty(Tg,{nf:"maximum"},function(){return this.dk},function(a){var b=this.dk;b!==a&&(0>a&&w.Ea(a,">= 0",Tg,"maximum"),this.dk=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("maximum",b,a))}); w.defineProperty(Tg,{alignment:"alignment"},function(){return this.ge},function(a){var b=this.ge;b.L(a)||(this.ge=a.S(),null!==this.O&&this.O.I(),this.cd("alignment",b,a))});w.defineProperty(Tg,{stretch:"stretch"},function(){return this.Cg},function(a){var b=this.Cg;b!==a&&(this.Cg=a,null!==this.O&&this.O.I(),this.cd("stretch",b,a))}); w.defineProperty(Tg,{dG:"separatorPadding"},function(){return this.ik},function(a){"number"===typeof a&&(a=new db(a));var b=this.ik;null!==a&&null!==b&&b.L(a)||(null!==a&&(a=a.S()),this.ik=a,null!==this.O&&this.O.I(),this.cd("separatorPadding",b,a))});w.defineProperty(Tg,{rq:"separatorStroke"},function(){return this.Vs},function(a){var b=this.Vs;b!==a&&(null===a||"string"===typeof a||a instanceof ga)&&(a instanceof ga&&a.freeze(),this.Vs=a,null!==this.O&&this.O.I(),this.cd("separatorStroke",b,a))}); w.defineProperty(Tg,{sq:"separatorStrokeWidth"},function(){return this.Ws},function(a){var b=this.Ws;b!==a&&(this.Ws=a,null!==this.O&&this.O.I(),this.cd("separatorStrokeWidth",b,a))}); w.defineProperty(Tg,{FL:"separatorDashArray"},function(){return this.Xh},function(a){var b=this.Xh;if(b!==a){null===a||Array.isArray(a)||w.yd(a,"Array",Tg,"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.lb(),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.wa(t);return}e> q?(v=e-q,e=q):v=0;var B=Math.sqrt(e*e/(1+r*r));0>p&&(B=-B);k+=B;l+=r*B;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(f/2));0===v&&d.yk(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.wa(t);return}q=t[x];p=q[0];s=q[1];r=q[2];q=q[3];e=v}}w.wa(t)}} -X.prototype.yk=function(a,b){if(null!==this.qc||null!==this.zd){null!==this.zd&&Lo(this,a,this.zd,!0,!1);null!==this.qc&&Lo(this,a,this.qc,!1,!1);var c=this.fi;if(0===c){var d=this.U;d instanceof hh&&d.type===hj&&"Selection"===d.td&&d.rb instanceof X&&d.Of.Jd()===d.rb&&(c=d.rb.kb)}a.lineWidth=c;a.lineJoin=this.wp;a.lineCap=this.tp;a.miterLimit=this.cn;var e=!1;this.U&&b.pj("drawShadows")&&(e=this.U.Zl);var f=!0;null!==this.qc&&null===this.zd&&(f=!1);var d=!1,h=!0,k=this.mG;null!==k&&(d=!0,h=a.fA(k, -this.sf));var l=this.hb;if(null!==l){if(l.ma===Ee)a.beginPath(),d&&!h?wo(a,l.xc,l.Gc,l.yb,l.Gb,k,this.sf):(a.moveTo(l.xc,l.Gc),a.lineTo(l.yb,l.Gb)),null!==this.zd&&a.Jg(this.zd),0!==c&&null!==this.qc&&a.Ej();else if(l.ma===Fe){var m=l.xc,n=l.Gc,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.zd&&(a.beginPath(),a.rect(l,r,m,n),a.Jg(this.zd));if(null!==this.qc){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.lb(),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(),gq(a,h,k,this.sf),a.Ej(),w.wa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Ej());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ma===Ne)m=l.xc,n=l.Gc,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.zd&&a.Jg(this.zd),d&&!h&&(h=w.lb(),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(),gq(a,h,k,this.sf),w.wa(h)),0!==c&&null!==this.qc&&(f&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= +X.prototype.yk=function(a,b){if(null!==this.qc||null!==this.zd){null!==this.zd&&Lo(this,a,this.zd,!0,!1);null!==this.qc&&Lo(this,a,this.qc,!1,!1);var c=this.fi;if(0===c){var d=this.U;d instanceof hh&&d.type===hj&&"Selection"===d.td&&d.rb instanceof X&&d.Of.Jd()===d.rb&&(c=d.rb.kb)}a.lineWidth=c;a.lineJoin=this.wp;a.lineCap=this.tp;a.miterLimit=this.cn;var e=!1;this.U&&b.pj("drawShadows")&&(e=this.U.Zl);var f=!0;null!==this.qc&&null===this.zd&&(f=!1);var d=!1,h=!0,k=this.mG;null!==k&&(d=!0,h=a.gA(k, +this.tf));var l=this.hb;if(null!==l){if(l.ma===Ee)a.beginPath(),d&&!h?wo(a,l.xc,l.Gc,l.yb,l.Gb,k,this.tf):(a.moveTo(l.xc,l.Gc),a.lineTo(l.yb,l.Gb)),null!==this.zd&&a.Jg(this.zd),0!==c&&null!==this.qc&&a.Ej();else if(l.ma===Fe){var m=l.xc,n=l.Gc,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.zd&&(a.beginPath(),a.rect(l,r,m,n),a.Jg(this.zd));if(null!==this.qc){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.lb(),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(),gq(a,h,k,this.tf),a.Ej(),w.wa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Ej());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ma===Ne)m=l.xc,n=l.Gc,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.zd&&a.Jg(this.zd),d&&!h&&(h=w.lb(),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(),gq(a,h,k,this.tf),w.wa(h)),0!==c&&null!==this.qc&&(f&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0,a.Ej(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Ej());else if(l.ma===Be){r=l.Oj;n=r.length;for(q=0;qx.of);else{var t=rf(x,m),v=t.length;if(0===v){a.lineTo(x.ka,x.ra);break}for(var B=0;Bx.pf);else{var t=rf(x,m),v=t.length;if(0===v){a.lineTo(x.ka,x.ra);break}for(var B=0;Be)){var f=.001,h=c.length,k=b[0],l=b[1];if(4===e)wo(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.lb(),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.wa(s);return}p=s[u];n=p[0];q=p[1];p=p[2];f=t}else e=!e}w.wa(s)}}}X.prototype.getDocumentPoint=X.prototype.Wa=function(a,b){void 0===b&&(b=new z);if(a instanceof L){a.Od()&&w.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ia,d=this.kb;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.vk=function(a,b){var c=this.vf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.cb,e=this.kb/2;c.type!==Ee||b||(e+=2);var f=w.Ef();f.assign(d);f.xf(e+2,e+2);if(!f.Ha(a))return w.Db(f),!1;d=e+1E-4;if(c.type===Ee){if(null===this.stroke)return!1;d=(c.D-c.ia)*(a.x-c.ia)+(c.F-c.ga)*(a.y-c.ga);if(0>(c.ia-c.D)*(a.x-c.D)+(c.ga-c.F)*(a.y-c.F)||0>d)return!1;w.Db(f);return Ud(c.ia,c.ga,c.D,c.F,e,a.x,a.y)}if(c.type===Fe){var h=c.ia,k=c.ga,l=c.D,m=c.F;f.x=Math.min(h,l);f.y=Math.min(k, +X.prototype.vk=function(a,b){var c=this.hf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.cb,e=this.kb/2;c.type!==Ee||b||(e+=2);var f=w.Ef();f.assign(d);f.xf(e+2,e+2);if(!f.Ha(a))return w.Db(f),!1;d=e+1E-4;if(c.type===Ee){if(null===this.stroke)return!1;d=(c.D-c.ia)*(a.x-c.ia)+(c.F-c.ga)*(a.y-c.ga);if(0>(c.ia-c.D)*(a.x-c.D)+(c.ga-c.F)*(a.y-c.F)||0>d)return!1;w.Db(f);return Ud(c.ia,c.ga,c.D,c.F,e,a.x,a.y)}if(c.type===Fe){var h=c.ia,k=c.ga,l=c.D,m=c.F;f.x=Math.min(h,l);f.y=Math.min(k, m);f.width=Math.abs(l-h);f.height=Math.abs(m-k);if(null===this.fill){f.xf(-d,-d);if(f.Ha(a))return w.Db(f),!1;f.xf(d,d)}null!==this.stroke&&f.xf(e,e);e=f.Ha(a);w.Db(f);return e}if(c.type===Ne){var h=c.ia,k=c.ga,l=c.D,m=c.F,c=Math.min(h,l),n=Math.min(k,m),h=Math.abs(l-h)/2,k=Math.abs(m-k)/2,c=a.x-(c+h),n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return w.Db(f),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);w.Db(f);return 0>=h||0>=k?!1:1>=c*c/(h*h)+n*n/(k*k)}if(c.type=== Be)return w.Db(f),null===this.fill?uf(c,a.x,a.y,e):c.Ha(a,e,1Math.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||Va(l.y,e))&&(l.ye||Va(l.x,e))&&(l.x=h&&d<=a}a=h&&f<=a} -X.prototype.ME=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.vk(a,!0))return!0;var e=a.uf(b);b=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.vk(a,!0))return!0;var e=a.vf(b);b=e;1.5=e||Na(b,f,0,-p)>=e||Na(b,f,0,p)>=e||Na(b,f,n,0)>= e?!1:!0}else if(f.type===Be){h=f.cb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Ma(a.x,a.y,k,l,m,l)>e&&Ma(a.x,a.y,m,h,k,h)>e&&Ma(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.Ha(a,b,!0))return!0}else{c=f.dc;for(b=0;be)return!1;l=k.vb.n;m=l.length;for(h=0;he)return!1;break;case nf:f=w.lb(); Xd(n,p,q.sc,q.Pc,q.Ah,q.Bh,q.D,q.F,.8,f);n=d(f,a);w.wa(f);if(n)return!1;n=q.D;p=q.F;if(a.Rp(n,p)>e)return!1;break;case of:f=w.lb();ge(n,p,q.sc,q.Pc,q.D,q.F,.8,f);n=d(f,a);w.wa(f);if(n)return!1;n=q.D;p=q.F;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.ka;p=q.ra;if(a.Rp(n,p)>e)return!1;break}q=null;f=w.lb();for(b=0;b= 0",X,"strokeWidth:value")});w.defineProperty(X,{KL:"strokeCap"},function(){return this.tp},function(a){var b=this.tp;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.Ea(a,'"butt", "round", or "square"',X,"strokeCap"):(this.tp=a,this.na(),this.h("strokeCap",b,a)))}); w.defineProperty(X,{ML:"strokeJoin"},function(){return this.wp},function(a){var b=this.wp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.Ea(a,'"miter", "bevel", or "round"',X,"strokeJoin"):(this.wp=a,this.na(),this.h("strokeJoin",b,a)))});w.defineProperty(X,{NL:"strokeMiterLimit"},function(){return this.cn},function(a){var b=this.cn;if(b!==a)if(1<=a){this.cn=a;this.na();var c=this.U;null!==c&&(c.ck=NaN);this.h("strokeMiterLimit",b,a)}else w.Ea(a,"value >= 1",X,"strokeWidth:value")}); w.defineProperty(X,{mG:"strokeDashArray"},function(){return this.vp},function(a){var b=this.vp;if(b!==a){null===a||Array.isArray(a)||w.yd(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.qf!==a&&(h=!1);!1===b.pj("textGreeking")&&(h=!1);n=this.bi;l=this.ci;switch(this.Ot){case qo:a.translate(c, -0);a.scale(-1,1);break;case po:a.translate(0,d);a.scale(1,-1);break;case ro:a.translate(c,d),a.scale(-1,-1)}var m=this.je,p=(n+e+l)*m;d>p&&(k=this.Al,k=k.y*d-k.y*p+k.offsetY);for(var p=this.Oi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,x=c,v=e,B=f,y=0;h?("left"===B?y=0:"right"===B?y=x-r:"center"===B&&(y=(x-r)/2),s.fillRect(0+y,t+.25*v,r,1)):("left"===B?y=0:"right"===B?y=x:"center"===B&&(y=x/2),s.fillText(u,0+y,t+v-.25*v),u=v/20|0,0===u&&(u=1),"right"===B?y-=r:"center"=== +Hh.prototype.yk=function(a,b){if(null!==this.qc&&0!==this.Ed.length&&null!==this.ng){var c=this.Ia.width,d=this.Ia.height,e=Eq(this),f=a.textAlign=this.wl,h=b.Kr;"start"===f&&(f=h?"right":"left");"end"===f&&(f=h?"left":"right");Lo(this,a,this.qc,!0,!1);(this.Zj||this.Yj)&&Lo(this,a,this.qc,!1,!1);var k=0,h=!1,l=w.xb(0,0);this.ph.nb(l);var m=w.xb(0,e);this.ph.nb(m);var n=l.vf(m);w.v(l);w.v(m);l=b.scale;8>n*l*l&&(h=!0);b.rf!==a&&(h=!1);!1===b.pj("textGreeking")&&(h=!1);n=this.bi;l=this.ci;switch(this.Ot){case qo:a.translate(c, +0);a.scale(-1,1);break;case po:a.translate(0,d);a.scale(1,-1);break;case ro:a.translate(c,d),a.scale(-1,-1)}var m=this.je,p=(n+e+l)*m;d>p&&(k=this.Al,k=k.y*d-k.y*p+k.offsetY);for(var p=this.Oi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,x=c,v=e,B=f,y=0;h?("left"===B?y=0:"right"===B?y=x-r:"center"===B&&(y=(x-r)/2),s.fillRect(0+y,t+.25*v,r,1)):("left"===B?y=0:"right"===B?y=x:"center"===B&&(y=x/2),s.fillText(u,0+y,t+v-.25*v),u=v/20|0,0===u&&(u=1),"right"===B?y-=r:"center"=== B&&(y-=r/2),this.Zj&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+y,t+v-.2*v),s.lineTo(0+y+r,t+v-.2*v),s.stroke()),this.Yj&&(s.beginPath(),s.lineWidth=u,t=t+v-v/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+y,t),s.lineTo(0+y+r,t),s.stroke()));k+=e+l}switch(this.Ot){case qo:a.scale(-1,1);a.translate(-c,0);break;case po:a.scale(1,-1);a.translate(0,-d);break;case ro:a.scale(-1,-1),a.translate(-c,-d)}}}; Hh.prototype.computeAngle=function(a,b){var c=0;switch(a){default:case kj:c=0;break;case nq:c=b;break;case Pp:c=b+90;break;case Rp:c=b-90;break;case Fq:c=b+180;break;case Gq:c=we(b);90c&&(c-=180);break;case Qp:c=we(b+90);90c&&(c-=180);break;case Sp:c=we(b-90);90c&&(c-=180);break;case Tp:c=we(b);if(45c||225c)return 0;90c&&(c-=180)}return we(c)}; -Hh.prototype.Nn=function(a,b,c,d){this.Yo=a;var e=this.Oi;e.reset();var f=0,h=0;if(isNaN(this.Ba.width)){f=this.Ed.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.xx){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.ng);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.ng);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.Ba.width;null!==this.O&&(f=Math.min(f, -this.O.Bf.width),f=Math.max(f,this.O.zh.width));h=Dq(this,f,e);m=h=isNaN(this.Ba.height)?Math.min(h,b/this.scale):this.Ba.height;if(0!==e.ef&&1!==e.Qe.length&&this.Xi===Bq&&(b=this.ng,l=this.Xi===Bq?Iq(b):0,k=this.bi+this.ci,k=Math.max(0,Eq(this)+k),m=Math.min(this.MI-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Qe.length))){k=e.Qe[m];for(a=Math.max(1,a-l);Hq(k,b)>a&&1h&&(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.ng);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.Ba.width;null!==this.O&&(f=Math.min(f, +this.O.Bf.width),f=Math.max(f,this.O.zh.width));h=Dq(this,f,e);m=h=isNaN(this.Ba.height)?Math.min(h,b/this.scale):this.Ba.height;if(0!==e.ef&&1!==e.Qe.length&&this.Xi===Bq&&(b=this.ng,l=this.Xi===Bq?Iq(b):0,k=this.bi+this.ci,k=Math.max(0,Eq(this)+k),m=Math.min(this.MI-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Qe.length))){k=e.Qe[m];for(a=Math.max(1,a-l);Hq(k,b)>a&&1=a.fh)return new ha(0,l);if(a.rk===zq){c.gj=1;f=Hq(b,k);if(0===h||f<=d)return c.ef=f,c.pf.push(c.ef),c.Qe.push(b),new ha(f,l);var m=Jq(b);b=b.substr(m.length);for(var n=Jq(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.pf[a.je+p]=f,e=Math.max(e,f)):(c.pf[a.je+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Qe[a.je+p]=m.substr(0,n);p++;m=m.substr(n);if(a.je+p>a.fh)break}n=Jq(b);for(f=Hq(m+n,k);0a.fh))break}c.gj=Math.min(a.fh,p);c.ef=Math.max(c.ef,e);return new ha(c.ef,l*c.gj)}function Jq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} +function Cq(a,b,c,d){b=b.replace(/^\s+|\s+$/g,"");var e=0,f=0,h=0,k=a.ng,f=a.bi+a.ci,l=Math.max(0,Eq(a)+f),h=a.Xi===Bq?Iq(k):0;if(a.je>=a.fh)return new ha(0,l);if(a.rk===zq){c.gj=1;f=Hq(b,k);if(0===h||f<=d)return c.ef=f,c.qf.push(c.ef),c.Qe.push(b),new ha(f,l);var m=Jq(b);b=b.substr(m.length);for(var n=Jq(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.qf[a.je+p]=f,e=Math.max(e,f)):(c.qf[a.je+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Qe[a.je+p]=m.substr(0,n);p++;m=m.substr(n);if(a.je+p>a.fh)break}n=Jq(b);for(f=Hq(m+n,k);0a.fh))break}c.gj=Math.min(a.fh,p);c.ef=Math.max(c.ef,e);return new ha(c.ef,l*c.gj)}function Jq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} function Hq(a,b){xq!==b&&(xq=yq.font=b);return yq.measureText(a).width}function Eq(a){if(null!==a.wm)return a.wm;var b=a.ng;xq!==b&&(xq=yq.font=b);var c=0;void 0!==sq[b]&&5E3>tq?c=sq[b]:(c=1.3*yq.measureText("M").width,sq[b]=c,tq++);return a.wm=c}function Iq(a){xq!==a&&(xq=yq.font=a);var b=0;void 0!==uq[a]&&5E3>vq?b=uq[a]:(b=yq.measureText(wq).width,uq[a]=b,vq++);return b} -function Dq(a,b,c){var d=a.Ed.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.bi+a.ci,e=Math.max(0,Eq(a)+e);if(0===d.length)return c.ef=0,a.je=1,e;if(!a.xx){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.je=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.rk!==zq?(c.gj=0,h=Cq(a,h,c,b),f+=h.height,a.je+=c.gj):(Cq(a,h,c,b),f+=e,a.je++),a.je===a.fh&&(l=!0)),h=k+1;return a.Wv=f} +function Dq(a,b,c){var d=a.Ed.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.bi+a.ci,e=Math.max(0,Eq(a)+e);if(0===d.length)return c.ef=0,a.je=1,e;if(!a.Ax){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.je=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.rk!==zq?(c.gj=0,h=Cq(a,h,c,b),f+=h.height,a.je+=c.gj):(Cq(a,h,c,b),f+=e,a.je++),a.je===a.fh&&(l=!0)),h=k+1;return a.Xv=f} w.defineProperty(Hh,{pB:"textValidation"},function(){return this.xl},function(a){var b=this.xl;b!==a&&(null!==a&&w.j(a,"function",Hh,"textValidation"),this.xl=a,this.h("textValidation",b,a))});w.defineProperty(Hh,{nG:"textEdited"},function(){return this.it},function(a){var b=this.it;b!==a&&(null!==a&&w.j(a,"function",Hh,"textEdited"),this.it=a,this.h("textEdited",b,a))}); w.defineProperty(Hh,{HL:"spacingAbove"},function(){return this.bi},function(a){var b=this.bi;b!==a&&(this.bi=a,this.h("spacingAbove",b,a))});w.defineProperty(Hh,{IL:"spacingBelow"},function(){return this.ci},function(a){var b=this.ci;b!==a&&(this.ci=a,this.h("spacingBelow",b,a))});w.defineProperty(Hh,{MI:"maxLines"},function(){return this.fh},function(a){var b=this.fh;b!==a&&(a=Math.floor(a),0>=a&&w.Ea(a,"> 0",Hh,"maxLines"),this.fh=a,this.h("maxLines",b,a),this.I())});w.u(Hh,{lL:"metrics"},function(){return this.Oi}); -w.defineProperty(Hh,{xK:"choices"},function(){return this.Rq},function(a){var b=this.Rq;b!==a&&(null===a||Array.isArray(a)||w.yd(a,"Array",Hh,"choices:value"),this.Rq=a,this.h("choices",b,a))});function Up(){this.ef=this.gj=0;this.pf=[];this.Qe=[]}Up.prototype.reset=function(){this.ef=this.gj=0;this.pf=[];this.Qe=[]};Up.prototype.Lp=function(a){this.gj=a.gj;this.ef=a.ef;this.pf=w.Il(a.pf);this.Qe=w.Il(a.Qe)};w.u(Up,{tK:"arrSize"},function(){return this.pf});w.u(Up,{uK:"arrText"},function(){return this.Qe}); -w.u(Up,{kL:"maxLineWidth"},function(){return this.ef});function wl(){G.call(this);this.Se=null;this.bt="";this.jk=Nd;this.Mo=De;this.gi=this.Te=null;this.Lo=Gb;this.mg=Nj;this.xp=null;this.ez=!1;this.xv=!0;this.Uv=!1;this.op=null}w.La(wl,G);w.fa("Picture",wl);wl.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Se;a.bt=this.bt;a.jk=this.jk.S();a.Mo=this.Mo;a.mg=this.mg;a.Te=this.Te;a.gi=this.gi;a.Lo=this.Lo.S();a.xv=this.xv;a.op=this.op}; +w.defineProperty(Hh,{xK:"choices"},function(){return this.Rq},function(a){var b=this.Rq;b!==a&&(null===a||Array.isArray(a)||w.yd(a,"Array",Hh,"choices:value"),this.Rq=a,this.h("choices",b,a))});function Up(){this.ef=this.gj=0;this.qf=[];this.Qe=[]}Up.prototype.reset=function(){this.ef=this.gj=0;this.qf=[];this.Qe=[]};Up.prototype.Lp=function(a){this.gj=a.gj;this.ef=a.ef;this.qf=w.Il(a.qf);this.Qe=w.Il(a.Qe)};w.u(Up,{tK:"arrSize"},function(){return this.qf});w.u(Up,{uK:"arrText"},function(){return this.Qe}); +w.u(Up,{kL:"maxLineWidth"},function(){return this.ef});function wl(){G.call(this);this.Se=null;this.bt="";this.jk=Nd;this.Mo=De;this.gi=this.Te=null;this.Lo=Gb;this.mg=Nj;this.xp=null;this.hz=!1;this.yv=!0;this.Vv=!1;this.op=null}w.La(wl,G);w.fa("Picture",wl);wl.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Se;a.bt=this.bt;a.jk=this.jk.S();a.Mo=this.Mo;a.mg=this.mg;a.Te=this.Te;a.gi=this.gi;a.Lo=this.Lo.S();a.yv=this.yv;a.op=this.op}; wl.prototype.gc=function(a){a===Nj||a===Pj||a===Qj?this.kI=a:G.prototype.gc.call(this,a)};wl.prototype.toString=function(){return"Picture("+this.source+")#"+w.Kd(this)};var Kq=new sa,Lq=0,ql=[];function Mq(){var a=ql;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 De:n=d.width;p=d.height;break;case Pj:case Qj:var s=0;q===Pj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===Qj&&(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.oj()*b.scale,u=k*h/(n*q*p*q),s=Kq[this.source],q=null;if(void 0!==s&&16s.Gp.length&&(Rq(s,4,l,m),Rq(s,16,l,m));for(var l=s.Gp,m=l.length,q=l[0],t=0;ta)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.$a(!1);b=d.o;b.A=new L(0,a);b.B=Lb;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=xb;b.B=new L(1,.6);w.q(a); return b},ExternalOrganization:function(a,b,c){a=a?a.Cc: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.$a(!1);b=d.o;b.A=new L(a/2,a/2);b.B=new L(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.$a(!1);b=a.o;b.A=new L(.25,.25);b.B=new L(.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.$a(!1);b=a.o;b.A=new L(0,.25);b.B=Lb;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 L(0,.25);b.B=new L(.5,.75);w.q(a);return b},InternalStorage:function(a,b,c){var d=a?a.Cc:NaN;a=a?a.uu: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.$a(!1);b=e.o;b.A=new L(d,a);b.B=Lb;w.q(e);return b},Junction:function(a,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 L(0,.25);b.B=new L(.5,.75);w.q(a);return b},InternalStorage:function(a,b,c){var d=a?a.Cc:NaN;a=a?a.vu: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.$a(!1);b=e.o;b.A=new L(d,a);b.B=Lb;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.$a(!1);b=a.o;b.Zd=Pj;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.$a(!1);b=a.o;b.A=new L(.1,0);b.B=new L(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 L(0,.25);b.B=Lb;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+ 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 L(.15,.15);b.B=new L(.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 L(0,.25);b.B=Lb;w.q(a);return b},MessageFromUser:function(a,b,c){a=a?a.Cc: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=xb;b.B=new L(a,1);w.q(d);return b}, @@ -1439,8 +1439,8 @@ MicroformProcessing:function(a,b,c){a=a?a.Cc:NaN;isNaN(a)&&(a=.25);var d=w.s();M 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.$a(!1);b=a.o;b.A=new L(0,.25);b.B=new L(.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.$a(!1);b=a.o;b.A=new L(0,.2);b.B=new L(.8,1);w.q(a);return b},OfflineStorage:function(a,b,c){a=a?a.Cc: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.$a(!1);b=e.o;b.A=new L(d/4+.5*a,a);b.B=new L(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=xb;b.B=new L(.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.$a(!1);b=a.o;b.Zd=Pj;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 L(0,.49);b.B=new L(1,.75);w.q(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Cc:NaN;a=a?a.uu: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 L(d,0);b.B=new L(1-a,1);w.q(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Cc:NaN;a=a?a.uu: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 L(d,0);b.B=new L(1-a,1);w.q(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Cc: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, +(.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.$a(!1);b=a.o;b.Zd=Pj;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 L(0,.49);b.B=new L(1,.75);w.q(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Cc:NaN;a=a?a.vu: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 L(d,0);b.B=new L(1-a,1);w.q(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Cc:NaN;a=a?a.vu: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 L(d,0);b.B=new L(1-a,1);w.q(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Cc: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.$a(!1);b=d.o;b.A=new L(a,0);b.B=new L(1-a,1);w.q(d);return b},Process:function(a,b,c){a=a?a.Cc: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.$a(!1);b=d.o;b.A=new L(a,0);b.B=Lb;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.$a(!1);b=a.o;b.A=new L(.25,.25);b.B=new L(.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.$a(!1);b=a.o;b.A=new L(.25,0);b.B=new L(.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 L(.23,0); b.B=new L(.77,1);w.q(a);return b},TransmittalTape:function(a,b,c){a=a?a.Cc: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=xb;b.B=new L(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=xb;b.B=new L(.55,1);w.q(a);return b},Buffer:function(a,b,c){a=w.s();M(a, @@ -1480,42 +1480,42 @@ TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 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 lq(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 oq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=Re(oq[d],!1),Rd[d]=a,c!==d&&(Rd[c]=d),d}}return"string"===typeof b?b:b instanceof Ae?a:null} -function S(a){C.call(this,a);this.N=2408959;this.ml=this.ui="";this.Js=this.Gs=this.Ss=this.Sr=null;this.Us="";this.si=this.Fr=this.Ts=this.Zm=null;this.Is="";this.kp=null;this.Hs=Dd;this.Ks="";this.lp=null;this.Ed="";this.Rv=this.Uq=this.Zk=null;this.Ri=(new z(NaN,NaN)).freeze();this.Xr="";this.pl=null;this.Yr=xb;this.fs=md;this.Zr=nd;this.nr=null;this.Tr=Xq;this.an=ld;this.$m="gray";this.Bg=4;this.YC=-1;this.st=NaN;this.GG=new A;this.Nm=null;this.ck=NaN}w.La(S,C);w.fa("Part",S); +function S(a){C.call(this,a);this.N=2408959;this.ml=this.ui="";this.Js=this.Gs=this.Ss=this.Sr=null;this.Us="";this.si=this.Fr=this.Ts=this.Zm=null;this.Is="";this.kp=null;this.Hs=Dd;this.Ks="";this.lp=null;this.Ed="";this.Sv=this.Uq=this.Zk=null;this.Ri=(new z(NaN,NaN)).freeze();this.Xr="";this.pl=null;this.Yr=xb;this.fs=md;this.Zr=nd;this.nr=null;this.Tr=Xq;this.an=ld;this.$m="gray";this.Bg=4;this.YC=-1;this.st=NaN;this.GG=new A;this.Nm=null;this.ck=NaN}w.La(S,C);w.fa("Part",S); S.prototype.cloneProtected=function(a){C.prototype.cloneProtected.call(this,a);a.N=this.N&-4097|49152;a.ui=this.ui;a.ml=this.ml;a.Sr=this.Sr;a.Ss=this.Ss;a.Gs=this.Gs;a.Js=this.Js;a.Us=this.Us;a.Ts=this.Ts;a.Fr=this.Fr;a.si=null;a.Is=this.Is;a.Hs=this.Hs.S();a.Ks=this.Ks;a.Ed=this.Ed;a.Uq=this.Uq;a.Ri.assign(this.Ri);a.Xr=this.Xr;a.Yr=this.Yr.S();a.fs=this.fs.S();a.Zr=this.Zr.S();a.nr=this.nr;a.Tr=this.Tr;a.an=this.an.S();a.$m=this.$m;a.Bg=this.Bg;a.st=this.st}; -S.prototype.ki=function(a){C.prototype.ki.call(this,a);a.Ek();a.Zm=null;a.kp=null;a.lp=null;a.pl=null;a.Nm=null};S.prototype.toString=function(){var a=w.hf(Object.getPrototypeOf(this))+"#"+w.Kd(this);null!==this.data&&(a+="("+Qf(this.data)+")");return a};S.LayoutNone=0;var Jm;S.LayoutAdded=Jm=1;var Sm;S.LayoutRemoved=Sm=2;S.LayoutShown=4;S.LayoutHidden=8;S.LayoutNodeSized=16;var yn;S.LayoutGroupLayout=yn=32;S.LayoutNodeReplaced=64;var Xq;S.LayoutStandard=Xq=Jm|Sm|28|yn|64;S.LayoutAll=16777215; +S.prototype.ki=function(a){C.prototype.ki.call(this,a);a.Ek();a.Zm=null;a.kp=null;a.lp=null;a.pl=null;a.Nm=null};S.prototype.toString=function(){var a=w.jf(Object.getPrototypeOf(this))+"#"+w.Kd(this);null!==this.data&&(a+="("+Qf(this.data)+")");return a};S.LayoutNone=0;var Jm;S.LayoutAdded=Jm=1;var Sm;S.LayoutRemoved=Sm=2;S.LayoutShown=4;S.LayoutHidden=8;S.LayoutNodeSized=16;var yn;S.LayoutGroupLayout=yn=32;S.LayoutNodeReplaced=64;var Xq;S.LayoutStandard=Xq=Jm|Sm|28|yn|64;S.LayoutAll=16777215; S.prototype.Vn=function(a,b,c,d,e,f,h){var k=this.g;null!==k&&(a===Of&&"elements"===b?e instanceof C?Km(e,function(a){Mm(k,a);Lm(k,a)}):e instanceof wl&&kn(k,e):a===Pf&&"elements"===b&&(e instanceof C?Km(e,function(a){Qm(k,a);Pm(k,a)}):e instanceof wl&&ln(k,e)),k.Xc(a,b,c,d,e,f,h))};S.prototype.updateTargetBindings=S.prototype.Hb=function(a){C.prototype.Hb.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.righta&&(a=1);var b=this.g;if(null!==b&&!b.wh){b.wh=!0;var c=new J(T);c.add(this);zr(this,c,b.Pd,a,b.Pa,this,b.wB===tl);b.wh=!1}}; -function zr(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.wh){b.wh=!0;var c=new J(T);c.add(this);Br(this,c,b.Pd,a,b.Pa,this,b.wB===tl);b.wh=!1}};function Br(a,b,c,d,e,f,h){for(var k=f===a?!1:a.gd,l=c?a.hx():a.Kg();l.next();){var m=l.value;m.Lc&&(k||m.Zg||m.Yb(),m=m.oA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.vd(!0),m.Ek(),h&&el(e,m,f)),2a&&(a=2);var b=this.g;if(null!==b&&!b.wh){b.wh=!0;var c=new J(T);c.add(this);Br(this,c,b.Pd,a,b.Pa,this,b.wB===tl);b.wh=!1}};function Br(a,b,c,d,e,f,h){for(var k=f===a?!1:a.gd,l=c?a.kx():a.Kg();l.next();){var m=l.value;m.Lc&&(k||m.Zg||m.Yb(),m=m.oA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.vd(!0),m.Ek(),h&&el(e,m,f)),2a&&(a-=180);break;case Qp:a=we(c+90);90a&&(a-=180);break;case Sp:a=we(c-90);90a&&(a-=180);break;case Tp:a=we(c);if(45a||225a)return 0;90a&&(a-=180)}return we(a)}; @@ -1593,32 +1593,32 @@ w.defineProperty(W,{Eh:"toPortId"},function(){return this.hi},function(a){var b= w.defineProperty(W,{qG:"toPortChanged"},function(){return this.mt},function(a){var b=this.mt;b!==a&&(null!==a&&w.j(a,"function",W,"toPortChanged"),this.mt=a,this.h("toPortChanged",b,a))});w.defineProperty(W,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Sj:rc},function(a){this.Ld();var b=this.V.Sj;b.L(a)||(a=a.S(),this.V.Sj=a,this.h("fromSpot",b,a),this.Yb())}); w.defineProperty(W,{Sl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Qj:NaN},function(a){this.Ld();var b=this.V.Qj;b!==a&&(0>a&&w.Ea(a,">= 0",W,"fromEndSegmentLength"),this.V.Qj=a,this.h("fromEndSegmentLength",b,a),this.Yb())});w.defineProperty(W,{Rt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Pj:pr},function(a){this.Ld();var b=this.V.Pj;b!==a&&(w.Ft("Link.fromEndSegmentDirection","2.0"),this.V.Pj=a,this.h("fromEndSegmentDirection",b,a),this.Yb())}); w.defineProperty(W,{St:"fromShortLength"},function(){return null!==this.V?this.V.Rj:NaN},function(a){this.Ld();var b=this.V.Rj;b!==a&&(this.V.Rj=a,this.h("fromShortLength",b,a),this.Yb())});w.defineProperty(W,{Bb:"toSpot"},function(){return null!==this.V?this.V.pk:rc},function(a){this.Ld();var b=this.V.pk;b.L(a)||(a=a.S(),this.V.pk=a,this.h("toSpot",b,a),this.Yb())}); -w.defineProperty(W,{jm:"toEndSegmentLength"},function(){return null!==this.V?this.V.nk:NaN},function(a){this.Ld();var b=this.V.nk;b!==a&&(0>a&&w.Ea(a,">= 0",W,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),this.Yb())});w.defineProperty(W,{Ku:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:pr},function(a){this.Ld();var b=this.V.mk;b!==a&&(w.Ft("Link.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),this.Yb())}); -w.defineProperty(W,{Lu:"toShortLength"},function(){return null!==this.V?this.V.ok:NaN},function(a){this.Ld();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),this.Yb())});function nn(a){var b=a.Y,c=a.$;null!==b?null!==c?Jr(a,b.PH(c)):Jr(a,null):Jr(a,null)}function Jr(a,b){var c=a.Zk;if(c!==b){null!==c&&jr(c,a);a.Zk=b;null!==b&&kr(b,a);var d=a.sE;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.Ua,f.Ua=!0);d(a,c,b);null!==f&&(f.Ua=e)}!a.Zg||a.JD!==c&&a.KD!==c||a.Yb()}} -W.prototype.Ek=function(){var a=this.Ka;null!==a&&this.Y!==a&&this.$!==a&&a.Sw&&S.prototype.Ek.call(this)};W.prototype.getOtherNode=W.prototype.oA=function(a){var b=this.Y;return a===b?this.$:b};W.prototype.getOtherPort=function(a){var b=this.Jc;return a===b?this.jd:b};w.u(W,{YK:"isLabeledLink"},function(){return null===this.rf?!1:0a&&w.Ea(a,">= 0",W,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),this.Yb())});w.defineProperty(W,{Lu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:pr},function(a){this.Ld();var b=this.V.mk;b!==a&&(w.Ft("Link.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),this.Yb())}); +w.defineProperty(W,{Mu:"toShortLength"},function(){return null!==this.V?this.V.ok:NaN},function(a){this.Ld();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),this.Yb())});function nn(a){var b=a.Y,c=a.$;null!==b?null!==c?Jr(a,b.PH(c)):Jr(a,null):Jr(a,null)}function Jr(a,b){var c=a.Zk;if(c!==b){null!==c&&jr(c,a);a.Zk=b;null!==b&&kr(b,a);var d=a.sE;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.Ua,f.Ua=!0);d(a,c,b);null!==f&&(f.Ua=e)}!a.Zg||a.JD!==c&&a.KD!==c||a.Yb()}} +W.prototype.Ek=function(){var a=this.Ka;null!==a&&this.Y!==a&&this.$!==a&&a.Vw&&S.prototype.Ek.call(this)};W.prototype.getOtherNode=W.prototype.oA=function(a){var b=this.Y;return a===b?this.$:b};W.prototype.getOtherPort=function(a){var b=this.Jc;return a===b?this.jd:b};w.u(W,{YK:"isLabeledLink"},function(){return null===this.sf?!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.ri(f),h=2;h=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.ri(f),h=2;hc&&(c=-c)):Va(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.uf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}w.wa(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,{yF:"midAngle"},function(){this.co();return this.computeMidAngle()}); +return a}e=0;f=w.lb();for(h=0;hc&&(c=-c)):Va(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.vf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}w.wa(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,{yF:"midAngle"},function(){this.co();return this.computeMidAngle()}); W.prototype.computeMidAngle=function(){var a=this.qa;if(2>a)return NaN;if(this.computeCurve()===xj&&4<=a&&!this.jc){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 Oa(((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))?e>c+10?d.Rb(a):b.Rb(a):b.Rb(d);b=this.l(c-1);d=this.l(c);a=this.l(c+1);c=b.uf(d);e=d.uf(a);return c>e+10?b.Rb(d):e>c+10?d.Rb(a):b.Rb(a)}; +c=b.vf(d),e=d.vf(a),!(c>e+10))?e>c+10?d.Rb(a):b.Rb(a):b.Rb(d);b=this.l(c-1);d=this.l(c);a=this.l(c+1);c=b.vf(d);e=d.vf(a);return c>e+10?b.Rb(d):e>c+10?d.Rb(a):b.Rb(a)}; w.defineProperty(W,{points:"points"},function(){return this.bd},function(a){var b=this.bd;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>l?-1:1)*p+r,t=n*(u- @@ -1629,19 +1629,19 @@ m&&(y=f.Wa(Gb,w.K()),H=w.xb(y.x+1E3*x,y.y+1E3*v),this.getLinkPointFromPoint(e,f, function Pr(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 z);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.O;null===e||e.Yg()||(e=e.O);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.Bn(e,h,k,l, f);null!==a&&f.transform(a);return f};function Qr(a,b){var c=b.Bs;null===c&&(c=new Rr,c.port=b,c.Oc=b.U,b.Bs=c);return Sr(c,a)} -W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new z);if(c.fd())return b.Wa(c,k),k;if(c.uj()){var l=Qr(this,b);if(null!==l){k.assign(l.eq);if(e&&this.Yx===Gr){var m=Qr(this,h);if(null!==m&&l.tn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.rj(Tb)||c.rj(Wb))&&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(Gb,w.K());l=f=null;this.qa> +W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new z);if(c.fd())return b.Wa(c,k),k;if(c.uj()){var l=Qr(this,b);if(null!==l){k.assign(l.eq);if(e&&this.ay===Gr){var m=Qr(this,h);if(null!==m&&l.tn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.rj(Tb)||c.rj(Wb))&&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(Gb,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(Gb,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.fd())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(Gb,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.Od()&&h.mi(a)&&(c+=180,360<=c&&(c-=360));a=pr;a=e?this.Rt:this.Ku;a===pr&&(a=e?b.Rt:b.Ku);switch(a){case qr:b=b.zn();c+=b;360<=c&&(c-=360);break;case pr:case vo:b=b.zn();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.uj()&&(a=Qr(this,b),null!==a))return a.ax;a=NaN;a=d?this.Sl:this.jm;null!==b&&isNaN(a)&&(a=d?b.Sl:b.jm);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a){return a?Nr(this,this.Jc):Or(this,this.jd)};function Nr(a,b){if(null===b)return Gb;var c=a.Ab;c.Vc()&&null!==b&&(c=b.Ab);return c===rc?tb:c}function Or(a,b){if(null===b)return Gb;var c=a.Bb;c.Vc()&&null!==b&&(c=b.Bb);return c===rc?tb:c} -W.prototype.computeOtherPoint=function(a,b){var c=b.Wa(Gb),d;d=b.Bs;d=null!==d?Sr(d,this):null;null!==d&&(c=d.eq);return c};W.prototype.computeShortLength=function(a){if(a){if(a=this.St,isNaN(a)){var b=this.Jc;null!==b&&(a=b.St)}}else a=this.Lu,isNaN(a)&&(b=this.jd,null!==b&&(a=b.Lu));return isNaN(a)?0:a}; +l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;w.v(l)}d.Od()&&h.mi(a)&&(c+=180,360<=c&&(c-=360));a=pr;a=e?this.Rt:this.Lu;a===pr&&(a=e?b.Rt:b.Lu);switch(a){case qr:b=b.zn();c+=b;360<=c&&(c-=360);break;case pr:case vo:b=b.zn();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.uj()&&(a=Qr(this,b),null!==a))return a.gx;a=NaN;a=d?this.Sl:this.jm;null!==b&&isNaN(a)&&(a=d?b.Sl:b.jm);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a){return a?Nr(this,this.Jc):Or(this,this.jd)};function Nr(a,b){if(null===b)return Gb;var c=a.Ab;c.Vc()&&null!==b&&(c=b.Ab);return c===rc?tb:c}function Or(a,b){if(null===b)return Gb;var c=a.Bb;c.Vc()&&null!==b&&(c=b.Bb);return c===rc?tb:c} +W.prototype.computeOtherPoint=function(a,b){var c=b.Wa(Gb),d;d=b.Bs;d=null!==d?Sr(d,this):null;null!==d&&(c=d.eq);return c};W.prototype.computeShortLength=function(a){if(a){if(a=this.St,isNaN(a)){var b=this.Jc;null!==b&&(a=b.St)}}else a=this.Mu,isNaN(a)&&(b=this.jd,null!==b&&(a=b.Mu));return isNaN(a)?0:a}; W.prototype.zk=function(a,b,c,d,e,f){if(!1===this.Tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Ff(),h.reset());h.multiply(this.transform);if(this.qn(a,h))return Zp(this,b,c,e),void 0===f&&w.ue(h),!0;if(this.Tf(a,h)){var k=!1;if(!this.Gn)for(var l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.Yf){var p=n.W,q=this.Ia;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.Ff();p.set(h);if(n instanceof C)k=n.zk(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.Tg)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.wk(k.W))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,x=w.K(),v=w.K(),B=w.K(),y=w.Ff();y.set(t);y.BF(k.transform);y.px();v.x=r;v.y=s;v.transform(y);x.x=q;x.y=s;x.transform(y);t=!1;kq(k,x,v,B)?t=!0:(x.x=r,x.y=u,x.transform(y),kq(k,x,v,B)?t=!0:(v.x=q,v.y=u,v.transform(y),kq(k,x,v,B)?t=!0:(x.x=q,x.y=s,x.transform(y),kq(k,x,v,B)&& +n){if(n instanceof X){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.qn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.wk(k.W))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,x=w.K(),v=w.K(),B=w.K(),y=w.Ff();y.set(t);y.BF(k.transform);y.tx();v.x=r;v.y=s;v.transform(y);x.x=q;x.y=s;x.transform(y);t=!1;kq(k,x,v,B)?t=!0:(x.x=r,x.y=u,x.transform(y),kq(k,x,v,B)?t=!0:(v.x=q,v.y=u,v.transform(y),kq(k,x,v,B)?t=!0:(x.x=q,x.y=s,x.transform(y),kq(k,x,v,B)&& (t=!0))));w.ue(y);w.v(x);w.v(v);w.v(B);k=t}}else k=k.qn(r,q)}}else k=Bo(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof J&&e.add(n),e instanceof I&&e.add(n)));w.ue(p)}}}void 0===f&&w.ue(h);return k||null!==this.background||null!==this.jn}void 0===f&&w.ue(h);return!1};w.u(W,{jc:"isOrthogonal"},function(){return 2===(this.Um.value&2)});w.u(W,{sj:"isAvoiding"},function(){return 4===(this.Um.value&4)}); -W.prototype.computeCurve=function(){if(null===this.Gi){var a=this.Jc,b=this.jc;this.Gi=null!==a&&a===this.jd&&!b}return this.Gi?xj:this.Ye};W.prototype.computeCorner=function(){if(this.Ye===xj)return 0;var a=this.$z;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;da)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;Va(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.Ug(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.ea(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Ug(c,d)}}return!0;case Fr:f=this.l(a);p=this.l(c);if(!f.Ic(b)||!p.Ic(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.Ug(a,b);for(a+=1;ah.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new z(a.x,Math.max((a.y+c.y)/2,a.y)),m=new z(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.Ha(a)||h.Ha(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 z(a.x,Math.min((a.y+c.y)/2,a.y)),m=new z(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.ea(2,h.x,h.y),this.w(3,h.x,h.y);else if(c=this.l(3),0===b||180===b)K(h.x,c.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.ea(2,h,a.y),this.ea(3,h,c.y)):K(h.y,c.y)?(Math.abs(a.y-h.y)<=s.ln/2&&(this.ea(2,h.x,a.y),this.ea(3,c.x,a.y)),this.w(2,h.x,a.y)):this.ea(2,a.x,h.y);else if(90===b||270===b)K(h.y,c.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.ea(2,a.x,h),this.ea(3,c.x,h)):K(h.x,c.x)?(Math.abs(a.x-h.x)<=s.mn/2&&(this.ea(2,a.x,h.y),this.ea(3, a.x,c.y)),this.w(2,a.x,h.y)):this.ea(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.hj(f.x,u.y):this.hj(u.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ii(l),this.ii(m))}};W.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2}; function Bi(a){if(null===a.g||!a.sj)return!1;var b=a.points.n,c=b.length;if(4>c)return!1;a=Bn(a.g,!0,a.Ka,null);for(var d=1;da)return new Ae(Ee);var b=!1,c=this.g;null!==c&&Kr(this)&&c.al.contains(this)&&null!==this.lw&&(b=!0);var d=c=0,e=this.l(0).copy(),f=e.copy(),c=this.bd.n,h=this.computeCurve();if(h===xj&&3<=a&&!Va(this.vq,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.jc)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;ka)return new Ae(Ee);var b=!1,c=this.g;null!==c&&Kr(this)&&c.al.contains(this)&&null!==this.ow&&(b=!0);var d=c=0,e=this.l(0).copy(),f=e.copy(),c=this.bd.n,h=this.computeCurve();if(h===xj&&3<=a&&!Va(this.vq,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.jc)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-y,u.y=q-y,t.x=v+s,t.y=q+s):(u.x=v-y,u.y=q+y,t.x=v+s,t.y=q-s):r>q?(u.x=v+y,u.y=q-y,t.x=v-s,t.y=q+s):(u.x=v+y,u.y=q+y,t.x=v-s,t.y=q-s));Va(x,v)&&Va(q,r)&&(q>p?(B>v?(u.x= v-y,u.y=q-y,t.x=v+s):(u.x=v+y,u.y=q-y,t.x=v-s),t.y=q+s):(B>v?(u.x=v-y,u.y=q+y,t.x=v+s):(u.x=v+y,u.y=q+y,t.x=v-s),t.y=q-s));if(Va(x,v)&&Va(v,B)||Va(p,q)&&Va(q,r))x=.5*(x+B),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&&Va(b.x,this.l(0).x)&&Va(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));for(k=1;k=a-1){f!==u&&(0!==this.computeShortLength(!1)&&(u=Xr(this,u.copy(),!1,dd)),$r(this,l,-c,-d,f,u,b));break}k=Yr(this,u,k+1,k=e)retur function $r(a,b,c,d,e,f,h){if(!h&&Kr(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.Ye===jj?M(b,n,p,!1,!1):N(b,l,q,n,q,n,p)}else if(K(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.Ye===jj?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.Dx;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&&!K(h,x)){n.x=u;n.y=q;n=!0;break a}}else if(!K(q,s)&&K(h,x)&&Math.min(q,s)h&&Math.min(u,t)p&&!K(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,{Nt:"firstPickIndex"},function(){var a;2>=this.qa?a=0:((a=this.jc)||(a=this.computeSpot(!0)!==tb),a=a?1:0);return a});w.u(W,{Bx:"lastPickIndex"},function(){var a=this.qa;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.jc)||(b=this.computeSpot(!1)!==tb);a=b?a-2:a-1}return a});function Kr(a){a=a.Ye;return a===ij||a===jj} -function Mr(a,b){if(b||Kr(a)){var c=a.g;null===c||c.al.contains(a)||null===a.lw||c.al.add(a,a.lw)}}function lj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Kc){var d=c.g;if(null!==d)for(var e=!1,d=d.Dx;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;lh&&Math.min(u,t)p&&!K(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,{Nt:"firstPickIndex"},function(){var a;2>=this.qa?a=0:((a=this.jc)||(a=this.computeSpot(!0)!==tb),a=a?1:0);return a});w.u(W,{Ex:"lastPickIndex"},function(){var a=this.qa;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.jc)||(b=this.computeSpot(!1)!==tb);a=b?a-2:a-1}return a});function Kr(a){a=a.Ye;return a===ij||a===jj} +function Mr(a,b){if(b||Kr(a)){var c=a.g;null===c||c.al.contains(a)||null===a.ow||c.al.add(a,a.ow)}}function lj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Kc){var d=c.g;if(null!==d)for(var e=!1,d=d.Gx;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.xg=Math.floor((a.x-this.ze)/this.ze)*this.ze;this.yg=Math.floor((b-this.Ae)/this.Ae)*this.Ae;this.$r=Math.ceil((c+2*this.ze)/this.ze)*this.ze;this.as=Math.ceil((d+2*this.Ae)/this.Ae)*this.Ae;a=1+(Math.ceil((this.$r-this.xg)/this.ze)|0);b=1+(Math.ceil((this.as-this.yg)/this.Ae)|0);if(null===this.md||this.Bp=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Rc|w.kd:return c>a&&c<=180+a?180:270;case w.kd|w.$c:return c>180-a&&c<=360-a?270:0;case w.$c|w.Zc:return c>a&&c<=180+a?90:0;case w.Zc|w.Rc:return c>180-a&&c<=360-a?180:90;case w.Rc|w.kd|w.$c:return 90180+a&&c<=360- a?270:0;case w.kd|w.$c|w.Zc:return 180a&&180>=c?90:0;case w.$c|w.Zc|w.Rc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.Zc|w.Rc|w.kd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Rc|w.kd|w.$c|w.Zc)&&(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.bg.length=0}; function Sr(a,b){var c=a.bg;if(0===c.length){a:if(!a.gq){c=a.gq;a.gq=!0;var d,e=null,f=a.Oc,f=f instanceof U?f:null;if(null===f||f.we)d=a.Oc.IE(a.port.Qd);else{if(!f.W.H()){a.gq=c;break a}e=f;d=e.HE()}var h=a.bg.length=0,k=a.port.Wa(xb,w.K()),l=a.port.Wa(Lb,w.K()),f=w.hg(k.x,k.y,0,0);f.ri(l);w.v(k);w.v(l);k=w.xb(f.x+f.width/2,f.y+f.height/2);for(d=d.i;d.next();)if(l=d.value,l.isVisible()){var m=l.Jc===a.port||l.Y.mi(e),n=l.computeSpot(m);if(n.uj()&&(m=m?l.jd:l.Jc,null!==m)){var p=m.U;if(null!==p){var m= -l.computeOtherPoint(p,m),p=k.Rb(m),n=gs(f,n,p,l.jc),q=0;0===n?(q=w.$c,180Math.abs(E)?(B=Math.abs(E)/ q,q=Math.abs(E)):B=1;break;case w.Rc:r>Math.abs(H)?(B=Math.abs(H)/r,r=Math.abs(H)):B=1;break;case w.kd:m>Math.abs(E)?(B=Math.abs(E)/m,m=Math.abs(E)):B=1;break;default:case w.$c:p>Math.abs(H)?(B=Math.abs(H)/p,p=Math.abs(H)):B=1}v=0}var V=u.eq;if(e===rr){t=u.link.computeThickness();t*=B;V.set(y);switch(x){case w.Zc:V.x=y.x+E/2+q/2-v-t/2;break;case w.Rc:V.y=y.y+H/2+r/2-v-t/2;break;case w.kd:V.x=y.x+E/2-m/2+v+t/2;break;default:case w.$c:V.y=y.y+H/2-p/2+v+t/2}v+=t}else t=.5,e===or&&(t=(u.Yp+1)/(u.tn+1)), -V.x=y.x+E*t,V.y=y.y+H*t}w.v(k);w.v(d);w.v(l);w.v(n);y=a.bg;for(E=0;Eb.xe?1:a.angleb.angle?1:0}; -Rr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Oc,this.port,tb,b.Jc===this.port),d=a.Yp;if(0>d)return c;var e=a.tn;if(1>=e||!b.jc)return c;var b=a.Lx,f=a.eq;if(a.xe===w.Rc||a.xe===w.Zc)d=e-1-d;return((a=a.xe===w.Rc||a.xe===w.$c)?b.yb.xe?1:a.angleb.angle?1:0}; +Rr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Oc,this.port,tb,b.Jc===this.port),d=a.Yp;if(0>d)return c;var e=a.tn;if(1>=e||!b.jc)return c;var b=a.Ox,f=a.eq;if(a.xe===w.Rc||a.xe===w.Zc)d=e-1-d;return((a=a.xe===w.Rc||a.xe===w.$c)?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(Mj,{padding:"padding"},function(){return this.ff},function(a){"number"===typeof a?a=new db(a):w.G(a,db,Mj,"padding");var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.h("padding",b,a))});function rg(){0e&&(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(Mj,{padding:"padding"},function(){return this.ff},function(a){"number"===typeof a?a=new db(a):w.G(a,db,Mj,"padding");var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.h("padding",b,a))});function rg(){0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.Gd("Layout")}this.zf=!0};rg.prototype.Sn=function(a){return!a.location.H()||a instanceof U&&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.bq||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof T?l.lf||(l instanceof U?null===l.Sb?ks(a,b,l.Nc,!1,e,f,h,k):(ls(l),b.add(l)):(ls(l),b.add(l))):h&&l instanceof W?b.add(l):!k||!l.de()||l instanceof T||(ls(l),b.add(l)))}}function ls(a){var b=a.W;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ze()} +function ks(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.bq||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof T?l.mf||(l instanceof U?null===l.Sb?ks(a,b,l.Nc,!1,e,f,h,k):(ls(l),b.add(l)):(ls(l),b.add(l))):h&&l instanceof W?b.add(l):!k||!l.de()||l instanceof T||(ls(l),b.add(l)))}}function ls(a){var b=a.W;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ze()} rg.prototype.collectParts=rg.prototype.pH=function(a){var b=new J(S);a instanceof D?(ks(this,b,a.eg,!0,null,!0,!0,!0),ks(this,b,a.links,!0,null,!0,!0,!0),ks(this,b,a.Jk,!0,null,!0,!0,!0)):a instanceof U?ks(this,b,a.Nc,!1,null,!0,!0,!0):ks(this,b,a.i,!1,null,!0,!0,!0);return b};w.defineProperty(rg,{oe:"arrangementOrigin"},function(){return this.Jq},function(a){w.G(a,z,rg,"arrangementOrigin");this.Jq.L(a)||(this.Jq.assign(a),this.J())}); rg.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(xb),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; -function sg(){w.mc(this);this.ie=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 J(ms);this.edges=new J(ns);this.Ix=new ka(T,ms);this.Ex=new ka(W,ns)}w.fa("LayoutNetwork",sg); -sg.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 J(ms);this.edges=new J(ns);this.Ix=new ka(T,ms);this.Ex=new ka(W,ns)}; +function sg(){w.mc(this);this.ie=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 J(ms);this.edges=new J(ns);this.Lx=new ka(T,ms);this.Hx=new ka(W,ns)}w.fa("LayoutNetwork",sg); +sg.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 J(ms);this.edges=new J(ns);this.Lx=new ka(T,ms);this.Hx=new ka(W,ns)}; sg.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Sb?"("+this.Sb.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.rd,d=b.rd;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.Ub("Layout");d=[];switch(this.alignment){case Bs:var k=a,l=c,m=Math.max(this.Hp.width,1);if(!isFinite(m))for(var n=m=0;nk-1||0h){d.push(new A(0,Q?v-p:v,h+l,ba+p+m));for(V=0;Vy&&(e.width+=e.x-y,e.x=y)}for(k=f=h=e=0;kd?1:0}; Mn.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.ka=0,a.ra=0);else{var b=new I(Us);b.Hc(a.i);a=new I(Us);var c=new I(Us),d;d=this.sort(b);var e=this.Sy,f=this.BC,h=this.Wd,k=this.Fo,l=this.Ty,m=this.pr,b=this.bl,n=this.SD,p=this.Gg,q=this.hv,e=this.Pf,f=this.Hx,h=this.fJ;if(!isFinite(h)|| -0>=h)h=NaN;k=this.iH;if(!isFinite(k)||0>=k)k=1;l=this.ye;isFinite(l)||(l=0);m=this.of;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.Pf);if((this.direction===Ms||this.direction===Ns)&&this.sorting!==Gs){for(var r=0;!(r>=d.length);r+=2){a.add(d.da(r));if(r+1>=d.length)break;c.add(d.da(r+1))}this.direction===Ms?(this.Pf===Rs&&a.reverse(),d=new I(Us),d.Hc(a),d.Hc(c)):(this.Pf===Rs&&c.reverse(),d=new I(Us),d.Hc(c),d.Hc(a))}for(var s= +Cs.prototype.doLayout=function(a){null===a&&w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.network.vertexes;if(1>=a.count)1===a.count&&(a=a.first(),a.ka=0,a.ra=0);else{var b=new I(Us);b.Hc(a.i);a=new I(Us);var c=new I(Us),d;d=this.sort(b);var e=this.Vy,f=this.BC,h=this.Wd,k=this.Fo,l=this.Wy,m=this.pr,b=this.bl,n=this.SD,p=this.Gg,q=this.iv,e=this.Pf,f=this.Kx,h=this.fJ;if(!isFinite(h)|| +0>=h)h=NaN;k=this.iH;if(!isFinite(k)||0>=k)k=1;l=this.ye;isFinite(l)||(l=0);m=this.pf;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.Pf);if((this.direction===Ms||this.direction===Ns)&&this.sorting!==Gs){for(var r=0;!(r>=d.length);r+=2){a.add(d.da(r));if(r+1>=d.length)break;c.add(d.da(r+1))}this.direction===Ms?(this.Pf===Rs&&a.reverse(),d=new I(Us),d.Hc(a),d.Hc(c)):(this.Pf===Rs&&c.reverse(),d=new I(Us),d.Hc(c),d.Hc(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.Sy=e;this.BC=f;this.Wd=h;this.Fo=k;this.Ty=l;this.pr=m;this.bl=b;this.SD=n;this.Gg=p;this.hv=q;b=d;d=this.Sy;e=this.Wd;f=this.Ty;k=this.pr;l=this.bl;m=this.Gg;n=this.hv;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+ +m*Math.PI/180);r>h?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Vy=e;this.BC=f;this.Wd=h;this.Fo=k;this.Wy=l;this.pr=m;this.bl=b;this.SD=n;this.Gg=p;this.iv=q;b=d;d=this.Vy;e=this.Wd;f=this.Wy;k=this.pr;l=this.bl;m=this.Gg;n=this.iv;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.zf=!0}; function at(a,b,c,d,e){var f=a.pr,h=a.Wd;a=a.Gg;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;180c){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.Qm++;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.Qm?a.Wd-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.Qm++;if(!(23a.Qm?a.Wd-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.Qm++;if(!(23a.Qm?a.Wd-f/(2*Math.PI):a.Wd-(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.Wd,l=a.Gg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.bl;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.du&&this.commitLinks()}; +function ft(a,b,c,d,e,f,h){var k=a.Wd,l=a.Gg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.bl;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.eu&&this.commitLinks()}; Cs.prototype.commitNodes=function(){for(var a=this.YG,b=this.network.vertexes.i;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};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.PG;if(.001>Math.abs(a.Fo-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.Fo-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}} @@ -1814,57 +1814,57 @@ b[e]++;for(f=f.ic;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a else{for(var q=Infinity,r=Infinity,s=-1,u=[],p=0;pa[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;pH.indexOf(Q)||$H.indexOf(Q)|| $=t?l+1:l)),v+=l=t&&l++,y>=t&&y++,l>y&&(H=y,y=l,l=H),y-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,{iH:"aspectRatio"},function(){return this.Lq},function(a){this.Lq!==a&&(w.j(a,"number",Cs,"aspectRatio"),0=a?a:360,this.J())}); w.defineProperty(Cs,{Pf:"arrangement"},function(){return this.ld},function(a){this.ld!==a&&(w.mb(a,Cs,Cs,"arrangement"),a===Rs||a===Ds||a===Qs||a===Ps)&&(this.ld=a,this.J())});w.defineProperty(Cs,{direction:"direction"},function(){return this.aa},function(a){this.aa!==a&&(w.mb(a,Cs,Cs,"direction"),a===Fs||a===Os||a===Ms||a===Ns)&&(this.aa=a,this.J())}); w.defineProperty(Cs,{sorting:"sorting"},function(){return this.$h},function(a){this.$h!==a&&(w.mb(a,Cs,Cs,"sorting"),a===Ks||a===Ls||a===Is||Js||a===Gs)&&(this.$h=a,this.J())});w.defineProperty(Cs,{comparer:"comparer"},function(){return this.Jh},function(a){this.Jh!==a&&(w.j(a,"function",Cs,"comparer"),this.Jh=a,this.J())});w.defineProperty(Cs,{spacing:"spacing"},function(){return this.ai},function(a){this.ai!==a&&(w.j(a,"number",Cs,"spacing"),this.ai=a,this.J())}); -w.defineProperty(Cs,{Hx:"nodeDiameterFormula"},function(){return this.rs},function(a){this.rs!==a&&(w.mb(a,Cs,Cs,"nodeDiameterFormula"),a===Hs||a===Ss)&&(this.rs=a,this.J())});w.u(Cs,{ZG:"actualXRadius"},function(){return this.Wd});w.u(Cs,{$G:"actualYRadius"},function(){return this.Gg});w.u(Cs,{XJ:"actualSpacing"},function(){return this.bl});w.u(Cs,{YG:"actualCenter"},function(){return isNaN(this.oe.x)||isNaN(this.oe.y)?new z(0,0):new z(this.oe.x+this.ZG,this.oe.y+this.$G)});var Ds; +w.defineProperty(Cs,{Kx:"nodeDiameterFormula"},function(){return this.rs},function(a){this.rs!==a&&(w.mb(a,Cs,Cs,"nodeDiameterFormula"),a===Hs||a===Ss)&&(this.rs=a,this.J())});w.u(Cs,{ZG:"actualXRadius"},function(){return this.Wd});w.u(Cs,{$G:"actualYRadius"},function(){return this.Gg});w.u(Cs,{XJ:"actualSpacing"},function(){return this.bl});w.u(Cs,{YG:"actualCenter"},function(){return isNaN(this.oe.x)||isNaN(this.oe.y)?new z(0,0):new z(this.oe.x+this.ZG,this.oe.y+this.$G)});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.zq=this.fo=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 z(n.x+n.width+d.width,n.y),l[1]=new z(n.x,n.y+n.height+d.height),f=2):(p=Zt(l,f,e,k,n.width,n.height,d),q=l[p],r=new z(q.x+n.width+d.width, q.y),s=new z(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().cb,d=this.network.vertexes.i;d.next();){if(d.value.cb.Tf(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Fg?a.Fg=new I(du):a.Fg.clear();a.Fg.Hc(a.network.vertexes);var c=a.Fg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.fg-a.fg});for(var d=c.count-1;0<=d&&1>=c.da(d).fg;)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.cb=new A(k-r.x-h,l-r.y-m,p+2*h,q+2*m);f.focus=new z(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.Dh){var e=d.Dh.da(d.ZA);d.fg=e.py;var f=e.FB,h=e.GB;d.cb=new A(d.ka-f,d.ra-h,e.qy,e.oy);d.focus=new z(f,h);d.ZA--}}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.ka,e=b.ra,f=b.width,h=b.height;null!==b.Dh&&0=p.fg?l++:(k=!0,m++,h+=Math.atan2(b.ra-p.ra,b.ka-p.ka))}if(0!==l)for(0=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.cb=new A(k-r.x-h,l-r.y-m,p+2*h,q+2*m);f.focus=new z(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.Dh){var e=d.Dh.da(d.ZA);d.fg=e.ty;var f=e.FB,h=e.GB;d.cb=new A(d.ka-f,d.ra-h,e.uy,e.sy);d.focus=new z(f,h);d.ZA--}}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.ka,e=b.ra,f=b.width,h=b.height;null!==b.Dh&&0=p.fg?l++:(k=!0,m++,h+=Math.atan2(b.ra-p.ra,b.ka-p.ka))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.ka=d+p*Math.cos(q);l.ra=e+p*Math.sin(q);k++}}}function Zt(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.ka,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.ka-b.ka}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.ra-b.ra});for(var h=a.Oh,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.Qx,null===n&&(a.Qx=n=new ta(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.Qx,null===n&&(a.Qx=n=new ta(0)),m=n.random(),s= +b[c],l=k.M,q=k.T,d=l.x+q.x,l=l.y+q.y,n=k.charge*a.electricalFieldX(d,l),p=k.charge*a.electricalFieldY(d,l),n=n+k.mass*a.gravitationalFieldX(d,l),p=p+k.mass*a.gravitationalFieldY(d,l);k.forceX+=n;k.forceY+=p;for(q=c+1;qh||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.Tx,null===n&&(a.Tx=n=new ta(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.Tx,null===n&&(a.Tx=n=new ta(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=Math.max(a.Oh/20,50);for(e=0;ed&&(f=d),h<-d?h=-d:h>d&&(h=d),k.ka+=f,k.ra+=h,c=Math.max(c,f*f+h*h));return c>a.GE*a.GE}ht.prototype.moveFixedVertex=function(){}; -ht.prototype.commitLayout=function(){this.gB();this.commitNodes();this.du&&this.commitLinks()};ht.prototype.gB=function(){if(this.tq)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.Ab=rc,b.Bb=rc)}};ht.prototype.commitNodes=function(){var a=0,b=0;if(this.hH){var c=w.Ef();this.sh(this.network,c);b=this.oe;a=b.x-c.x;b=b.y-c.y;w.Db(c)}for(var c=w.Ef(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.cb),c.x+=a,c.y+=b,e.cb=c;e.commit()}w.Db(c)}; +ht.prototype.commitLayout=function(){this.gB();this.commitNodes();this.eu&&this.commitLinks()};ht.prototype.gB=function(){if(this.tq)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.Ab=rc,b.Bb=rc)}};ht.prototype.commitNodes=function(){var a=0,b=0;if(this.hH){var c=w.Ef();this.sh(this.network,c);b=this.oe;a=b.x-c.x;b=b.y-c.y;w.Db(c)}for(var c=w.Ef(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.cb),c.x+=a,c.y+=b,e.cb=c;e.commit()}w.Db(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.Bo:a};ht.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Ao:a};ht.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.yo: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.zo:a};ht.prototype.gravitationalFieldX=function(){return 0};ht.prototype.gravitationalFieldY=function(){return 0};ht.prototype.isFixed=function(a){return a.isFixed};w.u(ht,{BK:"currentIteration"},function(){return this.Rr});w.defineProperty(ht,{lE:"arrangementSpacing"},function(){return this.jg},function(a){w.G(a,ha,ht,"arrangementSpacing");this.jg.L(a)||(this.jg.assign(a),this.J())}); w.defineProperty(ht,{hH:"arrangesToOrigin"},function(){return this.Kq},function(a){this.Kq!==a&&(w.j(a,"boolean",ht,"arrangesToOrigin"),this.Kq=a,this.J())});w.defineProperty(ht,{tq:"setsPortSpots"},function(){return this.Zh},function(a){this.Zh!==a&&(w.j(a,"boolean",ht,"setsPortSpots"),this.Zh=a,this.J())});w.defineProperty(ht,{comments:"comments"},function(){return this.Ih},function(a){this.Ih!==a&&(w.j(a,"boolean",ht,"comments"),this.Ih=a,this.J())}); w.defineProperty(ht,{IA:"maxIterations"},function(){return this.cp},function(a){this.cp!==a&&(w.j(a,"number",ht,"maxIterations"),0<=a&&(this.cp=a,this.J()))});w.defineProperty(ht,{GE:"epsilonDistance"},function(){return this.sr},function(a){this.sr!==a&&(w.j(a,"number",ht,"epsilonDistance"),0b.toVertex.index&&(a.Xx(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.ns=0;for(d.reset();d.next();)b=d.value,0===b.lc.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.Qpb.toVertex.index&&(a.$x(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.ns=0;for(d.reset();d.next();)b=d.value,0===b.lc.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.Lf]&&(this.Vv=d[b]-1,this.Lf=b),d[b]d[this.Lf]&&(this.Wv=d[b]-1,this.Lf=b),d[b]c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.zg);a.zg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Hu(a,b,a.zg,-1,!0,!0),a.zg++);var f=0;b=[];for(f=0;fc)for(k=a.Jb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -ju.prototype.commitLayout=function(){if(this.tq)for(var a=vu(this,!0),b=vu(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.Uz();this.du&&this.commitLinks()};function vu(a,b){return 270===a.aa?b?Gc:Jc:90===a.aa?b?Jc:Gc:180===a.aa?b?Hc:Ic:b?Ic:Hc} +ju.prototype.commitLayout=function(){if(this.tq)for(var a=vu(this,!0),b=vu(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.Vz();this.eu&&this.commitLinks()};function vu(a,b){return 270===a.aa?b?Gc:Jc:90===a.aa?b?Jc:Gc:180===a.aa?b?Hc:Ic:b?Ic:Hc} ju.prototype.commitNodes=function(){this.vg=[];this.Kf=[];this.Jf=[];this.Nb=[];for(var a=0;a<=this.qb;a++)this.vg[a]=0,this.Kf[a]=0,this.Jf[a]=0,this.Nb[a]=0;for(a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;this.vg[c]=Math.max(this.vg[c],this.nodeMinLayerSpace(b,!0));this.Kf[c]=Math.max(this.Kf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.Hm,c=0;c<=this.qb;c++){var e=d;0>=this.vg[c]+this.Kf[c]&&(e=0);0=l.M.right)Yd=(0===this.aa?eb:-ib)/2;b.w( na,la+eb)):270===this.aa?(b.w(R++,na,la+eb),Q&&b.w(R++,na,la),b.w(R++,na,la-ib)):(b.w(R++,na-ib,la),Q&&b.w(R++,na,la),b.w(R++,na+eb,la));l=qa}$&&(Ua=b.l(R-1).x,lb=b.l(R-1).y,na=b.l(R).x,la=b.l(R).y,180===this.aa||0===this.aa?lb!==la&&(hb=0===this.aa?Math.min(Math.max((na+Ua)/2,this.Nb[m.layer]),na):Math.max(Math.min((na+Ua)/2,this.Nb[m.layer]),na),b.w(R++,hb,lb),b.w(R++,hb,la)):Ua!==na&&(hb=90===this.aa?Math.min(Math.max((la+lb)/2,this.Nb[m.layer]),la):Math.max(Math.min((la+lb)/2,this.Nb[m.layer]), la),b.w(R++,Ua,hb),b.w(R++,na,hb)))}if(null!==d&&Q){if(null!==h){if(b.computeSpot(!0)===tb){var ub=b.l(0),Ge=b.l(2);ub.L(Ge)||b.ea(1,(ub.x+Ge.x)/2,(ub.y+Ge.y)/2)}ba=b.getLinkPoint(e,h,tb,!0,!1,f,k);ba.H()||ba.set(e.W.Hl);b.ea(0,ba.x,ba.y)}null!==k&&(b.computeSpot(!1)===tb&&(ub=b.l(b.qa-1),Ge=b.l(b.qa-3),ub.L(Ge)||b.ea(b.qa-2,(ub.x+Ge.x)/2,(ub.y+Ge.y)/2)),ba=b.getLinkPoint(f,k,tb,!1,!1,e,h),ba.H()||ba.set(f.W.Hl),b.ea(b.qa-1,ba.x,ba.y))}b.jj();c.commit()}}}for(var gd=new I(W),bg=this.network.edges.i;bg.next();){var Df= bg.value.link;null!==Df&&Df.jc&&!gd.contains(Df)&&gd.add(Df)}if(0zc.y&&(Ef=Mc.y>zc.y?0:rd.xzc.y&&(Ef=Mc.y>zc.y?0:rd.xRb.x&&(ob=di.x>Rb.x?0:hd.yb.layer?1:a.Web.We?1:a.peb.pe?1:0:0};ju.prototype.aG=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.firstb.first||a.qib.qi||a.Web.We?1:a.peb.pe?1:0:0}; -ju.prototype.Zx=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.eeb.ee||a.qib.qi||a.Web.We?1:a.peb.pe?1:0:0};function gv(a,b){var c=a-b;return-1c}function xu(a,b){var c,d=a.he[b];if(d>=a.hh.length){c=[];for(var e=0;eb.ee||a.qib.qi||a.Web.We?1:a.peb.pe?1:0:0};function gv(a,b){var c=a-b;return-1c}function xu(a,b){var c,d=a.he[b];if(d>=a.hh.length){c=[];for(var e=0;ea&&(this.Yi=a,this.J()))});w.defineProperty(ju,{tq:"setsPortSpots"},function(){return this.Zh},function(a){this.Zh!==a&&(w.j(a,"boolean",ju,"setsPortSpots"),this.Zh=a,this.J())});w.defineProperty(ju,{vF:"linkSpacing"},function(){return this.Wr},function(a){this.Wr!==a&&(w.j(a,"number",ju,"linkSpacing"),0<=a&&(this.Wr=a,this.J()))});w.u(ju,{LI:"maxLayer"},function(){return this.qb}); -w.u(ju,{iL:"maxIndex"},function(){return this.Vv});w.u(ju,{hL:"maxColumn"},function(){return this.Jb});w.u(ju,{nL:"minIndexLayer"},function(){return this.es});w.u(ju,{jL:"maxIndexLayer"},function(){return this.Lf});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; +w.u(ju,{iL:"maxIndex"},function(){return this.Wv});w.u(ju,{hL:"maxColumn"},function(){return this.Jb});w.u(ju,{nL:"minIndexLayer"},function(){return this.es});w.u(ju,{jL:"maxIndexLayer"},function(){return this.Lf});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.pe=this.We=this.ee=this.first=this.layer=0;this.link=null;this.qi=0}w.$d(fv,{layer:!0,first:!0,ee:!0,We:!0,pe:!0,index:!0,link:!0,qi:!0});function pu(){sg.call(this)}w.La(pu,sg);w.fa("LayeredDigraphNetwork",pu);pu.prototype.createVertex=function(){return new hv};pu.prototype.createEdge=function(){return new iv}; function hv(){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.kn=0;this.OA=this.PA=null}w.La(hv,ms);w.fa("LayeredDigraphVertex",hv);function iv(){ns.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.La(iv,ns);w.fa("LayeredDigraphEdge",iv); -function Y(){0f?Zv(a,k,qa,B,y):$v(a,k,qa,B,y);qa=y.x;B=y.width;y=y.height;break;case Nv:for(m=0;ms&&($za&&(Jw(a,-za,0,gb,m-1),Kw(E,-za,0),Kw(V,-za,0),za=0)}n.pa.m(za,ca);B=Math.max(B,ba);y=Math.max(y,H+(0===R?0:x)+Ja.height);$=ba}else{0s&&(caza&&(Jw(a,0,-za,gb,m-1),Kw(E,0,-za),Kw(V,0,-za),za=0);n.pa.m($,za);y=Math.max(y,Q);B=Math.max(B,H+(0===R?0:x)+Ja.width);ca=Q}Ra++}0za&&(Jw(a,-za,0,gb,m-1),Kw(E,-za,0),Kw(V,-za,0),za=0)}n.pa.m(za,ca);B=Math.max(B,ba);y=Math.max(y,H+(0===R?0:x)+Ja.height);$=ba}else{0s&&(caza&&(Jw(a,0,-za,gb,m-1),Kw(E,0,-za),Kw(V,0,-za),za=0);n.pa.m($,za);y=Math.max(y,Q);B=Math.max(B,H+(0===R?0:x)+Ja.width);ca=Q}Ra++}0q&&(q=0),135v&&(v=0),p===Ov&&(l+=u/2+a.T.y),k+=d+c):b?(null===a.comments?d>B&&(p=Ow(p,d-B,0),k=p.x,l=p.y,B=d,q=0):B=Mw(a,B,q),0>q&&(k-=q,q=0),135y&&(p=Ow(p,0,e-y),k=p.x,l=p.y,y=e,v=0):y=Nw(a,y,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].xf[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].xd&&(d=c 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 z(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.If){case kv:for(a=b.lc;a.next();)b=a.value,b.fromVertex===e&&b.Fs.m(c,d);break;case rv:for(a=b.ic;a.next();)b=a.value,b.toVertex===e&&b.Fs.m(c,d);break;default:w.k("Unhandled path value "+a.If.toString())}}function Kw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m=l=0;lp.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;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 Xv(a){var b=Uv(a),b=90===b||270===b,c=a.layerSpacing;if(0CommandHandler Extensions:

  • LocalStorageCommandHandler.html, using LocalStorageCommandHandler.js -

    Builder Extensions:

    +

    Builder and Link Extensions:

    -

    Predefined:

    +

    Projects:

    +
      +
    • Floor Planner, in the projects/floorplanner/ folder +
    • A minimal Angular 2 sample, in the projects/angular2-mininal folder +
    • A Cordova project implementing the Logic Circuit sample, in the projects/cordova-circuit folder +
    • An Electron project implementing the Logic Circuit sample, in the projects/electron-circuit folder +
    • An NW.js project implementing the Logic Circuit sample, in the projects/nw-circuit folder +
    • A demonstration PhantomJS server-side project rendering a Logic Circuit diagram, in the projects/phantom-circuit folder +
    + +

    Predefined, built-in functionality:

    +

    See the samples index for a subset of this list with screenshots and short descriptions.

    diff --git a/samples/indexList.js b/samples/indexList.js index d1d8ba690..6757cef7f 100644 --- a/samples/indexList.js +++ b/samples/indexList.js @@ -1239,6 +1239,14 @@ arr.push([ ["links", "geometries", "extensions"] ]); +arr.push([ + "../extensions/ParallelRoute", + "Parallel Route Links", + "Demonstrates custom Links that route parallel to other Links between the same two ports.", + "ParallelRoute", + ["links", "geometries", "extensions"] +]); + arr.push([ "../extensions/Dimensioning", "Dimensioning", @@ -1296,7 +1304,7 @@ arr.push([ ]); arr.push([ - "../extensions/FloorPlanner", + "../projects/floorplanner/FloorPlanner", "Floor Planner", "An editor for users to create robust, detailed floor plans.", "FloorPlanner", @@ -1419,15 +1427,15 @@ arr.push([ arr.push([ "virtualizedTreeLayout", "Virtualized TreeLayout", - "Shows a virtualized TreeLayout, with TreeModel.", + "Shows a virtualized TreeLayout with TreeModel.", "virtualizedTree", ["collections", "treelayout", "customlayout", "tooltips", "performance"] ]); arr.push([ "virtualizedForceLayout", - "Virtualized ForceDirectedLayout", - "Shows a virtualized ForceDirectedLayout, with GraphLinksModel.", + "Virtualized ForceDirected Layout", + "Shows a virtualized ForceDirectedLayout with GraphLinksModel.", "virtualizedForceLayout", ["collections", "forcedirectedlayout", "customlayout", "tooltips", "performance"] ]); diff --git a/samples/treeMapper.html b/samples/treeMapper.html index 0e16151cd..0e3dd9a8e 100644 --- a/samples/treeMapper.html +++ b/samples/treeMapper.html @@ -91,7 +91,6 @@ $("TreeExpanderButton", // support expanding/collapsing subtrees { width: 14, height: 14, - portId: "", "ButtonIcon.stroke": "white", "ButtonIcon.strokeWidth": 2, "ButtonBorder.fill": "goldenrod", @@ -124,7 +123,7 @@ routing: go.Link.Orthogonal, fromEndSegmentLength: 4, toEndSegmentLength: 4, - fromSpot: go.Spot.Bottom, + fromSpot: new go.Spot(0.001, 1, 7, 0), toSpot: go.Spot.Left }, $(go.Shape,