diff --git a/api/index.html b/api/index.html index 3946eb6fa..632aba5f5 100644 --- a/api/index.html +++ b/api/index.html @@ -1125,7 +1125,7 @@
-Grids are implemented using a type of Panel, Panel.Grid. +Grids are implemented using a type of Panel, Panel,Grid. Grid Panels, like most other types of Panels, can be used within Nodes or any other kind of Part. However when they are used as the Diagram.grid, they are effectively infinite in extent.
@@ -36,8 +36,6 @@diagram.grid.visible = true; - diagram.initialContentAlignment = go.Spot.Center; - diagram.nodeTemplate = $(go.Node, "Auto", $(go.Shape, "Rectangle", { fill: "lightgray" }), @@ -61,7 +59,6 @@Grid Snapping
diagram.toolManager.draggingTool.isGridSnapEnabled = true; diagram.toolManager.resizingTool.isGridSnapEnabled = true; - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -87,7 +84,6 @@Simple Grid Customization
diagram.toolManager.draggingTool.isGridSnapEnabled = true; diagram.toolManager.resizingTool.isGridSnapEnabled = true; - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -106,7 +102,9 @@Simple Grid Customization
The cell size used when snapping the locations of Parts during a drag need not be exactly the same as the background grid's cell size. -The value of DraggingTool.gridSnapCellSize takes precedence over the Panel.gridCellSize. +The value of DraggingTool.gridSnapCellSize takes precedence over the Panel.gridCellSize. +Note that if DraggingTool.gridSnapCellSize is set but ResizingTool.cellSize is not, +Parts will use the DraggingTool.gridSnapCellSize value when resizing.
diagram.grid.visible = true; @@ -117,7 +115,6 @@Simple Grid Customization
// (the default background grid has a cell size of 10x10) diagram.toolManager.draggingTool.gridSnapCellSize = new go.Size(20, 20); - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -135,7 +132,7 @@Simple Grid Customization
Custom Grids
-Grid patterns are implemented by the Panel class when its Panel.type is Panel.Grid. +Grid patterns are implemented by the Panel class when its Panel.type is Panel,Grid. The elements of a Grid Panel must be Shapes whose Shape.figure is one of a small set of known kinds of figures. The only figures it can accept are: "LineH", "LineV", "BarH", and "BarV". The two "Line" figures result in stroked lines separating the grid cells; @@ -169,7 +166,6 @@
Custom Grids
$(go.Shape, "LineV", { stroke: "green", interval: 5 }) ); - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -224,7 +220,6 @@Custom Grids
$(go.Shape, "BarH", { fill: "lightgreen", interval: 2, height: 50 }) ); - diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", @@ -260,7 +255,6 @@Custom Grids
$(go.Shape, "BarH", { fill: "rgba(255,0,0,0.1)", height: 50 }) ); - diagram.initialContentAlignment = go.Spot.Center; diagram.toolManager.draggingTool.isGridSnapEnabled = true; diagram.nodeTemplate = @@ -283,7 +277,6 @@Custom Grids
Here is an example of using a "Grid" Panel as a regular data bound element in a Node:- diagram.initialContentAlignment = go.Spot.Center; diagram.nodeTemplate = $(go.Node, "Auto", diff --git a/learn/index.html b/learn/index.html index d724583b2..3ba8faf56 100644 --- a/learn/index.html +++ b/learn/index.html @@ -69,25 +69,25 @@Get Started with GoJS
-+ layout: $(go.TreeLayout, + { angle: 90, layerSpacing: 35 }) + }); + + // the template we defined earlier + myDiagram.nodeTemplate = + $(go.Node, "Horizontal", + { background: "#44CCFF" }, + $(go.Picture, + { margin: 10, width: 50, height: 50, background: "red" }, + new go.Binding("source")), + $(go.TextBlock, "Default Text", + { margin: 12, stroke: "white", font: "bold 16px sans-serif" }, + new go.Binding("text", "name")) + ); + + // define a Link template that routes orthogonally, with no arrowhead + myDiagram.linkTemplate = + $(go.Link, + { routing: go.Link.Orthogonal, corner: 5 }, + $(go.Shape, { strokeWidth: 3, stroke: "#555" })); // the link shape + + var model = $(go.TreeModel); + model.nodeDataArray = + [ + { key: "1", name: "Don Meow", source: "cat1.png" }, + { key: "2", parent: "1", name: "Demeter", source: "cat2.png" }, + { key: "3", parent: "1", name: "Copricat", source: "cat3.png" }, + { key: "4", parent: "3", name: "Jellylorum", source: "cat4.png" }, + { key: "5", parent: "3", name: "Alonzo", source: "cat5.png" }, + { key: "6", parent: "2", name: "Munkustrap", source: "cat6.png" } + ]; + myDiagram.model = model; + + +GoJS Tutorials
-For video tutorials, click here.
-For a GraphObject manipulation tutorial, click here.
-For the text tutorial, read on.
- -Text Tutorial
-- GoJS is a JavaScript library for implementing interactive diagrams. - This page will show you the essentials of using GoJS. - If you would rather watch videos instead, see our YouTube videos. -
- -- Because GoJS is a JavaScript library that depends on HTML5 features, - you will need to make sure that your page declares that it is an HTML5 document. - And of course you need to load the library: -
- -+
GoJS Tutorials
++ For video tutorials, click here. + For the textual tutorials, read on. +
+ ++ GoJS is a JavaScript library for implementing interactive diagrams. + This page will show you the essentials of using GoJS. + If you would rather watch videos instead, see our YouTube videos. +
+ ++ Because GoJS is a JavaScript library that depends on HTML5 features, + you will need to make sure that your page declares that it is an HTML5 document. + And of course you need to load the library: +
+ +-<!DOCTYPE html> <!-- HTML5 document type --> <html> <head> @@ -96,85 +96,85 @@
Text Tutorial
. . .- You can download GoJS (and all the samples) here. - Alternatively you can link straight to the GoJS library provided by CDNJS: +
+ You can download GoJS (and all the samples) here. + Alternatively you can link straight to the GoJS library provided by CDNJS: -
+- + -- Each GoJS diagram is contained in an HTML
+<div>
element in your - HTML page that you give an explicit size: -+ Each GoJS diagram is contained in an HTML
-<div>
element in your + HTML page that you give an explicit size: ++
-<!-- The DIV for a Diagram needs an explicit size or else we will not see anything. In this case we also add a background color so we can see that area. --> <div id="myDiagramDiv" style="width:400px; height:150px; background-color: #DAE4E4;"></div>
- In JavaScript code you pass the
+<div>
'sid
when making a Diagram: -+ In JavaScript code you pass the
-<div>
'sid
when making a Diagram: ++
-var $ = go.GraphObject.make; var myDiagram = $(go.Diagram, "myDiagramDiv");
- Together, this creates an empty diagram: -
- - - - - -- Notice that
-go
is the "namespace" in which all GoJS types reside. - All code uses of GoJS classes such as Diagram or Node or Panel or Shape or TextBlock - will be prefixed with "go.
". -- This article will show you by example how to use
- -go.GraphObject.make
to build GoJS objects. - For more detail, read Building Objects in GoJS. - Using$
as an abbreviation forgo.GraphObject.make
- is so handy that we will assume its use from now on. - If you use$
for something else in your code, - you can always pick a different short variable name, - such as$$
orMAKE
orGO
. -Diagrams and Models
- -- The Nodes and Links of a Diagram are visualizations of data that is managed by a Model. - GoJS has a model-view architecture, - where Models hold the data (arrays of JavaScript objects) that describe nodes and links, - and Diagrams act as views to visualize this data using actual Node and Link objects. - Models, not Diagrams, are what you load and then save after editing. - You add whatever properties you need for your app on the data objects in the model; - you do not add properties to or modify the prototype of the Diagram and GraphObject classes. -
- -- Here's an example of a Model and Diagram, followed by the actual diagram it generates: -
- -+
+ Together, this creates an empty diagram: +
+ + + + + ++ Notice that
+go
is the "namespace" in which all GoJS types reside. + All code uses of GoJS classes such as Diagram or Node or Panel or Shape or TextBlock + will be prefixed with "go.
". ++ This article will show you by example how to use
+ +go.GraphObject.make
to build GoJS objects. + For more detail, read Building Objects in GoJS. + Using$
as an abbreviation forgo.GraphObject.make
+ is so handy that we will assume its use from now on. + If you use$
for something else in your code, + you can always pick a different short variable name, + such as$$
orMAKE
orGO
. +Diagrams and Models
+ ++ The Nodes and Links of a Diagram are visualizations of data that is managed by a Model. + GoJS has a model-view architecture, + where Models hold the data (arrays of JavaScript objects) that describe nodes and links, + and Diagrams act as views to visualize this data using actual Node and Link objects. + Models, not Diagrams, are what you load and then save after editing. + You add whatever properties you need for your app on the data objects in the model; + you do not add properties to or modify the prototype of the Diagram and GraphObject classes. +
+ ++ Here's an example of a Model and Diagram, followed by the actual diagram it generates: +
+ +- - - - -var $ = go.GraphObject.make; var myDiagram = $(go.Diagram, "myDiagramDiv", @@ -192,78 +192,82 @@
Diagrams and Models
myDiagram.model = myModel;- The diagram displays the three nodes that are in the model. Some interaction is already possible: -
--
- -- Click and drag the background in the above diagram to pan the view.
-- Click a node to select it, or press down on and drag a node to move it around.
-- To create a selection box, click and hold on the background, then start dragging.
-- Use CTRL-C and CTRL-V, or control-drag-and-drop, to make a copy of the selection.
-- Press the Delete key to delete selected nodes. - (Read about more Keyboard Commands.)
-- Since the undo manager was enabled, CTRL-Z and CTRL-Y will undo and redo moves and copies and deletions.
-Styling Nodes
- -- Nodes are styled by creating templates consisting of GraphObjects and setting properties on those objects. - To create a Node, we have several building block classes at our disposal: -
--
- -- Shape, to display pre-defined or custom geometry with colors
-- TextBlock, to display (potentially editable) text in various fonts
-- Picture, to display images
-- Panel, containers to hold a collection of other objects that - can be positioned and sized in different manners according to the type of the Panel (like tables, - vertical stacks, and stretching containers)
-- All of these building blocks are derived from the - GraphObject abstract class, - so we casually refer to them as GraphObjects or objects or elements. - Note that a GraphObject is not an HTML DOM element, so there is not as much overhead in - creating or modifying such objects. -
- -- We want the model data properties to affect our Nodes, and this is done by way of data bindings. - Data bindings allow us to change the appearance and behavior of GraphObjects in Nodes by automatically setting - properties on those GraphObjects to values that are taken from the model data. - The model data objects are plain JavaScript objects. - You can choose to use whatever property names you like on the node data in the model. -
- -- The default Node template is simple: A Node which contains one TextBlock. - There is a data binding between a TextBlock's
- -text
property and - the model data'skey
property. - In code, the template looks something like this: -+ }); + + var myModel = $(go.Model); + // in the model data, each node is represented by a JavaScript object: + myModel.nodeDataArray = [ + { key: "Alpha" }, + { key: "Beta" }, + { key: "Gamma" } + ]; + myDiagram.model = myModel; + + +
+ The diagram displays the three nodes that are in the model. Some interaction is already possible: +
++
+ +- Click and drag the background in the above diagram to pan the view.
+- Click a node to select it, or press down on and drag a node to move it around.
+- To create a selection box, click and hold on the background, then start dragging.
+- Use CTRL-C and CTRL-V, or control-drag-and-drop, to make a copy of the selection.
+- + Press the Delete key to delete selected nodes. + (Read about more Keyboard Commands.) +
+- Since the undo manager was enabled, CTRL-Z and CTRL-Y will undo and redo moves and copies and deletions.
+Styling Nodes
+ ++ Nodes are styled by creating templates consisting of GraphObjects and setting properties on those objects. + To create a Node, we have several building block classes at our disposal: +
++
+ +- Shape, to display pre-defined or custom geometry with colors
+- TextBlock, to display (potentially editable) text in various fonts
+- Picture, to display images
+- + Panel, containers to hold a collection of other objects that + can be positioned and sized in different manners according to the type of the Panel (like tables, + vertical stacks, and stretching containers) +
++ All of these building blocks are derived from the + GraphObject abstract class, + so we casually refer to them as GraphObjects or objects or elements. + Note that a GraphObject is not an HTML DOM element, so there is not as much overhead in + creating or modifying such objects. +
+ ++ We want the model data properties to affect our Nodes, and this is done by way of data bindings. + Data bindings allow us to change the appearance and behavior of GraphObjects in Nodes by automatically setting + properties on those GraphObjects to values that are taken from the model data. + The model data objects are plain JavaScript objects. + You can choose to use whatever property names you like on the node data in the model. +
+ ++ The default Node template is simple: A Node which contains one TextBlock. + There is a data binding between a TextBlock's
+ +text
property and + the model data'skey
property. + In code, the template looks something like this: +-myDiagram.nodeTemplate = $(go.Node, $(go.TextBlock, @@ -271,17 +275,17 @@
Styling Nodes
new go.Binding("text", "key")) );- TextBlocks, Shapes, and Pictures are the primitive building blocks of GoJS. - TextBlocks cannot contain images; Shapes cannot contain text. - If you want your node to show some text, you must use a TextBlock. - If you want to draw or fill some geometrical figures, you must use a Shape. -
-- More generally, the skeleton of a Node template will look something like this: -
- -+
+ TextBlocks, Shapes, and Pictures are the primitive building blocks of GoJS. + TextBlocks cannot contain images; Shapes cannot contain text. + If you want your node to show some text, you must use a TextBlock. + If you want to draw or fill some geometrical figures, you must use a Shape. +
++ More generally, the skeleton of a Node template will look something like this: +
+ +-myDiagram.nodeTemplate = $(go.Node, "Vertical", // second argument of a Node/Panel can be a Panel type /* set Node properties here */ @@ -309,28 +313,29 @@
Styling Nodes
);- The nesting of GraphObjects within Panels can be arbitrarily deep, - and every class has its own unique set of properties to explore, - but this shows the general idea. -
- -- Now that we have seen how to make a Node template, let's see a live example. - We will make a simple template commonly seen in organizational diagrams — an image next to a name. - Consider the following Node template: -
--
- -- A Node of "Horizontal" Panel type, meaning that its elements will be laid out horizontally side-by-side. - It has two elements: -
--
-- A Picture for the portrait, with the image source data bound
-- A TextBlock for the name, with the text data bound
-+
+ The nesting of GraphObjects within Panels can be arbitrarily deep, + and every class has its own unique set of properties to explore, + but this shows the general idea. +
+ ++ Now that we have seen how to make a Node template, let's see a live example. + We will make a simple template commonly seen in organizational diagrams — an image next to a name. + Consider the following Node template: +
++
+ +- + A Node of "Horizontal" Panel type, meaning that its elements will be laid out horizontally side-by-side. + It has two elements: +
++
+- A Picture for the portrait, with the image source data bound
+- A TextBlock for the name, with the text data bound
+-var $ = go.GraphObject.make; var myDiagram = $(go.Diagram, "myDiagramDiv", @@ -370,79 +375,79 @@
Styling Nodes
myDiagram.model = model;That code produces this diagram:
+That code produces this diagram:
- - - - -- We may want to show some "default" state when not all information is present, - for instance when an image does not load or when a name is not known. - The "empty" node data in this example is used to show that node templates can work - perfectly well without any of the properties on the bound data. -
- -Kinds of Models
- -- With a custom node template our diagram is becoming a pretty sight, but perhaps we want to show more. - Perhaps we want an organizational chart to show that Don Meow is really the boss of a cat cartel. - So we will create a complete organization chart diagram by adding some Links to show the relationship - between individual nodes and a Layout to automatically position the nodes. -
- -- In order to get links into our diagram, the basic
- -Model
is not going to cut it. - We are going to have to pick one of the other two models in GoJS, both of which support Links. - These areGraphLinksModel
andTreeModel
. - (Read more about models here.) -- In GraphLinksModel, we have
- -model.linkDataArray
in addition to themodel.nodeDataArray
. - It holds an array of JavaScript objects, each describing a link by specifying the "to" and "from" node keys. - Here's an example where node A links to node B and where node B links to node C: -+ }); + + // define a simple Node template + myDiagram.nodeTemplate = + $(go.Node, "Horizontal", + // the entire node will have a light-blue background + { background: "#44CCFF" }, + $(go.Picture, + // the picture has a red background, only visible when there is no source set + // or when the image is partially transparent + { margin: 10, width: 50, height: 50, background: "red" }, + // Picture.source is data bound to the "source" attribute of model data: + new go.Binding("source")), + $(go.TextBlock, + "Default Text", // the initial value for TextBlock.text + // some room around the text, a larger font, and a white stroke + { margin: 12, stroke: "white", font: "bold 16px sans-serif" }, + // TextBlock.text is data bound to the "name" attribute of model data: + new go.Binding("text", "name")) + ); + + var model = $(go.Model); + model.nodeDataArray = + [ // note that each node data object holds whatever properties it needs; + // for this app we add the "name" and "source" properties + { name: "Don Meow", source: "cat1.png" }, + { name: "Copricat", source: "cat2.png" }, + { name: "Demeter", source: "cat3.png" }, + { /* Empty node data */ } + ]; + myDiagram.model = model; + + +
+ We may want to show some "default" state when not all information is present, + for instance when an image does not load or when a name is not known. + The "empty" node data in this example is used to show that node templates can work + perfectly well without any of the properties on the bound data. +
+ +Kinds of Models
+ ++ With a custom node template our diagram is becoming a pretty sight, but perhaps we want to show more. + Perhaps we want an organizational chart to show that Don Meow is really the boss of a cat cartel. + So we will create a complete organization chart diagram by adding some Links to show the relationship + between individual nodes and a Layout to automatically position the nodes. +
+ ++ In order to get links into our diagram, the basic
+ +Model
is not going to cut it. + We are going to have to pick one of the other two models in GoJS, both of which support Links. + These areGraphLinksModel
andTreeModel
. + (Read more about models here.) ++ In GraphLinksModel, we have
+ +model.linkDataArray
in addition to themodel.nodeDataArray
. + It holds an array of JavaScript objects, each describing a link by specifying the "to" and "from" node keys. + Here's an example where node A links to node B and where node B links to node C: +-var model = $(go.GraphLinksModel); model.nodeDataArray = [ @@ -458,20 +463,20 @@
Kinds of Models
myDiagram.model = model;- A GraphLinksModel allows you to have any number of links between nodes, going in any direction. - There could be ten links running from A to B, and three more running the opposite way, from B to A. -
++ A GraphLinksModel allows you to have any number of links between nodes, going in any direction. + There could be ten links running from A to B, and three more running the opposite way, from B to A. +
-- A TreeModel works a little differently. - Instead of maintaining a separate array of link data, - the links in a tree model are created by specifying a "parent" for a node data. - Links are then created from this association. - Here's the same example done as a TreeModel, with node A linking to node B and node B linking to node C: -
++ A TreeModel works a little differently. + Instead of maintaining a separate array of link data, + the links in a tree model are created by specifying a "parent" for a node data. + Links are then created from this association. + Here's the same example done as a TreeModel, with node A linking to node B and node B linking to node C: +
-+
-var model = $(go.TreeModel); model.nodeDataArray = [ @@ -482,19 +487,19 @@
Kinds of Models
myDiagram.model = model;- TreeModel is simpler than GraphLinksModel, but it cannot make arbitrary link relationships, - such as multiple links between the same two nodes, or having multiple parents. - Our organizational diagram is a simple hierarchical tree-like structure, - so we will choose TreeModel for this example. -
++ TreeModel is simpler than GraphLinksModel, but it cannot make arbitrary link relationships, + such as multiple links between the same two nodes, or having multiple parents. + Our organizational diagram is a simple hierarchical tree-like structure, + so we will choose TreeModel for this example. +
-- First, we will complete the data by adding a few more nodes, using a TreeModel, - and specifying keys and parents in the data. -
++ First, we will complete the data by adding a few more nodes, using a TreeModel, + and specifying keys and parents in the data. +
-+
- - - - -var $ = go.GraphObject.make; var myDiagram = $(go.Diagram, "myDiagramDiv", @@ -528,84 +533,84 @@
Kinds of Models
myDiagram.model = model;Diagram Layouts
- -- As you can see the TreeModel automatically creates the necessary Links to associate the Nodes, - but it's hard to tell whose parent is who. -
- -- Diagrams have a default layout which takes all nodes that do not have a location and gives them locations, - arranging them in a grid. - We could explicitly give each of our nodes a location to sort out this organizational mess, - but as an easier solution in our case, we will use a layout that gives us good locations automatically. -
- -- We want to show a hierarchy, and are already using a TreeModel, so the most natural layout choice is TreeLayout. - TreeLayout defaults to flowing from left to right, so to get it to flow from top to bottom - (as is common in organizational diagrams), we will set the
- -angle
property to 90. -- Using layouts in GoJS is usually simple. - Each kind of layout has a number of properties that affect the results. - There are samples for each layout (like TreeLayout Demo) - that showcase its properties. -
- -+ }); + + // the template we defined earlier + myDiagram.nodeTemplate = + $(go.Node, "Horizontal", + { background: "#44CCFF" }, + $(go.Picture, + { margin: 10, width: 50, height: 50, background: "red" }, + new go.Binding("source")), + $(go.TextBlock, "Default Text", + { margin: 12, stroke: "white", font: "bold 16px sans-serif" }, + new go.Binding("text", "name")) + ); + + var model = $(go.TreeModel); + model.nodeDataArray = + [ + { key: "1", name: "Don Meow", source: "cat1.png" }, + { key: "2", parent: "1", name: "Demeter", source: "cat2.png" }, + { key: "3", parent: "1", name: "Copricat", source: "cat3.png" }, + { key: "4", parent: "3", name: "Jellylorum", source: "cat4.png" }, + { key: "5", parent: "3", name: "Alonzo", source: "cat5.png" }, + { key: "6", parent: "2", name: "Munkustrap", source: "cat6.png" } + ]; + myDiagram.model = model; + + +
Diagram Layouts
+ ++ As you can see the TreeModel automatically creates the necessary Links to associate the Nodes, + but it's hard to tell whose parent is who. +
+ ++ Diagrams have a default layout which takes all nodes that do not have a location and gives them locations, + arranging them in a grid. + We could explicitly give each of our nodes a location to sort out this organizational mess, + but as an easier solution in our case, we will use a layout that gives us good locations automatically. +
+ ++ We want to show a hierarchy, and are already using a TreeModel, so the most natural layout choice is TreeLayout. + TreeLayout defaults to flowing from left to right, so to get it to flow from top to bottom + (as is common in organizational diagrams), we will set the
+ +angle
property to 90. ++ Using layouts in GoJS is usually simple. + Each kind of layout has a number of properties that affect the results. + There are samples for each layout (like TreeLayout Demo) + that showcase its properties. +
+ +-// define a TreeLayout that flows from top to bottom myDiagram.layout = $(go.TreeLayout, { angle: 90, layerSpacing: 35 });
- GoJS has several other layouts, which you can read about here. -
++ GoJS has several other layouts, which you can read about here. +
-- Adding the layout to the diagram and model so far, we can see our results: -
++ Adding the layout to the diagram and model so far, we can see our results: +
-+
- - - - -var $ = go.GraphObject.make; var myDiagram = $(go.Diagram, "myDiagramDiv", @@ -640,62 +645,62 @@
Diagram Layouts
myDiagram.model = model;- Our diagram is starting to look like a proper organization chart, but we could do better with the links. -
- -Link Templates
- -- We will construct a new Link template that will better suit our wide, boxy nodes. - A Link is a different kind of Part, not like a Node. - The main element of a Link is the Link's shape, - and must be a Shape that will have its geometry computed dynamically by GoJS. - Our link is going to consist of just this shape, - with its stroke a little thicker than normal and dark gray instead of black. - Unlike the default link template we will not have an arrowhead. - And we will change the Link
- -routing
property from Normal to Orthogonal, - and give it acorner
value so that right-angle turns are rounded. -+ layout: $(go.TreeLayout, // specify a Diagram.layout that arranges trees + { angle: 90, layerSpacing: 35 }) + }); + + // the template we defined earlier + myDiagram.nodeTemplate = + $(go.Node, "Horizontal", + { background: "#44CCFF" }, + $(go.Picture, + { margin: 10, width: 50, height: 50, background: "red" }, + new go.Binding("source")), + $(go.TextBlock, "Default Text", + { margin: 12, stroke: "white", font: "bold 16px sans-serif" }, + new go.Binding("text", "name")) + ); + + var model = $(go.TreeModel); + model.nodeDataArray = + [ + { key: "1", name: "Don Meow", source: "cat1.png" }, + { key: "2", parent: "1", name: "Demeter", source: "cat2.png" }, + { key: "3", parent: "1", name: "Copricat", source: "cat3.png" }, + { key: "4", parent: "3", name: "Jellylorum", source: "cat4.png" }, + { key: "5", parent: "3", name: "Alonzo", source: "cat5.png" }, + { key: "6", parent: "2", name: "Munkustrap", source: "cat6.png" } + ]; + myDiagram.model = model; + + +
+ Our diagram is starting to look like a proper organization chart, but we could do better with the links. +
+ +Link Templates
+ ++ We will construct a new Link template that will better suit our wide, boxy nodes. + A Link is a different kind of Part, not like a Node. + The main element of a Link is the Link's shape, + and must be a Shape that will have its geometry computed dynamically by GoJS. + Our link is going to consist of just this shape, + with its stroke a little thicker than normal and dark gray instead of black. + Unlike the default link template we will not have an arrowhead. + And we will change the Link
+ +routing
property from Normal to Orthogonal, + and give it acorner
value so that right-angle turns are rounded. +-// define a Link template that routes orthogonally, with no arrowhead myDiagram.linkTemplate = $(go.Link, @@ -709,13 +714,13 @@
Link Templates
);- Combining our Link template with our Node template, TreeModel, and TreeLayout, - we finally have a full organization diagram. - The complete code is repeated below, and the resulting diagram follows: -
++ Combining our Link template with our Node template, TreeModel, and TreeLayout, + we finally have a full organization diagram. + The complete code is repeated below, and the resulting diagram follows: +
-+
- - - - -var $ = go.GraphObject.make; var myDiagram = @@ -757,62 +762,65 @@
Link Templates
myDiagram.model = model;- Now that you are familiar with some of the basics of GoJS, - consider perusing the samples to see some of the diagrams possible with GoJS, - or read the technical introduction to get - an in-depth look at the components of GoJS. -
- - - - -Learn More
++ You may want to read more tutorials, such as the GraphObject manipulation tutorial. + You can also watch tutorials on YouTube. +
++ Also consider perusing the samples to see some of the diagrams possible with GoJS, + or read the technical introduction to get + an in-depth look at the components of GoJS. +
+ + + + diff --git a/package.json b/package.json index dfa4824d0..a305fede1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gojs", - "version": "1.8.17", + "version": "1.8.18", "description": "Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams", "keywords": [ "diagram", "chart", "tree", "flowchart", "orgchart", "uml", "bpmn", "graphics", "editor", "inspector", "drawing", "canvas", "shape", "svg", "hierarchy", "node", "link", "group", "vertex", "edge", "connection", "port", "label", "arrowhead", "family-tree", "decision-tree", "mindmap", "tournament", "treeview", "pipe-tree", "genogram", "ivr-tree", "parse-tree", "concept-map", "euler", "visualization", "entity-relationship", "er-diagram", "friend-wheel", "radial", "graph-distances", "graph-paths", "sankey", "pert", "gantt", "timeline", "monitor", "layer", "swimlane", "spreadsheet", "virtualization", "flow", "process", "state", "sequential-function", "grafcet", "sequence", "circuit", "record", "field", "table", "dataflow", "data-flow", "planogram", "seating", "pipes", "overview", "palette", "comment", "layout", "grid-layout", "tree-layout", "force-directed", "layered", "hierarchical", "circular", "fishbone", "ishikawa", "parallel", "serpentine", "treemap", "tree-map", "freehand", "polygon", "polyline", "bezier", "panel", "view", "model", "databinding", "data-binding", "binding", "transaction", "coordinates", "subgraph", "selection", "highlight", "tooltip", "context-menu", "tool", "command", "validation", "button", "template", "legend", "grid", "printing" ], "homepage": "https://gojs.net", diff --git a/release/go-debug.js b/release/go-debug.js index 7a2577b32..a83d85da9 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,9 +1,9 @@ /* - * GoJS v1.8.17 JavaScript Library for HTML Diagrams + * GoJS v1.8.18 JavaScript Library for HTML Diagrams * Northwoods Software, https://www.nwoods.com/ * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. * Copyright (C) 1998-2018 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.8.17/doc/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.8.18/doc/license.html. */ (function(window) { var f,ca={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript"); Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return g.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),g=this;c.prototype=this.prototype;b.prototype=new c;return b}); @@ -43,7 +43,7 @@ c).trim();if(""!==b)return a.vz=b}else if(D.Qa(a)&&a.constructor)return D.yf(a.c (c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){v&&D.trace("property get error: "+d.toString())}return c},Ua:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){v&&D.trace("property set error: "+d.toString())}},nv:function(a,b){D.h(a,"object","Setting properties requires Objects as arguments");D.h(b,"object","Setting properties requires Objects as arguments");var c=a instanceof x,d=a instanceof E,e;for(e in b){""=== e&&D.k("Setting properties requires non-empty property names");var g=a,h=e;if(c||d){var k=e.indexOf(".");if(0c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0, -g="",h=0;h c;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;c c;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;c d;d++)b[D.Wg("7ca11abfd7330390")](D.Wg(c[d-1]),10,15*d+0);b[D.Wg("7ca11abfd022028846")]=D.Wg("39f046ebb36e4b");for(d=1;5>d;d++)b[D.Wg("7ca11abfd7330390")](D.Wg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])D.s=function(a,b){var c=new ya(a,b,2);Object.freeze(c);a[b]=c;var d=a.Av;d instanceof na||(d=new na("string",ya),a.Av=d);d.add(b,c);return c};return a}();function ya(a,b,c){D.xc(this);this.NC=a;this.ac=b;this.SH=c}D.ka("EnumValue",ya);ya.prototype.toString=function(){return D.yf(this.NC)+"."+this.ac};D.w(ya,{Re:"classType"},function(){return this.NC});D.w(ya,{name:"name"},function(){return this.ac});D.w(ya,{value:"value"},function(){return this.SH}); @@ -198,713 +198,713 @@ hd.prototype.copy=function(){var a=new hd;a.bc[0]=this.bc[0];a.bc[1]=this.bc[1]; id.prototype.addColorStop=function(a,b){this.gF.push({offset:a,color:b})}; function qd(a,b,c){this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.eo=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.strokeStyle="#000000";this.textAlign="start";this.eq=!1;this.Pg=this.Gt=this.Ft=0;this.document=b||document;this.AF=c;this.ny=null;this.path=[];this.Mh=new hd;this.stack=[];this.zf=[];this.Sx=a;this.WJ="http://www.w3.org/2000/svg"; this.width=this.Sx.width;this.height=this.Sx.height;this.Gm=rd(this,"svg",{width:this.width+"px",height:this.height+"px",viewBox:"0 0 "+this.Sx.width+" "+this.Sx.height});this.Gm.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg");this.Gm.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");sd(this,1,0,0,1,0,0);a=D.Mm++;b=rd(this,"clipPath",{id:"mainClip"+a});b.appendChild(rd(this,"rect",{x:0,y:0,width:this.width,height:this.height})); -this.Gm.appendChild(b);this.zf[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}f=qd.prototype;f.arc=function(a,b,c,d,e,g){td(this,a,b,c,d,e,g)};f.beginPath=function(){this.path=[]};f.bezierCurveTo=function(a,b,c,d,e,g){this.path.push(["C",a,b,c,d,e,g])};f.clearRect=function(){};f.clip=function(){ud(this,"clipPath",this.path,new hd)};f.closePath=function(){this.path.push(["z"])};f.createLinearGradient=function(a,b,c,d){var e=new id("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -f.createPattern=function(){return null};f.createRadialGradient=function(a,b,c,d,e,g){var h=new id("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=e;h.r2=g;return h}; +this.Gm.appendChild(b);this.zf[0].setAttributeNS(null,"clip-path","url(#mainClip"+a+")")}f=qd.prototype;f.arc=function(a,b,c,d,e,g){var h=2*Math.PI,k=c*Math.cos(d),l=c*Math.sin(d),m=a+k,n=b+l,p=g?0:1;d=g?d-e:e-d;0>d&&(d=d%h+h);d>h-1E-6?(this.path.push(["A",c,c,0,1,p,a-k,b-l]),this.path.push(["A",c,c,0,1,p,m,n])):1E-6 =Math.PI),p,a+c*Math.cos(e),b+c*Math.sin(e)])};f.beginPath=function(){this.path=[]}; +f.bezierCurveTo=function(a,b,c,d,e,g){this.path.push(["C",a,b,c,d,e,g])};f.clearRect=function(){};f.clip=function(){td(this,"clipPath",this.path,new hd)};f.closePath=function(){this.path.push(["z"])};f.createLinearGradient=function(a,b,c,d){var e=new id("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e};f.createPattern=function(){return null};f.createRadialGradient=function(a,b,c,d,e,g){var h=new id("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=e;h.r2=g;return h}; f.drawImage=function(a,b,c,d,e,g,h,k,l){var m="";a instanceof HTMLCanvasElement&&(m=a.toDataURL());a instanceof HTMLImageElement&&(m=a.src);void 0===d&&(g=b,h=c,k=d=a.naturalWidth,l=e=a.naturalHeight);d=d||0;e=e||0;g=g||0;h=h||0;k=k||0;l=l||0;m={x:0,y:0,width:a.naturalWidth,height:a.naturalHeight,href:m,preserveAspectRatio:"xMidYMid slice"};Eb(d,k)&&Eb(e,l)||(m.preserveAspectRatio="none");var n="";k/=d;l/=e;if(0!==g||0!==h)n+=" translate("+g+", "+h+")";if(1!==k||1!==l)n+=" scale("+k+", "+l+")";if(0!== -b||0!==c)n+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==a.naturalWidth||e!==a.naturalHeight)a="CLIP"+D.Mm++,g=rd(this,"clipPath",{id:a}),g.appendChild(rd(this,"rect",{x:b,y:c,width:d,height:e})),this.Gm.appendChild(g),m["clip-path"]="url(#"+a+")";Ed(this,"image",m,this.Mh,n);this.addElement("image",m)};f.fill=function(){ud(this,"fill",this.path,this.Mh)};f.Xg=function(){this.eq?this.clip():this.fill()};f.fillRect=function(a,b,c,d){Fd(this,"fill",[a,b,c,d],this.Mh)}; -f.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};Ed(this,"fill",b,this.Mh);this.addElement("text",b,a[0])};f.lineTo=function(a,b){this.path.push(["L",a,b])};f.moveTo=function(a,b){this.path.push(["M",a,b])};f.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};f.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; +b||0!==c)n+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==a.naturalWidth||e!==a.naturalHeight)a="CLIP"+D.Mm++,g=rd(this,"clipPath",{id:a}),g.appendChild(rd(this,"rect",{x:b,y:c,width:d,height:e})),this.Gm.appendChild(g),m["clip-path"]="url(#"+a+")";ud(this,"image",m,this.Mh,n);this.addElement("image",m)};f.fill=function(){td(this,"fill",this.path,this.Mh)};f.Xg=function(){this.eq?this.clip():this.fill()};f.fillRect=function(a,b,c,d){Ed(this,"fill",[a,b,c,d],this.Mh)}; +f.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};ud(this,"fill",b,this.Mh);this.addElement("text",b,a[0])};f.lineTo=function(a,b){this.path.push(["L",a,b])};f.moveTo=function(a,b){this.path.push(["M",a,b])};f.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};f.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; f.restore=function(){this.Mh=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.eo=a.eo;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign}; f.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,eo:this.eo,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;b b.offset?1:-1});for(k=0;k =2*Math.PI?(td(a,b,c,d,e,e+Math.PI,h),td(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,g])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,g]))}}function sd(a,b,c,d,e,g,h){var k=new hd;k.bc=[b,c,d,e,g,h];b={};Ed(a,"g",b,k);k=a.addElement("g",b);a.zf.push(k)} +return"url(#"+c+")"}function Ed(a,b,c,d){c={x:c[0],y:c[1],width:c[2],height:c[3]};ud(a,b,c,d);a.addElement("rect",c)} +function td(a,b,c,d){for(var e=[],g=0;g b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.vr?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.vr?this.clip():this.fill()}; -f.Zj=function(){this.vr||this.stroke()};D.defineProperty(Hd,{eq:"clipInsteadOfFill"},function(){return this.vr},function(a){this.vr=a});f=Hd.prototype;f.fC=function(a,b,c){this.Ft=a;this.Gt=b;this.Pg=c};f.Em=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.xo=function(){this.shadowOffsetX=this.Ft;this.shadowOffsetY=this.Gt;this.shadowBlur=this.Pg}; +f.quadraticCurveTo=function(a,b,c,d){this.za.quadraticCurveTo(a,b,c,d)};f.rect=function(a,b,c,d){this.za.rect(a,b,c,d)};f.restore=function(){this.za.restore()};Gd.prototype.rotate=function(a){this.za.rotate(a)};f=Gd.prototype;f.save=function(){this.za.save()};f.setTransform=function(a,b,c,d,e,g){this.za.setTransform(a,b,c,d,e,g)};f.scale=function(a,b){this.za.scale(a,b)};f.stroke=function(){this.za.stroke()}; +f.transform=function(a,b,c,d,e,g){1===a&&0===b&&0===c&&1===d&&0===e&&0===g||this.za.transform(a,b,c,d,e,g)};f.translate=function(a,b){this.za.translate(a,b)};f.Xg=function(a){if(a instanceof Ba&&a.type===Hd){var b=a.Mo;a=a.xz;a>b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.vr?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.vr?this.clip():this.fill()}; +f.Zj=function(){this.vr||this.stroke()};D.defineProperty(Gd,{eq:"clipInsteadOfFill"},function(){return this.vr},function(a){this.vr=a});f=Gd.prototype;f.fC=function(a,b,c){this.Ft=a;this.Gt=b;this.Pg=c};f.Em=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.xo=function(){this.shadowOffsetX=this.Ft;this.shadowOffsetY=this.Gt;this.shadowBlur=this.Pg}; f.YA=function(a,b){var c=this.za;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else return!1;return!0};f.TA=function(){var a=this.za;void 0!==a.setLineDash?(a.setLineDash(D.ml),a.lineDashOffset=0):void 0!==a.webkitLineDash&&(a.webkitLineDash=D.ml,a.webkitLineDashOffset=0)};f.De=function(a){a&&(this.rz="");this.qz=this.sz=""}; -var Jd=(Math.sqrt(2)-1)/3*4,Kd=(new N(0,0)).Oa(),Ld=(new C(0,0,0,0)).Oa(),Sd=(new Lb(0,0,0,0)).Oa(),Td=(new Lb(2,2,2,2)).Oa(),Ud=(new N(6,6)).Oa(),Vd=(new N(-Infinity,-Infinity)).Oa(),Wd=(new N(Infinity,Infinity)).Oa(),Xd=(new Ca(0,0)).Oa(),Yd=(new Ca(1,1)).Oa(),Zd=(new Ca(6,6)).Oa(),$d=(new Ca(8,8)).Oa(),ae=(new Ca(10,10)).Oa(),ge=(new Ca(Infinity,Infinity)).Oa(),he=(new N(NaN,NaN)).Oa(),ie=(new Ca(NaN,NaN)).Oa(),je=(new C(NaN,NaN,NaN,NaN)).Oa(),ke=(new S(.156,.156)).Oa(),le=(new S(.844,.844)).Oa(), -me=new ma,ne=new ma,oe=null;function pe(a){if(0>=a)return 0;var b=oe;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);oe=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function Q(a,b){var c=a-b;return.5>c&&-.5 c&&-5E-8 =e&&(e=1E-6);var k=0,l=0,m=0,n=0;a m-n)if(a-c>e||c-a>e){if(g=(d-b)/(c-a)*(g-a)+b,g-e<=h&&h<=g+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=g&&g<=h+e)return!0}else return!0;return!1} -function re(a,b,c,d,e,g,h,k,l,m,n,p){if(qe(a,b,h,k,p,c,d)&&qe(a,b,h,k,p,e,g))return qe(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+g)/2,t=(d+s)/2,y=(c+u)/2;return re(a,b,q,r,d,c,t,y,l,m,n,p)||re(t,y,s,u,e,g,h,k,l,m,n,p)} -function Ae(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,h,k,l,c,d)&&qe(a,b,h,k,l,e,g))Ub(m,a,b,0,0),Ub(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Ae(a,b,n,p,d,c,s,u,l,m);Ae(s,u,q,r,e,g,h,k,l,m)}} -function Be(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,h,k,l,c,d)&&qe(a,b,h,k,l,e,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Be(a,b,n,p,d,c,s,u,l,m);Be(s,u,q,r,e,g,h,k,l,m)}} -function Ce(a,b,c,d,e,g,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+g*l;e=e*s+h*l;g=g*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+g*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=g}function De(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,e,g,m,c,d))return qe(a,b,e,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return De(a,b,n,p,q,r,h,k,l,m)||De(q,r,c,d,e,g,h,k,l,m)} -function Ee(a,b,c,d,e,g,h,k){if(qe(a,b,e,g,h,c,d))Ub(k,a,b,0,0),Ub(k,e,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Ee(a,b,l,m,n,p,h,k);Ee(n,p,c,d,e,g,h,k)}}function Fe(a,b,c,d,e,g,h,k){if(qe(a,b,e,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Fe(a,b,l,m,n,p,h,k);Fe(n,p,c,d,e,g,h,k)}} -function Ge(a,b,c,d,e,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(qe(a,b,h,k,q,c,d)&&qe(a,b,h,k,q,e,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,b h)return!1}else if(a h)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+g)/2;e=(e+h)/2;g=(g+k)/2;var t=(s+c)/2,y=(u+d)/2;c=(c+e)/2;d=(d+g)/2;var w=(t+c)/2,A=(y+d)/2, -B=(n-l)*(n-l)+(p-m)*(p-m),P=!1;Ge(a,b,s,u,t,y,w,A,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(qe(a,b,h,k,q,c,d)&&qe(a,b,h,k,q,e,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,b a)return r}else if(a a)return r;0 q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,y=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(s+t)/2;c=(u+y)/2;var t=(t+e)/2,y=(y+g)/2, -w=(d+t)/2,A=(c+y)/2,r=r+He(a,b,s,u,d,c,w,A,l,m,n,p,q),r=r+He(w,A,t,y,e,g,h,k,l,m,n,p,q)}return r} +var Id=(Math.sqrt(2)-1)/3*4,Jd=(new N(0,0)).Oa(),Kd=(new C(0,0,0,0)).Oa(),Ld=(new Lb(0,0,0,0)).Oa(),Sd=(new Lb(2,2,2,2)).Oa(),Td=(new N(6,6)).Oa(),Ud=(new N(-Infinity,-Infinity)).Oa(),Vd=(new N(Infinity,Infinity)).Oa(),Wd=(new Ca(0,0)).Oa(),Xd=(new Ca(1,1)).Oa(),Yd=(new Ca(6,6)).Oa(),Zd=(new Ca(8,8)).Oa(),$d=(new Ca(10,10)).Oa(),ae=(new Ca(Infinity,Infinity)).Oa(),ge=(new N(NaN,NaN)).Oa(),he=(new Ca(NaN,NaN)).Oa(),ie=(new C(NaN,NaN,NaN,NaN)).Oa(),je=(new S(.156,.156)).Oa(),ke=(new S(.844,.844)).Oa(), +le=new ma,me=new ma,ne=null;function oe(a){if(0>=a)return 0;var b=ne;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);ne=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function Q(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8 =e&&(e=1E-6);var k=0,l=0,m=0,n=0;a m-n)if(a-c>e||c-a>e){if(g=(d-b)/(c-a)*(g-a)+b,g-e<=h&&h<=g+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=g&&g<=h+e)return!0}else return!0;return!1} +function qe(a,b,c,d,e,g,h,k,l,m,n,p){if(pe(a,b,h,k,p,c,d)&&pe(a,b,h,k,p,e,g))return pe(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+g)/2,t=(d+s)/2,y=(c+u)/2;return qe(a,b,q,r,d,c,t,y,l,m,n,p)||qe(t,y,s,u,e,g,h,k,l,m,n,p)} +function re(a,b,c,d,e,g,h,k,l,m){if(pe(a,b,h,k,l,c,d)&&pe(a,b,h,k,l,e,g))Ub(m,a,b,0,0),Ub(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;re(a,b,n,p,d,c,s,u,l,m);re(s,u,q,r,e,g,h,k,l,m)}} +function Ae(a,b,c,d,e,g,h,k,l,m){if(pe(a,b,h,k,l,c,d)&&pe(a,b,h,k,l,e,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Ae(a,b,n,p,d,c,s,u,l,m);Ae(s,u,q,r,e,g,h,k,l,m)}} +function Be(a,b,c,d,e,g,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+g*l;e=e*s+h*l;g=g*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+g*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=g}function Ce(a,b,c,d,e,g,h,k,l,m){if(pe(a,b,e,g,m,c,d))return pe(a,b,e,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return Ce(a,b,n,p,q,r,h,k,l,m)||Ce(q,r,c,d,e,g,h,k,l,m)} +function De(a,b,c,d,e,g,h,k){if(pe(a,b,e,g,h,c,d))Ub(k,a,b,0,0),Ub(k,e,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;De(a,b,l,m,n,p,h,k);De(n,p,c,d,e,g,h,k)}}function Ee(a,b,c,d,e,g,h,k){if(pe(a,b,e,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Ee(a,b,l,m,n,p,h,k);Ee(n,p,c,d,e,g,h,k)}} +function Fe(a,b,c,d,e,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(pe(a,b,h,k,q,c,d)&&pe(a,b,h,k,q,e,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,b h)return!1}else if(a h)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+g)/2;e=(e+h)/2;g=(g+k)/2;var t=(s+c)/2,y=(u+d)/2;c=(c+e)/2;d=(d+g)/2;var w=(t+c)/2,A=(y+d)/2, +B=(n-l)*(n-l)+(p-m)*(p-m),P=!1;Fe(a,b,s,u,t,y,w,A,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(pe(a,b,h,k,q,c,d)&&pe(a,b,h,k,q,e,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,b a)return r}else if(a a)return r;0 q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,y=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(s+t)/2;c=(u+y)/2;var t=(t+e)/2,y=(y+g)/2, +w=(d+t)/2,A=(c+y)/2,r=r+Ge(a,b,s,u,d,c,w,A,l,m,n,p,q),r=r+Ge(w,A,t,y,e,g,h,k,l,m,n,p,q)}return r} function db(a,b,c,d,e,g,h){if(Eb(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(Eb(b,d)){a c)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-g)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005 c)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(Eb(k,h))return db(a,b,c,d,e,g,l),!1;e=(h*a-k*e+g-b)/(h-k);if(Eb(h,0)){a c)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}g= -h*(e-a)+b;return db(a,b,c,d,e,g,l)}function Je(a,b,c,d,e,g,h,k,l){var m=1E21,n=a,p=b;if(Ie(a,b,a,d,e,g,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g);q m} -function Ke(a,b,c,d,e,g,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(g-k)/m,h=a,n=k*h+(g-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(g-k)/m,a=b-d*a,h=(g-k*e-a)/(d-k),n=d*h+a);l.n(h,n);return l} -function Le(a,b,c){var d=b.x,e=b.y,g=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===g?(g=a=0,e =m):e===h?(d =k):a.Pa(b)||a.Pa(c)||Pe(k,m,l,m,d,e,g,h)||Pe(l,m,l,n,d,e,g,h)||Pe(l,n,k,n,d,e,g,h)||Pe(k,n,k,m,d,e,g,h)?!0:!1}function Pe(a,b,c,d,e,g,h,k){return 0>=Qe(a,b,c,d,e,g)*Qe(a,b,c,d,h,k)&&0>=Qe(e,g,h,k,a,b)*Qe(e,g,h,k,c,d)} -function Qe(a,b,c,d,e,g){c-=a;d-=b;a=e-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0 g&&(g=0)));return 0>g?-1:0 a&&(a+=360);360<=a&&(a-=360);return a} -function Se(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);var g=b>c?-1:1;d=[];var h=e/2,k=b;c=Math.min(2*e,Math.abs(c-b));if(1E-5>c)return b=k+g*Math.min(c,h),g=0+a*Math.cos(k),k=0+a*Math.sin(k),h=0+a*Math.cos(b),a=0+a*Math.sin(b),b=(g+h)/2,c=(k+a)/2,d.push([g,k,b,c,b,c,h,a]),d;for(;1E-5 c,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(0 k)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,a a?"M"+this.la.toString()+" "+this.ja.toString()+"L"+this.F.toString()+" "+this.G.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a)+"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);case tf:var b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ -"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case uf:b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ -2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case We:for(var b="",c=this.nc.o,d=c.length,e=0;e
=P-1?!0:null!==l[t+1].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)}function d(){t++;return l[t]}function e(){var a=new N(parseFloat(d()),parseFloat(d()));y===y.toLowerCase()&&(a.x=B.x+a.x,a.y=B.y+a.y);return a}function g(){return B=e()}function h(){return A=e()}function k(){return"c"!==w.toLowerCase()&&"s"!==w.toLowerCase()?B:new N(2*B.x-A.x,2*B.y-A.y)}void 0===b&&(b=!1);"string"!==typeof a&&D.kc(a,"string",Ve,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, +function He(a,b,c,d,e,g,h,k,l){if(Q(a,c)&&Q(b,d))return l.x=a,l.y=b,!1;if(Eb(e,h)){if(Eb(a,c))return db(a,b,c,d,e,g,l),!1;g=(d-b)/(c-a)*(e-a)+b;return db(a,b,c,d,e,g,l)}k=(k-g)/(h-e);if(Eb(a,c)){g=k*(a-e)+g;c=h=0;b c)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(Eb(k,h))return db(a,b,c,d,e,g,l),!1;e=(h*a-k*e+g-b)/(h-k);if(Eb(h,0)){a c)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}g= +h*(e-a)+b;return db(a,b,c,d,e,g,l)}function Ie(a,b,c,d,e,g,h,k,l){var m=1E21,n=a,p=b;if(He(a,b,a,d,e,g,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g);q m} +function Je(a,b,c,d,e,g,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(g-k)/m,h=a,n=k*h+(g-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(g-k)/m,a=b-d*a,h=(g-k*e-a)/(d-k),n=d*h+a);l.n(h,n);return l} +function Ke(a,b,c){var d=b.x,e=b.y,g=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===g?(g=a=0,e =m):e===h?(d =k):a.Pa(b)||a.Pa(c)||Le(k,m,l,m,d,e,g,h)||Le(l,m,l,n,d,e,g,h)||Le(l,n,k,n,d,e,g,h)||Le(k,n,k,m,d,e,g,h)?!0:!1}function Le(a,b,c,d,e,g,h,k){return 0>=Pe(a,b,c,d,e,g)*Pe(a,b,c,d,h,k)&&0>=Pe(e,g,h,k,a,b)*Pe(e,g,h,k,c,d)} +function Pe(a,b,c,d,e,g){c-=a;d-=b;a=e-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0 g&&(g=0)));return 0>g?-1:0 a&&(a+=360);360<=a&&(a-=360);return a} +function Re(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);var g=b>c?-1:1;d=[];var h=e/2,k=b;c=Math.min(2*e,Math.abs(c-b));if(1E-5>c)return b=k+g*Math.min(c,h),g=0+a*Math.cos(k),k=0+a*Math.sin(k),h=0+a*Math.cos(b),a=0+a*Math.sin(b),b=(g+h)/2,c=(k+a)/2,d.push([g,k,b,c,b,c,h,a]),d;for(;1E-5 c,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(0 k)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,a a?"M"+this.la.toString()+" "+this.ja.toString()+"L"+this.F.toString()+" "+this.G.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a)+"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);case Ze:var b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ +"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case tf:b=new C(this.la,this.ja,0,0);b.tH(this.F,this.G,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ +2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ve:for(var b="",c=this.nc.o,d=c.length,e=0;e
=P-1?!0:null!==l[t+1].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/)}function d(){t++;return l[t]}function e(){var a=new N(parseFloat(d()),parseFloat(d()));y===y.toLowerCase()&&(a.x=B.x+a.x,a.y=B.y+a.y);return a}function g(){return B=e()}function h(){return A=e()}function k(){return"c"!==w.toLowerCase()&&"s"!==w.toLowerCase()?B:new N(2*B.x-A.x,2*B.y-A.y)}void 0===b&&(b=!1);"string"!==typeof a&&D.kc(a,"string",Ue,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm, "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=0;m =P-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":s=!0;r=q=!1;break;case "M":m=g();null===p.fc||!0===s?(T(p,m.x,m.y,q,!1,!r),s=!1):p.moveTo(m.x,m.y);for(n=B;!c();)m=g(),p.lineTo(m.x,m.y);break;case "L":for(;!c();)m= -g(),p.lineTo(m.x,m.y);break;case "H":for(;!c();)B=m=new N((y===y.toLowerCase()?B.x:0)+parseFloat(d()),B.y),p.lineTo(B.x,B.y);break;case "V":for(;!c();)B=m=new N(B.x,(y===y.toLowerCase()?B.y:0)+parseFloat(d())),p.lineTo(B.x,B.y);break;case "C":for(;!c();){var u=e(),H=h(),m=g();U(p,u.x,u.y,H.x,H.y,m.x,m.y)}break;case "S":for(;!c();)u=k(),H=h(),m=g(),U(p,u.x,u.y,H.x,H.y,m.x,m.y);break;case "Q":for(;!c();)H=h(),m=g(),zf(p,H.x,H.y,m.x,m.y);break;case "T":for(;!c();)A=H=k(),m=g(),zf(p,H.x,H.y,m.x,m.y); -break;case "B":for(;!c();){var m=parseFloat(d()),u=parseFloat(d()),H=parseFloat(d()),R=parseFloat(d()),aa=parseFloat(d()),V=aa,ea=!1;c()||(V=parseFloat(d()),c()||(ea=0!==parseFloat(d())));y===y.toLowerCase()&&(H+=B.x,R+=B.y);p.arcTo(m,u,H,R,aa,V,ea)}break;case "A":for(;!c();)u=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),R=parseFloat(d()),aa=!!parseFloat(d()),V=!!parseFloat(d()),m=g(),Af(p,u,H,R,aa,V,m.x,m.y);break;case "Z":m=p.q.nc.o[p.q.nc.length-1];X(p);B=n;break;case "F":u="";for(m=1;l[t+ -m];)if(null!==l[t+m].match(/[Uu]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?q=!0:Bf(p);break;case "U":u="";for(m=1;l[t+m];)if(null!==l[t+m].match(/[Ff]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?r=!0:p.kb(!1)}n=p.q;D.u(p);if(b)for(p=n.nc.j;p.next();)m=p.value,m.Ku=!0;return n}; -function Cf(a,b){for(var c=a.length,d=D.P(),e=0;e h&&(h+=360),s.Ne+=h);0>a&&(s.Ne=180-s.Ne,s.Ff=-s.Ff);0>d&&(s.Ne=-s.Ne,s.Ff=-s.Ff);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case If:h=s.F;k=s.G;s.F=h* +g(),p.lineTo(m.x,m.y);break;case "H":for(;!c();)B=m=new N((y===y.toLowerCase()?B.x:0)+parseFloat(d()),B.y),p.lineTo(B.x,B.y);break;case "V":for(;!c();)B=m=new N(B.x,(y===y.toLowerCase()?B.y:0)+parseFloat(d())),p.lineTo(B.x,B.y);break;case "C":for(;!c();){var u=e(),H=h(),m=g();U(p,u.x,u.y,H.x,H.y,m.x,m.y)}break;case "S":for(;!c();)u=k(),H=h(),m=g(),U(p,u.x,u.y,H.x,H.y,m.x,m.y);break;case "Q":for(;!c();)H=h(),m=g(),yf(p,H.x,H.y,m.x,m.y);break;case "T":for(;!c();)A=H=k(),m=g(),yf(p,H.x,H.y,m.x,m.y); +break;case "B":for(;!c();){var m=parseFloat(d()),u=parseFloat(d()),H=parseFloat(d()),R=parseFloat(d()),aa=parseFloat(d()),V=aa,ea=!1;c()||(V=parseFloat(d()),c()||(ea=0!==parseFloat(d())));y===y.toLowerCase()&&(H+=B.x,R+=B.y);p.arcTo(m,u,H,R,aa,V,ea)}break;case "A":for(;!c();)u=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),R=parseFloat(d()),aa=!!parseFloat(d()),V=!!parseFloat(d()),m=g(),zf(p,u,H,R,aa,V,m.x,m.y);break;case "Z":m=p.q.nc.o[p.q.nc.length-1];X(p);B=n;break;case "F":u="";for(m=1;l[t+ +m];)if(null!==l[t+m].match(/[Uu]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?q=!0:Af(p);break;case "U":u="";for(m=1;l[t+m];)if(null!==l[t+m].match(/[Ff]/))m++;else if(null===l[t+m].match(/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/))m++;else{u=l[t+m];break}u.match(/[Mm]/)?r=!0:p.kb(!1)}n=p.q;D.u(p);if(b)for(p=n.nc.j;p.next();)m=p.value,m.Ku=!0;return n}; +function Bf(a,b){for(var c=a.length,d=D.P(),e=0;e h&&(h+=360),s.Ne+=h);0>a&&(s.Ne=180-s.Ne,s.Ff=-s.Ff);0>d&&(s.Ne=-s.Ne,s.Ff=-s.Ff);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case Hf:h=s.F;k=s.G;s.F=h* a+k*c+e;s.G=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.ck+=h);0>a&&(s.ck=180-s.ck,s.xm=!s.xm);0>d&&(s.ck=-s.ck,s.xm=!s.xm);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:D.k("Unknown Segment type: "+s.type)}}}}this.pb=!0;return this}; -Ve.prototype.Pa=function(a,b,c,d){var e=a.x,g=a.y,h=this.ib.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.nc.o,s=r.length,u=0;u =a)return 0;if((e>h?e-h:h-e)<(g>k?g-k:k-g)){if(e=a=0,ge)return 0}else if(e e)return 0;return 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}; -Ve.prototype.getAngleAlongPath=Ve.prototype.NF=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;g+=m}}return NaN}; -Ve.prototype.getFractionForPoint=Ve.prototype.SI=function(a){if(this.type===Ze){var b=this.la,c=this.ja,d=this.F,e=this.G;if(b!==d||c!==e){var g=a.x;a=a.y;var h=0,k=0;return b===d?(c =k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b =k?k===b?0:1:Math.abs(g-b)/(k-h)):((g-b)*(g-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===tf){if(b=this.la,c=this.ja,d=this.F,e=this.G,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,g=a.x; +Ue.prototype.Pa=function(a,b,c,d){var e=a.x,g=a.y,h=this.ib.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.nc.o,s=r.length,u=0;u =a)return 0;if((e>h?e-h:h-e)<(g>k?g-k:k-g)){if(e=a=0,ge)return 0}else if(e e)return 0;return 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}; +Ue.prototype.getAngleAlongPath=Ue.prototype.NF=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;g+=m}}return NaN}; +Ue.prototype.getFractionForPoint=Ue.prototype.SI=function(a){if(this.type===Ye){var b=this.la,c=this.ja,d=this.F,e=this.G;if(b!==d||c!==e){var g=a.x;a=a.y;var h=0,k=0;return b===d?(c =k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b =k?k===b?0:1:Math.abs(g-b)/(k-h)):((g-b)*(g-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===Ze){if(b=this.la,c=this.ja,d=this.F,e=this.G,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,g=a.x; a=a.y;g=Math.min(Math.max(g,b),d);a=Math.min(Math.max(a,c),e);var b=Math.abs(g-b),d=Math.abs(g-d),c=Math.abs(a-c),e=Math.abs(a-e),m=Math.min(b,d,c,e);if(m===c)return g/l;if(m===d)return(h+a)/l;if(m===e)return(2*h+k-g)/l;if(m===b)return(2*h+2*k-a)/l}}else{for(var e=this.$x,h=this.uu,k=this.vu,l=D.P(),c=Infinity,b=d=0,g=e.length,n=m=0,p=0;p a?0:1a?"M"+this.la.toString()+" "+this.ja.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a),c=this.Eb.o,d=c.length,e=0;e a&&(a+=360),this.Xd=a,this.ff=0,v&&D.p(d,$f,"x1"),this.Ch=Math.max(d,0),v&&D.p(e,$f,"y1"),this.Og=Math.max(e,0),this.qp="boolean"===typeof h?!!h:!1,this.Ko=!!k):(v&&D.p(d,$f,"x1"),this.Xd=d,v&&D.p(e, -$f,"y1"),this.ff=e,v&&D.p(g,$f,"x2"),a===Hf&&(g=Math.max(g,0)),this.Ch=g,"number"===typeof h?(a===Hf&&(h=Math.max(h,0)),this.Og=h):this.Og=0,this.Ko=this.qp=!1);this.hi=!1;this.pb=!0;this.$h=null}D.ka("PathSegment",$f);D.Di($f);$f.prototype.copy=function(){var a=new $f;a.da=this.da;a.Cb=this.Cb;a.Jb=this.Jb;a.Xd=this.Xd;a.ff=this.ff;a.Ch=this.Ch;a.Og=this.Og;a.qp=this.qp;a.Ko=this.Ko;a.hi=this.hi;a.pb=this.pb;return a}; -$f.prototype.equalsApprox=$f.prototype.Wc=function(a){if(!(a instanceof $f)||this.type!==a.type||this.gy!==a.gy)return!1;switch(this.type){case Ef:case wf:return Q(this.F,a.F)&&Q(this.G,a.G);case Ff:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c)&&Q(this.Uh,a.Uh)&&Q(this.Vh,a.Vh);case Gf:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c);case Hf:return Q(this.Ne,a.Ne)&&Q(this.Ff,a.Ff)&&Q(this.pa,a.pa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, -a.radiusY);case If:return this.xm===a.xm&&this.jy===a.jy&&Q(this.ck,a.ck)&&Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};$f.prototype.qc=function(a){a.Re===$f?this.type=a:D.ak(this,a)}; -$f.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Ef:b=0>a?"M"+this.F.toString()+" "+this.G.toString():"M"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case wf:b=0>a?"L"+this.F.toString()+" "+this.G.toString():"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Ff:b=0>a?"C"+this.Ec.toString()+" "+this.$c.toString()+" "+this.Uh.toString()+" "+this.Vh.toString()+" "+this.F.toString()+" "+this.G.toString():"C"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.Uh.toFixed(a)+ -" "+this.Vh.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Gf:b=0>a?"Q"+this.Ec.toString()+" "+this.$c.toString()+" "+this.F.toString()+" "+this.G.toString():"Q"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Hf:b=0>a?"B"+this.Ne.toString()+" "+this.Ff.toString()+" "+this.pa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Ne.toFixed(a)+" "+this.Ff.toFixed(a)+" "+this.pa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; -break;case If:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.ck.toString()+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toString()+" "+this.G.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.ck.toFixed(a)+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;default:b=this.type.toString()}return b+(this.hi?"z":"")};var Ef;$f.Move=Ef=D.s($f,"Move",0);var wf;$f.Line=wf=D.s($f,"Line",1);var Ff; -$f.Bezier=Ff=D.s($f,"Bezier",2);var Gf;$f.QuadraticBezier=Gf=D.s($f,"QuadraticBezier",3);var Hf;$f.Arc=Hf=D.s($f,"Arc",4);var If;$f.SvgArc=If=D.s($f,"SvgArc",4);$f.prototype.freeze=function(){this.J=!0;return this};$f.prototype.Xa=function(){this.J=!1;return this};$f.prototype.close=$f.prototype.close=function(){this.hi=!0;return this}; -function Vf(a,b){if(null!==a.$h&&!1===b.pb)return a.$h;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$h=[],a.$h;var e=a.Xd,g=a.ff,h=Se(c =r?h=Math.PI:1<=r&&(h=0);!l&&0 h&&(h+=2*Math.PI);l=b>g?1:b/g;r=b>g?g/b:1;b=Se(b>g?b:g,n,n+h,!0);g=D.hh();g.reset();g.translate(c,d);g.rotate(a.Xd,0,0);g.scale(l,r);Cf(b,g);D.nf(g);a.$h=b;return a.$h} -D.defineProperty($f,{gy:"isClosed"},function(){return this.hi},function(a){this.hi!==a&&(this.hi=a,this.pb=!0)});D.defineProperty($f,{type:"type"},function(){return this.da},function(a){v&&D.Da(a,$f,$f,"type");this.J&&D.qa(this,a);this.da=a;this.pb=!0});D.defineProperty($f,{F:"endX"},function(){return this.Cb},function(a){v&&D.p(a,$f,"endX");this.J&&D.qa(this,a);this.Cb=a;this.pb=!0}); -D.defineProperty($f,{G:"endY"},function(){return this.Jb},function(a){v&&D.p(a,$f,"endY");this.J&&D.qa(this,a);this.Jb=a;this.pb=!0});D.defineProperty($f,{Ec:"point1X"},function(){return this.Xd},function(a){v&&D.p(a,$f,"point1X");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0});D.defineProperty($f,{$c:"point1Y"},function(){return this.ff},function(a){v&&D.p(a,$f,"point1Y");this.J&&D.qa(this,a);this.ff=a;this.pb=!0}); -D.defineProperty($f,{Uh:"point2X"},function(){return this.Ch},function(a){v&&D.p(a,$f,"point2X");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty($f,{Vh:"point2Y"},function(){return this.Og},function(a){v&&D.p(a,$f,"point2Y");this.J&&D.qa(this,a);this.Og=a;this.pb=!0});D.defineProperty($f,{pa:"centerX"},function(){return this.Xd},function(a){v&&D.p(a,$f,"centerX");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); -D.defineProperty($f,{va:"centerY"},function(){return this.ff},function(a){v&&D.p(a,$f,"centerY");this.J&&D.qa(this,a);this.ff=a;this.pb=!0});D.defineProperty($f,{radiusX:"radiusX"},function(){return this.Ch},function(a){v&&D.p(a,$f,"radiusX");0>a&&D.ua(a,">= zero",$f,"radiusX");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty($f,{radiusY:"radiusY"},function(){return this.Og},function(a){v&&D.p(a,$f,"radiusY");0>a&&D.ua(a,">= zero",$f,"radiusY");this.J&&D.qa(this,a);this.Og=a;this.pb=!0}); -D.defineProperty($f,{Ne:"startAngle"},function(){return this.Cb},function(a){this.Cb!==a&&(this.J&&D.qa(this,a),v&&D.p(a,$f,"startAngle"),a%=360,0>a&&(a+=360),this.Cb=a,this.pb=!0)});D.defineProperty($f,{Ff:"sweepAngle"},function(){return this.Jb},function(a){v&&D.p(a,$f,"sweepAngle");this.J&&D.qa(this,a);360a&&(a=-360);this.Jb=a;this.pb=!0});D.defineProperty($f,{xm:"isClockwiseArc"},function(){return this.Ko},function(a){this.J&&D.qa(this,a);this.Ko=a;this.pb=!0}); -D.defineProperty($f,{jy:"isLargeArc"},function(){return this.qp},function(a){this.J&&D.qa(this,a);this.qp=a;this.pb=!0});D.defineProperty($f,{ck:"xAxisRotation"},function(){return this.Xd},function(a){v&&D.p(a,$f,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); -function bg(){this.ca=null;this.AA=(new N(0,0)).freeze();this.Gz=(new N(0,0)).freeze();this.Nv=this.Jw=0;this.Ov=1;this.ww="";this.tx=this.aw=!1;this.Zv=this.Pv=0;this.fk=this.iw=this.sw=!1;this.$r=null;this.qx=0;this.Sg=this.px=null}D.ka("InputEvent",bg); -bg.prototype.copy=function(){var a=new bg;a.ca=this.ca;a.AA.assign(this.Sd);a.Gz.assign(this.ha);a.Jw=this.Jw;a.Nv=this.Nv;a.Ov=this.Ov;a.ww=this.ww;a.aw=this.aw;a.tx=this.tx;a.Pv=this.Pv;a.Zv=this.Zv;a.sw=this.sw;a.iw=this.iw;a.fk=this.fk;a.$r=this.$r;a.qx=this.qx;a.px=this.px;a.Sg=this.Sg;return a}; -bg.prototype.toString=function(){var a="^";0!==this.xd&&(a+="M:"+this.xd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ee&&(a+="C:"+this.Ee);0!==this.Vk&&(a+="D:"+this.Vk);this.Cc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(bg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(bg,{Sd:"viewPoint"},function(){return this.AA},function(a){D.l(a,N,bg,"viewPoint");this.AA.assign(a)}); -D.defineProperty(bg,{ha:"documentPoint"},function(){return this.Gz},function(a){D.l(a,N,bg,"documentPoint");this.Gz.assign(a)});bg.prototype.getMultiTouchViewPoint=bg.prototype.ay=function(a,b){var c=this.g;if(null===c)return b;cg(c,this.event,a,b);return b};bg.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;cg(c,this.event,a,b);b.assign(c.pC(b));return b};D.defineProperty(bg,{xd:"modifiers"},function(){return this.Jw},function(a){this.Jw=a}); -D.defineProperty(bg,{button:"button"},function(){return this.Nv},function(a){this.Nv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});D.defineProperty(bg,{buttons:"buttons"},function(){return this.Ov},function(a){this.Ov=a});D.defineProperty(bg,{key:"key"},function(){return this.ww},function(a){this.ww=a});D.defineProperty(bg,{Wk:"down"},function(){return this.aw},function(a){this.aw=a}); -D.defineProperty(bg,{up:"up"},function(){return this.tx},function(a){this.tx=a});D.defineProperty(bg,{Ee:"clickCount"},function(){return this.Pv},function(a){this.Pv=a});D.defineProperty(bg,{Vk:"delta"},function(){return this.Zv},function(a){this.Zv=a});D.defineProperty(bg,{Ou:"isMultiTouch"},function(){return this.sw},function(a){this.sw=a});D.defineProperty(bg,{Cc:"handled"},function(){return this.iw},function(a){this.iw=a}); -D.defineProperty(bg,{bubbles:"bubbles"},function(){return this.fk},function(a){this.fk=a});D.defineProperty(bg,{event:"event"},function(){return this.$r},function(a){this.$r=a});D.w(bg,{Qj:"isTouchEvent"},function(){var a=window.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=window.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)});D.w(bg,{Qh:"isMac"},function(){return D.Qh}); -D.defineProperty(bg,{timestamp:"timestamp"},function(){return this.qx},function(a){this.qx=a});D.defineProperty(bg,{Qf:"targetDiagram"},function(){return this.px},function(a){this.px=a});D.defineProperty(bg,{Oe:"targetObject"},function(){return this.Sg},function(a){this.Sg=a});D.defineProperty(bg,{control:"control"},function(){return 0!==(this.xd&1)},function(a){this.xd=a?this.xd|1:this.xd&-2}); -D.defineProperty(bg,{shift:"shift"},function(){return 0!==(this.xd&4)},function(a){this.xd=a?this.xd|4:this.xd&-5});D.defineProperty(bg,{alt:"alt"},function(){return 0!==(this.xd&2)},function(a){this.xd=a?this.xd|2:this.xd&-3});D.defineProperty(bg,{Xu:"meta"},function(){return 0!==(this.xd&8)},function(a){this.xd=a?this.xd|8:this.xd&-9}); -D.defineProperty(bg,{left:"left"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); -D.defineProperty(bg,{right:"right"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},function(a){this.buttons=a?this.buttons|2:this.buttons&-3}); -D.defineProperty(bg,{iM:"middle"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});function dg(){this.ca=null;this.ac="";this.Tw=this.nx=null;this.sr=!1}D.ka("DiagramEvent",dg);dg.prototype.copy=function(){var a=new dg;a.ca=this.ca;a.ac=this.ac;a.nx=this.nx;a.Tw=this.Tw;a.sr=this.sr;return a}; -dg.prototype.toString=function(){var a="*"+this.name;null!==this.hC&&(a+=":"+this.hC.toString());null!==this.LB&&(a+="("+this.LB.toString()+")");return a};D.defineProperty(dg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(dg,{name:"name"},function(){return this.ac},function(a){this.ac=a});D.defineProperty(dg,{hC:"subject"},function(){return this.nx},function(a){this.nx=a});D.defineProperty(dg,{LB:"parameter"},function(){return this.Tw},function(a){this.Tw=a}); -D.defineProperty(dg,{cancel:"cancel"},function(){return this.sr},function(a){this.sr!==a&&D.Qn("DiagramEvent.cancel","2.0");this.sr=a});function eg(){this.tr=fg;this.pn=this.Iw="";this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null}D.ka("ChangedEvent",eg);var gg;eg.Transaction=gg=D.s(eg,"Transaction",-1);var fg;eg.Property=fg=D.s(eg,"Property",0);var hg;eg.Insert=hg=D.s(eg,"Insert",1);var ig;eg.Remove=ig=D.s(eg,"Remove",2); -eg.prototype.clear=eg.prototype.clear=function(){this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null};eg.prototype.copy=function(){var a=new eg;a.tr=this.tr;a.Iw=this.Iw;a.pn=this.pn;a.ye=this.ye;a.ca=this.ca;a.at=this.at;var b=this.dt;a.dt=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.ct;a.ct=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Ys;a.Ys=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Xs;a.Xs=D.Qa(b)&&"function"===typeof b.V?b.V():b;return a}; -eg.prototype.qc=function(a){a.Re===eg?this.Oc=a:D.ak(this,a)}; -eg.prototype.toString=function(){var a="",a=this.Oc===gg?a+"* ":this.Oc===fg?a+(null!==this.ea?"!m":"!d"):a+((null!==this.ea?"!m":"!d")+this.Oc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Ef&&this.Ef!==this.propertyName&&(a+=" "+this.Ef);a+=": ";this.Oc===gg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ia(this.object)),null!==this.oldValue&&(a+=" old: "+ia(this.oldValue)),null!==this.Wj&&(a+=" "+this.Wj),null!==this.newValue&& -(a+=" new: "+ia(this.newValue)),null!==this.Uj&&(a+=" "+this.Uj));return a};eg.prototype.getValue=eg.prototype.oa=function(a){return a?this.oldValue:this.newValue};eg.prototype.getParam=function(a){return a?this.Wj:this.Uj};eg.prototype.canUndo=eg.prototype.canUndo=function(){return null!==this.ea||null!==this.g?!0:!1};eg.prototype.undo=eg.prototype.undo=function(){this.canUndo()&&(null!==this.ea?this.ea.Hn(this,!0):null!==this.g&&this.g.Hn(this,!0))}; -eg.prototype.canRedo=eg.prototype.canRedo=function(){return null!==this.ea||null!==this.g?!0:!1};eg.prototype.redo=eg.prototype.redo=function(){this.canRedo()&&(null!==this.ea?this.ea.Hn(this,!1):null!==this.g&&this.g.Hn(this,!1))};D.defineProperty(eg,{ea:"model"},function(){return this.ye},function(a){this.ye=a});D.defineProperty(eg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a}); -D.defineProperty(eg,{Oc:"change"},function(){return this.tr},function(a){v&&D.Da(a,eg,eg,"change");this.tr=a});D.defineProperty(eg,{Ef:"modelChange"},function(){return this.Iw},function(a){v&&D.h(a,"string",eg,"modelChange");this.Iw=a});D.defineProperty(eg,{propertyName:"propertyName"},function(){return this.pn},function(a){v&&"string"!==typeof a&&D.h(a,"function",eg,"propertyName");this.pn=a}); -D.w(eg,{mG:"isTransactionFinished"},function(){return this.tr===gg&&("CommittedTransaction"===this.pn||"FinishedUndo"===this.pn||"FinishedRedo"===this.pn)});D.defineProperty(eg,{object:"object"},function(){return this.at},function(a){this.at=a});D.defineProperty(eg,{oldValue:"oldValue"},function(){return this.dt},function(a){this.dt=a});D.defineProperty(eg,{Wj:"oldParam"},function(){return this.ct},function(a){this.ct=a}); -D.defineProperty(eg,{newValue:"newValue"},function(){return this.Ys},function(a){this.Ys=a});D.defineProperty(eg,{Uj:"newParam"},function(){return this.Xs},function(a){this.Xs=a}); -function M(a){1 a?0:1a?"M"+this.la.toString()+" "+this.ja.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a),c=this.Eb.o,d=c.length,e=0;e a&&(a+=360),this.Xd=a,this.ff=0,v&&D.p(d,Zf,"x1"),this.Ch=Math.max(d,0),v&&D.p(e,Zf,"y1"),this.Og=Math.max(e,0),this.qp="boolean"===typeof h?!!h:!1,this.Ko=!!k):(v&&D.p(d,Zf,"x1"),this.Xd=d,v&&D.p(e, +Zf,"y1"),this.ff=e,v&&D.p(g,Zf,"x2"),a===Gf&&(g=Math.max(g,0)),this.Ch=g,"number"===typeof h?(a===Gf&&(h=Math.max(h,0)),this.Og=h):this.Og=0,this.Ko=this.qp=!1);this.hi=!1;this.pb=!0;this.$h=null}D.ka("PathSegment",Zf);D.Di(Zf);Zf.prototype.copy=function(){var a=new Zf;a.da=this.da;a.Cb=this.Cb;a.Jb=this.Jb;a.Xd=this.Xd;a.ff=this.ff;a.Ch=this.Ch;a.Og=this.Og;a.qp=this.qp;a.Ko=this.Ko;a.hi=this.hi;a.pb=this.pb;return a}; +Zf.prototype.equalsApprox=Zf.prototype.Wc=function(a){if(!(a instanceof Zf)||this.type!==a.type||this.gy!==a.gy)return!1;switch(this.type){case Df:case vf:return Q(this.F,a.F)&&Q(this.G,a.G);case Ef:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c)&&Q(this.Uh,a.Uh)&&Q(this.Vh,a.Vh);case Ff:return Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.Ec,a.Ec)&&Q(this.$c,a.$c);case Gf:return Q(this.Ne,a.Ne)&&Q(this.Ff,a.Ff)&&Q(this.pa,a.pa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, +a.radiusY);case Hf:return this.xm===a.xm&&this.jy===a.jy&&Q(this.ck,a.ck)&&Q(this.F,a.F)&&Q(this.G,a.G)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};Zf.prototype.qc=function(a){a.Re===Zf?this.type=a:D.ak(this,a)}; +Zf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Df:b=0>a?"M"+this.F.toString()+" "+this.G.toString():"M"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case vf:b=0>a?"L"+this.F.toString()+" "+this.G.toString():"L"+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Ef:b=0>a?"C"+this.Ec.toString()+" "+this.$c.toString()+" "+this.Uh.toString()+" "+this.Vh.toString()+" "+this.F.toString()+" "+this.G.toString():"C"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.Uh.toFixed(a)+ +" "+this.Vh.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Ff:b=0>a?"Q"+this.Ec.toString()+" "+this.$c.toString()+" "+this.F.toString()+" "+this.G.toString():"Q"+this.Ec.toFixed(a)+" "+this.$c.toFixed(a)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;case Gf:b=0>a?"B"+this.Ne.toString()+" "+this.Ff.toString()+" "+this.pa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Ne.toFixed(a)+" "+this.Ff.toFixed(a)+" "+this.pa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; +break;case Hf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.ck.toString()+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toString()+" "+this.G.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.ck.toFixed(a)+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.F.toFixed(a)+" "+this.G.toFixed(a);break;default:b=this.type.toString()}return b+(this.hi?"z":"")};var Df;Zf.Move=Df=D.s(Zf,"Move",0);var vf;Zf.Line=vf=D.s(Zf,"Line",1);var Ef; +Zf.Bezier=Ef=D.s(Zf,"Bezier",2);var Ff;Zf.QuadraticBezier=Ff=D.s(Zf,"QuadraticBezier",3);var Gf;Zf.Arc=Gf=D.s(Zf,"Arc",4);var Hf;Zf.SvgArc=Hf=D.s(Zf,"SvgArc",4);Zf.prototype.freeze=function(){this.J=!0;return this};Zf.prototype.Xa=function(){this.J=!1;return this};Zf.prototype.close=Zf.prototype.close=function(){this.hi=!0;return this}; +function If(a,b){if(null!==a.$h&&!1===b.pb)return a.$h;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$h=[],a.$h;var e=a.Xd,g=a.ff,h=Re(c =r?h=Math.PI:1<=r&&(h=0);!l&&0 h&&(h+=2*Math.PI);l=b>g?1:b/g;r=b>g?g/b:1;b=Re(b>g?b:g,n,n+h,!0);g=D.hh();g.reset();g.translate(c,d);g.rotate(a.Xd,0,0);g.scale(l,r);Bf(b,g);D.nf(g);a.$h=b;return a.$h} +D.defineProperty(Zf,{gy:"isClosed"},function(){return this.hi},function(a){this.hi!==a&&(this.hi=a,this.pb=!0)});D.defineProperty(Zf,{type:"type"},function(){return this.da},function(a){v&&D.Da(a,Zf,Zf,"type");this.J&&D.qa(this,a);this.da=a;this.pb=!0});D.defineProperty(Zf,{F:"endX"},function(){return this.Cb},function(a){v&&D.p(a,Zf,"endX");this.J&&D.qa(this,a);this.Cb=a;this.pb=!0}); +D.defineProperty(Zf,{G:"endY"},function(){return this.Jb},function(a){v&&D.p(a,Zf,"endY");this.J&&D.qa(this,a);this.Jb=a;this.pb=!0});D.defineProperty(Zf,{Ec:"point1X"},function(){return this.Xd},function(a){v&&D.p(a,Zf,"point1X");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0});D.defineProperty(Zf,{$c:"point1Y"},function(){return this.ff},function(a){v&&D.p(a,Zf,"point1Y");this.J&&D.qa(this,a);this.ff=a;this.pb=!0}); +D.defineProperty(Zf,{Uh:"point2X"},function(){return this.Ch},function(a){v&&D.p(a,Zf,"point2X");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty(Zf,{Vh:"point2Y"},function(){return this.Og},function(a){v&&D.p(a,Zf,"point2Y");this.J&&D.qa(this,a);this.Og=a;this.pb=!0});D.defineProperty(Zf,{pa:"centerX"},function(){return this.Xd},function(a){v&&D.p(a,Zf,"centerX");this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); +D.defineProperty(Zf,{va:"centerY"},function(){return this.ff},function(a){v&&D.p(a,Zf,"centerY");this.J&&D.qa(this,a);this.ff=a;this.pb=!0});D.defineProperty(Zf,{radiusX:"radiusX"},function(){return this.Ch},function(a){v&&D.p(a,Zf,"radiusX");0>a&&D.ua(a,">= zero",Zf,"radiusX");this.J&&D.qa(this,a);this.Ch=a;this.pb=!0});D.defineProperty(Zf,{radiusY:"radiusY"},function(){return this.Og},function(a){v&&D.p(a,Zf,"radiusY");0>a&&D.ua(a,">= zero",Zf,"radiusY");this.J&&D.qa(this,a);this.Og=a;this.pb=!0}); +D.defineProperty(Zf,{Ne:"startAngle"},function(){return this.Cb},function(a){this.Cb!==a&&(this.J&&D.qa(this,a),v&&D.p(a,Zf,"startAngle"),a%=360,0>a&&(a+=360),this.Cb=a,this.pb=!0)});D.defineProperty(Zf,{Ff:"sweepAngle"},function(){return this.Jb},function(a){v&&D.p(a,Zf,"sweepAngle");this.J&&D.qa(this,a);360a&&(a=-360);this.Jb=a;this.pb=!0});D.defineProperty(Zf,{xm:"isClockwiseArc"},function(){return this.Ko},function(a){this.J&&D.qa(this,a);this.Ko=a;this.pb=!0}); +D.defineProperty(Zf,{jy:"isLargeArc"},function(){return this.qp},function(a){this.J&&D.qa(this,a);this.qp=a;this.pb=!0});D.defineProperty(Zf,{ck:"xAxisRotation"},function(){return this.Xd},function(a){v&&D.p(a,Zf,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.qa(this,a);this.Xd=a;this.pb=!0}); +function ag(){this.ca=null;this.AA=(new N(0,0)).freeze();this.Gz=(new N(0,0)).freeze();this.Nv=this.Jw=0;this.Ov=1;this.ww="";this.tx=this.aw=!1;this.Zv=this.Pv=0;this.fk=this.iw=this.sw=!1;this.$r=null;this.qx=0;this.Sg=this.px=null}D.ka("InputEvent",ag); +ag.prototype.copy=function(){var a=new ag;a.ca=this.ca;a.AA.assign(this.Sd);a.Gz.assign(this.ha);a.Jw=this.Jw;a.Nv=this.Nv;a.Ov=this.Ov;a.ww=this.ww;a.aw=this.aw;a.tx=this.tx;a.Pv=this.Pv;a.Zv=this.Zv;a.sw=this.sw;a.iw=this.iw;a.fk=this.fk;a.$r=this.$r;a.qx=this.qx;a.px=this.px;a.Sg=this.Sg;return a}; +ag.prototype.toString=function(){var a="^";0!==this.xd&&(a+="M:"+this.xd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ee&&(a+="C:"+this.Ee);0!==this.Vk&&(a+="D:"+this.Vk);this.Cc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(ag,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(ag,{Sd:"viewPoint"},function(){return this.AA},function(a){D.l(a,N,ag,"viewPoint");this.AA.assign(a)}); +D.defineProperty(ag,{ha:"documentPoint"},function(){return this.Gz},function(a){D.l(a,N,ag,"documentPoint");this.Gz.assign(a)});ag.prototype.getMultiTouchViewPoint=ag.prototype.ay=function(a,b){var c=this.g;if(null===c)return b;bg(c,this.event,a,b);return b};ag.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;bg(c,this.event,a,b);b.assign(c.pC(b));return b};D.defineProperty(ag,{xd:"modifiers"},function(){return this.Jw},function(a){this.Jw=a}); +D.defineProperty(ag,{button:"button"},function(){return this.Nv},function(a){this.Nv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});D.defineProperty(ag,{buttons:"buttons"},function(){return this.Ov},function(a){this.Ov=a});D.defineProperty(ag,{key:"key"},function(){return this.ww},function(a){this.ww=a});D.defineProperty(ag,{Wk:"down"},function(){return this.aw},function(a){this.aw=a}); +D.defineProperty(ag,{up:"up"},function(){return this.tx},function(a){this.tx=a});D.defineProperty(ag,{Ee:"clickCount"},function(){return this.Pv},function(a){this.Pv=a});D.defineProperty(ag,{Vk:"delta"},function(){return this.Zv},function(a){this.Zv=a});D.defineProperty(ag,{Ou:"isMultiTouch"},function(){return this.sw},function(a){this.sw=a});D.defineProperty(ag,{Cc:"handled"},function(){return this.iw},function(a){this.iw=a}); +D.defineProperty(ag,{bubbles:"bubbles"},function(){return this.fk},function(a){this.fk=a});D.defineProperty(ag,{event:"event"},function(){return this.$r},function(a){this.$r=a});D.w(ag,{Qj:"isTouchEvent"},function(){var a=window.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=window.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)});D.w(ag,{Qh:"isMac"},function(){return D.Qh}); +D.defineProperty(ag,{timestamp:"timestamp"},function(){return this.qx},function(a){this.qx=a});D.defineProperty(ag,{Qf:"targetDiagram"},function(){return this.px},function(a){this.px=a});D.defineProperty(ag,{Oe:"targetObject"},function(){return this.Sg},function(a){this.Sg=a});D.defineProperty(ag,{control:"control"},function(){return 0!==(this.xd&1)},function(a){this.xd=a?this.xd|1:this.xd&-2}); +D.defineProperty(ag,{shift:"shift"},function(){return 0!==(this.xd&4)},function(a){this.xd=a?this.xd|4:this.xd&-5});D.defineProperty(ag,{alt:"alt"},function(){return 0!==(this.xd&2)},function(a){this.xd=a?this.xd|2:this.xd&-3});D.defineProperty(ag,{Xu:"meta"},function(){return 0!==(this.xd&8)},function(a){this.xd=a?this.xd|8:this.xd&-9}); +D.defineProperty(ag,{left:"left"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); +D.defineProperty(ag,{right:"right"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},function(a){this.buttons=a?this.buttons|2:this.buttons&-3}); +D.defineProperty(ag,{iM:"middle"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});function cg(){this.ca=null;this.ac="";this.Tw=this.nx=null;this.sr=!1}D.ka("DiagramEvent",cg);cg.prototype.copy=function(){var a=new cg;a.ca=this.ca;a.ac=this.ac;a.nx=this.nx;a.Tw=this.Tw;a.sr=this.sr;return a}; +cg.prototype.toString=function(){var a="*"+this.name;null!==this.hC&&(a+=":"+this.hC.toString());null!==this.LB&&(a+="("+this.LB.toString()+")");return a};D.defineProperty(cg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(cg,{name:"name"},function(){return this.ac},function(a){this.ac=a});D.defineProperty(cg,{hC:"subject"},function(){return this.nx},function(a){this.nx=a});D.defineProperty(cg,{LB:"parameter"},function(){return this.Tw},function(a){this.Tw=a}); +D.defineProperty(cg,{cancel:"cancel"},function(){return this.sr},function(a){this.sr!==a&&D.Qn("DiagramEvent.cancel","2.0");this.sr=a});function dg(){this.tr=eg;this.pn=this.Iw="";this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null}D.ka("ChangedEvent",dg);var fg;dg.Transaction=fg=D.s(dg,"Transaction",-1);var eg;dg.Property=eg=D.s(dg,"Property",0);var gg;dg.Insert=gg=D.s(dg,"Insert",1);var hg;dg.Remove=hg=D.s(dg,"Remove",2); +dg.prototype.clear=dg.prototype.clear=function(){this.Xs=this.Ys=this.ct=this.dt=this.at=this.ca=this.ye=null};dg.prototype.copy=function(){var a=new dg;a.tr=this.tr;a.Iw=this.Iw;a.pn=this.pn;a.ye=this.ye;a.ca=this.ca;a.at=this.at;var b=this.dt;a.dt=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.ct;a.ct=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Ys;a.Ys=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Xs;a.Xs=D.Qa(b)&&"function"===typeof b.V?b.V():b;return a}; +dg.prototype.qc=function(a){a.Re===dg?this.Oc=a:D.ak(this,a)}; +dg.prototype.toString=function(){var a="",a=this.Oc===fg?a+"* ":this.Oc===eg?a+(null!==this.ea?"!m":"!d"):a+((null!==this.ea?"!m":"!d")+this.Oc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Ef&&this.Ef!==this.propertyName&&(a+=" "+this.Ef);a+=": ";this.Oc===fg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ia(this.object)),null!==this.oldValue&&(a+=" old: "+ia(this.oldValue)),null!==this.Wj&&(a+=" "+this.Wj),null!==this.newValue&& +(a+=" new: "+ia(this.newValue)),null!==this.Uj&&(a+=" "+this.Uj));return a};dg.prototype.getValue=dg.prototype.oa=function(a){return a?this.oldValue:this.newValue};dg.prototype.getParam=function(a){return a?this.Wj:this.Uj};dg.prototype.canUndo=dg.prototype.canUndo=function(){return null!==this.ea||null!==this.g?!0:!1};dg.prototype.undo=dg.prototype.undo=function(){this.canUndo()&&(null!==this.ea?this.ea.Hn(this,!0):null!==this.g&&this.g.Hn(this,!0))}; +dg.prototype.canRedo=dg.prototype.canRedo=function(){return null!==this.ea||null!==this.g?!0:!1};dg.prototype.redo=dg.prototype.redo=function(){this.canRedo()&&(null!==this.ea?this.ea.Hn(this,!1):null!==this.g&&this.g.Hn(this,!1))};D.defineProperty(dg,{ea:"model"},function(){return this.ye},function(a){this.ye=a});D.defineProperty(dg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a}); +D.defineProperty(dg,{Oc:"change"},function(){return this.tr},function(a){v&&D.Da(a,dg,dg,"change");this.tr=a});D.defineProperty(dg,{Ef:"modelChange"},function(){return this.Iw},function(a){v&&D.h(a,"string",dg,"modelChange");this.Iw=a});D.defineProperty(dg,{propertyName:"propertyName"},function(){return this.pn},function(a){v&&"string"!==typeof a&&D.h(a,"function",dg,"propertyName");this.pn=a}); +D.w(dg,{mG:"isTransactionFinished"},function(){return this.tr===fg&&("CommittedTransaction"===this.pn||"FinishedUndo"===this.pn||"FinishedRedo"===this.pn)});D.defineProperty(dg,{object:"object"},function(){return this.at},function(a){this.at=a});D.defineProperty(dg,{oldValue:"oldValue"},function(){return this.dt},function(a){this.dt=a});D.defineProperty(dg,{Wj:"oldParam"},function(){return this.ct},function(a){this.ct=a}); +D.defineProperty(dg,{newValue:"newValue"},function(){return this.Ys},function(a){this.Ys=a});D.defineProperty(dg,{Uj:"newParam"},function(){return this.Xs},function(a){this.Xs=a}); +function M(a){1 g?b+("\\u000"+a.charCodeAt(d).toString(16)):32>g?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===g?b+"\\u2028":8233===g?b+"\\u2029":b+e}return'"'+b+'"'}; -M.prototype.writeJsonValue=M.prototype.yv=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.yv(a.valueOf()):D.isArray(a)?yg(this,a):D.Qa(a)?vg(this,a):"function"===typeof a?"null":a.toString()}; -function yg(a,b,c){void 0===c&&(c=!1);var d=D.cb(b);if(0>=d)return"[]";var e=new xa;e.add("[ ");c&&1 =d)return"[]";var e=new xa;e.add("[ ");c&&1 d)return;D.Vg(a.ze,d)}ah(a,"nodeDataArray",ig,"nodeDataArray",a,b,null,d,null);a.xv(b)} -M.prototype.removeNodeDataCollection=function(a){if(D.isArray(a))for(var b=D.cb(a),c=0;cd)return;D.Vg(a.ze,d)}$g(a,"nodeDataArray",hg,"nodeDataArray",a,b,null,d,null);a.xv(b)} +M.prototype.removeNodeDataCollection=function(a){if(D.isArray(a))for(var b=D.cb(a),c=0;cb&&(b=D.cb(a));D.Ih(a,b,c);ah(this,"",hg,"",a,null,c,null,b)}; -M.prototype.removeArrayItem=M.prototype.HG=function(a,b){void 0===b&&(b=-1);v&&(D.gu(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.ze&&D.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=D.cb(a)-1);var c=D.La(a,b);D.Vg(a,b);ah(this,"",ig,"",a,c,null,b,null)};D.defineProperty(M,{qo:"nodeCategoryProperty"},function(){return this.kn},function(a){var b=this.kn;b!==a&&(bh(a,M,"nodeCategoryProperty"),this.kn=a,this.i("nodeCategoryProperty",b,a))}); +D.defineProperty(M,{OA:"copiesArrayObjects"},function(){return this.zr},function(a){var b=this.zr;b!==a&&(null!==a&&D.h(a,"boolean",M,"copiesArrayObjects"),this.zr=a,this.i("copiesArrayObjects",b,a))});M.prototype.copyNodeData=function(a){if(null===a)return null;var b=null,b=this.Po,b=null!==b?b(a,this):hh(this,a,!0);D.Qa(b)&&D.xc(b);return b}; +function hh(a,b,c){if(a.PA&&Array.isArray(b)){var d=[];for(c=0;c b&&(b=D.cb(a));D.Ih(a,b,c);$g(this,"",gg,"",a,null,c,null,b)}; +M.prototype.removeArrayItem=M.prototype.HG=function(a,b){void 0===b&&(b=-1);v&&(D.gu(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.ze&&D.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=D.cb(a)-1);var c=D.La(a,b);D.Vg(a,b);$g(this,"",hg,"",a,c,null,b,null)};D.defineProperty(M,{qo:"nodeCategoryProperty"},function(){return this.kn},function(a){var b=this.kn;b!==a&&(ah(a,M,"nodeCategoryProperty"),this.kn=a,this.i("nodeCategoryProperty",b,a))}); M.prototype.getCategoryForNodeData=M.prototype.eB=function(a){if(null===a)return"";var b=this.kn;if(""===b)return"";b=D.xb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;D.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -M.prototype.setCategoryForNodeData=M.prototype.Sy=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.kn;if(""!==c)if(this.le(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"nodeCategory",fg,c,a,d,b))}else D.Ua(a,c,b)}}; +M.prototype.setCategoryForNodeData=M.prototype.Sy=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.kn;if(""!==c)if(this.le(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),$g(this,"nodeCategory",eg,c,a,d,b))}else D.Ua(a,c,b)}}; function Y(a,b){M.call(this);2 D.im(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Oc=== -ig){c=a.Wj;if("linkDataArray"===a.Ef){d=a.oldValue;D.Qa(d)&&"number"===typeof c&&(e=this.of(d),b?(this.ki.add(d),D.La(this.df,c)!==d&&D.Ih(this.df,c,d),void 0!==e&&this.td.add(e,d)):(this.ki.remove(d),D.La(this.df,c)===d&&D.Vg(this.df,c),void 0!==e&&this.td.remove(e)));return}if("linkLabelKeys"===a.Ef){d=this.al(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.im(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.im(d,a.newValue),0<=c&&D.Vg(d,c)));return}}M.prototype.Hn.call(this,a,b)}; +f.Hn=function(a,b){if(a.Oc===gg){var c=a.Uj;if("linkDataArray"===a.Ef){var d=a.newValue;if(D.Qa(d)&&"number"===typeof c){var e=this.of(d);b?(this.ki.remove(d),D.La(this.df,c)===d&&D.Vg(this.df,c),void 0!==e&&this.td.remove(e)):(this.ki.add(d),D.La(this.df,c)!==d&&D.Ih(this.df,c,d),void 0!==e&&this.td.add(e,d))}return}if("linkLabelKeys"===a.Ef){d=this.al(a.object);D.isArray(d)&&"number"===typeof c&&(b?(c=D.im(d,a.newValue),0<=c&&D.Vg(d,c)):0>D.im(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Oc=== +hg){c=a.Wj;if("linkDataArray"===a.Ef){d=a.oldValue;D.Qa(d)&&"number"===typeof c&&(e=this.of(d),b?(this.ki.add(d),D.La(this.df,c)!==d&&D.Ih(this.df,c,d),void 0!==e&&this.td.add(e,d)):(this.ki.remove(d),D.La(this.df,c)===d&&D.Vg(this.df,c),void 0!==e&&this.td.remove(e)));return}if("linkLabelKeys"===a.Ef){d=this.al(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.im(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.im(d,a.newValue),0<=c&&D.Vg(d,c)));return}}M.prototype.Hn.call(this,a,b)}; D.defineProperty(Y,{GA:"archetypeNodeData"},function(){return this.zl},function(a){var b=this.zl;b!==a&&(null!==a&&D.l(a,Object,Y,"archetypeNodeData"),this.zl=a,this.i("archetypeNodeData",b,a))});Y.prototype.io=function(a){if(void 0!==a){var b=this.zl;if(null!==b){var c=this.Ie(a);null===c&&(c=this.copyNodeData(b),D.Ua(c,this.Dk,a),this.em(c))}return a}}; -D.defineProperty(Y,{fo:"linkFromKeyProperty"},function(){return this.li},function(a){var b=this.li;b!==a&&(bh(a,Y,"linkFromKeyProperty"),this.li=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.um=function(a){if(null!==a){var b=this.li;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(ch(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; -Y.prototype.setFromKeyForLinkData=Y.prototype.YB=function(a,b){null===b&&(b=void 0);void 0===b||ch(b)||D.kc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.li;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(hh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&gh(this,b,a),ah(this,"linkFromKey",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{ho:"linkToKeyProperty"},function(){return this.mi},function(a){var b=this.mi;b!==a&&(bh(a,Y,"linkToKeyProperty"),this.mi=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.vm=function(a){if(null!==a){var b=this.mi;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(ch(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; -Y.prototype.setToKeyForLinkData=Y.prototype.dC=function(a,b){null===b&&(b=void 0);void 0===b||ch(b)||D.kc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.mi;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(hh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&gh(this,b,a),ah(this,"linkToKey",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Tu:"linkFromPortIdProperty"},function(){return this.en},function(a){var b=this.en;b!==a&&(bh(a,Y,"linkFromPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.en=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.TI=function(a){if(null===a)return"";var b=this.en;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; -Y.prototype.setFromPortIdForLinkData=Y.prototype.ZB=function(a,b){D.h(b,"string",Y,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.en;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"linkFromPortId",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Vu:"linkToPortIdProperty"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(bh(a,Y,"linkToPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.fn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.XI=function(a){if(null===a)return"";var b=this.fn;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; -Y.prototype.setToPortIdForLinkData=Y.prototype.eC=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.fn;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"linkToPortId",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Uu:"linkLabelKeysProperty"},function(){return this.Kg},function(a){var b=this.Kg;b!==a&&(bh(a,Y,"linkLabelKeysProperty"),this.Kg=a,this.i("linkLabelKeysProperty",b,a))}); +D.defineProperty(Y,{fo:"linkFromKeyProperty"},function(){return this.li},function(a){var b=this.li;b!==a&&(ah(a,Y,"linkFromKeyProperty"),this.li=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.um=function(a){if(null!==a){var b=this.li;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(bh(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; +Y.prototype.setFromKeyForLinkData=Y.prototype.YB=function(a,b){null===b&&(b=void 0);void 0===b||bh(b)||D.kc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.li;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(gh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&fh(this,b,a),$g(this,"linkFromKey",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{ho:"linkToKeyProperty"},function(){return this.mi},function(a){var b=this.mi;b!==a&&(ah(a,Y,"linkToKeyProperty"),this.mi=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.vm=function(a){if(null!==a){var b=this.mi;if(""!==b&&(b=D.xb(a,b),void 0!==b)){if(bh(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; +Y.prototype.setToKeyForLinkData=Y.prototype.dC=function(a,b){null===b&&(b=void 0);void 0===b||bh(b)||D.kc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.mi;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.xb(a,c);d!==b&&(gh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&fh(this,b,a),$g(this,"linkToKey",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{Tu:"linkFromPortIdProperty"},function(){return this.en},function(a){var b=this.en;b!==a&&(ah(a,Y,"linkFromPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.en=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.TI=function(a){if(null===a)return"";var b=this.en;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; +Y.prototype.setFromPortIdForLinkData=Y.prototype.ZB=function(a,b){D.h(b,"string",Y,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.en;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),$g(this,"linkFromPortId",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{Vu:"linkToPortIdProperty"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(ah(a,Y,"linkToPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.fn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.XI=function(a){if(null===a)return"";var b=this.fn;if(""===b)return"";a=D.xb(a,b);return void 0===a?"":a}; +Y.prototype.setToPortIdForLinkData=Y.prototype.eC=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.fn;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),$g(this,"linkToPortId",eg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Uu:"linkLabelKeysProperty"},function(){return this.Kg},function(a){var b=this.Kg;b!==a&&(ah(a,Y,"linkLabelKeysProperty"),this.Kg=a,this.i("linkLabelKeysProperty",b,a))}); Y.prototype.getLabelKeysForLinkData=Y.prototype.al=function(a){if(null===a)return D.ml;var b=this.Kg;if(""===b)return D.ml;a=D.xb(a,b);return void 0===a?D.ml:a}; -Y.prototype.setLabelKeysForLinkData=Y.prototype.cH=function(a,b){D.gu(b,Y,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Kg;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d=D.ml);if(d!==b){for(var e=D.cb(d),g=0;g e||(D.Vg(d,e),this.Lh(a)&&(hh(this,b,a),ah(this,"linkLabelKeys",ig,c,a,b,null,e,null)))}else void 0!==d&&D.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +Y.prototype.setLabelKeysForLinkData=Y.prototype.cH=function(a,b){D.gu(b,Y,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Kg;if(""!==c)if(this.Lh(a)){var d=D.xb(a,c);void 0===d&&(d=D.ml);if(d!==b){for(var e=D.cb(d),g=0;g e||(D.Vg(d,e),this.Lh(a)&&(gh(this,b,a),$g(this,"linkLabelKeys",hg,c,a,b,null,e,null)))}else void 0!==d&&D.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; D.defineProperty(Y,{$g:"linkDataArray"},function(){return this.df},function(a){var b=this.df;if(b!==a){D.gu(a,Y,"linkDataArray");this.td.clear();for(var c=D.cb(a),d=0;d d)return;D.Vg(a.df,d)}ah(a,"linkDataArray",ig,"linkDataArray",a,b,null,d,null);c=a.um(b);hh(a,c,b);c=a.vm(b);hh(a,c,b);d=a.al(b);if(D.isArray(d))for(var e=D.cb(d),g=0;g d)return;D.Vg(a.df,d)}$g(a,"linkDataArray",hg,"linkDataArray",a,b,null,d,null);c=a.um(b);gh(a,c,b);c=a.vm(b);gh(a,c,b);d=a.al(b);if(D.isArray(d))for(var e=D.cb(d),g=0;g a.Ki&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ki;d&&b&&a.vd("CommittingTransaction",c,a.Gj);var e=0;if(0 a.Lj;e--)g=d.fa(e),null!==g&&g.clear(), +(m=d.Qu,n=d.R.fl,l.HG(n,m),l.mB(n,m,p))}catch(q){v&&D.trace("Binding error: "+q.toString()+' setting source property "'+c+'" on '+b.toString()+" with conversion function: "+g)}}finally{this.Pz.remove(a)}}}};function Bg(){this.BH=(new K(dg)).freeze();this.ac="";this.CD=!1}D.ka("Transaction",Bg); +Bg.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.fg.count.toString()+(this.Iu?"":", incomplete");if(void 0!==a&&0a.Ki&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ki;d&&b&&a.vd("CommittingTransaction",c,a.Gj);var e=0;if(0 a.Lj;e--)g=d.fa(e),null!==g&&g.clear(), d.pd(e),a.$z=!0;e=a.uG;0===e&&(e=1);0 =e&&(g=d.fa(0),null!==g&&g.clear(),d.pd(0),a.rh--);d.add(b);a.rh++;d.freeze();g=b}a.vd("CommittedTransaction",c,g)}else{a.uh=!0;try{a.isEnabled&&null!==g&&(g.Iu=!0,g.undo())}finally{a.vd("RolledBackTransaction",c,g),a.uh=!1}null!==g&&g.clear()}a.Yv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.fg;for(b=c.count-1;b>=a;b--)d=c.fa(b),null!==d&&d.undo(),c.Xa(),c.pd(b);c.freeze()}return!1} -tg.prototype.canUndo=tg.prototype.canUndo=function(){if(!this.isEnabled||0 =this.Ki&&!this.Qz&&(a=a.g,null!==a&&!1===a.ao||D.trace("Change not within a transaction: "+c.toString()))}}; -tg.prototype.skipsEvent=function(a){if(null===a||0>a.Oc.value)return!0;a=a.object;if(a instanceof O){if(a=a.layer,null!==a&&a.Yc)return!0}else if(a instanceof Hg&&a.Yc)return!0;return!1};D.w(tg,{PJ:"models"},function(){return this.eA.j});D.defineProperty(tg,{isEnabled:"isEnabled"},function(){return this.tf},function(a){this.tf=a});D.w(tg,{rH:"transactionToUndo"},function(){return 0<=this.Lj&&this.Lj<=this.history.count-1?this.history.fa(this.Lj):null}); -D.w(tg,{qH:"transactionToRedo"},function(){return this.Lj =this.Ki&&!this.Qz&&(a=a.g,null!==a&&!1===a.ao||D.trace("Change not within a transaction: "+c.toString()))}}; +ig.prototype.skipsEvent=function(a){if(null===a||0>a.Oc.value)return!0;a=a.object;if(a instanceof O){if(a=a.layer,null!==a&&a.Yc)return!0}else if(a instanceof Gg&&a.Yc)return!0;return!1};D.w(ig,{PJ:"models"},function(){return this.eA.j});D.defineProperty(ig,{isEnabled:"isEnabled"},function(){return this.tf},function(a){this.tf=a});D.w(ig,{rH:"transactionToUndo"},function(){return 0<=this.Lj&&this.Lj<=this.history.count-1?this.history.fa(this.Lj):null}); +D.w(ig,{qH:"transactionToRedo"},function(){return this.Lj b.Rh||(b.scale=a))};qa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.$y);D.p(a,qa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Wh)return!1;a*=b.scale;return a b.Rh?!1:b.Gx}; -qa.prototype.increaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"increaseZoom:factor");var b=this.g;null!==b&&b.jm===Wh&&(a*=b.scale,a b.Rh||(b.scale=a))};qa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Wh)return!1;a*=b.scale;return a b.Rh?!1:b.Gx};qa.prototype.resetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"resetZoom:newscale");var b=this.g;null===b||a b.Rh||(b.scale=a)}; -qa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"canResetZoom:newscale");var b=this.g;return null===b||a b.Rh?!1:b.Gx};qa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.DA&&!isNaN(this.aA)&&a.kd.O(this.CA)?(a.scale=this.aA,a.position=this.OD,this.DA=NaN,this.CA=Ld):(this.aA=b,this.OD=c.copy(),a.zoomToFit(),this.DA=a.scale,this.CA=a.kd.copy())}};qa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Gx}; -qa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,qa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.uj&&(this.uj.next()?a=this.uj.value:this.uj=null)}catch(c){this.uj=null}null===a&&(0 b.Rh||(b.scale=a))};qa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.$y);D.p(a,qa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Vh)return!1;a*=b.scale;return a b.Rh?!1:b.Gx}; +qa.prototype.increaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"increaseZoom:factor");var b=this.g;null!==b&&b.jm===Vh&&(a*=b.scale,a b.Rh||(b.scale=a))};qa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Vh)return!1;a*=b.scale;return a b.Rh?!1:b.Gx};qa.prototype.resetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"resetZoom:newscale");var b=this.g;null===b||a b.Rh||(b.scale=a)}; +qa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Px);D.p(a,qa,"canResetZoom:newscale");var b=this.g;return null===b||a b.Rh?!1:b.Gx};qa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.DA&&!isNaN(this.aA)&&a.kd.O(this.CA)?(a.scale=this.aA,a.position=this.OD,this.DA=NaN,this.CA=Kd):(this.aA=b,this.OD=c.copy(),a.zoomToFit(),this.DA=a.scale,this.CA=a.kd.copy())}};qa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Gx}; +qa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,qa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.uj&&(this.uj.next()?a=this.uj.value:this.uj=null)}catch(c){this.uj=null}null===a&&(0 h&&(h=-3),0 k&&(k=-3); +Hg.prototype.standardMouseOver=function(){var a=this.g;if(null!==a){var b=a.U;if(null!==b.g&&!0!==a.Ra.zc){var c=a.lb;a.lb=!0;var d=a.th?a.Je(b.ha,null,null):null;b.Oe=d;var e=!1;if(d!==a.Qo){var g=a.Qo,h=g;a.Qo=d;this.doCurrentObjectChanged(g,d);for(b.Cc=!1;null!==g;){var k=g.Zu;if(null!==k){if(d===g)break;if(null!==d&&d.ym(g))break;k(b,g,d);e=!0;if(b.Cc)break}g=g.R}g=h;for(b.Cc=!1;null!==d;){k=d.Yu;if(null!==k){if(g===d)break;if(null!==g&&g.ym(d))break;k(b,d,g);e=!0;if(b.Cc)break}d=d.R}d=a.Qo}if(null!== +d){g=d;for(h="";null!==g;){h=g.cursor;if(""!==h)break;g=g.R}a.sc=h;b.Cc=!1;for(g=d;null!==g;){d=g.FB;if(null!==d&&(d(b,g),e=!0,b.Cc))break;g=g.R}}else a.sc="",d=a.FB,null!==d&&(d(b),e=!0);e&&a.Le();a.lb=c}}};Hg.prototype.doCurrentObjectChanged=function(){}; +Hg.prototype.standardMouseWheel=function(){var a=this.g;if(null!==a){var b=a.U,c=b.Vk;if(0!==c&&a.kd.H()){var d=a.yb,e=a.ob.$u;if((e===$h&&!b.shift||e===ai&&b.control)&&(0 h&&(h=-3),0 k&&(k=-3); if(void 0===g||void 0===h||void 0===k||0===h&&0===k||b.shift)!b.shift&&a.Ce?(g=a.mv,e=3*e*g,0 e||Math.abs(b.y-a.y)>d};D.w(Zg,{g:"diagram"},function(){return this.ca}); -D.defineProperty(Zg,{name:"name"},function(){return this.ac},function(a){D.h(a,"string",Zg,"name");this.ac=a});D.defineProperty(Zg,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",Zg,"isEnabled");this.tf=a});D.defineProperty(Zg,{wa:"isActive"},function(){return this.AD},function(a){D.h(a,"boolean",Zg,"isActive");this.AD=a});D.defineProperty(Zg,{Tf:"transactionResult"},function(){return this.IE},function(a){null!==a&&D.h(a,"string",Zg,"transactionResult");this.IE=a}); -function Vh(){Zg.call(this);0 e&&(e=k),l>g&&(g=l))}}Infinity===c?b.n(0,0,0,0):b.n(c,d,e-c,g-d)} -function Pi(a,b){if(null===a.mc){var c=a.g;if(!(null===c||b&&(c.qb||c.Mf))&&null!==a.hc){var d=c.na;d.isEnabled&&d.iG?null!==d.Gj&&0 c.ta)){var d=a.g;if(null!==d&&!d.qb){var e=a.sj;if(null!==e){var g=null,h=null;null===c.$&&(g=Zi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.ba&&(k=Zi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.iq=c.m(0),c.jq=c.m(c.ta-1),c.Ji=!1,c.$=h,null!==g&&(c.hg=g.yd),c.ba=l,null!==k&&(c.jh=k.yd),c.oc!==a.Mw&&d.Ja("LinkRelinked",c,a.Mw),c.Gc!==a.Nw&&d.Ja("LinkRelinked",c,a.Nw)):$i(e,h,g,l,k):$i(e,null,null,null,null)}}}} -Vh.prototype.doDragOver=function(){}; -function aj(a,b){var c=a.g;if(null!==c){a.Ij&&Wi(a,!0);Fi(a);var d=Xi(c,b,null,function(b){return!Ui(a,b)}),e=c.U;e.Oe=d;if(null!==d){e.Cc=!1;for(var g=d;null!==g;){var h=g.CB;if(null!==h&&(h(e,g),e.Cc))break;g=Yi(g)}}else g=c.CB,null!==g&&g(e);if(a.wa||null!==ei){for(e=(a.mc||a.hc).j;e.next();)g=e.key,g instanceof G&&g.Pd.each(function(a){a.Ji=!1});a.doDropOnto(b,d);if(a.wa||null!==ei){d=D.Sf();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&bj(c,g.getAvoidableRect(d));D.Lb(d)}}}} -function bj(a,b){var c=!1;a.wb.Tk(b)&&(c=!0);c=a.$A(b,function(a){return a.Y},function(a){return a instanceof J},!0,function(a){return a instanceof J},c);if(0!==c.count)for(c=c.j;c.next();){var d=c.value;d.Nj&&d.ec()}}Vh.prototype.doDropOnto=function(){}; -Vh.prototype.doMouseMove=function(){if(this.wa){var a=this.g;null!==a&&null!==this.On&&null!==this.hc&&(this.mayCopy()?(a.sc="copy",Pi(this,!1),di(this,this.mc),Qi(this,this.mc,!1),Gi(this,this.mc)):this.mayMove()?(Ji(this),Qi(this,this.hc,!0)):this.mayDragOut()?(a.sc="no-drop",Pi(this,!1),Qi(this,this.mc,!1)):Ji(this),Vi(this,a.U.ha))}}; -Vh.prototype.doMouseUp=function(){if(this.wa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.mc?(Ji(this),Pi(this,!0),di(this,this.mc),Qi(this,this.mc,!1),Gi(this,this.mc),null!==this.mc&&a.YG(this.mc.bk())):(b=!0,Ji(this),this.mayMove()&&(Qi(this,this.hc,!0),Vi(this,a.U.ha)));this.Vr=!0;aj(this,a.U.ha);if(this.wa){this.mc=null;if(b&&null!==this.hc)for(b=this.hc.j;b.next();){var d=b.key;d instanceof G&&(d=d.Ka,null===d||null===d.placeholder||this.hc.contains(d)||d.placeholder.K())}a.Qc(); -Gi(this,this.hc);this.Tf=c?"Copy":"Move";a.Ja(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Vh.prototype.mayCopy=function(){if(!this.fG)return!1;var a=this.g;if(null===a||a.qb||a.Mf||!a.Zp||!a.Qk||(D.Qh?!a.U.alt:!a.U.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1}; -Vh.prototype.mayDragOut=function(){if(!this.fG)return!1;var a=this.g;if(null===a||!a.du||!a.Qk||a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1};Vh.prototype.mayMove=function(){var a=this.g;if(null===a||a.qb||!a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canMove())return!0}return null!==this.wd&&this.Ij&&this.wd.canMove()?!0:!1};var Hi=new K(Vh),ei=null,fi=null; -Vh.prototype.getDraggingSource=function(){return ei};Vh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.WE||a.qb||a.Mf||!a.Zp)return!1;var b=ei;return null===b||null===b.g||b.g.ea.om!==a.ea.om?!1:!0};Vh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Ra.Yh();cj(a);a.Ra.Yh();a=ei;null!==a&&null!==a.g&&(a.g.sc="copy")}};Vh.prototype.doSimulatedDragLeave=function(){var a=ei;null!==a&&a.doSimulatedDragOut();this.doCancel()}; -Vh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=ei;null!==b&&null!==b.hc&&this.mayDragIn()&&(a.sc="copy",dj(this,b.hc.bk(),!1),Qi(this,this.mc,!1),Vi(this,a.U.ha))}}; -Vh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=ei;if(null!==b){var c=b.g;b.Vr=!0;Ji(this);this.mayDragIn()&&(this.Nb("Drop"),dj(this,b.hc.bk(),!0),Qi(this,this.mc,!1),null!==this.mc&&a.YG(this.mc.bk()),aj(this,a.U.ha),a.Qc(),b=a.selection,null!==this.mc?this.Tf="ExternalCopy":b=new L(F),this.mc=null,a.doFocus(),a.Ja("ExternalObjectsDropped",b,c),this.ll())}}}; -function dj(a,b,c){if(null===a.mc){var d=a.g;if(null!==d&&!d.qb&&!d.Mf){d.lb=!c;d.hr=!c;a.kl=d.U.ha;c=d.hq(b,d,!0);var e=D.Sf();Oi(b,e);var d=e.x+e.width/2,g=e.y+e.height/2;D.Lb(e);var e=a.lx,h=new na(F),k=D.P();for(b=b.j;b.next();){var l=b.value,m=c.oa(l);l.re()&&l.canCopy()?(l=l.location,k.n(e.x-(d-l.x),e.y-(g-l.y)),m.location=k,m.mf(),h.add(m,ii(a,k))):l instanceof J&&l.canCopy()&&(m.hl(e.x-d,e.y-g),h.add(m,ii(a)))}D.A(k);a.mc=h;ci(a,h.bk());null!==a.wd&&(c=a.wd,d=c.uo,c.hl(a.kl.x-(d.x+d.width/ -2),a.kl.y-(d.y+d.height/2)))}}}Vh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.sc="":a.sc="no-drop")};function ri(a){this.point=a;this.dH=Kd}D.ka("DraggingInfo",ri);function Ri(a,b,c){this.Zc=a;this.info=b;this.$I=c} -function ej(){0 =d&&(d=.1);for(var e=this,g=b.Rn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.j;g.next();){var h=g.value,k=h.Y;if(k instanceof G){var l=h.fb(mc,D.P()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;l c){if(null!==this.vc&&a===this.bh&&b===this.dh)return!0;var d=b.yd;null===d&&(d="");if(a.Xx(d).count>=c)return!1}return!0}; -ej.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.Cq;if(null!==this.g&&this.g.eb===this&&(null!==a.layer&&!a.layer.eu||!0!==b.mH))return!1;var c=b.EK;if(Infinity>c){if(null!==this.vc&&a===this.eh&&b===this.fh)return!0;var d=b.yd;null===d&&(d="");if(a.Yg(d).count>=c)return!1}return!0};ej.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; -ej.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof G))return!1;var d=a.yd;null===d&&(d="");var e=b.Y;if(!(e instanceof G))return!1;var g=b.yd;null===g&&(g="");for(e=e.Yg(g);e.next();)if(g=e.value,g.$===c&&g.hg===d)return!0;return!1}; -ej.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.QI&&d.DK||!this.isInSameNode(b,d))&&(b.OI&&d.CK||!this.isLinked(b,d)))||null!==this.vc&&(null!==a&&this.isLabelDependentOnLink(a,this.vc)||null!==c&&this.isLabelDependentOnLink(c,this.vc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.vc))return!1;if(null!==a){var e=a.ty;if(null!==e&&!e(a,b,c,d,this.vc))return!1}if(null!== -c&&(e=c.ty,null!==e&&!e(a,b,c,d,this.vc)))return!1;e=this.ty;return null!==e?e(a,b,c,d,this.vc):!0};ej.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Yb;if(null===c)return!1;if(c===b)return!0;var d=new L(G);d.add(a);return fj(this,c,b,d)};function fj(a,b,c,d){if(b===c)return!0;var e=b.$;if(null!==e&&e.Lf&&(d.add(e),fj(a,e.Yb,c,d)))return!0;b=b.ba;return null!==b&&b.Lf&&(d.add(b),fj(a,b.Yb,c,d))?!0:!1} -ej.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.Cq;var d=null!==this.g?this.g.KK:gj;if(d!==gj){if(d===hj){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=b.Pd;d.next();){var e=d.value;if(e!==c&&e.jc&&e.ba===b)return!1}return!ij(this,a,b,c,!0)}if(d===jj){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=a.Pd;d.next();)if(e=d.value,e!==c&&e.jc&&e.$===a)return!1;return!ij(this,a,b,c,!0)}if(d===kj)return a===b?a=!0:(d=new L(G),d.add(b),a=lj(this,d,a,b,c)), -!a;if(d===mj)return!ij(this,a,b,c,!1);if(d===nj)return a===b?a=!0:(d=new L(G),d.add(b),a=oj(this,d,a,b,c)),!a}return!0};function ij(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Pd;g.next();){var h=g.value;if(h!==d&&(!e||h.jc)&&h.ba===b&&(h=h.$,h!==b&&ij(a,h,c,d,e)))return!0}return!1} -function lj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e&&h.ba===c&&(h=h.$,h!==c&&lj(a,b,h,d,e)))return!0}return!1}function oj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e){var k=h.$,h=h.ba,k=k===c?h:k;if(k!==c&&oj(a,b,k,d,e))return!0}}return!1} -D.defineProperty(ej,{ty:"linkValidation"},function(){return this.Ql},function(a){null!==a&&D.h(a,"function",ej,"linkValidation");this.Ql=a});D.defineProperty(ej,{Fy:"portTargeted"},function(){return this.jE},function(a){null!==a&&D.h(a,"function",ej,"portTargeted");this.jE=a});function ra(){0 e||Math.abs(b.y-a.y)>d};D.w(Hg,{g:"diagram"},function(){return this.ca}); +D.defineProperty(Hg,{name:"name"},function(){return this.ac},function(a){D.h(a,"string",Hg,"name");this.ac=a});D.defineProperty(Hg,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",Hg,"isEnabled");this.tf=a});D.defineProperty(Hg,{wa:"isActive"},function(){return this.AD},function(a){D.h(a,"boolean",Hg,"isActive");this.AD=a});D.defineProperty(Hg,{Tf:"transactionResult"},function(){return this.IE},function(a){null!==a&&D.h(a,"string",Hg,"transactionResult");this.IE=a}); +function Uh(){Hg.call(this);0 e&&(e=k),l>g&&(g=l))}}Infinity===c?b.n(0,0,0,0):b.n(c,d,e-c,g-d)} +function Oi(a,b){if(null===a.mc){var c=a.g;if(!(null===c||b&&(c.qb||c.Mf))&&null!==a.hc){var d=c.na;d.isEnabled&&d.iG?null!==d.Gj&&0 c.ta)){var d=a.g;if(null!==d&&!d.qb){var e=a.sj;if(null!==e){var g=null,h=null;null===c.$&&(g=Yi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.ba&&(k=Yi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.iq=c.m(0),c.jq=c.m(c.ta-1),c.Ji=!1,c.$=h,null!==g&&(c.hg=g.yd),c.ba=l,null!==k&&(c.jh=k.yd),c.oc!==a.Mw&&d.Ja("LinkRelinked",c,a.Mw),c.Gc!==a.Nw&&d.Ja("LinkRelinked",c,a.Nw)):Zi(e,h,g,l,k):Zi(e,null,null,null,null)}}}} +Uh.prototype.doDragOver=function(){}; +function $i(a,b){var c=a.g;if(null!==c){a.Ij&&Vi(a,!0);Ei(a);var d=Wi(c,b,null,function(b){return!Ti(a,b)}),e=c.U;e.Oe=d;if(null!==d){e.Cc=!1;for(var g=d;null!==g;){var h=g.CB;if(null!==h&&(h(e,g),e.Cc))break;g=Xi(g)}}else g=c.CB,null!==g&&g(e);if(a.wa||null!==di){for(e=(a.mc||a.hc).j;e.next();)g=e.key,g instanceof G&&g.Pd.each(function(a){a.Ji=!1});a.doDropOnto(b,d);if(a.wa||null!==di){d=D.Sf();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&aj(c,g.getAvoidableRect(d));D.Lb(d)}}}} +function aj(a,b){var c=!1;a.wb.Tk(b)&&(c=!0);c=a.$A(b,function(a){return a.Y},function(a){return a instanceof J},!0,function(a){return a instanceof J},c);if(0!==c.count)for(c=c.j;c.next();){var d=c.value;d.Nj&&d.ec()}}Uh.prototype.doDropOnto=function(){}; +Uh.prototype.doMouseMove=function(){if(this.wa){var a=this.g;null!==a&&null!==this.On&&null!==this.hc&&(this.mayCopy()?(a.sc="copy",Oi(this,!1),ci(this,this.mc),Pi(this,this.mc,!1),Fi(this,this.mc)):this.mayMove()?(Ii(this),Pi(this,this.hc,!0)):this.mayDragOut()?(a.sc="no-drop",Oi(this,!1),Pi(this,this.mc,!1)):Ii(this),Ui(this,a.U.ha))}}; +Uh.prototype.doMouseUp=function(){if(this.wa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.mc?(Ii(this),Oi(this,!0),ci(this,this.mc),Pi(this,this.mc,!1),Fi(this,this.mc),null!==this.mc&&a.YG(this.mc.bk())):(b=!0,Ii(this),this.mayMove()&&(Pi(this,this.hc,!0),Ui(this,a.U.ha)));this.Vr=!0;$i(this,a.U.ha);if(this.wa){this.mc=null;if(b&&null!==this.hc)for(b=this.hc.j;b.next();){var d=b.key;d instanceof G&&(d=d.Ka,null===d||null===d.placeholder||this.hc.contains(d)||d.placeholder.K())}a.Qc(); +Fi(this,this.hc);this.Tf=c?"Copy":"Move";a.Ja(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Uh.prototype.mayCopy=function(){if(!this.fG)return!1;var a=this.g;if(null===a||a.qb||a.Mf||!a.Zp||!a.Qk||(D.Qh?!a.U.alt:!a.U.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1}; +Uh.prototype.mayDragOut=function(){if(!this.fG)return!1;var a=this.g;if(null===a||!a.du||!a.Qk||a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canCopy())return!0}return null!==this.wd&&this.Ij&&this.wd.canCopy()?!0:!1};Uh.prototype.mayMove=function(){var a=this.g;if(null===a||a.qb||!a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.re()&&b.canMove())return!0}return null!==this.wd&&this.Ij&&this.wd.canMove()?!0:!1};var Gi=new K(Uh),di=null,ei=null; +Uh.prototype.getDraggingSource=function(){return di};Uh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.WE||a.qb||a.Mf||!a.Zp)return!1;var b=di;return null===b||null===b.g||b.g.ea.om!==a.ea.om?!1:!0};Uh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Ra.Yh();bj(a);a.Ra.Yh();a=di;null!==a&&null!==a.g&&(a.g.sc="copy")}};Uh.prototype.doSimulatedDragLeave=function(){var a=di;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +Uh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=di;null!==b&&null!==b.hc&&this.mayDragIn()&&(a.sc="copy",cj(this,b.hc.bk(),!1),Pi(this,this.mc,!1),Ui(this,a.U.ha))}}; +Uh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=di;if(null!==b){var c=b.g;b.Vr=!0;Ii(this);this.mayDragIn()&&(this.Nb("Drop"),cj(this,b.hc.bk(),!0),Pi(this,this.mc,!1),null!==this.mc&&a.YG(this.mc.bk()),$i(this,a.U.ha),a.Qc(),b=a.selection,null!==this.mc?this.Tf="ExternalCopy":b=new L(F),this.mc=null,a.doFocus(),a.Ja("ExternalObjectsDropped",b,c),this.ll())}}}; +function cj(a,b,c){if(null===a.mc){var d=a.g;if(null!==d&&!d.qb&&!d.Mf){d.lb=!c;d.hr=!c;a.kl=d.U.ha;c=d.hq(b,d,!0);var e=D.Sf();Ni(b,e);var d=e.x+e.width/2,g=e.y+e.height/2;D.Lb(e);var e=a.lx,h=new na(F),k=D.P();for(b=b.j;b.next();){var l=b.value,m=c.oa(l);l.re()&&l.canCopy()?(l=l.location,k.n(e.x-(d-l.x),e.y-(g-l.y)),m.location=k,m.mf(),h.add(m,hi(a,k))):l instanceof J&&l.canCopy()&&(m.hl(e.x-d,e.y-g),h.add(m,hi(a)))}D.A(k);a.mc=h;bi(a,h.bk());null!==a.wd&&(c=a.wd,d=c.uo,c.hl(a.kl.x-(d.x+d.width/ +2),a.kl.y-(d.y+d.height/2)))}}}Uh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.sc="":a.sc="no-drop")};function ii(a){this.point=a;this.dH=Jd}D.ka("DraggingInfo",ii);function Qi(a,b,c){this.Zc=a;this.info=b;this.$I=c} +function dj(){0 =d&&(d=.1);for(var e=this,g=b.Rn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.j;g.next();){var h=g.value,k=h.Y;if(k instanceof G){var l=h.fb(mc,D.P()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;l c){if(null!==this.vc&&a===this.bh&&b===this.dh)return!0;var d=b.yd;null===d&&(d="");if(a.Xx(d).count>=c)return!1}return!0}; +dj.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.Cq;if(null!==this.g&&this.g.eb===this&&(null!==a.layer&&!a.layer.eu||!0!==b.mH))return!1;var c=b.EK;if(Infinity>c){if(null!==this.vc&&a===this.eh&&b===this.fh)return!0;var d=b.yd;null===d&&(d="");if(a.Yg(d).count>=c)return!1}return!0};dj.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; +dj.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof G))return!1;var d=a.yd;null===d&&(d="");var e=b.Y;if(!(e instanceof G))return!1;var g=b.yd;null===g&&(g="");for(e=e.Yg(g);e.next();)if(g=e.value,g.$===c&&g.hg===d)return!0;return!1}; +dj.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.QI&&d.DK||!this.isInSameNode(b,d))&&(b.OI&&d.CK||!this.isLinked(b,d)))||null!==this.vc&&(null!==a&&this.isLabelDependentOnLink(a,this.vc)||null!==c&&this.isLabelDependentOnLink(c,this.vc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.vc))return!1;if(null!==a){var e=a.ty;if(null!==e&&!e(a,b,c,d,this.vc))return!1}if(null!== +c&&(e=c.ty,null!==e&&!e(a,b,c,d,this.vc)))return!1;e=this.ty;return null!==e?e(a,b,c,d,this.vc):!0};dj.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Yb;if(null===c)return!1;if(c===b)return!0;var d=new L(G);d.add(a);return ej(this,c,b,d)};function ej(a,b,c,d){if(b===c)return!0;var e=b.$;if(null!==e&&e.Lf&&(d.add(e),ej(a,e.Yb,c,d)))return!0;b=b.ba;return null!==b&&b.Lf&&(d.add(b),ej(a,b.Yb,c,d))?!0:!1} +dj.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.Cq;var d=null!==this.g?this.g.KK:fj;if(d!==fj){if(d===gj){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=b.Pd;d.next();){var e=d.value;if(e!==c&&e.jc&&e.ba===b)return!1}return!hj(this,a,b,c,!0)}if(d===ij){d=c||this.Gf;if(null!==d&&!d.jc)return!0;for(d=a.Pd;d.next();)if(e=d.value,e!==c&&e.jc&&e.$===a)return!1;return!hj(this,a,b,c,!0)}if(d===jj)return a===b?a=!0:(d=new L(G),d.add(b),a=kj(this,d,a,b,c)), +!a;if(d===lj)return!hj(this,a,b,c,!1);if(d===mj)return a===b?a=!0:(d=new L(G),d.add(b),a=nj(this,d,a,b,c)),!a}return!0};function hj(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Pd;g.next();){var h=g.value;if(h!==d&&(!e||h.jc)&&h.ba===b&&(h=h.$,h!==b&&hj(a,h,c,d,e)))return!0}return!1} +function kj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e&&h.ba===c&&(h=h.$,h!==c&&kj(a,b,h,d,e)))return!0}return!1}function nj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Pd;g.next();){var h=g.value;if(h!==e){var k=h.$,h=h.ba,k=k===c?h:k;if(k!==c&&nj(a,b,k,d,e))return!0}}return!1} +D.defineProperty(dj,{ty:"linkValidation"},function(){return this.Ql},function(a){null!==a&&D.h(a,"function",dj,"linkValidation");this.Ql=a});D.defineProperty(dj,{Fy:"portTargeted"},function(){return this.jE},function(a){null!==a&&D.h(a,"function",dj,"portTargeted");this.jE=a});function ra(){0 b.tu+1&&c b.tu+1&&c =c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? -"ne-resize":"e-resize"}else if(a instanceof x)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};D.defineProperty(Xj,{Eu:"handleArchetype"},function(){return this.Gl},function(a){null!==a&&D.l(a,O,Xj,"handleArchetype");this.Gl=a});D.w(Xj,{handle:"handle"},function(){return this.pc});D.defineProperty(Xj,{Bb:"adornedObject"},function(){return this.Tc},function(a){null!==a&&D.l(a,O,Xj,"adornedObject");this.Tc=a}); -Xj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.qb&&a.fu&&a.U.left?null!==this.findToolHandleAt(a.Pc.ha,this.name):!1}; -Xj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.pc=this.findToolHandleAt(a.Pc.ha,this.name),null!==this.pc&&(this.Tc=this.pc.Y.Bb,this.Bp.set(this.Bb.fb(this.handle.alignment.CG())),this.fE.set(this.Tc.Y.location),this.aE.set(this.Tc.Ea),this.Mz=this.computeCellSize(),this.Oz=this.computeMinSize(),this.Nz=this.computeMaxSize(),a.qf=!0,this.YD=a.Ra.isEnabled,a.Ra.isEnabled=!1,this.Nb(this.name),this.wa=!0))}; -Xj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.ll(),this.Tc=this.pc=null,this.wa=a.qf=!1,a.Ra.isEnabled=this.YD)};Xj.prototype.doCancel=function(){null!==this.Bb&&(this.Bb.Ea=this.DG,this.Bb.Y.location=this.XJ);this.stopTool()};Xj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.lg();D.A(e)}}; -Xj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.Qc();this.Tf=this.name;a.Ja("PartResized",this.Bb,this.DG)}this.stopTool()}; -Xj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.Bb,d=c.Y;c.Ea=a.size;d.mf();a=this.Bb.fb(this.handle.alignment.CG());d instanceof I?(c=new K(F),c.add(d),b.moveParts(c,this.Bp.copy().$j(a),!0)):d.location=d.location.copy().$j(a).add(this.Bp)}}; -Xj.prototype.computeResize=function(a,b,c,d,e,g){b.ee()&&(b=mc);var h=this.Bb.Fa,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=D.P();gb(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? +"ne-resize":"e-resize"}else if(a instanceof x)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};D.defineProperty(Wj,{Eu:"handleArchetype"},function(){return this.Gl},function(a){null!==a&&D.l(a,O,Wj,"handleArchetype");this.Gl=a});D.w(Wj,{handle:"handle"},function(){return this.pc});D.defineProperty(Wj,{Bb:"adornedObject"},function(){return this.Tc},function(a){null!==a&&D.l(a,O,Wj,"adornedObject");this.Tc=a}); +Wj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.qb&&a.fu&&a.U.left?null!==this.findToolHandleAt(a.Pc.ha,this.name):!1}; +Wj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.pc=this.findToolHandleAt(a.Pc.ha,this.name),null!==this.pc&&(this.Tc=this.pc.Y.Bb,this.Bp.set(this.Bb.fb(this.handle.alignment.CG())),this.fE.set(this.Tc.Y.location),this.aE.set(this.Tc.Ea),this.Mz=this.computeCellSize(),this.Oz=this.computeMinSize(),this.Nz=this.computeMaxSize(),a.qf=!0,this.YD=a.Ra.isEnabled,a.Ra.isEnabled=!1,this.Nb(this.name),this.wa=!0))}; +Wj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.ll(),this.Tc=this.pc=null,this.wa=a.qf=!1,a.Ra.isEnabled=this.YD)};Wj.prototype.doCancel=function(){null!==this.Bb&&(this.Bb.Ea=this.DG,this.Bb.Y.location=this.XJ);this.stopTool()};Wj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.lg();D.A(e)}}; +Wj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.OF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.Qc();this.Tf=this.name;a.Ja("PartResized",this.Bb,this.DG)}this.stopTool()}; +Wj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.Bb,d=c.Y;c.Ea=a.size;d.mf();a=this.Bb.fb(this.handle.alignment.CG());d instanceof I?(c=new K(F),c.add(d),b.moveParts(c,this.Bp.copy().$j(a),!0)):d.location=d.location.copy().$j(a).add(this.Bp)}}; +Wj.prototype.computeResize=function(a,b,c,d,e,g){b.ee()&&(b=mc);var h=this.Bb.Fa,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=D.P();gb(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height), a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,g||(a.width=a.height/p,a.x= -k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));D.A(q);return a};Xj.prototype.computeReshape=function(){var a=ak;this.Bb instanceof z&&(a=bk(this.Bb));return!(a===ck||a===dk||null!==this.g&&this.g.U.shift)};Xj.prototype.computeMinSize=function(){var a=this.Bb.ah.copy(),b=this.ah;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; -Xj.prototype.computeMaxSize=function(){var a=this.Bb.rf.copy(),b=this.rf;!isNaN(b.width)&&b.width a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; +Wj.prototype.computeMaxSize=function(){var a=this.Bb.rf.copy(),b=this.rf;!isNaN(b.width)&&b.width a&&(a+=360));var b=Math.min(Math.abs(this.vK),180),c=Math.min(Math.abs(this.uK),b/2);(null===this.g||!this.g.U.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};D.defineProperty(ek,{vK:"snapAngleMultiple"},function(){return this.qE},function(a){D.h(a,"number",ek,"snapAngleMultiple");this.qE=a}); -D.defineProperty(ek,{uK:"snapAngleEpsilon"},function(){return this.pE},function(a){D.h(a,"number",ek,"snapAngleEpsilon");this.pE=a});D.w(ek,{pM:"originalAngle"},function(){return this.Ow});function gk(){Zg.call(this);0 a&&(a+=360));var b=Math.min(Math.abs(this.vK),180),c=Math.min(Math.abs(this.uK),b/2);(null===this.g||!this.g.U.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};D.defineProperty(dk,{vK:"snapAngleMultiple"},function(){return this.qE},function(a){D.h(a,"number",dk,"snapAngleMultiple");this.qE=a}); +D.defineProperty(dk,{uK:"snapAngleEpsilon"},function(){return this.pE},function(a){D.h(a,"number",dk,"snapAngleEpsilon");this.pE=a});D.w(dk,{pM:"originalAngle"},function(){return this.Ow});function fk(){Hg.call(this);0 e.right&&(c.x-=d.width+5);c.x e.bottom&&(c.y-=d.height+5);c.y a.U.Ee?!1:!0};rk.prototype.doStart=function(){this.wa||null===this.ih||this.doActivate()}; -rk.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.ih;null===b&&(b=a.Je(a.U.ha));if(null!==b&&b instanceof pa&&(this.ih=b,null!==b.Y)){this.wa=!0;this.$a=Ak;var c=this.wI;null!==b.lH&&(c=b.lH);this.Jk=this.ih.copy();var d=new C(this.ih.fb(ec),this.ih.fb(vc));a.VG(d);if(c instanceof ik)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.Hj.appendChild(c);"function"===typeof c.focus&& -c.focus();"function"===typeof c.select&&this.Ry&&(c.select(),c.setSelectionRange(0,9999))}this.Fj=c}}}};rk.prototype.doCancel=function(){null!==this.bt&&this.Fj instanceof HTMLElement&&(this.Fj.style.border=this.bt,this.bt=null);this.stopTool()};rk.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};rk.prototype.doMouseDown=function(){this.wa&&this.acceptText(wk)}; -rk.prototype.acceptText=function(a){switch(a){case wk:if(this.$a===Ek)this.Fj instanceof HTMLElement&&this.Fj.focus();else if(this.$a===Ak||this.$a===Dk||this.$a===Bk)this.$a=Ck,Hk(this);break;case vk:case yk:case xk:if(yk===a&&!0===this.vA.ky)break;if(this.$a===Ak||this.$a===Dk||this.$a===Bk)this.$a=Ck,Hk(this)}}; -function Hk(a){var b=a.ih,c=a.g,d=a.Fj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof ik?null!==d.tC&&(g=d.tC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.Nb(a.name),a.$a=Ek,a.Tf=a.name,b.text=g,null!==b.kH&&b.kH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.ll(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Dk,null!==b.ZA&&b.ZA(a,e,g),d instanceof ik?d.show(b,c,a):(null===a.bt&&(a.bt=d.style.border,d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}} -rk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.$a=tk;this.ih=null;if(null!==this.Fj){var b=this.Fj;if(b instanceof ik)b.Yn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Hj.removeChild(b)}}this.wa=!1}};rk.prototype.doFocus=function(){v&&D.Qn("TextEditingTool.doFocus","2.0");Fk(this)};rk.prototype.doBlur=function(){v&&D.Qn("TextEditingTool.doBlur","2.0");Gk(this)}; -function Fk(a){if(null!==a.Fj&&a.state!==tk){var b=a.Bz;a.$a===Ak&&(a.$a=Bk);"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}function Gk(a){if(null!==a.Fj&&a.state!==tk){var b=a.Bz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}rk.prototype.isValidText=function(a,b,c){D.l(a,pa,rk,"isValidText:textblock");var d=this.jC;if(null!==d&&!d(a,b,c))return!1;d=a.jC;return null===d||d(a,b,c)?!0:!1}; -D.defineProperty(rk,{jC:"textValidation"},function(){return this.$l},function(a){null!==a&&D.h(a,"function",rk,"textValidation");this.$l=a});D.defineProperty(rk,{xG:"minimumEditorScale"},function(){return this.TD},function(a){null!==a&&D.h(a,"number",rk,"minimumEditorScale");this.TD=a});D.defineProperty(rk,{Ry:"selectsTextOnActivate"},function(){return this.nE},function(a){null!==a&&D.h(a,"boolean",rk,"selectsTextOnActivate");this.nE=a}); -D.defineProperty(rk,{state:"state"},function(){return this.$a},function(a){this.$a!==a&&(D.Da(a,rk,rk,"starting"),this.$a=a)});rk.prototype.measureTemporaryTextBlock=rk.prototype.KJ=function(a){var b=this.Jk;b.text=a;Ik(b,this.ih.rp,Infinity);return b};function Qh(){Zg.call(this);this.name="ToolManager";this.HH=new K(Zg);this.IH=new K(Zg);this.JH=new K(Zg);this.xD=this.yD=850;this.mD=(new Ca(2,2)).Oa();this.GE=5E3;this.XD=bi;this.vD=Jk;this.Xv=this.aD=null;this.An=-1}D.Ta(Qh,Zg); -D.ka("ToolManager",Qh);var bi;Qh.WheelScroll=bi=D.s(Qh,"WheelScroll",0);var ai;Qh.WheelZoom=ai=D.s(Qh,"WheelZoom",1);Qh.WheelNone=D.s(Qh,"WheelNone",2);var Jk;Qh.GestureZoom=Jk=D.s(Qh,"GestureZoom",3);var Kk;Qh.GestureCancel=Kk=D.s(Qh,"GestureCancel",4);var Xk;Qh.GestureNone=Xk=D.s(Qh,"GestureNone",5);D.defineProperty(Qh,{$u:"mouseWheelBehavior"},function(){return this.XD},function(a){D.Da(a,Qh,Qh,"mouseWheelBehavior");this.XD=a}); -D.defineProperty(Qh,{rq:"gestureBehavior"},function(){return this.vD},function(a){D.Da(a,Qh,Qh,"gestureBehavior");this.vD=a});Qh.prototype.initializeStandardTools=function(){this.TH=new hk;this.GG=new gi;this.CJ=new yj;this.SG=new Xj;this.jK=new ek;this.tG=new ra;this.Ge=new Vh;this.AI=new pk;this.YJ=new qk;this.NA=new kk;this.iC=new rk;this.fI=new ta;this.gI=new gk}; -Qh.prototype.updateAdornments=function(a){var b=this.nm;if(b instanceof da&&this.Xv===a){var c=b.Bb;(null!==a?c.Y===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -Qh.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.U;b.Qj&&this.rq===Kk&&(b.bubbles=!1);if(b.Ou){this.cancelWaitAfter();if(this.rq===Xk){b.bubbles=!0;return}if(this.rq===Kk)return;if(a.eb.canStartMultiTouch()){a.eb.standardPinchZoomStart();return}}var c=a.na;c.IA&&0!==c.Ki&&D.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.sf.length,d=0;d e.right&&(c.x-=d.width+5);c.x e.bottom?c.y-(d.height+5):c.y+20;c.y a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(kh,{lL:"animationReasons"},function(){return this.Kv}); -kh.prototype.canStart=function(){return!0};kh.prototype.prepareAutomaticAnimation=kh.prototype.ro=function(a){this.tf&&(this.Ll||this.ca.ao)&&(this.Kv.add(a),this.canStart(a)&&(this.tk&&this.Yh(),this.zc=!0))};function fl(a){if(a.tf&&(a.Kv.clear(),a.zc))if(!a.Ho)a.zc=!1;else if(0===a.Om){var b=+new Date;a.Om=b;requestAnimationFrame(function(){if(!1!==a.zc&&!a.tk&&a.Om===b){var c=a.ca;c.Kj("temporaryPixelRatio")&&(c.Ik=1);gl(c);a.zc=!1;c.Ja("AnimationStarting");hl(a,b)}})}} -function il(a,b,c,d,e,g){if(a.zc&&(v&&D.l(b,O,kh,"addPropToAnimation:obj"),!("position"===c&&d.O(e)||b instanceof F&&!b.dG))){var h=a.ln;if(h.contains(b)){var h=h.oa(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=jl(d));h.Mx&&void 0!==l[c]?h.pu[c]=jl(e):(g||(h.pu[c]=jl(e)),l[c]=jl(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.pu.location=jl(b.location))}else k=new ma,l=new ma,k[c]=jl(d),l[c]=jl(e),d=l,e=k.position,e instanceof N&&!e.H()&&a.Kv.contains("Expand SubGraph")&&e.assign(d.position),k= -new el(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.pu.location=jl(b.location)),h.add(b,k);a.Ho=!0}}function jl(a){return a instanceof N?a.copy():a instanceof Ca?a.copy():a} -function hl(a,b){var c;function d(){if(!1!==g.tk&&g.Om===b){var a=+new Date,c=a>s?m:a-r;kl(g);ll(g,e,q,h,c,m);g.Uv&&g.Uv();cj(e);ml(g);a>s?nl(g):requestAnimationFrame(d)}}void 0===c&&(c=new ma);var e=a.ca;if(null!==e){var g=a,h=c.QL||a.bD,k=c.nM||null,l=c.oM||null,m=c.duration||a.Jz,n=a.KH;for(c=a.ln.j;c.next();){var p=c.value.start.position;p instanceof N&&(p.H()||p.assign(n))}a.XC=h;a.Uv=k;a.Vv=l;a.WC=m;a.Wv=a.ln;var q=a.Wv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l=c.key.findVisibleNode(), -l instanceof I&&null!==l.placeholder&&(l=l.placeholder,n=l.fb(ec),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n));a.tk=!0;kl(a);ll(a,e,q,h,0,m);cj(a.ca);ml(a);var r=+new Date,s=r+m;g.Om===b&&requestAnimationFrame(function(){d()})}}function kl(a){if(!a.np){var b=a.ca;a.JE=b.lb;a.KC=b.Xe;a.LC=b.rv;b.lb=!0;b.Xe=!0;b.rv=!0;a.np=!0}}function ml(a){var b=a.ca;b.lb=a.JE;b.Xe=a.KC;b.rv=a.LC;a.np=!1} -function ll(a,b,c,d,e,g){for(c=c.j;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==ol[m])ol[m](h,l[m],k[m],d,e,g)}d=b.qB;b.qB=!0;m=a.bD;0!==a.Rr&&0!==a.Qr&&(c=a.Rr,b.Db=m(e,c,a.Qr-c,g));null!==a.Pr&&null!==a.Nr&&(c=a.Pr,a=a.Nr,b.sb=new N(m(e,c.x,a.x-c.x,g),m(e,c.y,a.y-c.y,g)));b.qB=d} -kh.prototype.stopAnimation=kh.prototype.Yh=function(){!0===this.zc&&(this.zc=!1,this.Om=0,this.Ho&&this.ca.Le());this.tk&&this.tf&&nl(this)}; -function nl(a){a.tk=!1;a.Ho=!1;kl(a);for(var b=a.ca,c=a.XC,d=a.WC,e=a.Wv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.pu,n;for(n in l)if(void 0!==ol[n]){var p=n;!h.Mx||"position:node"!==p&&"position:placeholder"!==p||(p="position");ol[p](g,k[n],void 0!==m[n]?m[n]:h.Mx?k[n]:l[n],c,d,d)}h.Mx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.Iy&&g instanceof F&&g.Qd(!1)}for(c=a.ca.links;c.next();)d=c.value,null!==d.Hp&&(d.points=d.Hp,d.Hp=null);b.uy.clear();b.Ik=null;b.Qc(); -b.ra();b.lg();pl(b);ml(a);a.Vv&&a.Vv();a.Om=0;a.Wv=null;a.Vv=null;a.Uv=null;a.Pr=null;a.Nr=null;a.Rr=0;a.Qr=0;a.ln=new na(O,el);b.Ja("AnimationFinished");b.Le()} -function ql(a,b,c){var d=b.aa,e=c.aa,g=null;c instanceof I&&(g=c.placeholder);null!==g?(d=g.fb(ec),d.x+=g.padding.left,d.y+=g.padding.top,il(a,b,"position",d,b.position,!1)):il(a,b,"position",new N(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);il(a,b,"scale",.01,b.scale,!1);if(b instanceof I)for(b=b.uc;b.next();)g=b.value,g instanceof G&&ql(a,g,c)} -function rl(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?il(a,b,"position:placeholder",b.position,d,!0):il(a,b,"position:node",b.position,c,!0);il(a,b,"scale",b.scale,.01,!0);a.zc&&(d=a.ln,d.contains(b)&&(d.oa(b).Iy=!0));if(b instanceof I)for(b=b.uc;b.next();)d=b.value,d instanceof G&&rl(a,d,c)}}function sl(a,b,c){a.zc&&(null===a.Pr&&b.H()&&null===a.Nr&&(a.Pr=b.copy()),a.Nr=c.copy(),a.Ho=!0)} -function tl(a,b,c){a.zc&&a.ca.ao&&(0===a.Rr&&0===a.Qr&&(a.Rr=b),a.Qr=c,a.Ho=!0)}D.defineProperty(kh,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",kh,"isEnabled");this.tf=a});D.defineProperty(kh,{duration:"duration"},function(){return this.Jz},function(a){D.h(a,"number",kh,"duration");1>a&&D.ua(a,">= 1",kh,"duration");this.Jz=a});D.w(kh,{pf:"isAnimating"},function(){return this.tk});D.w(kh,{uJ:"isTicking"},function(){return this.np}); -D.defineProperty(kh,{jG:"isInitial"},function(){return this.Ll},function(a){D.h(a,"boolean",kh,"isInitial");this.Ll=a});function el(a,b,c){this.start=a;this.end=b;this.pu=new ma;this.Mx=c;this.Iy=!1} -var ol={opacity:function(a,b,c,d,e,g){a.opacity=d(e,b,c-b,g)},position:function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},"position:node":function(a,b,c,d,e,g){var h=a.aa,k=c.aa;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Vy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new N(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g))},"position:placeholder":function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): -a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},scale:function(a,b,c,d,e,g){a.scale=d(e,b,c-b,g)},visible:function(a,b,c,d,e,g){a.visible=e!==g?b:c}};function Hg(){0 =a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.rb.j;k.next();){var l=k.value;l instanceof I?e++:l instanceof G?d++:l instanceof J?g++:l instanceof da?h++:c++}k="";0 e.right&&(c.x-=d.width+5);c.x e.bottom&&(c.y-=d.height+5);c.y a.U.Ee?!1:!0};qk.prototype.doStart=function(){this.wa||null===this.ih||this.doActivate()}; +qk.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.ih;null===b&&(b=a.Je(a.U.ha));if(null!==b&&b instanceof pa&&(this.ih=b,null!==b.Y)){this.wa=!0;this.$a=zk;var c=this.wI;null!==b.lH&&(c=b.lH);this.Jk=this.ih.copy();var d=new C(this.ih.fb(ec),this.ih.fb(vc));a.VG(d);if(c instanceof hk)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.Hj.appendChild(c);"function"===typeof c.focus&& +c.focus();"function"===typeof c.select&&this.Ry&&(c.select(),c.setSelectionRange(0,9999))}this.Fj=c}}}};qk.prototype.doCancel=function(){null!==this.bt&&this.Fj instanceof HTMLElement&&(this.Fj.style.border=this.bt,this.bt=null);this.stopTool()};qk.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};qk.prototype.doMouseDown=function(){this.wa&&this.acceptText(vk)}; +qk.prototype.acceptText=function(a){switch(a){case vk:if(this.$a===Dk)this.Fj instanceof HTMLElement&&this.Fj.focus();else if(this.$a===zk||this.$a===Ck||this.$a===Ak)this.$a=Bk,Gk(this);break;case uk:case xk:case wk:if(xk===a&&!0===this.vA.ky)break;if(this.$a===zk||this.$a===Ck||this.$a===Ak)this.$a=Bk,Gk(this)}}; +function Gk(a){var b=a.ih,c=a.g,d=a.Fj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof hk?null!==d.tC&&(g=d.tC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.Nb(a.name),a.$a=Dk,a.Tf=a.name,b.text=g,null!==b.kH&&b.kH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.ll(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Ck,null!==b.ZA&&b.ZA(a,e,g),d instanceof hk?d.show(b,c,a):(null===a.bt&&(a.bt=d.style.border,d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}} +qk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.$a=sk;this.ih=null;if(null!==this.Fj){var b=this.Fj;if(b instanceof hk)b.Yn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Hj.removeChild(b)}}this.wa=!1}};qk.prototype.doFocus=function(){v&&D.Qn("TextEditingTool.doFocus","2.0");Ek(this)};qk.prototype.doBlur=function(){v&&D.Qn("TextEditingTool.doBlur","2.0");Fk(this)}; +function Ek(a){if(null!==a.Fj&&a.state!==sk){var b=a.Bz;a.$a===zk&&(a.$a=Ak);"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}function Fk(a){if(null!==a.Fj&&a.state!==sk){var b=a.Bz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Ry&&(b.select(),b.setSelectionRange(0,9999))}}qk.prototype.isValidText=function(a,b,c){D.l(a,pa,qk,"isValidText:textblock");var d=this.jC;if(null!==d&&!d(a,b,c))return!1;d=a.jC;return null===d||d(a,b,c)?!0:!1}; +D.defineProperty(qk,{jC:"textValidation"},function(){return this.$l},function(a){null!==a&&D.h(a,"function",qk,"textValidation");this.$l=a});D.defineProperty(qk,{xG:"minimumEditorScale"},function(){return this.TD},function(a){null!==a&&D.h(a,"number",qk,"minimumEditorScale");this.TD=a});D.defineProperty(qk,{Ry:"selectsTextOnActivate"},function(){return this.nE},function(a){null!==a&&D.h(a,"boolean",qk,"selectsTextOnActivate");this.nE=a}); +D.defineProperty(qk,{state:"state"},function(){return this.$a},function(a){this.$a!==a&&(D.Da(a,qk,qk,"starting"),this.$a=a)});qk.prototype.measureTemporaryTextBlock=qk.prototype.KJ=function(a){var b=this.Jk;b.text=a;Hk(b,this.ih.rp,Infinity);return b};function Ph(){Hg.call(this);this.name="ToolManager";this.HH=new K(Hg);this.IH=new K(Hg);this.JH=new K(Hg);this.xD=this.yD=850;this.mD=(new Ca(2,2)).Oa();this.GE=5E3;this.XD=ai;this.vD=Ik;this.Xv=this.aD=null;this.An=-1}D.Ta(Ph,Hg); +D.ka("ToolManager",Ph);var ai;Ph.WheelScroll=ai=D.s(Ph,"WheelScroll",0);var $h;Ph.WheelZoom=$h=D.s(Ph,"WheelZoom",1);Ph.WheelNone=D.s(Ph,"WheelNone",2);var Ik;Ph.GestureZoom=Ik=D.s(Ph,"GestureZoom",3);var Jk;Ph.GestureCancel=Jk=D.s(Ph,"GestureCancel",4);var Kk;Ph.GestureNone=Kk=D.s(Ph,"GestureNone",5);D.defineProperty(Ph,{$u:"mouseWheelBehavior"},function(){return this.XD},function(a){D.Da(a,Ph,Ph,"mouseWheelBehavior");this.XD=a}); +D.defineProperty(Ph,{rq:"gestureBehavior"},function(){return this.vD},function(a){D.Da(a,Ph,Ph,"gestureBehavior");this.vD=a});Ph.prototype.initializeStandardTools=function(){this.TH=new gk;this.GG=new fi;this.CJ=new xj;this.SG=new Wj;this.jK=new dk;this.tG=new ra;this.Ge=new Uh;this.AI=new ok;this.YJ=new pk;this.NA=new jk;this.iC=new qk;this.fI=new ta;this.gI=new fk}; +Ph.prototype.updateAdornments=function(a){var b=this.nm;if(b instanceof da&&this.Xv===a){var c=b.Bb;(null!==a?c.Y===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +Ph.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.U;b.Qj&&this.rq===Jk&&(b.bubbles=!1);if(b.Ou){this.cancelWaitAfter();if(this.rq===Kk){b.bubbles=!0;return}if(this.rq===Jk)return;if(a.eb.canStartMultiTouch()){a.eb.standardPinchZoomStart();return}}var c=a.na;c.IA&&0!==c.Ki&&D.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.sf.length,d=0;d e.right&&(c.x-=d.width+5);c.x e.bottom?c.y-(d.height+5):c.y+20;c.y a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(jh,{lL:"animationReasons"},function(){return this.Kv}); +jh.prototype.canStart=function(){return!0};jh.prototype.prepareAutomaticAnimation=jh.prototype.ro=function(a){this.tf&&(this.Ll||this.ca.ao)&&(this.Kv.add(a),this.canStart(a)&&(this.tk&&this.Yh(),this.zc=!0))};function el(a){if(a.tf&&(a.Kv.clear(),a.zc))if(!a.Ho)a.zc=!1;else if(0===a.Om){var b=+new Date;a.Om=b;requestAnimationFrame(function(){if(!1!==a.zc&&!a.tk&&a.Om===b){var c=a.ca;c.Kj("temporaryPixelRatio")&&(c.Ik=1);fl(c);a.zc=!1;c.Ja("AnimationStarting");gl(a,b)}})}} +function hl(a,b,c,d,e,g){if(a.zc&&(v&&D.l(b,O,jh,"addPropToAnimation:obj"),!("position"===c&&d.O(e)||b instanceof F&&!b.dG))){var h=a.ln;if(h.contains(b)){var h=h.oa(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=il(d));h.Mx&&void 0!==l[c]?h.pu[c]=il(e):(g||(h.pu[c]=il(e)),l[c]=il(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.pu.location=il(b.location))}else k=new ma,l=new ma,k[c]=il(d),l[c]=il(e),d=l,e=k.position,e instanceof N&&!e.H()&&a.Kv.contains("Expand SubGraph")&&e.assign(d.position),k= +new $k(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.pu.location=il(b.location)),h.add(b,k);a.Ho=!0}}function il(a){return a instanceof N?a.copy():a instanceof Ca?a.copy():a} +function gl(a,b){var c;function d(){if(!1!==g.tk&&g.Om===b){var a=+new Date,c=a>s?m:a-r;jl(g);kl(g,e,q,h,c,m);g.Uv&&g.Uv();bj(e);ll(g);a>s?ml(g):requestAnimationFrame(d)}}void 0===c&&(c=new ma);var e=a.ca;if(null!==e){var g=a,h=c.QL||a.bD,k=c.nM||null,l=c.oM||null,m=c.duration||a.Jz,n=a.KH;for(c=a.ln.j;c.next();){var p=c.value.start.position;p instanceof N&&(p.H()||p.assign(n))}a.XC=h;a.Uv=k;a.Vv=l;a.WC=m;a.Wv=a.ln;var q=a.Wv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l=c.key.findVisibleNode(), +l instanceof I&&null!==l.placeholder&&(l=l.placeholder,n=l.fb(ec),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n));a.tk=!0;jl(a);kl(a,e,q,h,0,m);bj(a.ca);ll(a);var r=+new Date,s=r+m;g.Om===b&&requestAnimationFrame(function(){d()})}}function jl(a){if(!a.np){var b=a.ca;a.JE=b.lb;a.KC=b.Xe;a.LC=b.rv;b.lb=!0;b.Xe=!0;b.rv=!0;a.np=!0}}function ll(a){var b=a.ca;b.lb=a.JE;b.Xe=a.KC;b.rv=a.LC;a.np=!1} +function kl(a,b,c,d,e,g){for(c=c.j;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==nl[m])nl[m](h,l[m],k[m],d,e,g)}d=b.qB;b.qB=!0;m=a.bD;0!==a.Rr&&0!==a.Qr&&(c=a.Rr,b.Db=m(e,c,a.Qr-c,g));null!==a.Pr&&null!==a.Nr&&(c=a.Pr,a=a.Nr,b.sb=new N(m(e,c.x,a.x-c.x,g),m(e,c.y,a.y-c.y,g)));b.qB=d} +jh.prototype.stopAnimation=jh.prototype.Yh=function(){!0===this.zc&&(this.zc=!1,this.Om=0,this.Ho&&this.ca.Le());this.tk&&this.tf&&ml(this)}; +function ml(a){a.tk=!1;a.Ho=!1;jl(a);for(var b=a.ca,c=a.XC,d=a.WC,e=a.Wv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.pu,n;for(n in l)if(void 0!==nl[n]){var p=n;!h.Mx||"position:node"!==p&&"position:placeholder"!==p||(p="position");nl[p](g,k[n],void 0!==m[n]?m[n]:h.Mx?k[n]:l[n],c,d,d)}h.Mx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.Iy&&g instanceof F&&g.Qd(!1)}for(c=a.ca.links;c.next();)d=c.value,null!==d.Hp&&(d.points=d.Hp,d.Hp=null);b.uy.clear();b.Ik=null;b.Qc(); +b.ra();b.lg();ol(b);ll(a);a.Vv&&a.Vv();a.Om=0;a.Wv=null;a.Vv=null;a.Uv=null;a.Pr=null;a.Nr=null;a.Rr=0;a.Qr=0;a.ln=new na(O,$k);b.Ja("AnimationFinished");b.Le()} +function pl(a,b,c){var d=b.aa,e=c.aa,g=null;c instanceof I&&(g=c.placeholder);null!==g?(d=g.fb(ec),d.x+=g.padding.left,d.y+=g.padding.top,hl(a,b,"position",d,b.position,!1)):hl(a,b,"position",new N(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);hl(a,b,"scale",.01,b.scale,!1);if(b instanceof I)for(b=b.uc;b.next();)g=b.value,g instanceof G&&pl(a,g,c)} +function ql(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?hl(a,b,"position:placeholder",b.position,d,!0):hl(a,b,"position:node",b.position,c,!0);hl(a,b,"scale",b.scale,.01,!0);a.zc&&(d=a.ln,d.contains(b)&&(d.oa(b).Iy=!0));if(b instanceof I)for(b=b.uc;b.next();)d=b.value,d instanceof G&&ql(a,d,c)}}function rl(a,b,c){a.zc&&(null===a.Pr&&b.H()&&null===a.Nr&&(a.Pr=b.copy()),a.Nr=c.copy(),a.Ho=!0)} +function sl(a,b,c){a.zc&&a.ca.ao&&(0===a.Rr&&0===a.Qr&&(a.Rr=b),a.Qr=c,a.Ho=!0)}D.defineProperty(jh,{isEnabled:"isEnabled"},function(){return this.tf},function(a){D.h(a,"boolean",jh,"isEnabled");this.tf=a});D.defineProperty(jh,{duration:"duration"},function(){return this.Jz},function(a){D.h(a,"number",jh,"duration");1>a&&D.ua(a,">= 1",jh,"duration");this.Jz=a});D.w(jh,{pf:"isAnimating"},function(){return this.tk});D.w(jh,{uJ:"isTicking"},function(){return this.np}); +D.defineProperty(jh,{jG:"isInitial"},function(){return this.Ll},function(a){D.h(a,"boolean",jh,"isInitial");this.Ll=a});function $k(a,b,c){this.start=a;this.end=b;this.pu=new ma;this.Mx=c;this.Iy=!1} +var nl={opacity:function(a,b,c,d,e,g){a.opacity=d(e,b,c-b,g)},position:function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},"position:node":function(a,b,c,d,e,g){var h=a.aa,k=c.aa;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Vy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new N(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g))},"position:placeholder":function(a,b,c,d,e,g){e!==g?a.Vy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): +a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},scale:function(a,b,c,d,e,g){a.scale=d(e,b,c-b,g)},visible:function(a,b,c,d,e,g){a.visible=e!==g?b:c}};function Gg(){0 =a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.rb.j;k.next();){var l=k.value;l instanceof I?e++:l instanceof G?d++:l instanceof J?g++:l instanceof da?h++:c++}k="";0 =d.count)a=d.count;else if(d.fa(a)===b)return-1;d.ce(a,b);b.Fu(c);d=this.g;null!==d&&(c?d.ra():d.uq(b));zl(this,a,b);return a}; +Gg.prototype.findObjectsIn=Gg.prototype.Yk=function(a,b,c,d,e){void 0===b&&(b=null);void 0===c&&(c=null);void 0===d&&(d=!1);e instanceof K||e instanceof L||(e=new L(O));if(!1===this.Vl)return e;v&&!a.H()&&D.k("findObjectsIn: Rect must have a real value, not: "+a.toString());var g=!1;null!==this.g&&this.g.wb.Tk(a)&&(g=!0);for(var h=this.rb.o,k=h.length;k--;){var l=h[k];if((!0!==g||!1!==tl(l))&&l.isVisible()){var m=l;l.Yk(a,b,c,d,e)&&(null!==b&&(m=b(m)),null===m||null!==c&&!c(m)||(e instanceof L&&e.add(m), +e instanceof K&&e.add(m)))}}return e};Gg.prototype.$A=function(a,b,c,d,e,g,h){if(!1===this.Vl)return e;for(var k=this.rb.o,l=k.length;l--;){var m=k[l];if((!0!==h||!1!==tl(m))&&g(m)&&m.isVisible()){var n=m;m.Yk(a,b,c,d,e)&&(null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||(e instanceof L&&e.add(n),e instanceof K&&e.add(n)))}}return e}; +Gg.prototype.findObjectsNear=Gg.prototype.Rn=function(a,b,c,d,e,g){void 0===c&&(c=null);void 0===d&&(d=null);void 0===e&&(e=!0);if(!1!==e&&!0!==e){if(e instanceof K||e instanceof L)g=e;e=!0}g instanceof K||g instanceof L||(g=new L(O));if(!1===this.Vl)return g;v&&!a.H()&&D.k("findObjectsNear: Point must have a real value, not: "+a.toString());var h=!1;null!==this.g&&this.g.wb.Pa(a)&&(h=!0);for(var k=D.P(),l=D.P(),m=this.rb.o,n=m.length;n--;){var p=m[n];if((!0!==h||!1!==tl(p))&&p.isVisible()){k.assign(a); +kb(k,p.Hh);l.n(a.x+b,a.y);kb(l,p.Hh);var q=p;p.Rn(k,l,c,d,e,g)&&(null!==c&&(q=c(q)),null===q||null!==d&&!d(q)||(g instanceof L&&g.add(q),g instanceof K&&g.add(q)))}}D.A(k);D.A(l);return g};f=Gg.prototype; +f.Pf=function(a,b){if(this.visible){var c;c=void 0===b?a.wb:b;for(var d=this.rb.o,e=d.length,g=0;g =d.count)a=d.count;else if(d.fa(a)===b)return-1;d.ce(a,b);b.Fu(c);d=this.g;null!==d&&(c?d.ra():d.uq(b));yl(this,a,b);return a}; f.Af=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Af(a,b,c);var d=this.rb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.fa(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Gu(c);d.pd(a);d=this.g;null!==d&&(c?d.ra():d.Af(b));b.yw=null;return a}; -function zl(a,b,c){b=Al(a,b,c);if(c instanceof I&&null!==c&&isNaN(c.Do)){if(0!==c.uc.count){for(var d=-1,e=a.rb.o,g=e.length,h=0;h d&&k.Ka===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var g=b-1,h=NaN;0<=g;){h=a.fa(g).Do;if(!isNaN(h))break;g--}for(var k=b+1,l=NaN;k d)for(;;){if(-1===g||h<=d){g++;if(g===b)break;a.pd(b);a.ce(g,c);return g}for(h=NaN;0<=--g&&(h=a.fa(g).Do,isNaN(h)););}else if(!isNaN(l)&&l =d){k--;if(k===b)break;a.pd(b);a.ce(k,c);return k}for(l=NaN;++k a||1d&&k.Ka===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var g=b-1,h=NaN;0<=g;){h=a.fa(g).Do;if(!isNaN(h))break;g--}for(var k=b+1,l=NaN;k d)for(;;){if(-1===g||h<=d){g++;if(g===b)break;a.pd(b);a.ce(g,c);return g}for(h=NaN;0<=--g&&(h=a.fa(g).Do,isNaN(h)););}else if(!isNaN(l)&&l =d){k--;if(k===b)break;a.pd(b);a.ce(k,c);return k}for(l=NaN;++k a||1parseInt(e[1],10)&&(D.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+D.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),D.Rx.licenseKey=!0);this.ji=1;this.xk=0;this.xw=new N;this.yA=500;this.Lv=new N;this.Ht=null;this.vk=!1;this.preventDefault=this.Hy=this.Lq=this.Mq=this.Kq=this.Jq=this.mo=this.oo=this.no=this.ko=this.lo=this.uC=this.mC=this.nC=this.oC=this.Xl=this.ut= -this.Wl=this.tt=null;this.rw=!1;this.Il=new Nl;void 0!==a&&Ol(this,a);this.ed=!1}D.ka("Diagram",E); -E.prototype.clear=E.prototype.clear=function(){var a=null;null!==this.Ed&&(a=this.Ed.Y);this.ea.clear();for(var b=this.dc.length,c=0;c=a)return b;for(var c=this.dc.j;c.next();)b+="\n "+c.value.toString(a-1);return b};E.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.ca instanceof E?b.ca:null}; -D.defineProperty(E,{Hj:"div"},function(){return this.Ub},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Ub!==a){Cl=[];var b=this.Ub;null!==b?(b.ca=void 0,b.innerHTML="",null!==this.Ib&&(this.Ib.removeEventListener("touchstart",this.oC,!1),this.Ib.removeEventListener("touchmove",this.nC,!1),this.Ib.removeEventListener("touchend",this.mC,!1),this.Ib.ae.ca=null),b=this.ob,null!==b&&(b.sf.each(function(a){a.cancelWaitAfter()}),b.mg.each(function(a){a.cancelWaitAfter()}),b.ng.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.eb.doCancel(),this.dd=this.Ib=null,window.removeEventListener("resize",this.uC,!1),window.removeEventListener("mousemove",this.lo,!0),window.removeEventListener("mousedown",this.ko,!0),window.removeEventListener("mouseup",this.no,!0),window.removeEventListener("wheel",this.oo,!0),window.removeEventListener("mouseout",this.mo,!0)):this.sh=!1;this.Ub=null;if(null!==a){if(b=a.ca)b.Hj=null;Ol(this,a);this.to()}}}); -function Rl(a){var b=a.Ib;a.mz?(b.addEventListener("pointerdown",a.Jq,!1),b.addEventListener("pointermove",a.Kq,!1),b.addEventListener("pointerup",a.Mq,!1),b.addEventListener("pointerout",a.Lq,!1)):(b.addEventListener("touchstart",a.oC,!1),b.addEventListener("touchmove",a.nC,!1),b.addEventListener("touchend",a.mC,!1),b.addEventListener("mousemove",a.lo,!1),b.addEventListener("mousedown",a.ko,!1),b.addEventListener("mouseup",a.no,!1),b.addEventListener("mouseout",a.mo,!1));b.addEventListener("wheel", -a.oo,!1);b.addEventListener("keydown",a.wJ,!1);b.addEventListener("keyup",a.xJ,!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.ob.rq===Kk&&b.preventDefault()},!1);window.addEventListener("resize",a.uC,!1)} +D.defineProperty(E,{Hj:"div"},function(){return this.Ub},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Ub!==a){Bl=[];var b=this.Ub;null!==b?(b.ca=void 0,b.innerHTML="",null!==this.Ib&&(this.Ib.removeEventListener("touchstart",this.oC,!1),this.Ib.removeEventListener("touchmove",this.nC,!1),this.Ib.removeEventListener("touchend",this.mC,!1),this.Ib.ae.ca=null),b=this.ob,null!==b&&(b.sf.each(function(a){a.cancelWaitAfter()}),b.mg.each(function(a){a.cancelWaitAfter()}),b.ng.each(function(a){a.cancelWaitAfter()})), +b.cancelWaitAfter(),this.eb.doCancel(),this.dd=this.Ib=null,window.removeEventListener("resize",this.uC,!1),window.removeEventListener("mousemove",this.lo,!0),window.removeEventListener("mousedown",this.ko,!0),window.removeEventListener("mouseup",this.no,!0),window.removeEventListener("wheel",this.oo,!0),window.removeEventListener("mouseout",this.mo,!0)):this.sh=!1;this.Ub=null;if(null!==a){if(b=a.ca)b.Hj=null;Nl(this,a);this.to()}}}); +function Ql(a){var b=a.Ib;a.mz?(b.addEventListener("pointerdown",a.Jq,!1),b.addEventListener("pointermove",a.Kq,!1),b.addEventListener("pointerup",a.Mq,!1),b.addEventListener("pointerout",a.Lq,!1)):(b.addEventListener("touchstart",a.oC,!1),b.addEventListener("touchmove",a.nC,!1),b.addEventListener("touchend",a.mC,!1),b.addEventListener("mousemove",a.lo,!1),b.addEventListener("mousedown",a.ko,!1),b.addEventListener("mouseup",a.no,!1),b.addEventListener("mouseout",a.mo,!1));b.addEventListener("wheel", +a.oo,!1);b.addEventListener("keydown",a.wJ,!1);b.addEventListener("keyup",a.xJ,!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.ob.rq===Jk&&b.preventDefault()},!1);window.addEventListener("resize",a.uC,!1)} E.prototype.computePixelRatio=function(){if(null!==this.Ik)return this.Ik;var a=this.dd;return(window.devicePixelRatio||1)/(a.za.webkitBackingStorePixelRatio||a.za.mozBackingStorePixelRatio||a.za.msBackingStorePixelRatio||a.za.oBackingStorePixelRatio||a.za.backingStorePixelRatio||1)};E.prototype.doMouseMove=function(){this.eb.doMouseMove()};E.prototype.doMouseDown=function(){this.eb.doMouseDown()};E.prototype.doMouseUp=function(){this.eb.doMouseUp()};E.prototype.doMouseWheel=function(){this.eb.doMouseWheel()}; E.prototype.doKeyDown=function(){this.eb.doKeyDown()};E.prototype.doKeyUp=function(){this.eb.doKeyUp()};E.prototype.doFocus=function(){this.focus()};E.prototype.focus=E.prototype.focus=function(){if(this.Ib)if(this.nK)this.Ib.focus();else{var a=window.scrollX||window.pageXOffset,b=window.scrollY||window.pageYOffset;this.Ib.focus();window.scrollTo(a,b)}}; -function gl(a){if(null!==a.Ib){var b=a.Ub;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Hl?a.Kd:0,d=a.rk?a.Kd:0,e=a.ud;a.ud=a.computePixelRatio();a.ud!==e&&(a.ms=!0,a.Le());if(b.clientWidth!==a.Qb+c||b.clientHeight!==a.Pb+d)a.Ym=!0,a.Pe=!0,b=a.Zb,null!==b&&b.my&&a.jm===Wh&&(a.Sr=!0,b.L()),a.ke||a.Le()}}} -function Ll(a){var b=new Hg;b.name="Background";a.$t(b);b=new Hg;b.name="";a.$t(b);b=new Hg;b.name="Foreground";a.$t(b);b=new Hg;b.name="Adornment";b.Yc=!0;a.$t(b);b=new Hg;b.name="Tool";b.Yc=!0;b.eG=!0;a.$t(b);b=new Hg;b.name="Grid";b.Jf=!1;b.tg=!1;b.Yc=!0;a.WH(b,a.qm("Background"))} -function Sl(a){a.Ed=new x(Tl);a.Ed.name="GRID";var b=new z;b.Kb="LineH";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new F;b.add(a.Ed); -b.Nf="Grid";b.Do=0;b.iy=!1;b.dG=!1;b.tg=!1;b.vy="GRID";a.add(b);a.rb.remove(b);a.Ed.visible=!1}function Ul(){this.ca.nA?this.ca.nA=!1:this.ca.isEnabled?this.ca.zI(this):Vl(this.ca)}function Wl(a){this.ca.isEnabled?(this.ca.pA=a.target.scrollTop,this.ca.oA=a.target.scrollLeft):Vl(this.ca)} +function fl(a){if(null!==a.Ib){var b=a.Ub;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Hl?a.Kd:0,d=a.rk?a.Kd:0,e=a.ud;a.ud=a.computePixelRatio();a.ud!==e&&(a.ms=!0,a.Le());if(b.clientWidth!==a.Qb+c||b.clientHeight!==a.Pb+d)a.Ym=!0,a.Pe=!0,b=a.Zb,null!==b&&b.my&&a.jm===Vh&&(a.Sr=!0,b.L()),a.ke||a.Le()}}} +function Kl(a){var b=new Gg;b.name="Background";a.$t(b);b=new Gg;b.name="";a.$t(b);b=new Gg;b.name="Foreground";a.$t(b);b=new Gg;b.name="Adornment";b.Yc=!0;a.$t(b);b=new Gg;b.name="Tool";b.Yc=!0;b.eG=!0;a.$t(b);b=new Gg;b.name="Grid";b.Jf=!1;b.tg=!1;b.Yc=!0;a.WH(b,a.qm("Background"))} +function Rl(a){a.Ed=new x(Sl);a.Ed.name="GRID";var b=new z;b.Kb="LineH";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=.5;b.interval=5;a.Ed.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=1;b.interval=10;a.Ed.add(b);b=new F;b.add(a.Ed); +b.Nf="Grid";b.Do=0;b.iy=!1;b.dG=!1;b.tg=!1;b.vy="GRID";a.add(b);a.rb.remove(b);a.Ed.visible=!1}function Tl(){this.ca.nA?this.ca.nA=!1:this.ca.isEnabled?this.ca.zI(this):Ul(this.ca)}function Vl(a){this.ca.isEnabled?(this.ca.pA=a.target.scrollTop,this.ca.oA=a.target.scrollLeft):Ul(this.ca)} E.prototype.diagramScroll=E.prototype.zI=function(a){if(null!==this.Ib){this.Yw=!0;var b=this.kd,c=this.wb,d=this.Oy,e=b.x-d.left,g=b.y-d.top,h=b.width+d.left+d.right,k=b.height+d.top+d.bottom,l=b.right+d.right,d=b.bottom+d.bottom,m=c.x,b=c.y,n=c.width,p=c.height,q=c.right,r=c.bottom,c=this.scale,s;s=a.scrollLeft;if(this.rs)switch(this.lA){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;n q&&(this.position=s.n(-(this.bx.scrollWidth-this.Qb)+u-this.Qb/c+l,this.position.y))),a.NH&&this.Ce&&(gr&&(this.position=s.n(this.position.x,-(this.bx.scrollHeight-this.Pb)+a.scrollTop-this.Pb/c+d))),D.A(s),Xl(this), -this.Ym=this.Yw=!1,b=this.kd,c=this.wb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,g=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.yt.style.width="1px"),p>=k&&g>=b&&d<=r&&(this.yt.style.height="1px"))}};E.prototype.computeBounds=E.prototype.Kh=function(){0 q&&(this.position=s.n(-(this.bx.scrollWidth-this.Qb)+u-this.Qb/c+l,this.position.y))),a.NH&&this.Ce&&(gr&&(this.position=s.n(this.position.x,-(this.bx.scrollHeight-this.Pb)+a.scrollTop-this.Pb/c+d))),D.A(s),Wl(this), +this.Ym=this.Yw=!1,b=this.kd,c=this.wb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,g=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.yt.style.width="1px"),p>=k&&g>=b&&d<=r&&(this.yt.style.height="1px"))}};E.prototype.computeBounds=E.prototype.Kh=function(){0 c&&(e=c),e a.Rh&&(e=a.Rh),e):b===dm?(e=l>k?(h-a.Kd)/d:(g-a.Kd)/e,e>c&&(e=c),e a.Rh&&(e=a.Rh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=$l(this,cm)}; -E.prototype.zoomToRect=function(a,b){void 0===b&&(b=cm);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cm||b===dm)if(isNaN(c))e=this.wb.height*this.scale/d;else if(isNaN(d))e=this.wb.width*this.scale/c;else var e=this.Qb,g=this.Pb,e=b===dm?g/d>e/c?(g-(this.rk?this.Kd:0))/d:(e-(this.Hl?this.Kd:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new N(a.x,a.y)}};D.defineProperty(E,{qB:null},function(){return this.ed},function(a){this.ed=a}); -E.prototype.alignDocument=function(a,b){this.sk&&bm(this,this.Kh());var c=this.kd,d=this.wb;this.position=new N(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; -function am(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.VB===Dl)g.Xc()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),e>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*e-g.offsetY))),g=a.Oy,h=d-c.width,d c.left?k=c.left:k c.top?l=c.top:l c&&(e=c),e a.Rh&&(e=a.Rh),e):b===cm?(e=l>k?(h-a.Kd)/d:(g-a.Kd)/e,e>c&&(e=c),e a.Rh&&(e=a.Rh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Zl(this,bm)}; +E.prototype.zoomToRect=function(a,b){void 0===b&&(b=bm);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===bm||b===cm)if(isNaN(c))e=this.wb.height*this.scale/d;else if(isNaN(d))e=this.wb.width*this.scale/c;else var e=this.Qb,g=this.Pb,e=b===cm?g/d>e/c?(g-(this.rk?this.Kd:0))/d:(e-(this.Hl?this.Kd:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new N(a.x,a.y)}};D.defineProperty(E,{qB:null},function(){return this.ed},function(a){this.ed=a}); +E.prototype.alignDocument=function(a,b){this.sk&&am(this,this.Kh());var c=this.kd,d=this.wb;this.position=new N(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; +function $l(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.VB===Cl)g.Xc()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),e>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*e-g.offsetY))),g=a.Oy,h=d-c.width,d c.left?k=c.left:k c.top?l=c.top:l b.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Dp[0])e=a.Dp[c];else return;c=a.Ib;b=a.Qb;a=a.Pb;var g=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),g=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.n(g,h)}E.prototype.invalidateDocumentBounds=E.prototype.Qc=function(){this.sk||(this.sk=!0,this.Le(!0))};function pl(a){a.ke||Ti(a);a.sk&&bm(a,a.Kh())} -E.prototype.redraw=E.prototype.to=function(){this.ed||this.ke||(this.ra(),jm(this),Xl(this),this.Qc(),this.lg())};E.prototype.isUpdateRequested=function(){return this.cg};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Ra,c=b.isEnabled;b.Yh();b.isEnabled=!1;cj(this);this.sh=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; -E.prototype.requestUpdate=E.prototype.Le=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.ed||!1===a&&this.ke)){this.cg=!0;var b=this;requestAnimationFrame(function(){b.cg&&b.lg()})}};E.prototype.maybeUpdate=E.prototype.lg=function(){if(!this.bp||this.cg)this.bp&&(this.bp=!1),cj(this)};function km(a,b){a.Ra.pf||a.ed||!a.Ym||Vl(a)||(b&&Ti(a),Zl(a,!1))} -function cj(a){if(!a.ke&&(a.cg=!1,null!==a.Ub)){a.ke=!0;var b=a.Ra,c=a.iA;if(!b.np&&0!==c.length){for(var d=c.o,e=d.length,g=0;g b;b++){var c=a.Gg.j;if(null===c||0===a.Gg.count)break;a.Gg=new L(F);a.sC(c,a.Gg);v&&22===b&&D.trace("failure to validate parts")}a.rg.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} -E.prototype.sC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.re()||c instanceof I||(c.zm()?(Ik(c,Infinity,Infinity),c.rc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&Mm(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.zm()?(Ik(c,Infinity,Infinity),c.rc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.zm()?(Ik(c,Infinity,Infinity),c.rc()):b.add(c))}; -function Mm(a,b){for(var c=D.nb(),d=D.nb(),e=b.uc;e.next();){var g=e.value;g.isVisible()&&(g instanceof I?(Nm(g)||Om(g)||Pm(g))&&Mm(a,g):g instanceof J?g.$===b||g.ba===b?d.push(g):c.push(g):(Ik(g,Infinity,Infinity),g.rc()))}for(var e=c.length,h=0;h b.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Dp[0])e=a.Dp[c];else return;c=a.Ib;b=a.Qb;a=a.Pb;var g=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),g=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.n(g,h)}E.prototype.invalidateDocumentBounds=E.prototype.Qc=function(){this.sk||(this.sk=!0,this.Le(!0))};function ol(a){a.ke||Si(a);a.sk&&am(a,a.Kh())} +E.prototype.redraw=E.prototype.to=function(){this.ed||this.ke||(this.ra(),im(this),Wl(this),this.Qc(),this.lg())};E.prototype.isUpdateRequested=function(){return this.cg};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Ra,c=b.isEnabled;b.Yh();b.isEnabled=!1;bj(this);this.sh=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; +E.prototype.requestUpdate=E.prototype.Le=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.ed||!1===a&&this.ke)){this.cg=!0;var b=this;requestAnimationFrame(function(){b.cg&&b.lg()})}};E.prototype.maybeUpdate=E.prototype.lg=function(){if(!this.bp||this.cg)this.bp&&(this.bp=!1),bj(this)};function jm(a,b){a.Ra.pf||a.ed||!a.Ym||Ul(a)||(b&&Si(a),Yl(a,!1))} +function bj(a){if(!a.ke&&(a.cg=!1,null!==a.Ub)){a.ke=!0;var b=a.Ra,c=a.iA;if(!b.np&&0!==c.length){for(var d=c.o,e=d.length,g=0;g b;b++){var c=a.Gg.j;if(null===c||0===a.Gg.count)break;a.Gg=new L(F);a.sC(c,a.Gg);v&&22===b&&D.trace("failure to validate parts")}a.rg.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} +E.prototype.sC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.re()||c instanceof I||(c.zm()?(Hk(c,Infinity,Infinity),c.rc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&ym(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.zm()?(Hk(c,Infinity,Infinity),c.rc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.zm()?(Hk(c,Infinity,Infinity),c.rc()):b.add(c))}; +function ym(a,b){for(var c=D.nb(),d=D.nb(),e=b.uc;e.next();){var g=e.value;g.isVisible()&&(g instanceof I?(Mm(g)||Nm(g)||Om(g))&&ym(a,g):g instanceof J?g.$===b||g.ba===b?d.push(g):c.push(g):(Hk(g,Infinity,Infinity),g.rc()))}for(var e=c.length,h=0;h m&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,y=p.height+s+u,q=p.x-q,w=n.x,r=p.right+r,A=n.right+ -k,s=p.y-s,B=n.y,u=p.bottom+u,n=n.bottom+l,P="1px",H="1px",p=a.scale,R=!(t A+1&&(P=Math.max((r-A)*p+a.Qb,P)),m+k+1 n+1&&(H=Math.max((u-n)*p+a.Pb,H)),c+l+1 m&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,y=p.height+s+u,q=p.x-q,w=n.x,r=p.right+r,A=n.right+ +k,s=p.y-s,B=n.y,u=p.bottom+u,n=n.bottom+l,P="1px",H="1px",p=a.scale,R=!(t A+1&&(P=Math.max((r-A)*p+a.Qb,P)),m+k+1 n+1&&(H=Math.max((u-n)*p+a.Pb,H)),c+l+1 A+1&&(P=Math.max((r-A)*p+a.Qb,P)),m+1 n+1&&(H=Math.max((u-n)*p+k,H)),c+1 A+1&&(k=a.position.x*p));if(a.rs)switch(a.lA){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth- k-b.clientWidth}b.scrollLeft=k;a.kB&&a.Ce&&(c+1 n+1&&(b.scrollTop=a.position.y*p));m=a.Qb;c=a.Pb;b.style.width=m+(a.Hl?a.Kd:0)+"px";b.style.height=c+(a.rk?a.Kd:0)+"px";return d!==m||e!==c||a.Ra.zc?(n=a.wb,a.dv(g,n,p,a.scale,h),!1):!0} -E.prototype.add=E.prototype.add=function(a){D.l(a,F,E,"add:part");var b=a.g;if(b!==this){null!==b&&D.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.hr&&(a.Ol="Tool");var c=a.Nf,b=this.qm(c);null===b&&(b=this.qm(""));null===b&&D.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.uq(99999999,a,a.g===this),0<=c&&this.od(hg,"parts",b,null,a,null,c),b.Yc||this.Qc(),a.L(Wm),c=a.py,null!== +E.prototype.add=E.prototype.add=function(a){D.l(a,F,E,"add:part");var b=a.g;if(b!==this){null!==b&&D.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.hr&&(a.Ol="Tool");var c=a.Nf,b=this.qm(c);null===b&&(b=this.qm(""));null===b&&D.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.uq(99999999,a,a.g===this),0<=c&&this.od(gg,"parts",b,null,a,null,c),b.Yc||this.Qc(),a.L(Vm),c=a.py,null!== c&&c(a,null,b))}}; -E.prototype.uq=function(a){if(a instanceof G){if(this.Ap.add(a),a instanceof I){var b=a.Ka;null===b?this.am.add(a):b.jn.add(a);b=a.Zb;null!==b&&(b.g=this)}}else a instanceof J?this.tp.add(a):a instanceof da||this.rb.add(a);var c=this;Xm(a,function(a){Ym(c,a)});(a instanceof da||a instanceof I&&null!==a.Sb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.add(b,a):this.Vi.add(b,a)),Xm(a,function(a){Zm(c,a)}));!0!==Om(a)&&!0!==Pm(a)||this.Gg.add(a);$m(a,!0,this);an(a)?(a.aa.H()&& -this.ra(yl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(yl(a,a.aa));this.Le()}; -E.prototype.Af=function(a){a.iu();if(a instanceof G){if(this.Ap.remove(a),a instanceof I){var b=a.Ka;null===b?this.am.remove(a):b.jn.remove(a);b=a.Zb;null!==b&&(b.g=null)}}else a instanceof J?this.tp.remove(a):a instanceof da||this.rb.remove(a);var c=this;Xm(a,function(a){bn(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.remove(b):this.Vi.remove(b)),Xm(a,function(a){cn(c,a)}));this.Gg.remove(a);an(a)?(a.aa.H()&&this.ra(yl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(yl(a, -a.aa));this.Le()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");dn(this,a,!0)};function dn(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.jb=!1,b.Zg=!1,b.L(en),c&&b.Pn(),c=d.Af(-1,b,!1),0<=c&&a.od(ig,"parts",d,b,null,c,null),a=b.py,null!==a&&a(b,d,null))} +E.prototype.uq=function(a){if(a instanceof G){if(this.Ap.add(a),a instanceof I){var b=a.Ka;null===b?this.am.add(a):b.jn.add(a);b=a.Zb;null!==b&&(b.g=this)}}else a instanceof J?this.tp.add(a):a instanceof da||this.rb.add(a);var c=this;Wm(a,function(a){Xm(c,a)});(a instanceof da||a instanceof I&&null!==a.Sb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.add(b,a):this.Vi.add(b,a)),Wm(a,function(a){Ym(c,a)}));!0!==Nm(a)&&!0!==Om(a)||this.Gg.add(a);Zm(a,!0,this);$m(a)?(a.aa.H()&& +this.ra(xl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(xl(a,a.aa));this.Le()}; +E.prototype.Af=function(a){a.iu();if(a instanceof G){if(this.Ap.remove(a),a instanceof I){var b=a.Ka;null===b?this.am.remove(a):b.jn.remove(a);b=a.Zb;null!==b&&(b.g=null)}}else a instanceof J?this.tp.remove(a):a instanceof da||this.rb.remove(a);var c=this;Wm(a,function(a){an(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.hk.remove(b):this.Vi.remove(b)),Wm(a,function(a){bn(c,a)}));this.Gg.remove(a);$m(a)?(a.aa.H()&&this.ra(xl(a,a.aa)),this.Qc()):a.isVisible()&&a.aa.H()&&this.ra(xl(a, +a.aa));this.Le()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");cn(this,a,!0)};function cn(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.jb=!1,b.Zg=!1,b.L(dn),c&&b.Pn(),c=d.Af(-1,b,!1),0<=c&&a.od(hg,"parts",d,b,null,c,null),a=b.py,null!==a&&a(b,d,null))} E.prototype.removeParts=E.prototype.RB=function(a,b){if(D.isArray(a))for(var c=D.cb(a),d=0;d d&&this.Qc()}; -E.prototype.addLayerAfter=function(a,b){fn(this,a,b);a.ad(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ye&&this.od(ig,"layers",this,a,null,d,null));for(var e=c.count,g=0;g d&&this.Qc()}; -E.prototype.removeLayer=function(a){D.l(a,Hg,E,"removeLayer:layer");a.g!==this&&D.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.rb.copy().j;b.next();){var d=b.value,e=d.Nf;d.Nf=e!==a.name?e:""}null!==this.ye&&this.od(ig,"layers",this,a,null,c,null);this.ra();this.Qc()}}};E.prototype.findLayer=E.prototype.qm=function(a){for(var b=this.co;b.next();){var c=b.value;if(c.name===a)return c}return null}; +E.prototype.moveParts=E.prototype.moveParts=function(a,b,c){D.l(b,N,E,"moveParts:offset");var d=this.ob;if(null!==d){d=d.Ge;null===d&&(d=new Uh,d.ad(this));var e=new na(F);if(null!==a)a=a.j;else{for(a=this.Hi;a.next();)gi(d,e,a.value,c);for(a=this.rg;a.next();)gi(d,e,a.value,c);a=this.links}for(;a.next();)gi(d,e,a.value,c);d.moveParts(e,b,c)}}; +function en(a,b,c){D.l(b,Gg,E,"addLayer:layer");null!==b.g&&b.g!==a&&D.k("Cannot share a Layer with another Diagram: "+b+" of "+b.g);null===c?null!==b.g&&D.k("Cannot add an existing Layer to this Diagram again: "+b):(D.l(c,Gg,E,"addLayer:existingLayer"),c.g!==a&&D.k("Existing Layer must be in this Diagram: "+c+" not in "+c.g),b===c&&D.k("Cannot move a Layer before or after itself: "+b));if(b.g!==a){b=b.name;a=a.dc;c=a.count;for(var d=0;d d&&this.Qc()}; +E.prototype.addLayerAfter=function(a,b){en(this,a,b);a.ad(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ye&&this.od(hg,"layers",this,a,null,d,null));for(var e=c.count,g=0;g d&&this.Qc()}; +E.prototype.removeLayer=function(a){D.l(a,Gg,E,"removeLayer:layer");a.g!==this&&D.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.rb.copy().j;b.next();){var d=b.value,e=d.Nf;d.Nf=e!==a.name?e:""}null!==this.ye&&this.od(hg,"layers",this,a,null,c,null);this.ra();this.Qc()}}};E.prototype.findLayer=E.prototype.qm=function(a){for(var b=this.co;b.next();){var c=b.value;if(c.name===a)return c}return null}; E.prototype.addModelChangedListener=E.prototype.YH=function(a){D.h(a,"function",E,"addModelChangedListener:listener");null===this.xh&&(this.xh=new K("function"));this.xh.add(a);this.ea.Dn(a)};E.prototype.removeModelChangedListener=function(a){D.h(a,"function",E,"removeModelChangedListener:listener");null!==this.xh&&(this.xh.remove(a),0===this.xh.count&&(this.xh=null));this.ea.gv(a)}; -E.prototype.addChangedListener=E.prototype.Dn=function(a){D.h(a,"function",E,"addChangedListener:listener");null===this.Qi&&(this.Qi=new K("function"));this.Qi.add(a)};E.prototype.removeChangedListener=E.prototype.gv=function(a){D.h(a,"function",E,"removeChangedListener:listener");null!==this.Qi&&(this.Qi.remove(a),0===this.Qi.count&&(this.Qi=null))};E.prototype.Hx=function(a){this.lb||this.na.YF(a);a.Oc!==gg&&(this.Gi=!0);if(null!==this.Qi)for(var b=this.Qi,c=b.length,d=0;d a.Rh&&(c=a.Rh);e=D.Fb(a.sb.x+h/b-h/c,a.sb.y+k/b-k/c);a.position=e;D.A(e);a.Db=c;a.dv(d,a.wb,b,c,!1);a.ed=!1;Zl(a, -!1);c=a.Ra;c.zc&&tl(c,b,a.Db);a.ra();jm(a)}} -E.prototype.dv=function(a,b,c,d,e){a.O(b)||(void 0===e&&(e=!1),e||jm(this),Xl(this),d=this.Zb,null===d||!d.my||this.jm!==Wh||e||a.width===b.width&&a.height===b.height||d.L(),d=this.eb,!0===this.th&&d instanceof Qh&&(this.U.ha=this.pC(this.U.Sd),Yk(d,this)),this.ed||this.cG(a,b),mm(this),this.Fh.scale=c,this.Fh.position.x=a.x,this.Fh.position.y=a.y,this.Fh.bounds.set(a),this.Fh.isScroll=e,this.Ja("ViewportBoundsChanged",this.Fh,a),this.vB&&this.links.each(function(a){a.Nj&&a.aa.jg(b)&&a.ec()}))}; -function mm(a,b){void 0===b&&(b=null);var c=a.Ed;if(null!==c&&c.visible){for(var d=D.Im(),e=1,g=1,h=c.xa.o,k=h.length,l=0;l n||(hn(m.Kb)?g=g*n/Te(g,n):e=e*n/Te(e,n))}h=c.by;d.n(g*h.width,e*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{e=D.Sf();g=a.wb;e.n(g.x,g.y,g.width,g.height);for(h=a.Rw.j;h.next();)g=h.value.wb,g.H()&&Ub(e,g.x,g.y,g.width,g.height);if(!e.H()){D.Lb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Lb(e)}c.width=k+2*d.width;c.height= -l+2*d.height;e=D.P();gb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.$k(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.Jx=function(){var a=0 a.Rh&&(c=a.Rh);e=D.Fb(a.sb.x+h/b-h/c,a.sb.y+k/b-k/c);a.position=e;D.A(e);a.Db=c;a.dv(d,a.wb,b,c,!1);a.ed=!1;Yl(a, +!1);c=a.Ra;c.zc&&sl(c,b,a.Db);a.ra();im(a)}} +E.prototype.dv=function(a,b,c,d,e){a.O(b)||(void 0===e&&(e=!1),e||im(this),Wl(this),d=this.Zb,null===d||!d.my||this.jm!==Vh||e||a.width===b.width&&a.height===b.height||d.L(),d=this.eb,!0===this.th&&d instanceof Ph&&(this.U.ha=this.pC(this.U.Sd),Xk(d,this)),this.ed||this.cG(a,b),lm(this),this.Fh.scale=c,this.Fh.position.x=a.x,this.Fh.position.y=a.y,this.Fh.bounds.set(a),this.Fh.isScroll=e,this.Ja("ViewportBoundsChanged",this.Fh,a),this.vB&&this.links.each(function(a){a.Nj&&a.aa.jg(b)&&a.ec()}))}; +function lm(a,b){void 0===b&&(b=null);var c=a.Ed;if(null!==c&&c.visible){for(var d=D.Im(),e=1,g=1,h=c.xa.o,k=h.length,l=0;l n||(gn(m.Kb)?g=g*n/Se(g,n):e=e*n/Se(e,n))}h=c.by;d.n(g*h.width,e*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{e=D.Sf();g=a.wb;e.n(g.x,g.y,g.width,g.height);for(h=a.Rw.j;h.next();)g=h.value.wb,g.H()&&Ub(e,g.x,g.y,g.width,g.height);if(!e.H()){D.Lb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Lb(e)}c.width=k+2*d.width;c.height= +l+2*d.height;e=D.P();gb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.$k(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.Jx=function(){var a=0 a&&D.ua(a,">= 0",E,"scrollHorizontalLineChange"),this.Zw=a,this.i("scrollHorizontalLineChange",b,a))}); -D.defineProperty(E,{mv:"scrollVerticalLineChange"},function(){return this.ex},function(a){var b=this.ex;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.ex=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Vb},function(a){v&&D.l(a,bg,E,"lastInput");this.Vb=a});D.defineProperty(E,{Pc:"firstInput"},function(){return this.aj},function(a){v&&D.l(a,bg,E,"firstInput");this.aj=a}); +D.defineProperty(E,{mv:"scrollVerticalLineChange"},function(){return this.ex},function(a){var b=this.ex;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.ex=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Vb},function(a){v&&D.l(a,ag,E,"lastInput");this.Vb=a});D.defineProperty(E,{Pc:"firstInput"},function(){return this.aj},function(a){v&&D.l(a,ag,E,"firstInput");this.aj=a}); D.defineProperty(E,{sc:"currentCursor"},function(){return this.Tv},function(a){""===a&&(a=this.Mr);var b=this.Tv;if(b!==a){D.h(a,"string",E,"currentCursor");var c=this.Ib,d=this.Ub;null!==c&&(this.Tv=a,c.style.cursor=a,d.style.cursor=a,c.style.cursor===b&&(c.style.cursor="-webkit-"+a,d.style.cursor="-webkit-"+a,c.style.cursor===b&&(c.style.cursor="-moz-"+a,d.style.cursor="-moz-"+a,c.style.cursor===b&&(c.style.cursor=a,d.style.cursor=a))))}}); D.defineProperty(E,{zL:"defaultCursor"},function(){return this.Mr},function(a){""===a&&(a="auto");var b=this.Mr;b!==a&&(D.h(a,"string",E,"defaultCursor"),this.Mr=a,this.i("defaultCursor",b,a))});D.defineProperty(E,{click:"click"},function(){return this.Ri},function(a){var b=this.Ri;b!==a&&(null!==a&&D.h(a,"function",E,"click"),this.Ri=a,this.i("click",b,a))}); D.defineProperty(E,{nu:"doubleClick"},function(){return this.Yi},function(a){var b=this.Yi;b!==a&&(null!==a&&D.h(a,"function",E,"doubleClick"),this.Yi=a,this.i("doubleClick",b,a))});D.defineProperty(E,{MA:"contextClick"},function(){return this.Ti},function(a){var b=this.Ti;b!==a&&(null!==a&&D.h(a,"function",E,"contextClick"),this.Ti=a,this.i("contextClick",b,a))}); D.defineProperty(E,{FB:"mouseOver"},function(){return this.nj},function(a){var b=this.nj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseOver"),this.nj=a,this.i("mouseOver",b,a))});D.defineProperty(E,{EB:"mouseHover"},function(){return this.mj},function(a){var b=this.mj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHover"),this.mj=a,this.i("mouseHover",b,a))}); D.defineProperty(E,{DB:"mouseHold"},function(){return this.lj},function(a){var b=this.lj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHold"),this.lj=a,this.i("mouseHold",b,a))});D.defineProperty(E,{SJ:"mouseDragOver"},function(){return this.Kw},function(a){var b=this.Kw;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDragOver"),this.Kw=a,this.i("mouseDragOver",b,a))}); -D.defineProperty(E,{CB:"mouseDrop"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{lC:"toolTip"},function(){return this.wj},function(a){var b=this.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof ik||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.wj=a,this.i("toolTip",b,a))}); -D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(!v||a instanceof da||a instanceof ik||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ui=a,this.i("contextMenu",b,a))});D.defineProperty(E,{yb:"commandHandler"},function(){return this.wz},function(a){var b=this.wz;b!==a&&(D.l(a,qa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wz=a,a.ad(this))}); -D.defineProperty(E,{ob:"toolManager"},function(){return this.wA},function(a){var b=this.wA;b!==a&&(D.l(a,Qh,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wA=a,a.ad(this))});D.defineProperty(E,{mu:"defaultTool"},function(){return this.Cz},function(a){var b=this.Cz;b!==a&&(D.l(a,Zg,E,"defaultTool"),this.Cz=a,this.eb===b&&(this.eb=a))}); -D.defineProperty(E,{eb:"currentTool"},function(){return this.zz},function(a){var b=this.zz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.mu);null!==a&&(D.l(a,Zg,E,"currentTool"),this.zz=a,a.ad(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.jx}); +D.defineProperty(E,{CB:"mouseDrop"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{lC:"toolTip"},function(){return this.wj},function(a){var b=this.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof hk||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.wj=a,this.i("toolTip",b,a))}); +D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(!v||a instanceof da||a instanceof hk||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ui=a,this.i("contextMenu",b,a))});D.defineProperty(E,{yb:"commandHandler"},function(){return this.wz},function(a){var b=this.wz;b!==a&&(D.l(a,qa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wz=a,a.ad(this))}); +D.defineProperty(E,{ob:"toolManager"},function(){return this.wA},function(a){var b=this.wA;b!==a&&(D.l(a,Ph,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.ad(null),this.wA=a,a.ad(this))});D.defineProperty(E,{mu:"defaultTool"},function(){return this.Cz},function(a){var b=this.Cz;b!==a&&(D.l(a,Hg,E,"defaultTool"),this.Cz=a,this.eb===b&&(this.eb=a))}); +D.defineProperty(E,{eb:"currentTool"},function(){return this.zz},function(a){var b=this.zz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.mu);null!==a&&(D.l(a,Hg,E,"currentTool"),this.zz=a,a.ad(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.jx}); D.defineProperty(E,{JJ:"maxSelectionCount"},function(){return this.Fw},function(a){var b=this.Fw;if(b!==a)if(D.h(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Fw=a,this.i("maxSelectionCount",b,a),!this.na.ub&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); D.defineProperty(E,{VJ:"nodeSelectionAdornmentTemplate"},function(){return this.Lw},function(a){var b=this.Lw;b!==a&&(D.l(a,da,E,"nodeSelectionAdornmentTemplate"),this.Lw=a,this.i("nodeSelectionAdornmentTemplate",b,a))});D.defineProperty(E,{aJ:"groupSelectionAdornmentTemplate"},function(){return this.hw},function(a){var b=this.hw;b!==a&&(D.l(a,da,E,"groupSelectionAdornmentTemplate"),this.hw=a,this.i("groupSelectionAdornmentTemplate",b,a))}); D.defineProperty(E,{DJ:"linkSelectionAdornmentTemplate"},function(){return this.Aw},function(a){var b=this.Aw;b!==a&&(D.l(a,da,E,"linkSelectionAdornmentTemplate"),this.Aw=a,this.i("linkSelectionAdornmentTemplate",b,a))});D.w(E,{wm:"highlighteds"},function(){return this.lw}); -D.defineProperty(E,{Gi:"isModified"},function(){var a=this.na;return a.isEnabled?null!==a.Gj?!0:this.rw&&this.rh!==a.Lj:this.rw},function(a){if(this.rw!==a){D.h(a,"boolean",E,"isModified");this.rw=a;var b=this.na;!a&&b.isEnabled&&(this.rh=b.Lj);a||ln(this)}});function ln(a){var b=a.Gi;a.ME!==b&&(a.ME=b,a.Ja("Modified"))} -D.defineProperty(E,{ea:"model"},function(){return this.ye},function(a){var b=this.ye;if(b!==a){D.l(a,M,E,"model");this.eb.doCancel();null!==b&&b.na!==a.na&&b.na.iG&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Ra.Yh();this.Jx();this.sh=!1;this.bp=!0;this.rh=-2;this.cg=!1;var c=this.ke;this.ke=!0;this.Ra.ro("Model");null!==b&&(null!==this.xh&&this.xh.each(function(a){b.gv(a)}),b.gv(this.VD),b instanceof Y&&mn(this,b.$g),mn(this,b.qg));this.ye=a;a.Dn(this.UD);nn(this, -a.qg);a instanceof Y&&on(this,a.$g);a.gv(this.UD);a.Dn(this.VD);null!==this.xh&&this.xh.each(function(b){a.Dn(b)});this.ke=c;this.ed||this.ra();null!==b&&(a.na.isEnabled=b.na.isEnabled)}});D.defineProperty(E,{ab:null},function(){return this.ND},function(a){this.ND=a});D.w(E,{uy:null},function(){return this.GH}); -function Hl(a,b){if(b.ea===a.ea){var c=b.Oc,d=b.propertyName;if(c===gg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ob,c.sf.each(function(b){b.ad(a)}),c.mg.each(function(b){b.ad(a)}),c.ng.each(function(b){b.ad(a)}),a.ke||a.sh||(a.Sr=!0,a.bp&&(a.cg=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Ra;e.pf&&!a.lb&&e.Yh();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Ra,e.pf&&!a.lb&&e.Yh());else if(a.ab){a.ab=!1;try{var g=b.Ef;if(""!==g)if(c===fg){if("linkFromKey"===g){var h= +D.defineProperty(E,{Gi:"isModified"},function(){var a=this.na;return a.isEnabled?null!==a.Gj?!0:this.rw&&this.rh!==a.Lj:this.rw},function(a){if(this.rw!==a){D.h(a,"boolean",E,"isModified");this.rw=a;var b=this.na;!a&&b.isEnabled&&(this.rh=b.Lj);a||kn(this)}});function kn(a){var b=a.Gi;a.ME!==b&&(a.ME=b,a.Ja("Modified"))} +D.defineProperty(E,{ea:"model"},function(){return this.ye},function(a){var b=this.ye;if(b!==a){D.l(a,M,E,"model");this.eb.doCancel();null!==b&&b.na!==a.na&&b.na.iG&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Ra.Yh();this.Jx();this.sh=!1;this.bp=!0;this.rh=-2;this.cg=!1;var c=this.ke;this.ke=!0;this.Ra.ro("Model");null!==b&&(null!==this.xh&&this.xh.each(function(a){b.gv(a)}),b.gv(this.VD),b instanceof Y&&ln(this,b.$g),ln(this,b.qg));this.ye=a;a.Dn(this.UD);mn(this, +a.qg);a instanceof Y&&nn(this,a.$g);a.gv(this.UD);a.Dn(this.VD);null!==this.xh&&this.xh.each(function(b){a.Dn(b)});this.ke=c;this.ed||this.ra();null!==b&&(a.na.isEnabled=b.na.isEnabled)}});D.defineProperty(E,{ab:null},function(){return this.ND},function(a){this.ND=a});D.w(E,{uy:null},function(){return this.GH}); +function Gl(a,b){if(b.ea===a.ea){var c=b.Oc,d=b.propertyName;if(c===fg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ob,c.sf.each(function(b){b.ad(a)}),c.mg.each(function(b){b.ad(a)}),c.ng.each(function(b){b.ad(a)}),a.ke||a.sh||(a.Sr=!0,a.bp&&(a.cg=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Ra;e.pf&&!a.lb&&e.Yh();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Ra,e.pf&&!a.lb&&e.Yh());else if(a.ab){a.ab=!1;try{var g=b.Ef;if(""!==g)if(c===eg){if("linkFromKey"===g){var h= b.object,k=a.gg(h);if(null!==k){var l=b.newValue,m=a.Te(l);k.$=m}}else if("linkToKey"===g)h=b.object,k=a.gg(h),null!==k&&(l=b.newValue,m=a.Te(l),k.ba=m);else if("linkFromPortId"===g){if(h=b.object,k=a.gg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.hg=n)}}else if("linkToPortId"===g)h=b.object,k=a.gg(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.jh=n));else if("nodeGroupKey"===g){var h=b.object,p=a.Nh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Te(q);p.Ka=r instanceof I?r: -null}else p.Ka=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.gg(h),null!==k){var s=b.oldValue,u=b.newValue;if(D.isArray(s))for(var t=D.cb(s),y=0;y l)){var m=l;vn(k)&&m++;k.Af(m,!0);wn(k,m,l)}}}}function Zm(a,b){var c=b.ej;if(D.isArray(c)){var d=a.an.oa(c);if(null===d)d=[],d.push(b),a.an.add(c,d);else{for(c=0;c l)){var m=l;un(k)&&m++;k.Af(m,!0);vn(k,m,l)}}}}function Ym(a,b){var c=b.ej;if(D.isArray(c)){var d=a.an.oa(c);if(null===d)d=[],d.push(b),a.an.add(c,d);else{for(c=0;c this.scale&&(this.scale=a)):D.ua(a,"> 0",E,"minScale"))}); D.defineProperty(E,{Rh:"maxScale"},function(){return this.Ew},function(a){D.p(a,E,"maxScale");var b=this.Ew;b!==a&&(0 0",E,"maxScale"))});D.defineProperty(E,{Lm:"zoomPoint"},function(){return this.xx},function(a){this.xx.O(a)||(D.l(a,N,E,"zoomPoint"),this.xx=a=a.V())}); -D.defineProperty(E,{LA:"contentAlignment"},function(){return this.No},function(a){var b=this.No;b.O(a)||(D.l(a,S,E,"contentAlignment"),this.No=a=a.V(),this.i("contentAlignment",b,a),Zl(this,!1))});D.defineProperty(E,{WL:"initialContentAlignment"},function(){return this.hp},function(a){var b=this.hp;b.O(a)||(D.l(a,S,E,"initialContentAlignment"),this.hp=a=a.V(),this.i("initialContentAlignment",b,a))}); +D.defineProperty(E,{LA:"contentAlignment"},function(){return this.No},function(a){var b=this.No;b.O(a)||(D.l(a,S,E,"contentAlignment"),this.No=a=a.V(),this.i("contentAlignment",b,a),Yl(this,!1))});D.defineProperty(E,{WL:"initialContentAlignment"},function(){return this.hp},function(a){var b=this.hp;b.O(a)||(D.l(a,S,E,"initialContentAlignment"),this.hp=a=a.V(),this.i("initialContentAlignment",b,a))}); D.defineProperty(E,{padding:"padding"},function(){return this.vf},function(a){"number"===typeof a?a=new Lb(a):D.l(a,Lb,E,"padding");var b=this.vf;b.O(a)||(this.vf=a=a.V(),this.Qc(),this.i("padding",b,a))});D.w(E,{rg:"nodes"},function(){return this.Ap.j});D.w(E,{links:"links"},function(){return this.tp.j});D.w(E,{Hi:"parts"},function(){return this.rb.j}); -E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.Ap.j;b.next();){var c=b.value;c.Bq&&a.add(c)}for(b=this.tp.j;b.next();)c=b.value,c.Bq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.am.j};D.defineProperty(E,{Zb:"layout"},function(){return this.we},function(a){var b=this.we;b!==a&&(D.l(a,$g,E,"layout"),null!==b&&(b.g=null,b.group=null),this.we=a,a.g=this,a.group=null,this.ek=!0,this.i("layout",b,a),this.Le())}); -E.prototype.layoutDiagram=function(a){Ti(this);a&&Bn(this,!0);nm(this,!1)};function Bn(a,b){for(var c=a.am.j;c.next();)In(a,c.value,b);null!==a.Zb&&(b?a.Zb.Bf=!1:a.Zb.L())}function In(a,b,c){if(null!==b){for(var d=b.jn.j;d.next();)In(a,d.value,c);null!==b.Zb&&(c?b.Zb.Bf=!1:b.Zb.L())}} -function nm(a,b){if(a.ek&&!a.Dz){var c=a.ab;a.ab=!0;try{var d=a.na.Ki;0===d&&a.Nb("Layout");var e=a.Ra;1>=d&&!e.pf&&!e.zc&&(b||e.ro("Layout"));a.ek=!1;for(var g=a.am.j;g.next();)Jn(a,g.value,b,d);var h=a.Zb;h.Bf||(!b||h.lG||0===d?(h.doLayout(a),Ti(a),h.Bf=!0):a.ek=!0)}finally{0===d&&a.jd("Layout"),a.ek=!h.Bf,a.ab=c}}} -function Jn(a,b,c,d){if(null!==b){for(var e=b.jn.j;e.next();)Jn(a,e.value,c,d);e=b.Zb;null===e||e.Bf||(!c||e.lG||0===d?(b.po=!b.location.H(),e.doLayout(b),b.L(Kn),Mm(a,b),e.Bf=!0):a.ek=!0)}}D.defineProperty(E,{fe:"isTreePathToChildren"},function(){return this.uw},function(a){var b=this.uw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.uw=a,this.i("isTreePathToChildren",b,a),!this.na.ub))for(a=this.rg;a.next();)Ln(a.value)}); -E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.rg;b.next();){var c=b.value;c.Bq&&null===c.Sn()&&a.add(c)}return a.j};D.defineProperty(E,{qC:"treeCollapsePolicy"},function(){return this.sx},function(a){var b=this.sx;b!==a&&(a!==Fl&&a!==jn&&a!==kn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.sx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Ph:null},function(){return this.BD},function(a){this.BD=a}); -function El(a){function b(a){var b=a.toLowerCase(),h=new K("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new na("string",K),d=new na("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); +E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.Ap.j;b.next();){var c=b.value;c.Bq&&a.add(c)}for(b=this.tp.j;b.next();)c=b.value,c.Bq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.am.j};D.defineProperty(E,{Zb:"layout"},function(){return this.we},function(a){var b=this.we;b!==a&&(D.l(a,Zg,E,"layout"),null!==b&&(b.g=null,b.group=null),this.we=a,a.g=this,a.group=null,this.ek=!0,this.i("layout",b,a),this.Le())}); +E.prototype.layoutDiagram=function(a){Si(this);a&&An(this,!0);mm(this,!1)};function An(a,b){for(var c=a.am.j;c.next();)Hn(a,c.value,b);null!==a.Zb&&(b?a.Zb.Bf=!1:a.Zb.L())}function Hn(a,b,c){if(null!==b){for(var d=b.jn.j;d.next();)Hn(a,d.value,c);null!==b.Zb&&(c?b.Zb.Bf=!1:b.Zb.L())}} +function mm(a,b){if(a.ek&&!a.Dz){var c=a.ab;a.ab=!0;try{var d=a.na.Ki;0===d&&a.Nb("Layout");var e=a.Ra;1>=d&&!e.pf&&!e.zc&&(b||e.ro("Layout"));a.ek=!1;for(var g=a.am.j;g.next();)In(a,g.value,b,d);var h=a.Zb;h.Bf||(!b||h.lG||0===d?(h.doLayout(a),Si(a),h.Bf=!0):a.ek=!0)}finally{0===d&&a.jd("Layout"),a.ek=!h.Bf,a.ab=c}}} +function In(a,b,c,d){if(null!==b){for(var e=b.jn.j;e.next();)In(a,e.value,c,d);e=b.Zb;null===e||e.Bf||(!c||e.lG||0===d?(b.po=!b.location.H(),e.doLayout(b),b.L(Jn),ym(a,b),e.Bf=!0):a.ek=!0)}}D.defineProperty(E,{fe:"isTreePathToChildren"},function(){return this.uw},function(a){var b=this.uw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.uw=a,this.i("isTreePathToChildren",b,a),!this.na.ub))for(a=this.rg;a.next();)Kn(a.value)}); +E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.rg;b.next();){var c=b.value;c.Bq&&null===c.Sn()&&a.add(c)}return a.j};D.defineProperty(E,{qC:"treeCollapsePolicy"},function(){return this.sx},function(a){var b=this.sx;b!==a&&(a!==El&&a!==hn&&a!==jn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.sx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Ph:null},function(){return this.BD},function(a){this.BD=a}); +function Dl(a){function b(a){var b=a.toLowerCase(),h=new K("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new na("string",K),d=new na("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.Fz=c;a.Ez=d} -function Ga(a,b){var c=a.Ez.oa(b);return null!==c?c:a.Ez.oa(b.toLowerCase())}function Mn(a,b){var c=a.Fz.oa(b);if(null!==c)return c;c=a.Fz.oa(b.toLowerCase());if(null!==c)return c;D.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.yx=function(a,b){D.h(a,"string",E,"addDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Mn(this,a);null!==c&&c.add(b)}; -E.prototype.removeDiagramListener=E.prototype.QB=function(a,b){D.h(a,"string",E,"removeDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Mn(this,a);null!==c&&c.remove(b)}; -E.prototype.raiseDiagramEvent=E.prototype.Ja=function(a,b,c){v&&D.h(a,"string",E,"raiseDiagramEvent:name");var d=Mn(this,a),e=new dg;e.g=this;a=Ga(this,a);null!==a&&(e.name=a);void 0!==b&&(e.hC=b);void 0!==c&&(e.LB=c);b=d.length;if(1===b)d=d.fa(0),d(e);else if(0!==b)for(c=d.Fc(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.wb,g=a.scale,e=D.vg(0,0,e.width*g,e.height*g),h=D.Fb(0,0);if(b.x>=e.x&&b.x e.x+e.width-d.right&&(k=Math.max(a.lv,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.y e.y+e.height-d.bottom&&(k=Math.max(a.mv,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Wc(Kd)||(c=new N(c.x+h.x/g,c.y+h.y/g));D.Lb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new ma);a.context="svg";a=Tn(this,a);return null!==a?a.Gm:null}; +E.prototype.doAutoScroll=E.prototype.UA=function(a){this.Lv.assign(a);Qn(this,this.Lv).Wc(this.position)?ri(this):Rn(this)};function Rn(a){-1===a.Io&&(a.Io=D.setTimeout(function(){if(-1!==a.Io){ri(a);var b=a.U.event;if(null!==b){var c=Qn(a,a.Lv);c.Wc(a.position)||(a.position=c,a.U.ha=a.pC(a.Lv),c=fm(b),a.simulatedMouseMove(b,null,c)||a.doMouseMove(),a.sk=!0,am(a,a.Kh()),a.Pe=!0,a.lg(),Rn(a))}}},a.pr))}function ri(a){-1!==a.Io&&(D.clearTimeout(a.Io),a.Io=-1)} +function Qn(a,b){var c=a.position,d=a.cF;if(0>=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.wb,g=a.scale,e=D.vg(0,0,e.width*g,e.height*g),h=D.Fb(0,0);if(b.x>=e.x&&b.x e.x+e.width-d.right&&(k=Math.max(a.lv,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.y e.y+e.height-d.bottom&&(k=Math.max(a.mv,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Wc(Jd)||(c=new N(c.x+h.x/g,c.y+h.y/g));D.Lb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new ma);a.context="svg";a=Sn(this,a);return null!==a?a.Gm:null}; E.prototype.makeImage=function(a){void 0===a&&(a=new ma);var b=(a.document||document).createElement("img");b.src=this.EJ(a);return b}; -E.prototype.makeImageData=E.prototype.EJ=function(a){void 0===a&&(a=new ma);var b=Tn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Uk.getImageData(0,0,b.width,b.height);case "blob":b=b.ae;c=a.callback;if("function"!==typeof c){D.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== -typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Un=!1; -function Tn(a,b){a.Ra.Yh();a.lg();if(null===a.Ib)return null;"object"!==typeof b&&D.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new Ca(Infinity,Infinity):new Ca(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= +E.prototype.makeImageData=E.prototype.EJ=function(a){void 0===a&&(a=new ma);var b=Sn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Uk.getImageData(0,0,b.width,b.height);case "blob":b=b.ae;c=a.callback;if("function"!==typeof c){D.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== +typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Tn=!1; +function Sn(a,b){a.Ra.Yh();a.lg();if(null===a.Ib)return null;"object"!==typeof b&&D.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new Ca(Infinity,Infinity):new Ca(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new Lb(l):l instanceof Lb||D.k("MakeImage padding must be a Margin or a number.");l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.dd.De(!0);var s=new ja(null,p),u=s.Uk;if(!(d||e||k||h)){s.width=a.Qb+Math.ceil(l.left+l.right);s.height=a.Pb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new qd(s.ae, -p,q),Tm(a,u,l,new Ca(s.width,s.height),a.Db,a.sb,k,m,r,n),u;a.Ur=!1;Tm(a,u,l,new Ca(s.width,s.height),a.Db,a.sb,k,m,r,n);a.Ur=!0;return s}var t=a.yb.Px,y=new N(0,0),w=a.kd.copy();w.zK(a.padding);if(r)for(var A=!0,A=a.dc.o,B=A.length,P=0;Pt?(e=t,h=w.width,ea=w.height):(h=g.width,ea=g.height)):(h=w.width*e,ea=w.height*e):(e=t,h=w.width,ea=w.height);null!==l?(h+=V,ea+=A):l=new Lb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Un&&(h>d||ea>g)&&(D.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ea)+ -" vs 2000x2000) Consider increasing the max size."),Un=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ea=Math.min(ea,g)));s.width=Math.ceil(h);s.height=Math.ceil(ea);if("svg"===b.context)return u=new qd(s.ae,p,q),Tm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n),u;a.Ur=!1;Tm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n);a.Ur=!0;return s} -E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.OH&&D.k("Cannot inherit from "+D.yf(b));D.Ta(a,b)};function Nl(){this.vE=null;this.QH="63ad05bbe23a1786468a4c741b6d2";this.Zi=this.QH===this._tk?!0:null} -Nl.prototype.Km=function(a){a.dd.setTransform(a.ud,0,0,a.ud,0,0);if(null===this.Zi){var b="f",c=window[D.Wg("76a715b2f73f148a")][D.Wg("72ba13b5")];a=D.Wg;this.Zi=!0;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9"));if(!(6>d.length)){var e=a(d[1]).split(".");if("7da71ca0"===d[4]){var g=a(D[a("6cae19")]).split(".");if(e[0]>g[0]||e[0]===g[0]&&e[1]>=g[1]){g=c[a("76ad18b4f73e")];for(e=c[a("73a612b6fb191d")](a("35e7"))+ +h=B,ea=P):isNaN(P)?(e=B/w.width,h=B,ea=w.height*e):(e=P/w.height,h=w.width*e,ea=P):null!==e?"NaN"===e&&g.H()?(e=Math.min((g.width-V)/w.width,(g.height-A)/w.height),e>t?(e=t,h=w.width,ea=w.height):(h=g.width,ea=g.height)):(h=w.width*e,ea=w.height*e):(e=t,h=w.width,ea=w.height);null!==l?(h+=V,ea+=A):l=new Lb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Tn&&(h>d||ea>g)&&(D.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ea)+ +" vs 2000x2000) Consider increasing the max size."),Tn=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ea=Math.min(ea,g)));s.width=Math.ceil(h);s.height=Math.ceil(ea);if("svg"===b.context)return u=new qd(s.ae,p,q),Sm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n),u;a.Ur=!1;Sm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n);a.Ur=!0;return s} +E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.OH&&D.k("Cannot inherit from "+D.yf(b));D.Ta(a,b)};function Ml(){this.vE=null;this.QH="63ad05bbe23a1786468a4c741b6d2";this.Zi=this.QH===this._tk?!0:null} +Ml.prototype.Km=function(a){a.dd.setTransform(a.ud,0,0,a.ud,0,0);if(null===this.Zi){var b="f",c=window[D.Wg("76a715b2f73f148a")][D.Wg("72ba13b5")];a=D.Wg;this.Zi=!0;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9"));if(!(6>d.length)){var e=a(d[1]).split(".");if("7da71ca0"===d[4]){var g=a(D[a("6cae19")]).split(".");if(e[0]>g[0]||e[0]===g[0]&&e[1]>=g[1]){g=c[a("76ad18b4f73e")];for(e=c[a("73a612b6fb191d")](a("35e7"))+ 2;e c&&a(d[2])!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));0>c&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));if(this.Zi=!(0<=c&&ce.length;)e+="9";e=e.substr(e.length-4);d=""+["gsh","gsf"][parseInt(e.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(e.substr(0, 1),10)%4];c[a("79a417a0f0181a8946")]=d;if(window.document[a("78a712aa")]){if(window.document[a("78a712aa")][a("7bb806b6ed32388c4a875b")](c),e=window[a("7dad0290ec3b0b91578e5b40007031bf")](c)[a("7dad0283f1390b81519f4645156528bf")](a("78a704b7e62456904c9b12701b6532a8")),window.document[a("78a712aa")][a("68ad1bbcf533388c4a875b")](c),e)if(-1!==e.indexOf(parseInt(b[1]+b[2],16))&&-1!==e.indexOf(parseInt(b[3]+b[4],16)))this.Zi=!1;else if(D.Mu||D.zq||D.Aq||D.rB)for(d="."+d,e=0;e b.timeStamp-a.xk)b.preventDefault();else if(a.vk)b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;em(a,a,b,c,!0);c.Wk=!0;c.Ee=b.detail;if(D.zq||D.Aq)b.timeStamp-a.xk b.timeStamp-a.xk){b.preventDefault();return}a.xk=b.timeStamp}if(D.Zn&&null!==a.Ht)a.Ht=null,b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;em(a,a,b,c,!0);c.up=!0;c.Ee=b.detail;if(D.zq||D.Aq)c.Ee=a.ji;c.bubbles=b.bubbles;c.Qf=gm(b);a.simulatedMouseUp(b,null,new N,c.Qf)||(a.doMouseUp(),Ei(a),ga(a,c,b))}}};a.oo=function(b){if(a.isEnabled){var c= -a.Hd;a.Hd=a.Vb;a.Vb=c;em(a,a,b,c,!0);c.bubbles=!0;var d=0,e=0;void 0!==b.wheelDelta&&(e=0 b.timeStamp-a.xk)b.preventDefault();else if(a.vk)b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;dm(a,a,b,c,!0);c.Wk=!0;c.Ee=b.detail;if(D.zq||D.Aq)b.timeStamp-a.xk b.timeStamp-a.xk){b.preventDefault();return}a.xk=b.timeStamp}if(D.Zn&&null!==a.Ht)a.Ht=null,b.preventDefault();else{a.Hd=a.Vb;a.Vb=c;dm(a,a,b,c,!0);c.up=!0;c.Ee=b.detail;if(D.zq||D.Aq)c.Ee=a.ji;c.bubbles=b.bubbles;c.Qf=fm(b);a.simulatedMouseUp(b,null,new N,c.Qf)||(a.doMouseUp(),ri(a),ga(a,c,b))}}};a.oo=function(b){if(a.isEnabled){var c= +a.Hd;a.Hd=a.Vb;a.Vb=c;dm(a,a,b,c,!0);c.bubbles=!0;var d=0,e=0;void 0!==b.wheelDelta&&(e=0 n||Math.abs(m.y-b.screenY)>n)?a.ji++:a.ji=1;d.Ee=a.ji;a.xk=b.timeStamp;a.xw.n(b.screenX,b.screenY);m=0;b.ctrlKey&&(m+=1);b.altKey&&(m+=2);b.shiftKey&&(m+=4);b.metaKey&&(m+=8);d.xd=m;d.button=b.button;void 0===b.buttons||D.Mu||(d.buttons=b.buttons);D.Qh&&0===b.button&&b.ctrlKey&&(d.button=2);d.Wk=!1;d.up=!0;d.Vk=0;d.Cc=!1;d.bubbles=!0;d.event=b;d.timestamp=Date.now();d.Qf=null===e?gm(b):e.ca? -e.ca:null;d.Oe=null;a.simulatedMouseUp(b,null,new N,d.Qf)||(a.doMouseUp(),Ei(a),ga(a,d,b),c&&(a.vk=!1))}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Lq=function(b){if(a.isEnabled){a.th=!1;var c=a.jA;c[b.pointerId]&&delete c[b.pointerId];c=a.Dp;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.eb,b.cancelWaitAfter(),b.standardMouseOver())}};d.De(!0);Rl(a)} -function Vn(a){1 n||Math.abs(m.y-b.screenY)>n)?a.ji++:a.ji=1;d.Ee=a.ji;a.xk=b.timeStamp;a.xw.n(b.screenX,b.screenY);m=0;b.ctrlKey&&(m+=1);b.altKey&&(m+=2);b.shiftKey&&(m+=4);b.metaKey&&(m+=8);d.xd=m;d.button=b.button;void 0===b.buttons||D.Mu||(d.buttons=b.buttons);D.Qh&&0===b.button&&b.ctrlKey&&(d.button=2);d.Wk=!1;d.up=!0;d.Vk=0;d.Cc=!1;d.bubbles=!0;d.event=b;d.timestamp=Date.now();d.Qf=null===e?fm(b):e.ca? +e.ca:null;d.Oe=null;a.simulatedMouseUp(b,null,new N,d.Qf)||(a.doMouseUp(),ri(a),ga(a,d,b),c&&(a.vk=!1))}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Lq=function(b){if(a.isEnabled){a.th=!1;var c=a.jA;c[b.pointerId]&&delete c[b.pointerId];c=a.Dp;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.eb,b.cancelWaitAfter(),b.standardMouseOver())}};d.De(!0);Ql(a)} +function Un(a){1 a)&&D.ua(a,"0 <= loc <= 1",Ba,"addColorStop:loc");D.h(b,"string",Ba,"addColorStop:color");v&&!za(b)&&D.k('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.ph&&(this.ph=new na("number","string"));this.ph.add(a,b);this.da===Fg&&(this.type=Gg);this.qh=null}; -D.defineProperty(Ba,{type:"type"},function(){return this.da},function(a){this.J&&D.qa(this,a);D.Da(a,Ba,Ba,"type");this.da=a;this.start.ee()&&(a===Gg?this.start=jc:a===Id&&(this.start=mc));this.end.ee()&&(a===Gg?this.end=uc:a===Id&&(this.end=mc));this.qh=null});D.defineProperty(Ba,{color:"color"},function(){return this.Lo},function(a){this.J&&D.qa(this,a);v&&!za(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.Lo=a;this.qh=null}); +f.toString=function(){var a="Brush(";if(this.type===Eg)a+=this.color;else if(a=this.type===Fg?a+"Linear ":this.type===Hd?a+"Radial ":this.type===ao?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.Rk)for(var b=this.Rk.j;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; +Ba.prototype.addColorStop=Ba.prototype.addColorStop=function(a,b){this.J&&D.qa(this);("number"!==typeof a||!isFinite(a)||1a)&&D.ua(a,"0 <= loc <= 1",Ba,"addColorStop:loc");D.h(b,"string",Ba,"addColorStop:color");v&&!za(b)&&D.k('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.ph&&(this.ph=new na("number","string"));this.ph.add(a,b);this.da===Eg&&(this.type=Fg);this.qh=null}; +D.defineProperty(Ba,{type:"type"},function(){return this.da},function(a){this.J&&D.qa(this,a);D.Da(a,Ba,Ba,"type");this.da=a;this.start.ee()&&(a===Fg?this.start=jc:a===Hd&&(this.start=mc));this.end.ee()&&(a===Fg?this.end=uc:a===Hd&&(this.end=mc));this.qh=null});D.defineProperty(Ba,{color:"color"},function(){return this.Lo},function(a){this.J&&D.qa(this,a);v&&!za(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.Lo=a;this.qh=null}); D.defineProperty(Ba,{start:"start"},function(){return this.Mp},function(a){this.J&&D.qa(this,a);D.l(a,S,Ba,"start");this.Mp=a.V();this.qh=null});D.defineProperty(Ba,{end:"end"},function(){return this.Zo},function(a){this.J&&D.qa(this,a);D.l(a,S,Ba,"end");this.Zo=a.V();this.qh=null});D.defineProperty(Ba,{sv:"startRadius"},function(){return this.mx},function(a){this.J&&D.qa(this,a);D.p(a,Ba,"startRadius");0>a&&D.ua(a,">= zero",Ba,"startRadius");this.mx=a;this.qh=null}); D.defineProperty(Ba,{ou:"endRadius"},function(){return this.dw},function(a){this.J&&D.qa(this,a);D.p(a,Ba,"endRadius");0>a&&D.ua(a,">= zero",Ba,"endRadius");this.dw=a;this.qh=null});D.defineProperty(Ba,{Rk:"colorStops"},function(){return this.ph},function(a){this.J&&D.qa(this,a);v&&D.l(a,na,Ba,"colorStops");this.ph=a;this.qh=null});D.defineProperty(Ba,{pattern:"pattern"},function(){return this.Uw},function(a){this.J&&D.qa(this,a);this.Uw=a;this.qh=null}); Ba.randomColor=function(a,b){void 0===a&&(a=128);v&&(D.p(a,Ba,"randomColor:min"),(0>a||255d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+ -d+e+c};var fo=(new ja(null)).Uk,za;Ba.isValidColor=za=function(a){if("black"===a)return!0;if(""===a)return!1;v&&D.h(a,"string",Ba,"isValidColor");fo.fillStyle="#000000";var b=fo.fillStyle;fo.fillStyle=a;if(fo.fillStyle!==b)return!0;fo.fillStyle="#FFFFFF";b=fo.fillStyle;fo.fillStyle=a;return fo.fillStyle!==b};var ho=new ao,io=new ao,jo=new ao,ko=new ao;Ba.lighten=function(a){return lo(a)}; -Ba.prototype.lightenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?co:b;if(this.type===Fg)mo(this.color),this.color=no(c,d);else if((this.type===Gg||this.type===Id)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)mo(e.value),this.addColorStop(e.key,no(c,d));return this};var lo;Ba.lightenBy=lo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?co:c;mo(a);return no(b,c)};Ba.darken=function(a){return oo(a)}; -Ba.prototype.darkenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?co:b;if(this.type===Fg)mo(this.color),this.color=no(-c,d);else if((this.type===Gg||this.type===Id)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)mo(e.value),this.addColorStop(e.key,no(-c,d));return this};var oo;Ba.darkenBy=oo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?co:c;mo(a);return no(-b,c)}; -function no(a,b){switch(b){case co:var c=100*po(ho.Rc),d=100*po(ho.Rd),e=100*po(ho.nd);jo.Rc=.4124564*c+.3575761*d+.1804375*e;jo.Rd=.2126729*c+.7151522*d+.072175*e;jo.nd=.0193339*c+.119192*d+.9503041*e;jo.pg=ho.pg;c=qo(jo.Rc/ro[0]);d=qo(jo.Rd/ro[1]);e=qo(jo.nd/ro[2]);ko.Rc=116*d-16;ko.Rd=500*(c-d);ko.nd=200*(d-e);ko.pg=jo.pg;ko.Rc=Math.min(100,Math.max(0,ko.Rc+100*a));c=(ko.Rc+16)/116;d=c-ko.nd/200;jo.Rc=ro[0]*so(ko.Rd/500+c);jo.Rd=ro[1]*(ko.Rc>to*uo?Math.pow(c,3):ko.Rc/to);jo.nd=ro[2]*so(d);jo.pg= -ko.pg;c=-.969266*jo.Rc+1.8760108*jo.Rd+.041556*jo.nd;d=.0556434*jo.Rc+-.2040259*jo.Rd+1.0572252*jo.nd;ho.Rc=255*vo((3.2404542*jo.Rc+-1.5371385*jo.Rd+-.4985314*jo.nd)/100);ho.Rd=255*vo(c/100);ho.nd=255*vo(d/100);ho.pg=jo.pg;ho.Rc=Math.round(ho.Rc);255 ho.Rc&&(ho.Rc=0);ho.Rd=Math.round(ho.Rd);255 ho.Rd&&(ho.Rd=0);ho.nd=Math.round(ho.nd);255 ho.nd&&(ho.nd=0);return"rgba("+ho.Rc+", "+ho.Rd+", "+ho.nd+", "+ho.pg+")";case eo:var e=ho.Rc/255,g=ho.Rd/ -255,h=ho.nd/255,k=Math.max(e,g,h),d=Math.min(e,g,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(g-h)/l%6;break;case g:c=(h-e)/l+2;break;case h:c=(e-g)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}io.Rc=Math.round(c);io.Rd=Math.round(100*e);io.nd=Math.round(100*d);io.pg=ho.pg;io.nd=Math.min(100,Math.max(0,io.nd+100*a));return"hsla("+io.Rc+", "+io.Rd+"%, "+io.nd+"%, "+io.pg+")";default:return D.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} -function mo(a){fo.clearRect(0,0,1,1);fo.fillStyle="#000000";var b=fo.fillStyle;fo.fillStyle=a;fo.fillStyle!==b?(fo.fillRect(0,0,1,1),a=fo.getImageData(0,0,1,1).data,ho.Rc=a[0],ho.Rd=a[1],ho.nd=a[2],ho.pg=a[3]/255):(fo.fillStyle="#FFFFFF",b=fo.fillStyle,fo.fillStyle=a,fo.fillStyle===b&&v&&D.k('Color "'+a+'" is not a valid color string for RGBA color conversion'),ho.Rc=0,ho.Rd=0,ho.nd=0,ho.pg=1)}function po(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)} -function vo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var uo=216/24389,to=24389/27,ro=[95.047,100,108.883];function qo(a){return a>uo?Math.pow(a,1/3):(to*a+16)/116}function so(a){var b=a*a*a;return b>uo?b:(116*a-16)/to} -function O(){D.xc(this);this.S=4225027;this.Lc=1;this.rj=null;this.ac="";this.lc=this.Mb=null;this.sb=(new N(NaN,NaN)).freeze();this.$e=ie;this.oi=Xd;this.ni=ge;this.Nc=new Ea;this.Ni=new Ea;this.ij=new Ea;this.Db=this.Xo=1;this.wg=0;this.Qg=wo;this.gn=Sd;this.Fd=(new C(NaN,NaN,NaN,NaN)).freeze();this.cc=(new C(NaN,NaN,NaN,NaN)).freeze();this.fd=(new C(0,0,NaN,NaN)).freeze();this.Z=this.it=this.jt=null;this.Nm=this.ue=Vc;this.vt=0;this.tj=1;this.wr=0;this.Si=1;this.Lt=null;this.zt=-Infinity;this.sn= -0;this.tn=Kd;this.un=wj;this.Fr="";this.Hc=this.ma=null;this.Jo=-1;this.yn=this.yg=this.Cl=this.Lp=null;this.kA=Rj;this.on=null}D.Di(O);D.ka("GraphObject",O); +d+e+c};var eo=(new ja(null)).Uk,za;Ba.isValidColor=za=function(a){if("black"===a)return!0;if(""===a)return!1;v&&D.h(a,"string",Ba,"isValidColor");eo.fillStyle="#000000";var b=eo.fillStyle;eo.fillStyle=a;if(eo.fillStyle!==b)return!0;eo.fillStyle="#FFFFFF";b=eo.fillStyle;eo.fillStyle=a;return eo.fillStyle!==b};var fo=new $n,ho=new $n,io=new $n,jo=new $n;Ba.lighten=function(a){return ko(a)}; +Ba.prototype.lightenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?bo:b;if(this.type===Eg)lo(this.color),this.color=mo(c,d);else if((this.type===Fg||this.type===Hd)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)lo(e.value),this.addColorStop(e.key,mo(c,d));return this};var ko;Ba.lightenBy=ko=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bo:c;lo(a);return mo(b,c)};Ba.darken=function(a){return no(a)}; +Ba.prototype.darkenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?bo:b;if(this.type===Eg)lo(this.color),this.color=mo(-c,d);else if((this.type===Fg||this.type===Hd)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)lo(e.value),this.addColorStop(e.key,mo(-c,d));return this};var no;Ba.darkenBy=no=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bo:c;lo(a);return mo(-b,c)}; +function mo(a,b){switch(b){case bo:var c=100*oo(fo.Rc),d=100*oo(fo.Rd),e=100*oo(fo.nd);io.Rc=.4124564*c+.3575761*d+.1804375*e;io.Rd=.2126729*c+.7151522*d+.072175*e;io.nd=.0193339*c+.119192*d+.9503041*e;io.pg=fo.pg;c=po(io.Rc/qo[0]);d=po(io.Rd/qo[1]);e=po(io.nd/qo[2]);jo.Rc=116*d-16;jo.Rd=500*(c-d);jo.nd=200*(d-e);jo.pg=io.pg;jo.Rc=Math.min(100,Math.max(0,jo.Rc+100*a));c=(jo.Rc+16)/116;d=c-jo.nd/200;io.Rc=qo[0]*ro(jo.Rd/500+c);io.Rd=qo[1]*(jo.Rc>so*to?Math.pow(c,3):jo.Rc/so);io.nd=qo[2]*ro(d);io.pg= +jo.pg;c=-.969266*io.Rc+1.8760108*io.Rd+.041556*io.nd;d=.0556434*io.Rc+-.2040259*io.Rd+1.0572252*io.nd;fo.Rc=255*uo((3.2404542*io.Rc+-1.5371385*io.Rd+-.4985314*io.nd)/100);fo.Rd=255*uo(c/100);fo.nd=255*uo(d/100);fo.pg=io.pg;fo.Rc=Math.round(fo.Rc);255 fo.Rc&&(fo.Rc=0);fo.Rd=Math.round(fo.Rd);255 fo.Rd&&(fo.Rd=0);fo.nd=Math.round(fo.nd);255 fo.nd&&(fo.nd=0);return"rgba("+fo.Rc+", "+fo.Rd+", "+fo.nd+", "+fo.pg+")";case co:var e=fo.Rc/255,g=fo.Rd/ +255,h=fo.nd/255,k=Math.max(e,g,h),d=Math.min(e,g,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(g-h)/l%6;break;case g:c=(h-e)/l+2;break;case h:c=(e-g)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}ho.Rc=Math.round(c);ho.Rd=Math.round(100*e);ho.nd=Math.round(100*d);ho.pg=fo.pg;ho.nd=Math.min(100,Math.max(0,ho.nd+100*a));return"hsla("+ho.Rc+", "+ho.Rd+"%, "+ho.nd+"%, "+ho.pg+")";default:return D.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} +function lo(a){eo.clearRect(0,0,1,1);eo.fillStyle="#000000";var b=eo.fillStyle;eo.fillStyle=a;eo.fillStyle!==b?(eo.fillRect(0,0,1,1),a=eo.getImageData(0,0,1,1).data,fo.Rc=a[0],fo.Rd=a[1],fo.nd=a[2],fo.pg=a[3]/255):(eo.fillStyle="#FFFFFF",b=eo.fillStyle,eo.fillStyle=a,eo.fillStyle===b&&v&&D.k('Color "'+a+'" is not a valid color string for RGBA color conversion'),fo.Rc=0,fo.Rd=0,fo.nd=0,fo.pg=1)}function oo(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)} +function uo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var to=216/24389,so=24389/27,qo=[95.047,100,108.883];function po(a){return a>to?Math.pow(a,1/3):(so*a+16)/116}function ro(a){var b=a*a*a;return b>to?b:(116*a-16)/so} +function O(){D.xc(this);this.S=4225027;this.Lc=1;this.rj=null;this.ac="";this.lc=this.Mb=null;this.sb=(new N(NaN,NaN)).freeze();this.$e=he;this.oi=Wd;this.ni=ae;this.Nc=new Ea;this.Ni=new Ea;this.ij=new Ea;this.Db=this.Xo=1;this.wg=0;this.Qg=vo;this.gn=Ld;this.Fd=(new C(NaN,NaN,NaN,NaN)).freeze();this.cc=(new C(NaN,NaN,NaN,NaN)).freeze();this.fd=(new C(0,0,NaN,NaN)).freeze();this.Z=this.it=this.jt=null;this.Nm=this.ue=Vc;this.vt=0;this.tj=1;this.wr=0;this.Si=1;this.Lt=null;this.zt=-Infinity;this.sn= +0;this.tn=Jd;this.un=vj;this.Fr="";this.Hc=this.ma=null;this.Jo=-1;this.yn=this.yg=this.Cl=this.Lp=null;this.kA=yj;this.on=null}D.Di(O);D.ka("GraphObject",O); O.prototype.cloneProtected=function(a){a.S=this.S|6144;a.Lc=this.Lc;a.ac=this.ac;a.Mb=this.Mb;a.lc=this.lc;a.sb.assign(this.sb);a.$e=this.$e.V();a.oi=this.oi.V();a.ni=this.ni.V();a.ij=this.ij.copy();a.Db=this.Db;a.wg=this.wg;a.Qg=this.Qg;a.gn=this.gn.V();a.Fd.assign(this.Fd);a.cc.assign(this.cc);a.fd.assign(this.fd);a.it=this.it;null!==this.Z&&(a.Z=this.Z.copy());a.ue=this.ue.V();a.Nm=this.Nm.V();a.vt=this.vt;a.tj=this.tj;a.wr=this.wr;a.Si=this.Si;a.Lt=this.Lt;a.zt=this.zt;a.sn=this.sn;a.tn=this.tn.V(); a.un=this.un;a.Fr=this.Fr;null!==this.ma&&(a.ma=this.ma.copy());a.Hc=this.Hc;a.Jo=this.Jo;null!==this.Cl&&(a.Cl=D.lm(this.Cl));null!==this.yg&&(a.yg=this.yg.copy());a.yn=this.yn};O.prototype.addCopyProperty=O.prototype.VH=function(a){var b=this.Cl;if(D.isArray(b))for(var c=0;c k;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} -O.prototype.raiseChangedEvent=O.prototype.od=function(a,b,c,d,e,g,h){var k=this.Y;if(null!==k&&(k.so(a,b,c,d,e,g,h),Ho(this)&&c===this&&a===fg&&Io(this,k,b),c===k&&0!==(k.S&16777216)&&null!==k.data))for(a=this.xa.o,c=a.length,d=0;d k;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} +O.prototype.raiseChangedEvent=O.prototype.od=function(a,b,c,d,e,g,h){var k=this.Y;if(null!==k&&(k.so(a,b,c,d,e,g,h),Go(this)&&c===this&&a===eg&&Ho(this,k,b),c===k&&0!==(k.S&16777216)&&null!==k.data))for(a=this.xa.o,c=a.length,d=0;d a&&(a+=360));return a};O.prototype.getDocumentScale=O.prototype.Jj=function(){if(0!==(this.S&4096)===!1)return this.Xo;var a=this.Db;return null!==this.R?a*this.R.Jj():a};O.prototype.getLocalPoint=O.prototype.OF=function(a,b){void 0===b&&(b=new N);b.assign(a);this.Hh.Oh(b);return b}; -O.prototype.getNearestIntersectionPoint=O.prototype.PF=function(a,b,c){return this.Vn(a.x,a.y,b.x,b.y,c)};f=O.prototype;f.Vn=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.hm)return g=this.aa,Je(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Fa;c=Je(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; -function Ik(a,b,c,d,e){if(!1!==Nm(a)){var g=a.margin,h=g.right+g.left,g=g.top+g.bottom;b=Math.max(b-h,0);c=Math.max(c-g,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-g,0);var h=a.angle,g=0,g=a.Ea,k=0;a instanceof z&&(k=a.mb);90===h||270===h?(b=isFinite(g.height)?g.height+k:b,c=isFinite(g.width)?g.width+k:c):(b=isFinite(g.width)?g.width+k:b,c=isFinite(g.height)?g.height+k:c);var g=d||0,k=e||0,l=a instanceof x;switch(Mo(a,!0)){case ak:k=g=0;l&&(c=b=Infinity);break;case Ye:isFinite(b)&&b>d&&(g=b);isFinite(c)&& -c>e&&(k=c);break;case yo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case xo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.rf,m=a.ah;g>l.width&&m.width l.height&&m.height a.height||this.uf.Qe>a.width))&&(c=!0);this.S=c?this.S|256:this.S&-257;this.cc.H()|| -D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.cc.toString());this.Ay(g,this.cc);No(this,!1);D.Lb(g)};f.Cj=function(){}; -function Oo(a,b,c,d,e){var g=a.aa;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ea.H()){g=a.Fd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;e+=h;b=Mo(a,!0);c===d&&g===e&&(b=ak);switch(b){case ak:if(c>d||g>e)lm(a,!0),Ik(a,c>d?d:c,g>e?e:g);break;case Ye:lm(a,!0);Ik(a,d,e,0,0);break;case yo:lm(a,!0);Ik(a,d,g,0,0);break;case xo:lm(a,!0),Ik(a,c,e,0,0)}}} -f.Ay=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.Cm!==this&&c.QG!==this&&c.TB!==this||Po(c,!0),this.ra(),Db(a,b)||(c.dl(),this.$s(c)))};f.$s=function(a){null!==this.yd&&(Po(a,!0),a instanceof G&&Qo(a,this))};D.defineProperty(O,{wo:"shadowVisible"},function(){return this.yn},function(a){var b=this.yn;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"shadowVisible"),this.yn=a,this.ra(),this.i("shadowVisible",b,a))}); -O.prototype.He=function(a,b){if(this.visible){var c=this.cc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof qd)a:{if(this.visible){var g=null,h=a.ny;if(this instanceof x&&(this.type===Ro||this.type===So))To(this,a,b);else{var k=this.cc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.R;0!==(this.S&4096)===!0&&Uo(this);var c=0!==(this.S&256),n=!1;this instanceof +O.prototype.getNearestIntersectionPoint=O.prototype.PF=function(a,b,c){return this.Vn(a.x,a.y,b.x,b.y,c)};f=O.prototype;f.Vn=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.hm)return g=this.aa,Ie(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Fa;c=Ie(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; +function Hk(a,b,c,d,e){if(!1!==Mm(a)){var g=a.margin,h=g.right+g.left,g=g.top+g.bottom;b=Math.max(b-h,0);c=Math.max(c-g,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-g,0);var h=a.angle,g=0,g=a.Ea,k=0;a instanceof z&&(k=a.mb);90===h||270===h?(b=isFinite(g.height)?g.height+k:b,c=isFinite(g.width)?g.width+k:c):(b=isFinite(g.width)?g.width+k:b,c=isFinite(g.height)?g.height+k:c);var g=d||0,k=e||0,l=a instanceof x;switch(Lo(a,!0)){case Zj:k=g=0;l&&(c=b=Infinity);break;case Xe:isFinite(b)&&b>d&&(g=b);isFinite(c)&& +c>e&&(k=c);break;case xo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case wo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.rf,m=a.ah;g>l.width&&m.width l.height&&m.height a.height||this.uf.Qe>a.width))&&(c=!0);this.S=c?this.S|256:this.S&-257;this.cc.H()|| +D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.cc.toString());this.Ay(g,this.cc);Mo(this,!1);D.Lb(g)};f.Cj=function(){}; +function No(a,b,c,d,e){var g=a.aa;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ea.H()){g=a.Fd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;e+=h;b=Lo(a,!0);c===d&&g===e&&(b=Zj);switch(b){case Zj:if(c>d||g>e)km(a,!0),Hk(a,c>d?d:c,g>e?e:g);break;case Xe:km(a,!0);Hk(a,d,e,0,0);break;case xo:km(a,!0);Hk(a,d,g,0,0);break;case wo:km(a,!0),Hk(a,c,e,0,0)}}} +f.Ay=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.Cm!==this&&c.QG!==this&&c.TB!==this||Oo(c,!0),this.ra(),Db(a,b)||(c.dl(),this.$s(c)))};f.$s=function(a){null!==this.yd&&(Oo(a,!0),a instanceof G&&Po(a,this))};D.defineProperty(O,{wo:"shadowVisible"},function(){return this.yn},function(a){var b=this.yn;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"shadowVisible"),this.yn=a,this.ra(),this.i("shadowVisible",b,a))}); +O.prototype.He=function(a,b){if(this.visible){var c=this.cc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof qd)a:{if(this.visible){var g=null,h=a.ny;if(this instanceof x&&(this.type===Qo||this.type===Ro))So(this,a,b);else{var k=this.cc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.R;0!==(this.S&4096)===!0&&To(this);var c=0!==(this.S&256),n=!1;this instanceof pa&&(a.font=this.font);if(c){n=m.kh()?m.Fa:m.aa;if(null!==this.yg)var p=this.yg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;sd(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.Oj()){var u=this;if(!u.isVisible())break a}a.Mh.bc=[1,0,0,1,0,0];this instanceof pa&&1 c.width+c.x||c.x>n.width+n.x){1!==d&&(a.globalAlpha=e);return}v&&v.zF&&v.GI(a,k,l,u,q);a.save();a.beginPath();a.rect(k,l,u, -q);a.clip()}if(this.Oj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.el&&b.Kj("drawShadows")&&(n=this.xn,a.fC(n.x*b.scale*b.ud,n.y*b.scale*b.ud,this.Pg),a.xo(),a.shadowColor=this.wn)}n=!1;this.Y&&b.Kj("drawShadows")&&(n=this.Y.el);!0===this.wo?a.xo():!1===this.wo&&a.Em();null!==this.lc&&(Vo(this,a,this.lc,!0,!0),this.lc instanceof Ba&&this.lc.type===Id?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Xg(this.lc)):a.fillRect(c.x,c.y,c.width,c.height));g.Nu()||a.transform(g.m11,g.m12, -g.m21,g.m22,g.dx,g.dy);n&&(null!==h&&0!==(h.S&512)||null!==h&&(h.type===Ql||h.type===Yj)&&h.Md()!==this)&&null===this.wo&&a.Em();null!==this.Mb&&(u=this.Fa,k=c=0,l=u.width,u=u.height,q=0,this instanceof z&&(u=this.Za.ib,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Rg),Vo(this,a,this.Mb,!0,!1),this.Mb instanceof Ba&&this.Mb.type===Id?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Xg(this.Mb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.Dj&&v.FI(a,this);n&&(null!==this.Mb||null!==this.lc||null!==h&&0!==(h.S&512)|| -null!==h&&(h.type===Ql||h.type===Yj)&&h.Md()!==this)?(Wo(this,!0),null===this.wo&&a.Em()):Wo(this,!1);this.Xk(a,b);n&&0!==(this.S&512)===!0&&a.xo();this.Oj()&&n&&a.Em();m?(a.restore(),this instanceof x?a.De(!0):a.De(!1)):g.Nu()||(h=1/(g.m11*g.m22-g.m12*g.m21),a.transform(g.m22*h,-g.m12*h,-g.m21*h,g.m11*h,h*(g.m21*g.dy-g.m22*g.dx),h*(g.m12*g.dx-g.m11*g.dy)))}1!==d&&(a.globalAlpha=e)}}}; -function To(a,b,c){var d=a.cc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.lc&&(Vo(a,b,a.lc,!0,!0),a.lc instanceof Ba&&a.lc.type===Id?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.lc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Mb&&(Vo(a,b,a.Mb,!0,!1),a.Mb instanceof Ba&&a.Mb.type===Id?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.Mb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xk(b,c))}O.prototype.Xk=function(){}; -function Vo(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Fg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Fa,g=h.width,h=h.height;if(e)var l=a.aa,g=l.width,h=l.height;var m=b instanceof Hd;if(m&&c.qh&&(c.type===bo||c.Mo===g&&c.xz===h))k=c.qh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.aa,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY; -l+=r;p+=r;n+=s;q+=s;if(c.type===Gg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Id)s=isNaN(c.ou)?Math.max(g,h)/2:c.ou,isNaN(c.sv)?(r=0,s=Math.max(g,h)/2):r=c.sv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===bo)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.kc(c.type,"Brush type");if(c.type!==bo&&(e=c.Rk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.qh=k,null!==k&&(c.Mo=g,c.xz=h),null===k&&c.type===bo&&-1!==c.Mo)){c.Mo=-1;var t=a.g;null!==t&& +this.el&&b.Kj("drawShadows")&&(r=this.xn,a.fC(r.x*b.scale*b.ud,r.y*b.scale*b.ud,u.Pg),a.xo(),a.shadowColor=u.wn);u=!1;this.Y&&b.Kj("drawShadows")&&(u=this.Y.el);!0===this.wo?(a.xo(),!1===q&&u&&(sd(a,1,0,0,1,0,0),a.kb(),q=!0)):!1===this.wo&&a.Em();null!==this.lc&&(Uo(this,a,this.lc,!0,!0),!1===q&&u&&(sd(a,1,0,0,1,0,0),a.kb(),q=!0),this.lc instanceof Ba&&this.lc.type===Hd?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Xg(this.lc)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof x?sd(a,l.m11, +l.m12,l.m21,l.m22,l.dx,l.dy):a.Mh.bc=[l.m11,l.m12,l.m21,l.m22,l.dx,l.dy];null!==this.Mb&&(!1===q&&u&&(sd(a,1,0,0,1,0,0),a.kb(),q=!0),s=this.Fa,l=k=0,r=s.width,s=s.height,p=0,this instanceof z&&(s=this.Za.ib,k=s.x,l=s.y,r=s.width,s=s.height,p=this.Rg),Uo(this,a,this.Mb,!0,!1),this.Mb instanceof Ba&&this.Mb.type===Hd?(a.beginPath(),a.rect(k-p/2,l-p/2,r+p,s+p),a.Xg(this.Mb)):a.fillRect(k-p/2,l-p/2,r+p,s+p));u&&(null!==this.Mb||null!==this.lc||null!==m&&0!==(m.S&512)||null!==m&&(m.type===Pl||m.type=== +Xj)&&m.Md()!==this)?(Vo(this,!0),null===this.wo&&a.Em()):Vo(this,!1);this.Xk(a,b);u&&0!==(this.S&512)===!0&&a.xo();this.Oj()&&u&&a.Em();c&&(a.restore(),n&&a.zf.pop());this instanceof x&&(g=a.zf.pop());!0===q&&a.zf.pop();this instanceof pa&&1 c.width+c.x||c.x>n.width+n.x){1!==d&&(a.globalAlpha=e);return}v&&v.zF&&v.GI(a,k,l,u,q);a.save();a.beginPath();a.rect(k,l,u, +q);a.clip()}if(this.Oj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.el&&b.Kj("drawShadows")&&(n=this.xn,a.fC(n.x*b.scale*b.ud,n.y*b.scale*b.ud,this.Pg),a.xo(),a.shadowColor=this.wn)}n=!1;this.Y&&b.Kj("drawShadows")&&(n=this.Y.el);!0===this.wo?a.xo():!1===this.wo&&a.Em();null!==this.lc&&(Uo(this,a,this.lc,!0,!0),this.lc instanceof Ba&&this.lc.type===Hd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Xg(this.lc)):a.fillRect(c.x,c.y,c.width,c.height));g.Nu()||a.transform(g.m11,g.m12, +g.m21,g.m22,g.dx,g.dy);n&&(null!==h&&0!==(h.S&512)||null!==h&&(h.type===Pl||h.type===Xj)&&h.Md()!==this)&&null===this.wo&&a.Em();null!==this.Mb&&(u=this.Fa,k=c=0,l=u.width,u=u.height,q=0,this instanceof z&&(u=this.Za.ib,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Rg),Uo(this,a,this.Mb,!0,!1),this.Mb instanceof Ba&&this.Mb.type===Hd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Xg(this.Mb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.Dj&&v.FI(a,this);n&&(null!==this.Mb||null!==this.lc||null!==h&&0!==(h.S&512)|| +null!==h&&(h.type===Pl||h.type===Xj)&&h.Md()!==this)?(Vo(this,!0),null===this.wo&&a.Em()):Vo(this,!1);this.Xk(a,b);n&&0!==(this.S&512)===!0&&a.xo();this.Oj()&&n&&a.Em();m?(a.restore(),this instanceof x?a.De(!0):a.De(!1)):g.Nu()||(h=1/(g.m11*g.m22-g.m12*g.m21),a.transform(g.m22*h,-g.m12*h,-g.m21*h,g.m11*h,h*(g.m21*g.dy-g.m22*g.dx),h*(g.m12*g.dx-g.m11*g.dy)))}1!==d&&(a.globalAlpha=e)}}}; +function So(a,b,c){var d=a.cc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.lc&&(Uo(a,b,a.lc,!0,!0),a.lc instanceof Ba&&a.lc.type===Hd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.lc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Mb&&(Uo(a,b,a.Mb,!0,!1),a.Mb instanceof Ba&&a.Mb.type===Hd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.Mb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xk(b,c))}O.prototype.Xk=function(){}; +function Uo(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Eg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Fa,g=h.width,h=h.height;if(e)var l=a.aa,g=l.width,h=l.height;var m=b instanceof Gd;if(m&&c.qh&&(c.type===ao||c.Mo===g&&c.xz===h))k=c.qh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.aa,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY; +l+=r;p+=r;n+=s;q+=s;if(c.type===Fg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Hd)s=isNaN(c.ou)?Math.max(g,h)/2:c.ou,isNaN(c.sv)?(r=0,s=Math.max(g,h)/2):r=c.sv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===ao)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.kc(c.type,"Brush type");if(c.type!==ao&&(e=c.Rk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.qh=k,null!==k&&(c.Mo=g,c.xz=h),null===k&&c.type===ao&&-1!==c.Mo)){c.Mo=-1;var t=a.g;null!==t&& -1===c.Mo&&D.setTimeout(function(){t.to()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}O.prototype.isContainedBy=O.prototype.ym=function(a){if(a instanceof x)a:{if(this!==a&&null!==a)for(var b=this.R;null!==b;){if(b===a){a=!0;break a}b=b.R}a=!1}else a=!1;return a};O.prototype.isVisibleObject=O.prototype.Sj=function(){if(!this.visible)return!1;var a=this.R;return null!==a?a.Sj():!0}; -O.prototype.isEnabledObject=O.prototype.Ju=function(){for(var a=this instanceof x?this:this.R;null!==a&&a.isEnabled;)a=a.R;return null===a};D.defineProperty(O,{BF:"enabledChanged"},function(){return null!==this.ma?this.ma.Yr:null},function(a){Co(this);var b=this.ma.Yr;b!==a&&(null!==a&&D.h(a,"function",O,"enabledChanged"),this.ma.Yr=a,this.i("enabledChanged",b,a))}); -function Uo(a){if(0!==(a.S&2048)===!0){var b=a.Nc;b.reset();if(!a.cc.H()||!a.Fd.H()){Xo(a,!1);return}b.translate(a.cc.x,a.cc.y);b.translate(-a.Ia.x,-a.Ia.y);var c=a.Fa;Ko(a,b,c.x,c.y,c.width,c.height);Xo(a,!1);Yo(a,!0)}0!==(a.S&4096)===!0&&(b=a.R,null===b?(a.Ni.set(a.Nc),a.Xo=a.scale,Yo(a,!1)):null!==b.Hh&&(c=a.Ni,c.reset(),b.kh()?c.multiply(b.Ni):null!==b.R&&c.multiply(b.R.Ni),c.multiply(a.Nc),a.Xo=a.scale*b.Xo,Yo(a,!1)))} -function Ko(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=mc;a.Oj()&&a.Of.Xc()&&(h=a.Of);var k=D.P();if(a instanceof F&&a.Df!==a)for(c=a.Df,d=c.Fa,k.pv(d.x,d.y,d.width,d.height,h),c.ij.vb(k),k.offset(-c.Ia.x,-c.Ia.y),h=c.R;null!==h&&h!==a;)h.ij.vb(k),k.offset(-h.Ia.x,-h.Ia.y),h=h.R;else k.pv(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=O.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Nm(this)){lm(this,!0);No(this,!0);var b=this.R;null===b||a||b.K()}}; -f.xq=function(){!0!==Nm(this)&&(lm(this,!0),No(this,!0))};function Zo(a){if(!1===Om(a)){var b=a.R;null!==b?b.K():a.Oj()&&(b=a.g,null!==b&&(b.Gg.add(a),a instanceof G&&a.kg(),b.Le()));No(a,!0)}}f.cj=function(){0!==(this.S&2048)===!1&&(Xo(this,!0),Yo(this,!0))};f.nB=function(){Yo(this,!0)};f.ra=function(){var a=this.Y;null!==a&&a.ra()}; -function Mo(a,b){var c=a.stretch,d=a.R;if(null!==d&&d.da===fa)return $o(a,d.pe(a.Tb),d.oe(a.column),b);if(null!==d&&d.da===Ql&&d.Md()===a)return ap(a,Ye,b);if(c===wo){if(null!==d){if(d.da===Yj&&d.Md()===a)return ap(a,Ye,b);c=d.me;return c===wo?ap(a,ak,b):ap(a,c,b)}return ap(a,ak,b)}return ap(a,c,b)} -function $o(a,b,c,d){var e=a.stretch;if(e!==wo)return ap(a,e,d);var g=e=null;switch(b.stretch){case xo:g=!0;break;case Ye:g=!0}switch(c.stretch){case yo:e=!0;break;case Ye:e=!0}b=a.R.me;null===e&&(e=b===yo||b===Ye);null===g&&(g=b===xo||b===Ye);return!0===e&&!0===g?ap(a,Ye,d):!0===e?ap(a,yo,d):!0===g?ap(a,xo,d):ap(a,ak,d)} -function ap(a,b,c){if(c)return b;if(b===ak)return ak;c=a.Ea;if(c.H())return ak;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===yo)return ak;if(b===Ye)return xo}else{if(b===xo)return ak;if(b===Ye)return yo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===xo)return ak;if(b===Ye)return yo}else{if(b===yo)return ak;if(b===Ye)return xo}return b} -D.defineProperty(O,{Uq:"segmentOrientation"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&D.Da(a,J,O,"segmentOrientation"),this.un=a,this.K(),this.i("segmentOrientation",b,a),a===wj&&(this.angle=0))});D.defineProperty(O,{We:"segmentIndex"},function(){return this.zt},function(a){v&&D.h(a,"number",O,"segmentIndex");a=Math.round(a);var b=this.zt;b!==a&&(this.zt=a,this.K(),this.i("segmentIndex",b,a))}); +O.prototype.isEnabledObject=O.prototype.Ju=function(){for(var a=this instanceof x?this:this.R;null!==a&&a.isEnabled;)a=a.R;return null===a};D.defineProperty(O,{BF:"enabledChanged"},function(){return null!==this.ma?this.ma.Yr:null},function(a){Bo(this);var b=this.ma.Yr;b!==a&&(null!==a&&D.h(a,"function",O,"enabledChanged"),this.ma.Yr=a,this.i("enabledChanged",b,a))}); +function To(a){if(0!==(a.S&2048)===!0){var b=a.Nc;b.reset();if(!a.cc.H()||!a.Fd.H()){Wo(a,!1);return}b.translate(a.cc.x,a.cc.y);b.translate(-a.Ia.x,-a.Ia.y);var c=a.Fa;Jo(a,b,c.x,c.y,c.width,c.height);Wo(a,!1);Xo(a,!0)}0!==(a.S&4096)===!0&&(b=a.R,null===b?(a.Ni.set(a.Nc),a.Xo=a.scale,Xo(a,!1)):null!==b.Hh&&(c=a.Ni,c.reset(),b.kh()?c.multiply(b.Ni):null!==b.R&&c.multiply(b.R.Ni),c.multiply(a.Nc),a.Xo=a.scale*b.Xo,Xo(a,!1)))} +function Jo(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=mc;a.Oj()&&a.Of.Xc()&&(h=a.Of);var k=D.P();if(a instanceof F&&a.Df!==a)for(c=a.Df,d=c.Fa,k.pv(d.x,d.y,d.width,d.height,h),c.ij.vb(k),k.offset(-c.Ia.x,-c.Ia.y),h=c.R;null!==h&&h!==a;)h.ij.vb(k),k.offset(-h.Ia.x,-h.Ia.y),h=h.R;else k.pv(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=O.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Mm(this)){km(this,!0);Mo(this,!0);var b=this.R;null===b||a||b.K()}}; +f.xq=function(){!0!==Mm(this)&&(km(this,!0),Mo(this,!0))};function Yo(a){if(!1===Nm(a)){var b=a.R;null!==b?b.K():a.Oj()&&(b=a.g,null!==b&&(b.Gg.add(a),a instanceof G&&a.kg(),b.Le()));Mo(a,!0)}}f.cj=function(){0!==(this.S&2048)===!1&&(Wo(this,!0),Xo(this,!0))};f.nB=function(){Xo(this,!0)};f.ra=function(){var a=this.Y;null!==a&&a.ra()}; +function Lo(a,b){var c=a.stretch,d=a.R;if(null!==d&&d.da===fa)return Zo(a,d.pe(a.Tb),d.oe(a.column),b);if(null!==d&&d.da===Pl&&d.Md()===a)return $o(a,Xe,b);if(c===vo){if(null!==d){if(d.da===Xj&&d.Md()===a)return $o(a,Xe,b);c=d.me;return c===vo?$o(a,Zj,b):$o(a,c,b)}return $o(a,Zj,b)}return $o(a,c,b)} +function Zo(a,b,c,d){var e=a.stretch;if(e!==vo)return $o(a,e,d);var g=e=null;switch(b.stretch){case wo:g=!0;break;case Xe:g=!0}switch(c.stretch){case xo:e=!0;break;case Xe:e=!0}b=a.R.me;null===e&&(e=b===xo||b===Xe);null===g&&(g=b===wo||b===Xe);return!0===e&&!0===g?$o(a,Xe,d):!0===e?$o(a,xo,d):!0===g?$o(a,wo,d):$o(a,Zj,d)} +function $o(a,b,c){if(c)return b;if(b===Zj)return Zj;c=a.Ea;if(c.H())return Zj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===xo)return Zj;if(b===Xe)return wo}else{if(b===wo)return Zj;if(b===Xe)return xo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===wo)return Zj;if(b===Xe)return xo}else{if(b===xo)return Zj;if(b===Xe)return wo}return b} +D.defineProperty(O,{Uq:"segmentOrientation"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&D.Da(a,J,O,"segmentOrientation"),this.un=a,this.K(),this.i("segmentOrientation",b,a),a===vj&&(this.angle=0))});D.defineProperty(O,{We:"segmentIndex"},function(){return this.zt},function(a){v&&D.h(a,"number",O,"segmentIndex");a=Math.round(a);var b=this.zt;b!==a&&(this.zt=a,this.K(),this.i("segmentIndex",b,a))}); D.defineProperty(O,{WB:"segmentFraction"},function(){return this.sn},function(a){v&&D.h(a,"number",O,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1a||1=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Db=a,this.cj(),this.K(),this.i("scale",b,a))});D.defineProperty(O,{angle:"angle"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(v&&D.p(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.wg=a,bp(this),this.K(),this.cj(),this.i("angle",b,a)))}); -D.defineProperty(O,{Ea:"desiredSize"},function(){return this.$e},function(a){v&&D.l(a,Ca,O,"desiredSize");var b=a.width,c=a.height,d=this.$e,e=d.width,g=d.height;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))||(this.$e=a=a.V(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",d,a),Ho(this)&&(a=this.Y,null!==a&&(Io(this,a,"width"),Io(this,a,"height"))))}); -D.defineProperty(O,{width:"width"},function(){return this.$e.width},function(a){var b=this.$e.width;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"width"),b=this.$e,this.$e=a=(new Ca(a,this.$e.height)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Ho(this)&&(a=this.Y,null!==a&&Io(this,a,"width")))}); -D.defineProperty(O,{height:"height"},function(){return this.$e.height},function(a){var b=this.$e.height;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"height"),b=this.$e,this.$e=a=(new Ca(this.$e.width,a)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Ho(this)&&(a=this.Y,null!==a&&Io(this,a,"height")))}); +D.defineProperty(O,{position:"position"},function(){return this.sb},function(a){v&&D.l(a,N,O,"position");var b=a.x,c=a.y,d=this.sb,e=d.x,g=d.y;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))?this.cC():(a=a.V(),this.bC(a,d)&&this.i("position",d,a))});O.prototype.cC=function(){};O.prototype.bC=function(a){this.sb=a;Yo(this);this.cj();return!0};O.prototype.Vy=function(a,b){this.sb.n(a,b);this.cj()};D.w(O,{aa:"actualBounds"},function(){return this.cc}); +D.defineProperty(O,{scale:"scale"},function(){return this.Db},function(a){var b=this.Db;b!==a&&(v&&D.p(a,O,"scale"),0>=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Db=a,this.cj(),this.K(),this.i("scale",b,a))});D.defineProperty(O,{angle:"angle"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(v&&D.p(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.wg=a,ap(this),this.K(),this.cj(),this.i("angle",b,a)))}); +D.defineProperty(O,{Ea:"desiredSize"},function(){return this.$e},function(a){v&&D.l(a,Ca,O,"desiredSize");var b=a.width,c=a.height,d=this.$e,e=d.width,g=d.height;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))||(this.$e=a=a.V(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",d,a),Go(this)&&(a=this.Y,null!==a&&(Ho(this,a,"width"),Ho(this,a,"height"))))}); +D.defineProperty(O,{width:"width"},function(){return this.$e.width},function(a){var b=this.$e.width;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"width"),b=this.$e,this.$e=a=(new Ca(a,this.$e.height)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Go(this)&&(a=this.Y,null!==a&&Ho(this,a,"width")))}); +D.defineProperty(O,{height:"height"},function(){return this.$e.height},function(a){var b=this.$e.height;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",O,"height"),b=this.$e,this.$e=a=(new Ca(this.$e.width,a)).freeze(),this.K(),this instanceof z&&this.Ue(),this.i("desiredSize",b,a),Go(this)&&(a=this.Y,null!==a&&Ho(this,a,"height")))}); D.defineProperty(O,{ah:"minSize"},function(){return this.oi},function(a){var b=this.oi;b.O(a)||(v&&D.l(a,Ca,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.oi=a,this.K(),this.i("minSize",b,a))});D.defineProperty(O,{rf:"maxSize"},function(){return this.ni},function(a){var b=this.ni;b.O(a)||(v&&D.l(a,Ca,O,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.ni=a,this.K(),this.i("maxSize",b,a))}); -D.w(O,{Ia:"measuredBounds"},function(){return this.Fd});D.w(O,{Fa:"naturalBounds"},function(){return this.fd},{configurable:!0});D.defineProperty(O,{margin:"margin"},function(){return this.gn},function(a){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,O,"margin");var b=this.gn;b.O(a)||(this.gn=a=a.V(),this.K(),this.i("margin",b,a))});D.w(O,{transform:null},function(){0!==(this.S&2048)===!0&&Uo(this);return this.Nc});D.w(O,{Hh:null},function(){0!==(this.S&4096)===!0&&Uo(this);return this.Ni}); -D.defineProperty(O,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.O(a)||(v&&D.l(a,S,O,"alignment"),a.ee()&&!a.ld()&&D.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.ue=a=a.V(),Zo(this),this.i("alignment",b,a))});D.defineProperty(O,{column:"column"},function(){return this.wr},function(a){v&&D.p(a,O,"column");a=Math.round(a);var b=this.wr;b!==a&&(0>a&&D.ua(a,">= 0",O,"column"),this.wr=a,this.K(),this.i("column",b,a))}); +D.w(O,{Ia:"measuredBounds"},function(){return this.Fd});D.w(O,{Fa:"naturalBounds"},function(){return this.fd},{configurable:!0});D.defineProperty(O,{margin:"margin"},function(){return this.gn},function(a){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,O,"margin");var b=this.gn;b.O(a)||(this.gn=a=a.V(),this.K(),this.i("margin",b,a))});D.w(O,{transform:null},function(){0!==(this.S&2048)===!0&&To(this);return this.Nc});D.w(O,{Hh:null},function(){0!==(this.S&4096)===!0&&To(this);return this.Ni}); +D.defineProperty(O,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.O(a)||(v&&D.l(a,S,O,"alignment"),a.ee()&&!a.ld()&&D.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.ue=a=a.V(),Yo(this),this.i("alignment",b,a))});D.defineProperty(O,{column:"column"},function(){return this.wr},function(a){v&&D.p(a,O,"column");a=Math.round(a);var b=this.wr;b!==a&&(0>a&&D.ua(a,">= 0",O,"column"),this.wr=a,this.K(),this.i("column",b,a))}); D.defineProperty(O,{jI:"columnSpan"},function(){return this.Si},function(a){v&&D.h(a,"number",O,"columnSpan");a=Math.round(a);var b=this.Si;b!==a&&(1>a&&D.ua(a,">= 1",O,"columnSpan"),this.Si=a,this.K(),this.i("columnSpan",b,a))});D.defineProperty(O,{Tb:"row"},function(){return this.vt},function(a){v&&D.p(a,O,"row");a=Math.round(a);var b=this.vt;b!==a&&(0>a&&D.ua(a,">= 0",O,"row"),this.vt=a,this.K(),this.i("row",b,a))}); D.defineProperty(O,{rowSpan:"rowSpan"},function(){return this.tj},function(a){v&&D.h(a,"number",O,"rowSpan");a=Math.round(a);var b=this.tj;b!==a&&(1>a&&D.ua(a,">= 1",O,"rowSpan"),this.tj=a,this.K(),this.i("rowSpan",b,a))});D.defineProperty(O,{Wy:"spanAllocation"},function(){return this.Lt},function(a){var b=this.Lt;b!==a&&(null!==a&&D.h(a,"function",O,"spanAllocation"),this.Lt=a,this.K(),this.i("spanAllocation",b,a))}); D.defineProperty(O,{Gh:"alignmentFocus"},function(){return this.Nm},function(a){var b=this.Nm;b.O(a)||(v&&D.l(a,S,O,"alignmentFocus"),!a.ee()||a.ld()||a.O(dc)&&this instanceof G||D.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Nm=a=a.V(),this.K(),this.i("alignmentFocus",b,a))}); -D.defineProperty(O,{yd:"portId"},function(){return this.it},function(a){var b=this.it;if(b!==a){v&&null!==a&&D.h(a,"string",O,"portId");var c=this.Y;null===c||c instanceof G||(D.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&dp(c,this);this.it=a;if(null!==a&&c){c.cl=!0;null===c.Ae&&ep(c);var d=this.yd;null!==d&&c.Ae.add(d,this)}this.i("portId",b,a)}});function fp(a){var b=a.Y;if(b instanceof G&&(null!==a.yd||a===b.port)){var c=b.g;null===c||c.na.ub||Qo(b,a)}} -function bp(a){var b=a.g;null===b||b.na.ub||(a instanceof x?a instanceof G?a.kg():gp(a,a,function(a){fp(a)}):fp(a))}D.defineProperty(O,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Nk:dc},function(a){this.be();var b=this.Z.Nk;b.O(a)||(v&&D.l(a,S,O,"toSpot"),a=a.V(),this.Z.Nk=a,this.i("toSpot",b,a),fp(this))}); -D.defineProperty(O,{Jm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Lk:10},function(a){this.be();var b=this.Z.Lk;b!==a&&(v&&D.h(a,"number",O,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"toEndSegmentLength"),this.Z.Lk=a,this.i("toEndSegmentLength",b,a),fp(this))}); -D.defineProperty(O,{uv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Kk:Fo},function(a){this.be();var b=this.Z.Kk;b!==a&&(D.Qn("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"toEndSegmentDirection"),this.Z.Kk=a,this.i("toEndSegmentDirection",b,a),fp(this))});D.defineProperty(O,{vv:"toShortLength"},function(){return null!==this.Z?this.Z.Mk:0},function(a){this.be();var b=this.Z.Mk;b!==a&&(v&&D.h(a,"number",O,"toShortLength"),this.Z.Mk=a,this.i("toShortLength",b,a),fp(this))}); +D.defineProperty(O,{yd:"portId"},function(){return this.it},function(a){var b=this.it;if(b!==a){v&&null!==a&&D.h(a,"string",O,"portId");var c=this.Y;null===c||c instanceof G||(D.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&cp(c,this);this.it=a;if(null!==a&&c){c.cl=!0;null===c.Ae&&dp(c);var d=this.yd;null!==d&&c.Ae.add(d,this)}this.i("portId",b,a)}});function ep(a){var b=a.Y;if(b instanceof G&&(null!==a.yd||a===b.port)){var c=b.g;null===c||c.na.ub||Po(b,a)}} +function ap(a){var b=a.g;null===b||b.na.ub||(a instanceof x?a instanceof G?a.kg():fp(a,a,function(a){ep(a)}):ep(a))}D.defineProperty(O,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Nk:dc},function(a){this.be();var b=this.Z.Nk;b.O(a)||(v&&D.l(a,S,O,"toSpot"),a=a.V(),this.Z.Nk=a,this.i("toSpot",b,a),ep(this))}); +D.defineProperty(O,{Jm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Lk:10},function(a){this.be();var b=this.Z.Lk;b!==a&&(v&&D.h(a,"number",O,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"toEndSegmentLength"),this.Z.Lk=a,this.i("toEndSegmentLength",b,a),ep(this))}); +D.defineProperty(O,{uv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Kk:Eo},function(a){this.be();var b=this.Z.Kk;b!==a&&(D.Qn("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"toEndSegmentDirection"),this.Z.Kk=a,this.i("toEndSegmentDirection",b,a),ep(this))});D.defineProperty(O,{vv:"toShortLength"},function(){return null!==this.Z?this.Z.Mk:0},function(a){this.be();var b=this.Z.Mk;b!==a&&(v&&D.h(a,"number",O,"toShortLength"),this.Z.Mk=a,this.i("toShortLength",b,a),ep(this))}); D.defineProperty(O,{mH:"toLinkable"},function(){return null!==this.Z?this.Z.St:null},function(a){this.be();var b=this.Z.St;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"toLinkable"),this.Z.St=a,this.i("toLinkable",b,a))});D.defineProperty(O,{EK:"toMaxLinks"},function(){return null!==this.Z?this.Z.Tt:Infinity},function(a){this.be();var b=this.Z.Tt;b!==a&&(v&&D.h(a,"number",O,"toMaxLinks"),0>a&&D.ua(a,">= 0",O,"toMaxLinks"),this.Z.Tt=a,this.i("toMaxLinks",b,a))}); -D.defineProperty(O,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.pk:dc},function(a){this.be();var b=this.Z.pk;b.O(a)||(v&&D.l(a,S,O,"fromSpot"),a=a.V(),this.Z.pk=a,this.i("fromSpot",b,a),fp(this))});D.defineProperty(O,{sm:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.nk:10},function(a){this.be();var b=this.Z.nk;b!==a&&(v&&D.h(a,"number",O,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"fromEndSegmentLength"),this.Z.nk=a,this.i("fromEndSegmentLength",b,a),fp(this))}); -D.defineProperty(O,{zu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.mk:Fo},function(a){this.be();var b=this.Z.mk;b!==a&&(D.Qn("GraphObject.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"fromEndSegmentDirection"),this.Z.mk=a,this.i("fromEndSegmentDirection",b,a),fp(this))}); -D.defineProperty(O,{Au:"fromShortLength"},function(){return null!==this.Z?this.Z.ok:0},function(a){this.be();var b=this.Z.ok;b!==a&&(v&&D.h(a,"number",O,"fromShortLength"),this.Z.ok=a,this.i("fromShortLength",b,a),fp(this))});D.defineProperty(O,{LF:"fromLinkable"},function(){return null!==this.Z?this.Z.as:null},function(a){this.be();var b=this.Z.as;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"fromLinkable"),this.Z.as=a,this.i("fromLinkable",b,a))}); +D.defineProperty(O,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.pk:dc},function(a){this.be();var b=this.Z.pk;b.O(a)||(v&&D.l(a,S,O,"fromSpot"),a=a.V(),this.Z.pk=a,this.i("fromSpot",b,a),ep(this))});D.defineProperty(O,{sm:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.nk:10},function(a){this.be();var b=this.Z.nk;b!==a&&(v&&D.h(a,"number",O,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",O,"fromEndSegmentLength"),this.Z.nk=a,this.i("fromEndSegmentLength",b,a),ep(this))}); +D.defineProperty(O,{zu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.mk:Eo},function(a){this.be();var b=this.Z.mk;b!==a&&(D.Qn("GraphObject.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,O,"fromEndSegmentDirection"),this.Z.mk=a,this.i("fromEndSegmentDirection",b,a),ep(this))}); +D.defineProperty(O,{Au:"fromShortLength"},function(){return null!==this.Z?this.Z.ok:0},function(a){this.be();var b=this.Z.ok;b!==a&&(v&&D.h(a,"number",O,"fromShortLength"),this.Z.ok=a,this.i("fromShortLength",b,a),ep(this))});D.defineProperty(O,{LF:"fromLinkable"},function(){return null!==this.Z?this.Z.as:null},function(a){this.be();var b=this.Z.as;b!==a&&(v&&null!==a&&D.h(a,"boolean",O,"fromLinkable"),this.Z.as=a,this.i("fromLinkable",b,a))}); D.defineProperty(O,{cB:"fromMaxLinks"},function(){return null!==this.Z?this.Z.bs:Infinity},function(a){this.be();var b=this.Z.bs;b!==a&&(v&&D.h(a,"number",O,"fromMaxLinks"),0>a&&D.ua(a,">= 0",O,"fromMaxLinks"),this.Z.bs=a,this.i("fromMaxLinks",b,a))});D.defineProperty(O,{cursor:"cursor"},function(){return this.Fr},function(a){var b=this.Fr;b!==a&&(D.h(a,"string",O,"cursor"),this.Fr=a,this.i("cursor",b,a))}); -D.defineProperty(O,{click:"click"},function(){return null!==this.ma?this.ma.Ri:null},function(a){Co(this);var b=this.ma.Ri;b!==a&&(null!==a&&D.h(a,"function",O,"click"),this.ma.Ri=a,this.i("click",b,a))});D.defineProperty(O,{nu:"doubleClick"},function(){return null!==this.ma?this.ma.Yi:null},function(a){Co(this);var b=this.ma.Yi;b!==a&&(null!==a&&D.h(a,"function",O,"doubleClick"),this.ma.Yi=a,this.i("doubleClick",b,a))}); -D.defineProperty(O,{MA:"contextClick"},function(){return null!==this.ma?this.ma.Ti:null},function(a){Co(this);var b=this.ma.Ti;b!==a&&(null!==a&&D.h(a,"function",O,"contextClick"),this.ma.Ti=a,this.i("contextClick",b,a))});D.defineProperty(O,{Yu:"mouseEnter"},function(){return null!==this.ma?this.ma.Rs:null},function(a){Co(this);var b=this.ma.Rs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseEnter"),this.ma.Rs=a,this.i("mouseEnter",b,a))}); -D.defineProperty(O,{Zu:"mouseLeave"},function(){return null!==this.ma?this.ma.Ss:null},function(a){Co(this);var b=this.ma.Ss;b!==a&&(null!==a&&D.h(a,"function",O,"mouseLeave"),this.ma.Ss=a,this.i("mouseLeave",b,a))});D.defineProperty(O,{FB:"mouseOver"},function(){return null!==this.ma?this.ma.nj:null},function(a){Co(this);var b=this.ma.nj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseOver"),this.ma.nj=a,this.i("mouseOver",b,a))}); -D.defineProperty(O,{EB:"mouseHover"},function(){return null!==this.ma?this.ma.mj:null},function(a){Co(this);var b=this.ma.mj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHover"),this.ma.mj=a,this.i("mouseHover",b,a))});D.defineProperty(O,{DB:"mouseHold"},function(){return null!==this.ma?this.ma.lj:null},function(a){Co(this);var b=this.ma.lj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHold"),this.ma.lj=a,this.i("mouseHold",b,a))}); -D.defineProperty(O,{QJ:"mouseDragEnter"},function(){return null!==this.ma?this.ma.Ps:null},function(a){Co(this);var b=this.ma.Ps;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragEnter"),this.ma.Ps=a,this.i("mouseDragEnter",b,a))});D.defineProperty(O,{RJ:"mouseDragLeave"},function(){return null!==this.ma?this.ma.Qs:null},function(a){Co(this);var b=this.ma.Qs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragLeave"),this.ma.Qs=a,this.i("mouseDragLeave",b,a))}); -D.defineProperty(O,{CB:"mouseDrop"},function(){return null!==this.ma?this.ma.kj:null},function(a){Co(this);var b=this.ma.kj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDrop"),this.ma.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(O,{QE:"actionDown"},function(){return null!==this.ma?this.ma.er:null},function(a){Co(this);var b=this.ma.er;b!==a&&(null!==a&&D.h(a,"function",O,"actionDown"),this.ma.er=a,this.i("actionDown",b,a))}); -D.defineProperty(O,{RE:"actionMove"},function(){return null!==this.ma?this.ma.fr:null},function(a){Co(this);var b=this.ma.fr;b!==a&&(null!==a&&D.h(a,"function",O,"actionMove"),this.ma.fr=a,this.i("actionMove",b,a))});D.defineProperty(O,{SE:"actionUp"},function(){return null!==this.ma?this.ma.gr:null},function(a){Co(this);var b=this.ma.gr;b!==a&&(null!==a&&D.h(a,"function",O,"actionUp"),this.ma.gr=a,this.i("actionUp",b,a))}); -D.defineProperty(O,{PE:"actionCancel"},function(){return null!==this.ma?this.ma.dr:null},function(a){Co(this);var b=this.ma.dr;b!==a&&(null!==a&&D.h(a,"function",O,"actionCancel"),this.ma.dr=a,this.i("actionCancel",b,a))});D.defineProperty(O,{lC:"toolTip"},function(){return null!==this.ma?this.ma.wj:null},function(a){Co(this);var b=this.ma.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof ik||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.ma.wj=a,this.i("toolTip",b,a))}); -D.defineProperty(O,{contextMenu:"contextMenu"},function(){return null!==this.ma?this.ma.Ui:null},function(a){Co(this);var b=this.ma.Ui;b!==a&&(!v||a instanceof da||a instanceof ik||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.ma.Ui=a,this.i("contextMenu",b,a))});O.prototype.bind=O.prototype.bind=function(a){a.Sg=this;var b=this.rm();null!==b&&hp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Hc&&(this.Hc=new K(ph));this.Hc.add(a)}; -O.prototype.findTemplateBinder=O.prototype.rm=function(){for(var a=this instanceof x?this:this.R;null!==a;){if(null!==a.Al)return a;a=a.R}return null};O.prototype.setProperties=function(a){D.nv(this,a)};var ip; -O.make=ip=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=jp.oa(a);"function"===typeof g?(c=D.lm(arguments),d=g(c),D.Qa(d)||D.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ca[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||D.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);g=1;if(d instanceof E&&1 e)&&D.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.Ke=!0, -a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&D.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.Ke=!1,a.index=e);e=new ma;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.nv(a,e)}else D.nv(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var jp=new na("string","function"); -O.getBuilders=function(){var a=new na("string","function"),b;for(b in jp)if(b!==b.toLowerCase()){var c=jp.oa(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var lp;O.defineBuilder=lp=function(a,b){D.h(a,"string",O,"defineBuilder:name");D.h(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||D.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);jp.add(a,b)};var mp; -O.takeBuilderArgument=mp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; -lp("Button",function(){var a=new Ba(Gg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ba(Gg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=ip(x,Ql,{Hu:!0,BF:function(a,b){var e=a.Nd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},ip(z,{name:"ButtonBorder",Kb:"Rectangle",C:new S(0,0,2.761423749153968,2.761423749153968), +D.defineProperty(O,{click:"click"},function(){return null!==this.ma?this.ma.Ri:null},function(a){Bo(this);var b=this.ma.Ri;b!==a&&(null!==a&&D.h(a,"function",O,"click"),this.ma.Ri=a,this.i("click",b,a))});D.defineProperty(O,{nu:"doubleClick"},function(){return null!==this.ma?this.ma.Yi:null},function(a){Bo(this);var b=this.ma.Yi;b!==a&&(null!==a&&D.h(a,"function",O,"doubleClick"),this.ma.Yi=a,this.i("doubleClick",b,a))}); +D.defineProperty(O,{MA:"contextClick"},function(){return null!==this.ma?this.ma.Ti:null},function(a){Bo(this);var b=this.ma.Ti;b!==a&&(null!==a&&D.h(a,"function",O,"contextClick"),this.ma.Ti=a,this.i("contextClick",b,a))});D.defineProperty(O,{Yu:"mouseEnter"},function(){return null!==this.ma?this.ma.Rs:null},function(a){Bo(this);var b=this.ma.Rs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseEnter"),this.ma.Rs=a,this.i("mouseEnter",b,a))}); +D.defineProperty(O,{Zu:"mouseLeave"},function(){return null!==this.ma?this.ma.Ss:null},function(a){Bo(this);var b=this.ma.Ss;b!==a&&(null!==a&&D.h(a,"function",O,"mouseLeave"),this.ma.Ss=a,this.i("mouseLeave",b,a))});D.defineProperty(O,{FB:"mouseOver"},function(){return null!==this.ma?this.ma.nj:null},function(a){Bo(this);var b=this.ma.nj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseOver"),this.ma.nj=a,this.i("mouseOver",b,a))}); +D.defineProperty(O,{EB:"mouseHover"},function(){return null!==this.ma?this.ma.mj:null},function(a){Bo(this);var b=this.ma.mj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHover"),this.ma.mj=a,this.i("mouseHover",b,a))});D.defineProperty(O,{DB:"mouseHold"},function(){return null!==this.ma?this.ma.lj:null},function(a){Bo(this);var b=this.ma.lj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseHold"),this.ma.lj=a,this.i("mouseHold",b,a))}); +D.defineProperty(O,{QJ:"mouseDragEnter"},function(){return null!==this.ma?this.ma.Ps:null},function(a){Bo(this);var b=this.ma.Ps;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragEnter"),this.ma.Ps=a,this.i("mouseDragEnter",b,a))});D.defineProperty(O,{RJ:"mouseDragLeave"},function(){return null!==this.ma?this.ma.Qs:null},function(a){Bo(this);var b=this.ma.Qs;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDragLeave"),this.ma.Qs=a,this.i("mouseDragLeave",b,a))}); +D.defineProperty(O,{CB:"mouseDrop"},function(){return null!==this.ma?this.ma.kj:null},function(a){Bo(this);var b=this.ma.kj;b!==a&&(null!==a&&D.h(a,"function",O,"mouseDrop"),this.ma.kj=a,this.i("mouseDrop",b,a))});D.defineProperty(O,{QE:"actionDown"},function(){return null!==this.ma?this.ma.er:null},function(a){Bo(this);var b=this.ma.er;b!==a&&(null!==a&&D.h(a,"function",O,"actionDown"),this.ma.er=a,this.i("actionDown",b,a))}); +D.defineProperty(O,{RE:"actionMove"},function(){return null!==this.ma?this.ma.fr:null},function(a){Bo(this);var b=this.ma.fr;b!==a&&(null!==a&&D.h(a,"function",O,"actionMove"),this.ma.fr=a,this.i("actionMove",b,a))});D.defineProperty(O,{SE:"actionUp"},function(){return null!==this.ma?this.ma.gr:null},function(a){Bo(this);var b=this.ma.gr;b!==a&&(null!==a&&D.h(a,"function",O,"actionUp"),this.ma.gr=a,this.i("actionUp",b,a))}); +D.defineProperty(O,{PE:"actionCancel"},function(){return null!==this.ma?this.ma.dr:null},function(a){Bo(this);var b=this.ma.dr;b!==a&&(null!==a&&D.h(a,"function",O,"actionCancel"),this.ma.dr=a,this.i("actionCancel",b,a))});D.defineProperty(O,{lC:"toolTip"},function(){return null!==this.ma?this.ma.wj:null},function(a){Bo(this);var b=this.ma.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof hk||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.ma.wj=a,this.i("toolTip",b,a))}); +D.defineProperty(O,{contextMenu:"contextMenu"},function(){return null!==this.ma?this.ma.Ui:null},function(a){Bo(this);var b=this.ma.Ui;b!==a&&(!v||a instanceof da||a instanceof hk||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.ma.Ui=a,this.i("contextMenu",b,a))});O.prototype.bind=O.prototype.bind=function(a){a.Sg=this;var b=this.rm();null!==b&&gp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Hc&&(this.Hc=new K(oh));this.Hc.add(a)}; +O.prototype.findTemplateBinder=O.prototype.rm=function(){for(var a=this instanceof x?this:this.R;null!==a;){if(null!==a.Al)return a;a=a.R}return null};O.prototype.setProperties=function(a){D.nv(this,a)};var hp; +O.make=hp=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=ip.oa(a);"function"===typeof g?(c=D.lm(arguments),d=g(c),D.Qa(d)||D.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ca[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||D.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);g=1;if(d instanceof E&&1 e)&&D.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.Ke=!0, +a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&D.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.Ke=!1,a.index=e);e=new ma;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.nv(a,e)}else D.nv(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var ip=new na("string","function"); +O.getBuilders=function(){var a=new na("string","function"),b;for(b in ip)if(b!==b.toLowerCase()){var c=ip.oa(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var kp;O.defineBuilder=kp=function(a,b){D.h(a,"string",O,"defineBuilder:name");D.h(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||D.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);ip.add(a,b)};var lp; +O.takeBuilderArgument=lp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; +kp("Button",function(){var a=new Ba(Fg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ba(Fg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=hp(x,Pl,{Hu:!0,BF:function(a,b){var e=a.Nd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},hp(z,{name:"ButtonBorder",Kb:"Rectangle",C:new S(0,0,2.761423749153968,2.761423749153968), D:new S(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Yu=function(a,b){if(b.Ju()){var e=b.Nd("ButtonBorder");if(e instanceof z){var g=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=g;g=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=g}}};a.Zu=function(a,b){if(b.Ju()){var e=b.Nd("ButtonBorder");e instanceof z&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); -lp("TreeExpanderButton",function(){var a=ip("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},ip(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Zd},(new ph("figure","isTreeExpanded",function(a,c){var d=c.R;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).zy()),{visible:!1},(new ph("visible","isTreeLeaf",function(a){return!a})).zy());a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof G){var e=d.g;if(null!==e){e=e.yb;if(d.Dc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +kp("TreeExpanderButton",function(){var a=hp("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},hp(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Yd},(new oh("figure","isTreeExpanded",function(a,c){var d=c.R;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).zy()),{visible:!1},(new oh("visible","isTreeLeaf",function(a){return!a})).zy());a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof G){var e=d.g;if(null!==e){e=e.yb;if(d.Dc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; a.Cc=!0;d.Dc?e.collapseTree(d):e.expandTree(d)}}};return a}); -lp("SubGraphExpanderButton",function(){var a=ip("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},ip(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Zd},(new ph("figure","isSubGraphExpanded",function(a,c){var d=c.R;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).zy()));a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof I){var e=d.g;if(null!==e){e=e.yb;if(d.md){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Cc= -!0;d.md?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});lp("ToolTip",function(){var a=new da(Ql),b=new z;b.name="Border";b.fill="#FFFFE0";b.stroke="#CCCCCC";a.add(b);return a});lp("ContextMenu",function(){return new da(Pl)});lp("ContextMenuButton",function(){var a=ip("Button");a.stretch=yo;var b=a.Nd("ButtonBorder");b instanceof z&&(b.Kb="Rectangle",b.C=new S(0,0,2,3),b.D=new S(1,1,-2,-2));return a}); -lp("PanelExpanderButton",function(a){var b=mp(a,"COLLAPSIBLE"),c=ip("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},ip(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new ph("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).zy(b)));a=c.Nd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.qb){var h=c.rm();null===h&&(h=c.Y);null!==h&&(h=h.Nd(b),null!==h&& +kp("SubGraphExpanderButton",function(){var a=hp("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},hp(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Yd},(new oh("figure","isSubGraphExpanded",function(a,c){var d=c.R;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).zy()));a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.hf);if(d instanceof I){var e=d.g;if(null!==e){e=e.yb;if(d.md){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Cc= +!0;d.md?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});kp("ToolTip",function(){var a=new da(Pl),b=new z;b.name="Border";b.fill="#FFFFE0";b.stroke="#CCCCCC";a.add(b);return a});kp("ContextMenu",function(){return new da(Ol)});kp("ContextMenuButton",function(){var a=hp("Button");a.stretch=xo;var b=a.Nd("ButtonBorder");b instanceof z&&(b.Kb="Rectangle",b.C=new S(0,0,2,3),b.D=new S(1,1,-2,-2));return a}); +kp("PanelExpanderButton",function(a){var b=lp(a,"COLLAPSIBLE"),c=hp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},hp(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new oh("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).zy(b)));a=c.Nd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.qb){var h=c.rm();null===h&&(h=c.Y);null!==h&&(h=h.Nd(b),null!==h&& (g.Nb("Collapse/Expand Panel"),h.visible=!h.visible,g.jd("Collapse/Expand Panel")))}};return c}); -lp("CheckBoxButton",function(a){var b=mp(a);a=ip("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},ip(z,{name:"ButtonIcon",RI:"M0 4 L3 9 9 0",mb:2,stretch:Ye,dB:ck,visible:!1},""!==b?(new ph("visible",b)).FJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.qb||""!==b&&e.ea.qb)){a.Cc=!0;var g=d.Nd("ButtonIcon");e.Nb("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.jd("checkbox")}};return a}); -lp("CheckBox",function(a){a=mp(a);a=ip("CheckBoxButton",a,{name:"Button",margin:new Lb(0,1,0,0)});var b=ip(x,"Horizontal",a,{Hu:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Yu:a.Yu,Zu:a.Zu,click:a.click,_buttonClick:a.click});a.Yu=null;a.Zu=null;a.click=null;return b}); -function Do(){this.Yr=this.Ui=this.wj=this.dr=this.gr=this.fr=this.er=this.kj=this.Qs=this.Ps=this.lj=this.mj=this.nj=this.Ss=this.Rs=this.Ti=this.Yi=this.Ri=null}Do.prototype.copy=function(){var a=new Do;a.Ri=this.Ri;a.Yi=this.Yi;a.Ti=this.Ti;a.Rs=this.Rs;a.Ss=this.Ss;a.nj=this.nj;a.mj=this.mj;a.lj=this.lj;a.Ps=this.Ps;a.Qs=this.Qs;a.kj=this.kj;a.er=this.er;a.fr=this.fr;a.gr=this.gr;a.dr=this.dr;a.wj=this.wj;a.Ui=this.Ui;a.Yr=this.Yr;return a}; -function x(a){O.call(this);void 0===a?this.da=fk:(D.Da(a,x,x,"type"),this.da=a);this.xa=new K(O);this.vf=Sd;this.da===Tl&&(this.$n=!0);this.Jr=Vc;this.Xi=wo;this.da===fa&&np(this);this.Wp=ck;this.js=ae;this.ks=Kd;this.fs=0;this.es=100;this.hs=10;this.gs=0;this.Al=this.Ud=this.qk=this.Vm=this.Xm=null;this.xs=NaN;this.Ig=this.ej=null;this.op="category";this.Hg=null;this.yj=new C(NaN,NaN,NaN,NaN);this.Jk=this.wt=this.Yl=null;this.dk=""}D.Ta(x,O);D.Di(x);D.ka("Panel",x); -function np(a){a.ik=Sd;a.fi=1;a.Wi=null;a.Tm=null;a.ei=1;a.di=null;a.Sm=null;a.hd=[];a.cd=[];a.rn=op;a.Rm=op;a.xj=0;a.hj=0} +kp("CheckBoxButton",function(a){var b=lp(a);a=hp("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},hp(z,{name:"ButtonIcon",RI:"M0 4 L3 9 9 0",mb:2,stretch:Xe,dB:bk,visible:!1},""!==b?(new oh("visible",b)).FJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.qb||""!==b&&e.ea.qb)){a.Cc=!0;var g=d.Nd("ButtonIcon");e.Nb("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.jd("checkbox")}};return a}); +kp("CheckBox",function(a){a=lp(a);a=hp("CheckBoxButton",a,{name:"Button",margin:new Lb(0,1,0,0)});var b=hp(x,"Horizontal",a,{Hu:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Yu:a.Yu,Zu:a.Zu,click:a.click,_buttonClick:a.click});a.Yu=null;a.Zu=null;a.click=null;return b}); +function Co(){this.Yr=this.Ui=this.wj=this.dr=this.gr=this.fr=this.er=this.kj=this.Qs=this.Ps=this.lj=this.mj=this.nj=this.Ss=this.Rs=this.Ti=this.Yi=this.Ri=null}Co.prototype.copy=function(){var a=new Co;a.Ri=this.Ri;a.Yi=this.Yi;a.Ti=this.Ti;a.Rs=this.Rs;a.Ss=this.Ss;a.nj=this.nj;a.mj=this.mj;a.lj=this.lj;a.Ps=this.Ps;a.Qs=this.Qs;a.kj=this.kj;a.er=this.er;a.fr=this.fr;a.gr=this.gr;a.dr=this.dr;a.wj=this.wj;a.Ui=this.Ui;a.Yr=this.Yr;return a}; +function x(a){O.call(this);void 0===a?this.da=ek:(D.Da(a,x,x,"type"),this.da=a);this.xa=new K(O);this.vf=Ld;this.da===Sl&&(this.$n=!0);this.Jr=Vc;this.Xi=vo;this.da===fa&&mp(this);this.Wp=bk;this.js=$d;this.ks=Jd;this.fs=0;this.es=100;this.hs=10;this.gs=0;this.Al=this.Ud=this.qk=this.Vm=this.Xm=null;this.xs=NaN;this.Ig=this.ej=null;this.op="category";this.Hg=null;this.yj=new C(NaN,NaN,NaN,NaN);this.Jk=this.wt=this.Yl=null;this.dk=""}D.Ta(x,O);D.Di(x);D.ka("Panel",x); +function mp(a){a.ik=Ld;a.fi=1;a.Wi=null;a.Tm=null;a.ei=1;a.di=null;a.Sm=null;a.hd=[];a.cd=[];a.rn=np;a.Rm=np;a.xj=0;a.hj=0} x.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.da=this.da;a.vf=this.vf.V();a.Jr=this.Jr.V();a.Xi=this.Xi;if(a.da===fa){a.ik=this.ik.V();a.fi=this.fi;a.Wi=this.Wi;a.Tm=this.Tm;a.ei=this.ei;a.di=this.di;a.Sm=this.Sm;var b=[];if(0 a&&D.ua(a,">= 0",x,"padding"),a=new Lb(a)):(D.l(a,Lb,x,"padding"),0>a.left&&D.ua(a.left,">= 0",x,"padding:value.left"),0>a.right&&D.ua(a.right,">= 0",x,"padding:value.right"),0>a.top&&D.ua(a.top,">= 0",x,"padding:value.top"),0>a.bottom&&D.ua(a.bottom,">= 0",x,"padding:value.bottom"));var b=this.vf;b.O(a)||(this.vf=a=a.V(),this.K(),this.i("padding",b,a))}); D.defineProperty(x,{pm:"defaultAlignment"},function(){return this.Jr},function(a){var b=this.Jr;b.O(a)||(v&&D.l(a,S,x,"defaultAlignment"),this.Jr=a=a.V(),this.K(),this.i("defaultAlignment",b,a))});D.defineProperty(x,{me:"defaultStretch"},function(){return this.Xi},function(a){var b=this.Xi;b!==a&&(D.Da(a,O,x,"defaultStretch"),this.Xi=a,this.K(),this.i("defaultStretch",b,a))}); -D.defineProperty(x,{FL:"defaultSeparatorPadding"},function(){return void 0===this.ik?Sd:this.ik},function(a){if(void 0!==this.ik){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,x,"defaultSeparatorPadding");var b=this.ik;b.O(a)||(this.ik=a=a.V(),this.K(),this.i("defaultSeparatorPadding",b,a))}}); +D.defineProperty(x,{FL:"defaultSeparatorPadding"},function(){return void 0===this.ik?Ld:this.ik},function(a){if(void 0!==this.ik){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,x,"defaultSeparatorPadding");var b=this.ik;b.O(a)||(this.ik=a=a.V(),this.K(),this.i("defaultSeparatorPadding",b,a))}}); D.defineProperty(x,{DL:"defaultRowSeparatorStroke"},function(){return void 0===this.Wi?null:this.Wi},function(a){var b=this.Wi;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.Wi=a,this.ra(),this.i("defaultRowSeparatorStroke",b,a))}); D.defineProperty(x,{EL:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.fi?1:this.fi},function(a){if(void 0!==this.fi){var b=this.fi;b!==a&&isFinite(a)&&0<=a&&(this.fi=a,this.K(),this.i("defaultRowSeparatorStrokeWidth",b,a))}}); D.defineProperty(x,{CL:"defaultRowSeparatorDashArray"},function(){return void 0===this.Tm?null:this.Tm},function(a){if(void 0!==this.Tm){var b=this.Tm;if(b!==a){null===a||Array.isArray(a)||D.kc(a,"Array",x,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e =c&&(c=1);var d=this.by,e=d.width,d=d.height,g=this.Fa,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.VF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.xa.o,q=p.length,r=0;r -e*u*c))){s=w.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var y=n[r],A=!1,B=!0,P=w.iH;null!==P&&(A=!0,B=a.YA(P,w.gf));if("LineV"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Vo(this,a,w.stroke,!1,!1);a.beginPath();for(var H=Math.floor(-m.x/e),R=H;R<=H+k;R++){var aa=R*e+m.x;0<=aa&&aa<=h&&qp(R,u,y)&&(A&&!B?Go(a,aa,0,aa,g,P,w.gf):(a.moveTo(aa,0),a.lineTo(aa,g)))}a.stroke()}else if("LineH"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Vo(this,a,w.stroke,!1,!1);a.beginPath();for(R= -H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&qp(R,u,y)&&(A&&!B?Go(a,0,aa,h,aa,P,w.gf):(a.moveTo(0,aa),a.lineTo(h,aa)));a.stroke()}else if("BarV"===w.Kb&&null!==w.fill)for(Vo(this,a,w.fill,!0,!1),w=w.width,isNaN(w)&&(w=e),R=H=Math.floor(-m.x/e);R<=H+k;R++)aa=R*e+m.x,0<=aa&&aa<=h&&qp(R,u,y)&&a.fillRect(aa,0,w,g);else if("BarH"===w.Kb&&null!==w.fill)for(Vo(this,a,w.fill,!0,!1),w=w.height,isNaN(w)&&(w=d),R=H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&qp(R,u,y)&&a.fillRect(0,aa, -h,w);A&&a.TA();1!==s&&(a.globalAlpha=t)}}a.restore();a.De(!1)}else if(this.da===pp){e=this.Fa;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Md();c.He(a,b);e=this.Jj()*b.scale;0>=e&&(e=1);d=c.aa;h=this.xa.o;g=this.Xm;k=h.length;for(l=0;lthis.hB*q.interval*c.xf.vu/this.Du*e))for(r=q.Ia,u=q.mb*q.scale,s=q.Gh,s.ee()&&(s=jc),p=0;p =c&&(c=1);var d=this.by,e=d.width,d=d.height,g=this.Fa,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.VF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.xa.o,q=p.length,r=0;r +e*u*c))){s=w.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var y=n[r],A=!1,B=!0,P=w.iH;null!==P&&(A=!0,B=a.YA(P,w.gf));if("LineV"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Uo(this,a,w.stroke,!1,!1);a.beginPath();for(var H=Math.floor(-m.x/e),R=H;R<=H+k;R++){var aa=R*e+m.x;0<=aa&&aa<=h&&pp(R,u,y)&&(A&&!B?Fo(a,aa,0,aa,g,P,w.gf):(a.moveTo(aa,0),a.lineTo(aa,g)))}a.stroke()}else if("LineH"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Uo(this,a,w.stroke,!1,!1);a.beginPath();for(R= +H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&pp(R,u,y)&&(A&&!B?Fo(a,0,aa,h,aa,P,w.gf):(a.moveTo(0,aa),a.lineTo(h,aa)));a.stroke()}else if("BarV"===w.Kb&&null!==w.fill)for(Uo(this,a,w.fill,!0,!1),w=w.width,isNaN(w)&&(w=e),R=H=Math.floor(-m.x/e);R<=H+k;R++)aa=R*e+m.x,0<=aa&&aa<=h&&pp(R,u,y)&&a.fillRect(aa,0,w,g);else if("BarH"===w.Kb&&null!==w.fill)for(Uo(this,a,w.fill,!0,!1),w=w.height,isNaN(w)&&(w=d),R=H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&pp(R,u,y)&&a.fillRect(0,aa, +h,w);A&&a.TA();1!==s&&(a.globalAlpha=t)}}a.restore();a.De(!1)}else if(this.da===op){e=this.Fa;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Md();c.He(a,b);e=this.Jj()*b.scale;0>=e&&(e=1);d=c.aa;h=this.xa.o;g=this.Xm;k=h.length;for(l=0;lthis.hB*q.interval*c.xf.vu/this.Du*e))for(r=q.Ia,u=q.mb*q.scale,s=q.Gh,s.ee()&&(s=jc),p=0;p g.height)continue}else if(l.position>g.width)continue;var m=l.Wq;isNaN(m)&&(m=c?a.fi:a.ei);var n=l.Vq;null===n&&(n=c?a.Wi:a.di);if(0!==m&&null!==n){Vo(a,b,n,!1,!1);var n=!1,p=!0,q=l.qK;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.gf):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.gf):p=!1);b.beginPath();var r= -l.position+m;c?r>g.height&&(m-=r-g.height):r>g.width&&(m-=r-g.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=g.width-r.right,n&&!p?Go(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=g.height-r.bottom,n&&!p?Go(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(D.ml),b.lineDashOffset=0):void 0!==b.webkitLineDash&&(b.webkitLineDash=D.ml,b.webkitLineDashOffset=0))}}}} -function sp(a,b,c,d,e){for(var g=d.length,h=a.aa,k=0;k m)){var n=l.kf(),p=l.Wq;isNaN(p)&&(p=c?a.fi:a.ei);var q=l.Vq;null===q&&(q=c?a.Wi:a.di);null===q&&(p=0);n-=p;p=l.position+p;n+=l.hb;p+n>m&&(n=m-p);0>=n||(m=a.padding,Vo(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} -function qp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dg.height)continue}else if(l.position>g.width)continue;var m=l.Wq;isNaN(m)&&(m=c?a.fi:a.ei);var n=l.Vq;null===n&&(n=c?a.Wi:a.di);if(0!==m&&null!==n){Uo(a,b,n,!1,!1);var n=!1,p=!0,q=l.qK;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.gf):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.gf):p=!1);b.beginPath();var r= +l.position+m;c?r>g.height&&(m-=r-g.height):r>g.width&&(m-=r-g.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=g.width-r.right,n&&!p?Fo(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=g.height-r.bottom,n&&!p?Fo(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(D.ml),b.lineDashOffset=0):void 0!==b.webkitLineDash&&(b.webkitLineDash=D.ml,b.webkitLineDashOffset=0))}}}} +function rp(a,b,c,d,e){for(var g=d.length,h=a.aa,k=0;k m)){var n=l.kf(),p=l.Wq;isNaN(p)&&(p=c?a.fi:a.ei);var q=l.Vq;null===q&&(q=c?a.Wi:a.di);null===q&&(p=0);n-=p;p=l.position+p;n+=l.hb;p+n>m&&(n=m-p);0>=n||(m=a.padding,Uo(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} +function pp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dm&&e.set(s),D.A(s));D.A(n);g&&e.transform(h)}return c}; -f.K=function(a){O.prototype.K.call(this,a);a=null;if(this.da===Ql||this.da===tj)a=this.Md();for(var b=this.xa.o,c=b.length,d=0;d Od&&(rc=Math.max(Od-sc,0));var pg=0===Z.hb;Z.hb+=rc;Od=Math.max(Od-(rc+(pg?sc:0)),0)}1!==ba.Si||Tb!==ak&&Tb!==xo||(Z=this.oe(Kb),sc=Z.kf(),rc=Math.max(hf-Z.hb,0),rc+sc>cd&&(rc=Math.max(cd-sc,0)),pg=0===Z.hb,Z.hb+=rc,cd=Math.max(cd-(rc+(pg?sc:0)),0));pi&&ba.xq()}}}D.ya(df);for(var Gc=0,Fb=0,Jb=this.fq,ka=0;ka