diff --git a/api/index.html b/api/index.html index 82fac5d21..c2dd82b03 100644 --- a/api/index.html +++ b/api/index.html @@ -1,4 +1,4 @@ -GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

GoJS API

GoJS Class Index

Diagram Classes

Geometry Classes

Model Classes

Layout Classes

Tool Classes

Collection Classes

Extension Classes

Layout Extension Classes

Part Extension Classes

Tool Extension Classes

Storage Classes

Type

+GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

GoJS API

GoJS Class Index

Diagram Classes

Geometry Classes

Model Classes

Layout Classes

Tool Classes

Collection Classes

Extension Classes

Layout Extension Classes

Part Extension Classes

Tool Extension Classes

Storage Classes

Type

For bindings: The optional conversion function to convert property values back to data values. Specifying this function modifies a binding to set its Binding.mode to be Binding.TwoWay. If you want a two-way binding without a back-conversion function, specify null for a BackConversion. diff --git a/api/symbols/ActionTool.html b/api/symbols/ActionTool.html index 60015e233..4f0779d4a 100644 --- a/api/symbols/ActionTool.html +++ b/api/symbols/ActionTool.html @@ -1,4 +1,4 @@ -ActionTool | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ActionTool

Hierarchy

+ActionTool | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ActionTool

Hierarchy

The ActionTool is responsible for handling and dispatching mouse events on GraphObjects that have GraphObject.isActionable set to true. This is how one implements "controls", such as buttons or sliders or knobs, as GraphObjects diff --git a/api/symbols/Adornment.html b/api/symbols/Adornment.html index 3bfb2e249..245a4fa20 100644 --- a/api/symbols/Adornment.html +++ b/api/symbols/Adornment.html @@ -1,4 +1,4 @@ -Adornment | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Adornment

Hierarchy

+Adornment | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Adornment

Hierarchy

An Adornment is a special kind of Part that is associated with another Part, the Adornment.adornedPart.

Adornments are normally associated with a particular GraphObject in the adorned Part -- diff --git a/api/symbols/Animation.html b/api/symbols/Animation.html index a953f62d3..7e9363586 100644 --- a/api/symbols/Animation.html +++ b/api/symbols/Animation.html @@ -1,4 +1,4 @@ -Animation | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Animation

Hierarchy

  • Animation
+Animation | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Animation

Hierarchy

  • Animation

Animations are used to animate GraphObject and Diagram properties.

This class is useful for creating manual animations. If you wish to animate particular properties on a GraphObject every time their value changes, diff --git a/api/symbols/AnimationManager.html b/api/symbols/AnimationManager.html index 0be13491e..84f0b4d85 100644 --- a/api/symbols/AnimationManager.html +++ b/api/symbols/AnimationManager.html @@ -1,4 +1,4 @@ -AnimationManager | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationManager

Hierarchy

  • AnimationManager
+AnimationManager | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationManager

Hierarchy

  • AnimationManager

AnimationManager handles animations in a Diagram. Each Diagram has one, Diagram.animationManager. Setting the Model, performing a Layout, Group expansion and Tree expansion automatically start animations through the defaultAnimation. Animations can be manually started by creating Animations, which are associated with an diff --git a/api/symbols/AnimationTrigger.html b/api/symbols/AnimationTrigger.html index d64c640a9..d1b3ed107 100644 --- a/api/symbols/AnimationTrigger.html +++ b/api/symbols/AnimationTrigger.html @@ -1,4 +1,4 @@ -AnimationTrigger | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationTrigger

Hierarchy

  • AnimationTrigger
+AnimationTrigger | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationTrigger

Hierarchy

  • AnimationTrigger

An AnimationTrigger describes how to automatically animate a property on a GraphObject when it changes value. The target property name is a string, and all name matching is case-sensitive.

diff --git a/api/symbols/ArrangingLayout.html b/api/symbols/ArrangingLayout.html index 97dde0e93..5b3611c44 100644 --- a/api/symbols/ArrangingLayout.html +++ b/api/symbols/ArrangingLayout.html @@ -1,4 +1,4 @@ -ArrangingLayout | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArrangingLayout Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

+ArrangingLayout | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArrangingLayout Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

A custom Layout that provides one way to have a layout of layouts. It partitions nodes and links into separate subnetworks, applies a primary layout to each subnetwork, and then arranges those results by an diff --git a/api/symbols/BalloonLink.html b/api/symbols/BalloonLink.html index 76ccaf70c..efc5bbd9f 100644 --- a/api/symbols/BalloonLink.html +++ b/api/symbols/BalloonLink.html @@ -1,4 +1,4 @@ -BalloonLink | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BalloonLink Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

+BalloonLink | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BalloonLink Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

This custom Link class customizes its Shape to surround the comment node (the from node). If the Shape is filled, it will obscure the comment itself unless the Link is behind the comment node. Thus the default layer for BalloonLinks is "Background".

diff --git a/api/symbols/Binding.html b/api/symbols/Binding.html index 7ea2000de..d9b253166 100644 --- a/api/symbols/Binding.html +++ b/api/symbols/Binding.html @@ -1,4 +1,4 @@ -Binding | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Binding

Hierarchy

  • Binding
+Binding | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Binding

Hierarchy

  • Binding

A Binding describes how to automatically set a property on a GraphObject to a value of a property of data in the model. The target property name and the data source property name are strings. diff --git a/api/symbols/Brush.html b/api/symbols/Brush.html index f6f181105..0c919a1b2 100644 --- a/api/symbols/Brush.html +++ b/api/symbols/Brush.html @@ -1,4 +1,4 @@ -Brush | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Brush

Hierarchy

  • Brush
+Brush | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Brush

Hierarchy

  • Brush

A Brush holds color information and describes how to draw the inside of a Shape or the stroke of a shape or a TextBlock or the background of any GraphObject.

diff --git a/api/symbols/ChangedEvent.html b/api/symbols/ChangedEvent.html index 01146a173..e1655584a 100644 --- a/api/symbols/ChangedEvent.html +++ b/api/symbols/ChangedEvent.html @@ -1,4 +1,4 @@ -ChangedEvent | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChangedEvent

Hierarchy

  • ChangedEvent
+ChangedEvent | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChangedEvent

Hierarchy

  • ChangedEvent

A ChangedEvent represents a change to an object, typically a GraphObject, but also for model data, a Model, or a Diagram. The most common case is for remembering the name of a property diff --git a/api/symbols/CircularEdge.html b/api/symbols/CircularEdge.html index 6dd5afd91..7e1f851f5 100644 --- a/api/symbols/CircularEdge.html +++ b/api/symbols/CircularEdge.html @@ -1,4 +1,4 @@ -CircularEdge | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CircularEdge

Hierarchy

+CircularEdge | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CircularEdge

Hierarchy

This holds CircularLayout-specific information about Links.

This class inherits from LayoutEdge.

Index

Constructors

Inherited Members

Constructors

  • The cursor to show when a drop is not allowed. -This defaults to 'no-drop'.

    +This defaults to 'no-drop'. +Read more about cursors at Diagram.currentCursor

    since

    2.2

  • Gets or sets the mouse point from which parts start to move. diff --git a/api/symbols/DrawCommandHandler.html b/api/symbols/DrawCommandHandler.html index 4f2bd7766..df96cb129 100644 --- a/api/symbols/DrawCommandHandler.html +++ b/api/symbols/DrawCommandHandler.html @@ -1,4 +1,4 @@ -DrawCommandHandler | GoJS API

    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class DrawCommandHandler Extension

    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

    Hierarchy

    +DrawCommandHandler | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class DrawCommandHandler Extension

    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

    Hierarchy

    This CommandHandler class allows the user to position selected Parts in a diagram relative to the first part selected, in addition to overriding the doKeyDown method of the CommandHandler for handling the arrow keys in additional manners.

    diff --git a/api/symbols/FishboneLayout.html b/api/symbols/FishboneLayout.html index b27818736..25399060f 100644 --- a/api/symbols/FishboneLayout.html +++ b/api/symbols/FishboneLayout.html @@ -1,4 +1,4 @@ -FishboneLayout | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class FishboneLayout Extension

    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

    Hierarchy

    +FishboneLayout | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class FishboneLayout Extension

    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

    Hierarchy

    FishboneLayout is a custom Layout derived from TreeLayout for creating "fishbone" diagrams. A fishbone diagram also requires a Link class that implements custom routing, FishboneLink.

    This only works for angle === 0 or angle === 180.

    diff --git a/api/symbols/FishboneLink.html b/api/symbols/FishboneLink.html index 34e4b0e10..9b25cbdaa 100644 --- a/api/symbols/FishboneLink.html +++ b/api/symbols/FishboneLink.html @@ -1,4 +1,4 @@ -FishboneLink | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class FishboneLink Extension

    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

    Hierarchy

    +FishboneLink | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class FishboneLink Extension

    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

    Hierarchy

    Custom Link class for FishboneLayout.

    Index

    Inherited Members

    Properties

    Methods

    Constructors

    • Constructs an empty link that does not connect any nodes. diff --git a/api/symbols/ForceDirectedEdge.html b/api/symbols/ForceDirectedEdge.html index a8381111b..f6f65f222 100644 --- a/api/symbols/ForceDirectedEdge.html +++ b/api/symbols/ForceDirectedEdge.html @@ -1,4 +1,4 @@ -ForceDirectedEdge | GoJS API

      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ForceDirectedEdge

      Hierarchy

      +ForceDirectedEdge | GoJS API
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ForceDirectedEdge

      Hierarchy

      This holds ForceDirectedLayout-specific information about Links.

      This class inherits from LayoutEdge.

      Index

      Constructors

      Properties

      Inherited Members

      Constructors

      • diff --git a/api/symbols/ForceDirectedLayout.html b/api/symbols/ForceDirectedLayout.html index 72a484f34..c0feb03e6 100644 --- a/api/symbols/ForceDirectedLayout.html +++ b/api/symbols/ForceDirectedLayout.html @@ -1,4 +1,4 @@ -ForceDirectedLayout | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ForceDirectedLayout

        Hierarchy

        +ForceDirectedLayout | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ForceDirectedLayout

        Hierarchy

        Force-directed layout treats the graph as if it were a system of physical bodies with repulsive electrical, attractional gravitational, and spring forces acting on them and between them.

        Electrical forces come both from the field at the vertex's location as well as from neighboring vertexes and are quadratic by distance. diff --git a/api/symbols/ForceDirectedNetwork.html b/api/symbols/ForceDirectedNetwork.html index 6466ccf2f..7b66c57c5 100644 --- a/api/symbols/ForceDirectedNetwork.html +++ b/api/symbols/ForceDirectedNetwork.html @@ -1,4 +1,4 @@ -ForceDirectedNetwork | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ForceDirectedNetwork

        Hierarchy

        +ForceDirectedNetwork | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ForceDirectedNetwork

        Hierarchy

        This class represents an abstract graph of ForceDirectedVertexes and ForceDirectedEdges that can be constructed based on the Nodes and Links of a Diagram so that the ForceDirectedLayout can operate independently of the diagram until it diff --git a/api/symbols/ForceDirectedVertex.html b/api/symbols/ForceDirectedVertex.html index 749b0537b..923441d58 100644 --- a/api/symbols/ForceDirectedVertex.html +++ b/api/symbols/ForceDirectedVertex.html @@ -1,4 +1,4 @@ -ForceDirectedVertex | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ForceDirectedVertex

        Hierarchy

        +ForceDirectedVertex | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ForceDirectedVertex

        Hierarchy

        This holds ForceDirectedLayout-specific information about Nodes.

        This class inherits from LayoutVertex.

        Index

        Inherited Members

        Constructors

        • diff --git a/api/symbols/FreehandDrawingTool.html b/api/symbols/FreehandDrawingTool.html index 2e9b63acd..0c88e2673 100644 --- a/api/symbols/FreehandDrawingTool.html +++ b/api/symbols/FreehandDrawingTool.html @@ -1,4 +1,4 @@ -FreehandDrawingTool | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class FreehandDrawingTool Extension

          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

          Hierarchy

          • Tool
            • FreehandDrawingTool
          +FreehandDrawingTool | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class FreehandDrawingTool Extension

          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

          Hierarchy

          • Tool
            • FreehandDrawingTool

          The FreehandDrawingTool allows the user to draw a shape using the mouse. It collects all of the points from a mouse-down, all mouse-moves, until a mouse-up, and puts all of those points in a Geometry used by a Shape. diff --git a/api/symbols/Geometry.html b/api/symbols/Geometry.html index b508fedc9..c896f5835 100644 --- a/api/symbols/Geometry.html +++ b/api/symbols/Geometry.html @@ -1,4 +1,4 @@ -Geometry | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class Geometry

          Hierarchy

          • Geometry
          +Geometry | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class Geometry

          Hierarchy

          • Geometry

          The Geometry class is used to define the "shape" of a Shape. A Geometry can be simple straight lines, rectangles, or ellipses. A Geometry can also be an arbitrarily complex path, consisting of a list of PathFigures.

          diff --git a/api/symbols/GeometryReshapingTool.html b/api/symbols/GeometryReshapingTool.html index 5e4a4387a..cc3b35b92 100644 --- a/api/symbols/GeometryReshapingTool.html +++ b/api/symbols/GeometryReshapingTool.html @@ -1,4 +1,4 @@ -GeometryReshapingTool | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GeometryReshapingTool Extension

          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

          Hierarchy

          • Tool
            • GeometryReshapingTool
          +GeometryReshapingTool | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GeometryReshapingTool Extension

          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

          Hierarchy

          • Tool
            • GeometryReshapingTool

          The GeometryReshapingTool class allows for a Shape's Geometry to be modified by the user via the dragging of tool handles. This does not handle Links, whose routes should be reshaped by the LinkReshapingTool. diff --git a/api/symbols/GoCloudStorage.html b/api/symbols/GoCloudStorage.html index edf8fd035..398c01672 100644 --- a/api/symbols/GoCloudStorage.html +++ b/api/symbols/GoCloudStorage.html @@ -1,4 +1,4 @@ -GoCloudStorage | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoCloudStorage Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          +GoCloudStorage | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoCloudStorage Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          An abstract class for storing GoJS Models in various cloud storage services.

          GoCloudStorage is never used on its own. Its subclasses can be used to manage diagram model storage programatically, or any subset of GoCloudStorage subclasses can be bundled and used graphically with the GoCloudStorageManager.

          diff --git a/api/symbols/GoCloudStorageManager.html b/api/symbols/GoCloudStorageManager.html index 94532beca..1df122235 100644 --- a/api/symbols/GoCloudStorageManager.html +++ b/api/symbols/GoCloudStorageManager.html @@ -1,4 +1,4 @@ -GoCloudStorageManager | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoCloudStorageManager Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          • GoCloudStorageManager
          +GoCloudStorageManager | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoCloudStorageManager Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          • GoCloudStorageManager

          Class for easily saving / loading GoJS Models to / from a user-defined set of Cloud Storage Services with a pre-defined UI.

          GoCloudStorageManager holds a set of GoCloudStorage subclass instances (storages) to manage. When one is selected from the storage selection menu, it becomes the currentStorage property, which is used to save / load / delete / create files.

          diff --git a/api/symbols/GoDropBox.html b/api/symbols/GoDropBox.html index eb69d5541..a26931a23 100644 --- a/api/symbols/GoDropBox.html +++ b/api/symbols/GoDropBox.html @@ -1,4 +1,4 @@ -GoDropBox | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoDropBox Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          +GoDropBox | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoDropBox Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          Class for saving / loading GoJS Models to / from Dropbox. As with all GoCloudStorage subclasses (with the exception of GoLocalStorage, any page using GoDropBox must be served on a web server.

          Note: Any page using GoDropBox must include a script tag with a reference to the Dropbox JS SDK.

          diff --git a/api/symbols/GoGoogleDrive.html b/api/symbols/GoGoogleDrive.html index f56af8b25..bf04fc1f5 100644 --- a/api/symbols/GoGoogleDrive.html +++ b/api/symbols/GoGoogleDrive.html @@ -1,4 +1,4 @@ -GoGoogleDrive | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoGoogleDrive Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          +GoGoogleDrive | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoGoogleDrive Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          Class for saving / loading GoJS Models to / from Google Drive. Uses the Google Drive V3 API by use of a Google Client API object. diff --git a/api/symbols/GoLocalStorage.html b/api/symbols/GoLocalStorage.html index e89a5734f..cb9ada269 100644 --- a/api/symbols/GoLocalStorage.html +++ b/api/symbols/GoLocalStorage.html @@ -1,4 +1,4 @@ -GoLocalStorage | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoLocalStorage Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          +GoLocalStorage | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoLocalStorage Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          Class for saving / loading GoJS Models to / from Local Storage. GoLocalStorage is the only GoCloudStorage subclass than can be used in a local page; that is, one not served by a web server.

          diff --git a/api/symbols/GoOneDrive.html b/api/symbols/GoOneDrive.html index c008f7e6c..e7eb750be 100644 --- a/api/symbols/GoOneDrive.html +++ b/api/symbols/GoOneDrive.html @@ -1,4 +1,4 @@ -GoOneDrive | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoOneDrive Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          +GoOneDrive | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GoOneDrive Storage

          This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

          Hierarchy

          Class for saving / loading GoJS Diagram.models to / from Microsoft One Drive. As with all GoCloudStorage subclasses (with the exception of GoLocalStorage, any page using GoDropBox must be served on a web server.

          Note: Makes use of OneDrive FilePicker for JavaScript v7.2. Any page diff --git a/api/symbols/GraphLinksModel.html b/api/symbols/GraphLinksModel.html index 4a7e4d6ac..8f78511f9 100644 --- a/api/symbols/GraphLinksModel.html +++ b/api/symbols/GraphLinksModel.html @@ -1,4 +1,4 @@ -GraphLinksModel | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GraphLinksModel

          Hierarchy

          +GraphLinksModel | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GraphLinksModel

          Hierarchy

          GraphLinksModels support links between nodes and grouping nodes and links into subgraphs. GraphLinksModels hold node data and link data in separate arrays. Node data is normally represented in a Diagram by instances of Node, diff --git a/api/symbols/GraphObject.html b/api/symbols/GraphObject.html index b5e345a06..16bbc8451 100644 --- a/api/symbols/GraphObject.html +++ b/api/symbols/GraphObject.html @@ -1,4 +1,4 @@ -GraphObject | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GraphObject Abstract

          Hierarchy

          +GraphObject | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GraphObject Abstract

          Hierarchy

          This is the abstract base class for all graphical objects. Classes inheriting from GraphObject include: Shape, TextBlock, Picture, and Panel. @@ -358,6 +358,7 @@

          Interactive Behavior

          Other strings should be valid CSS strings that specify a cursor. This provides some more information about cursor syntax: CSS cursors (mozilla.org).

          +

          Read more about cursors at Diagram.currentCursor

          see

          Diagram.defaultCursor, Diagram.currentCursor

        • Gets or sets the desired size of this GraphObject in local coordinates. diff --git a/api/symbols/GridLayout.html b/api/symbols/GridLayout.html index ff57b14ee..005c07260 100644 --- a/api/symbols/GridLayout.html +++ b/api/symbols/GridLayout.html @@ -1,4 +1,4 @@ -GridLayout | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GridLayout

          Hierarchy

          +GridLayout | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GridLayout

          Hierarchy

          This simple layout places all of the Parts in a grid-like arrangement, ordered, spaced apart, and wrapping as needed. It ignores any Links connecting the Nodes being laid out. There are many samples that use GridLayout. diff --git a/api/symbols/Group.html b/api/symbols/Group.html index cdb7b2cb0..561d67d8e 100644 --- a/api/symbols/Group.html +++ b/api/symbols/Group.html @@ -1,4 +1,4 @@ -Group | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class Group

          Hierarchy

          +Group | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class Group

          Hierarchy

          A Group is a Node that can contain a subgraph of Nodes and Links, which are members of the group.

          diff --git a/api/symbols/GuidedDraggingTool.html b/api/symbols/GuidedDraggingTool.html index 9876c6667..2d22001cd 100644 --- a/api/symbols/GuidedDraggingTool.html +++ b/api/symbols/GuidedDraggingTool.html @@ -1,4 +1,4 @@ -GuidedDraggingTool | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GuidedDraggingTool Extension

          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

          Hierarchy

          +GuidedDraggingTool | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class GuidedDraggingTool Extension

          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

          Hierarchy

          The GuidedDraggingTool class makes guidelines visible as the parts are dragged around a diagram when the selected part is nearly aligned with another part.

          If you want to experiment with this extension, try the Guided Dragging sample.

          diff --git a/api/symbols/HTMLInfo.html b/api/symbols/HTMLInfo.html index d636b7e76..d17639dc3 100644 --- a/api/symbols/HTMLInfo.html +++ b/api/symbols/HTMLInfo.html @@ -1,4 +1,4 @@ -HTMLInfo | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class HTMLInfo

          Hierarchy

          • HTMLInfo
          +HTMLInfo | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class HTMLInfo

          Hierarchy

          • HTMLInfo

          HTMLInfo is used to show and hide custom HTML page elements, such as a context menu, tooltip, or text editor made of HTML.

          Properties that can be set to an HTMLInfo include:

            diff --git a/api/symbols/IncrementalData.html b/api/symbols/IncrementalData.html index e8d4171df..24b356386 100644 --- a/api/symbols/IncrementalData.html +++ b/api/symbols/IncrementalData.html @@ -1,4 +1,4 @@ -IncrementalData | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Interface IncrementalData

            Hierarchy

            • IncrementalData
            +IncrementalData | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Interface IncrementalData

            Hierarchy

            • IncrementalData

            Interface for the output object of Model.toIncrementalData.

            All properties of this object are optional, as they are only included if changes occurred. For instance, if a transaction didn't include any changes to modelData, the modelData property of this interface won't be included on the output object.

            diff --git a/api/symbols/InputEvent.html b/api/symbols/InputEvent.html index 6366ccb07..6462554c1 100644 --- a/api/symbols/InputEvent.html +++ b/api/symbols/InputEvent.html @@ -1,4 +1,4 @@ -InputEvent | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class InputEvent

            Hierarchy

            • InputEvent
            +InputEvent | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class InputEvent

            Hierarchy

            • InputEvent

            An InputEvent represents a mouse or keyboard or touch event. The principal properties hold information about a particular input event. These properties include the documentPoint at which a mouse event diff --git a/api/symbols/Inspector.html b/api/symbols/Inspector.html index 88f3e9fc3..54e077c03 100644 --- a/api/symbols/Inspector.html +++ b/api/symbols/Inspector.html @@ -1,4 +1,4 @@ -Inspector | GoJS API

            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class Inspector Extension

            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

            Hierarchy

            • Inspector
            +Inspector | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class Inspector Extension

            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

            Hierarchy

            • Inspector

            This class implements an inspector for GoJS model data objects. The constructor takes three arguments:

              diff --git a/api/symbols/Iterable.html b/api/symbols/Iterable.html index 3bd974ee8..84bb29770 100644 --- a/api/symbols/Iterable.html +++ b/api/symbols/Iterable.html @@ -1,4 +1,4 @@ -Iterable | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Interface Iterable<T>

              Hierarchy

              +Iterable | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Interface Iterable<T>

              Hierarchy

              This interface is implemented by the List, Set, and Map classes; it provides the iterator read-only property that returns an Iterator.

              Typical usage is:

              diff --git a/api/symbols/Iterator.html b/api/symbols/Iterator.html index 568f4ab2e..423d7705f 100644 --- a/api/symbols/Iterator.html +++ b/api/symbols/Iterator.html @@ -1,4 +1,4 @@ -Iterator | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Interface Iterator<T>

              Hierarchy

              +Iterator | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Interface Iterator<T>

              Hierarchy

              This interface defines properties and methods for iterating over a collection; it provides the next predicate and the value read-only property. Some Iterators also provide key property values along with each value.

              diff --git a/api/symbols/Layer.html b/api/symbols/Layer.html index 1808abbf5..5d94a5820 100644 --- a/api/symbols/Layer.html +++ b/api/symbols/Layer.html @@ -1,4 +1,4 @@ -Layer | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class Layer

              Hierarchy

              • Layer
              +Layer | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class Layer

              Hierarchy

              • Layer

              Layers are how named collections of Parts are drawn in front or behind other collections of Parts in a Diagram. Layers can only contain Parts, such as Nodes and Links. They cannot hold GraphObjects directly.

              You put a Part into a Layer by assigning Part.layerName with the name of the Layer. diff --git a/api/symbols/LayeredDigraphEdge.html b/api/symbols/LayeredDigraphEdge.html index 9af095373..a74cf7a8b 100644 --- a/api/symbols/LayeredDigraphEdge.html +++ b/api/symbols/LayeredDigraphEdge.html @@ -1,4 +1,4 @@ -LayeredDigraphEdge | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class LayeredDigraphEdge

              Hierarchy

              +LayeredDigraphEdge | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class LayeredDigraphEdge

              Hierarchy

              This holds LayeredDigraphLayout-specific information about Links.

              This class inherits from LayoutEdge.

              Index

              Inherited Members

              Constructors

              • diff --git a/api/symbols/LayeredDigraphLayout.html b/api/symbols/LayeredDigraphLayout.html index 01198a34a..1c2c47962 100644 --- a/api/symbols/LayeredDigraphLayout.html +++ b/api/symbols/LayeredDigraphLayout.html @@ -1,4 +1,4 @@ -LayeredDigraphLayout | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class LayeredDigraphLayout

                Hierarchy

                +LayeredDigraphLayout | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class LayeredDigraphLayout

                Hierarchy

                This arranges nodes of directed graphs into layers (rows or columns). There are many samples that use LayeredDigraphLayout.

                diff --git a/api/symbols/LayeredDigraphNetwork.html b/api/symbols/LayeredDigraphNetwork.html index 1f3310add..81b487d3f 100644 --- a/api/symbols/LayeredDigraphNetwork.html +++ b/api/symbols/LayeredDigraphNetwork.html @@ -1,4 +1,4 @@ -LayeredDigraphNetwork | GoJS API

                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class LayeredDigraphNetwork

                Hierarchy

                +LayeredDigraphNetwork | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class LayeredDigraphNetwork

                Hierarchy

                This class represents an abstract graph of LayeredDigraphVertexes and LayeredDigraphEdges that can be constructed based on the Nodes and Links of a Diagram so that the LayeredDigraphLayout can operate independently of the diagram until it diff --git a/api/symbols/LayeredDigraphVertex.html b/api/symbols/LayeredDigraphVertex.html index 18ca859b6..d532b63eb 100644 --- a/api/symbols/LayeredDigraphVertex.html +++ b/api/symbols/LayeredDigraphVertex.html @@ -1,4 +1,4 @@ -LayeredDigraphVertex | GoJS API

                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class LayeredDigraphVertex

                Hierarchy

                +LayeredDigraphVertex | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class LayeredDigraphVertex

                Hierarchy

                This holds LayeredDigraphLayout-specific information about Nodes.

                This class inherits from LayoutVertex.

                Index

                Inherited Members

                Properties

                • Gets or sets the cursor used during the linking or relinking operation. -This defaults to 'pointer'.

                  +This defaults to 'pointer'. +Read more about cursors at Diagram.currentCursor

                  since

                  2.2

                • Gets or sets the original Node from which the new link is being drawn diff --git a/api/symbols/LinkingTool.html b/api/symbols/LinkingTool.html index 9212db508..0adede830 100644 --- a/api/symbols/LinkingTool.html +++ b/api/symbols/LinkingTool.html @@ -1,4 +1,4 @@ -LinkingTool | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class LinkingTool

                  Hierarchy

                  +LinkingTool | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class LinkingTool

                  Hierarchy

                  The LinkingTool lets a user draw a new Link between two ports, using a mouse-drag operation.

                  By default an instance of this tool is installed as a mouse-move tool in the diff --git a/api/symbols/List.html b/api/symbols/List.html index 678368c47..8ce0444d0 100644 --- a/api/symbols/List.html +++ b/api/symbols/List.html @@ -1,4 +1,4 @@ -List | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class List<T>

                  Hierarchy

                  • List
                  +List | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class List<T>

                  Hierarchy

                  • List

                  NOTE: For 2.0 the constructor argument has changed. List now optionally accepts a collection, and only checks types in TypeScript.

                  An ordered iterable collection. diff --git a/api/symbols/LocalStorageCommandHandler.html b/api/symbols/LocalStorageCommandHandler.html index 35544236d..d41a54cf5 100644 --- a/api/symbols/LocalStorageCommandHandler.html +++ b/api/symbols/LocalStorageCommandHandler.html @@ -1,4 +1,4 @@ -LocalStorageCommandHandler | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class LocalStorageCommandHandler Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  +LocalStorageCommandHandler | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class LocalStorageCommandHandler Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  This CommandHandler class uses localStorage as the repository for the clipboard, rather than an in-memory global variable. It requires that the Diagram.model be serializable and deserializable using Model.toJson and Model.fromJson.

                  diff --git a/api/symbols/Map.html b/api/symbols/Map.html index 515fc540d..22e2a5609 100644 --- a/api/symbols/Map.html +++ b/api/symbols/Map.html @@ -1,4 +1,4 @@ -Map | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Map<K, V>

                  Hierarchy

                  • Map
                  +Map | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Map<K, V>

                  Hierarchy

                  • Map

                  NOTE: For 2.0 the constructor arguments have changed. Map now optionally accepts a collection, and only checks types in TypeScript.

                  An unordered iterable collection of key/value pairs that cannot contain two instances of the same key. diff --git a/api/symbols/Margin.html b/api/symbols/Margin.html index 5e8fd3995..d1e7bdc57 100644 --- a/api/symbols/Margin.html +++ b/api/symbols/Margin.html @@ -1,4 +1,4 @@ -Margin | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Margin

                  Hierarchy

                  • Margin
                  +Margin | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Margin

                  Hierarchy

                  • Margin

                  A Margin represents a band of space outside or inside a rectangular area, with possibly different values on each of the four sides.

                  Example uses include GraphObject.margin, Panel.padding, and Diagram.padding.

                  diff --git a/api/symbols/Model.html b/api/symbols/Model.html index 38122c452..c0148bf3c 100644 --- a/api/symbols/Model.html +++ b/api/symbols/Model.html @@ -1,4 +1,4 @@ -Model | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Model

                  Hierarchy

                  +Model | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Model

                  Hierarchy

                  Models hold the essential data of a diagram, describing the basic entities and their properties and relationships without specifying the appearance and behavior of the Nodes and Links and Groups that represent them visually. Models tend to hold only relatively simple data, making them easy to persist by serialization as JSON or XML formatted text.

                  diff --git a/api/symbols/Node.html b/api/symbols/Node.html index eeacb70b3..3cb29612e 100644 --- a/api/symbols/Node.html +++ b/api/symbols/Node.html @@ -1,4 +1,4 @@ -Node | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Node

                  Hierarchy

                  +Node | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Node

                  Hierarchy

                  A Node is a Part that may connect to other nodes with Links, or that may be a member of a Group.

                  Group inherits from Node, diff --git a/api/symbols/NodeLabelDraggingTool.html b/api/symbols/NodeLabelDraggingTool.html index 70d9ba062..bfbc39a56 100644 --- a/api/symbols/NodeLabelDraggingTool.html +++ b/api/symbols/NodeLabelDraggingTool.html @@ -1,4 +1,4 @@ -NodeLabelDraggingTool | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class NodeLabelDraggingTool Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  • Tool
                    • NodeLabelDraggingTool
                  +NodeLabelDraggingTool | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class NodeLabelDraggingTool Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  • Tool
                    • NodeLabelDraggingTool

                  The NodeLabelDraggingTool class lets the user move a label on a Node.

                  This tool only works when the Node has a label (any GraphObject) marked with { _isNodeLabel: true } that is positioned in a Spot Panel. diff --git a/api/symbols/NonRealtimeDraggingTool.html b/api/symbols/NonRealtimeDraggingTool.html index 6720d1af3..856e1a267 100644 --- a/api/symbols/NonRealtimeDraggingTool.html +++ b/api/symbols/NonRealtimeDraggingTool.html @@ -1,4 +1,4 @@ -NonRealtimeDraggingTool | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class NonRealtimeDraggingTool Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  +NonRealtimeDraggingTool | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class NonRealtimeDraggingTool Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  The NonRealtimeDraggingTool class lets the user drag an image instead of actually moving any selected nodes, until the mouse-up event.

                  If you want to experiment with this extension, try the Non Realtime Dragging sample.

                  diff --git a/api/symbols/ObjectData.html b/api/symbols/ObjectData.html index 9a4a47691..d6be2cb06 100644 --- a/api/symbols/ObjectData.html +++ b/api/symbols/ObjectData.html @@ -1,4 +1,4 @@ -ObjectData | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Interface ObjectData

                  Hierarchy

                  • ObjectData
                  +ObjectData | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Interface ObjectData

                  Hierarchy

                  • ObjectData

                  The ObjectData type is the same as { [index: string]: any; }. This is to ease writing someDataObject.anyPropertyName, when dealing with arbitrary JavaScript Objects used as model data.

                  diff --git a/api/symbols/OrthogonalLinkReshapingTool.html b/api/symbols/OrthogonalLinkReshapingTool.html index 149c93fbd..32e1aa9ba 100644 --- a/api/symbols/OrthogonalLinkReshapingTool.html +++ b/api/symbols/OrthogonalLinkReshapingTool.html @@ -1,4 +1,4 @@ -OrthogonalLinkReshapingTool | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class OrthogonalLinkReshapingTool Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  +OrthogonalLinkReshapingTool | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class OrthogonalLinkReshapingTool Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  The OrthogonalLinkReshapingTool class lets a user drag a tool handle along the link segment, which will move the whole segment.

                  If you want to experiment with this extension, try the Orthogonal Link Reshaping sample.

                  Index

                  Inherited Members

                  Constructors

                  • diff --git a/api/symbols/Overview.html b/api/symbols/Overview.html index 596d61504..caefc9d43 100644 --- a/api/symbols/Overview.html +++ b/api/symbols/Overview.html @@ -1,4 +1,4 @@ -Overview | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class Overview

                    Hierarchy

                    +Overview | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class Overview

                    Hierarchy

                    An Overview is a Diagram that displays all of a different diagram, with a rectangular box showing the viewport displayed by that other diagram.

                    diff --git a/api/symbols/OverviewResizingTool.html b/api/symbols/OverviewResizingTool.html index eb9ee159d..a42a9be05 100644 --- a/api/symbols/OverviewResizingTool.html +++ b/api/symbols/OverviewResizingTool.html @@ -1,4 +1,4 @@ -OverviewResizingTool | GoJS API

                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class OverviewResizingTool Extension

                    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                    Hierarchy

                    +OverviewResizingTool | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class OverviewResizingTool Extension

                    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                    Hierarchy

                    The OverviewResizingTool class lets the user resize the box within an overview.

                    If you want to experiment with this extension, try the Overview Resizing sample.

                    Index

                    Constructors

                    Methods

                    Inherited Members

                    Constructors

                    • diff --git a/api/symbols/PackedLayout.html b/api/symbols/PackedLayout.html index 0417c9067..2304e94dd 100644 --- a/api/symbols/PackedLayout.html +++ b/api/symbols/PackedLayout.html @@ -1,4 +1,4 @@ -PackedLayout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PackedLayout Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +PackedLayout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PackedLayout Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      Custom layout which attempts to pack nodes as close together as possible without overlap. Each node is assumed to be either rectangular or circular (dictated by the hasCircularNodes property). This layout diff --git a/api/symbols/Palette.html b/api/symbols/Palette.html index 0ebf1b711..86be00082 100644 --- a/api/symbols/Palette.html +++ b/api/symbols/Palette.html @@ -1,4 +1,4 @@ -Palette | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Palette

                      Hierarchy

                      +Palette | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Palette

                      Hierarchy

                      Palette extends the Diagram class to allow objects to be dragged and placed onto other Diagrams. Its Diagram.layout is a GridLayout. The Palette is Diagram.isReadOnly but to support drag-and-drop its Diagram.allowDragOut is true.

                      diff --git a/api/symbols/Panel.html b/api/symbols/Panel.html index 05675419d..a540c7f4d 100644 --- a/api/symbols/Panel.html +++ b/api/symbols/Panel.html @@ -1,4 +1,4 @@ -Panel | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Panel

                      Hierarchy

                      +Panel | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Panel

                      Hierarchy

                      A Panel is a GraphObject that holds other GraphObjects as its elements. A Panel is responsible for sizing and positioning its elements. The elements of a panel are drawn in the order in which they appear in the elements collection.

                      diff --git a/api/symbols/PanelLayout.html b/api/symbols/PanelLayout.html index 66622d1d2..76a330bed 100644 --- a/api/symbols/PanelLayout.html +++ b/api/symbols/PanelLayout.html @@ -1,4 +1,4 @@ -PanelLayout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PanelLayout Abstract

                      Hierarchy

                      +PanelLayout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PanelLayout Abstract

                      Hierarchy

                      This is the abstract base class for all Panel Layouts, which inform the possible Panel types. It is possible to create your own Panel type by creating a subclass of PanelLayout, though this is not common and not recommended for beginners.

                      diff --git a/api/symbols/PanelLayoutFlow.html b/api/symbols/PanelLayoutFlow.html index d339ad81b..e14ed2d7e 100644 --- a/api/symbols/PanelLayoutFlow.html +++ b/api/symbols/PanelLayoutFlow.html @@ -1,4 +1,4 @@ -PanelLayoutFlow | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PanelLayoutFlow Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +PanelLayoutFlow | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PanelLayoutFlow Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      A custom PanelLayout that arranges panel elements in rows or columns. A typical use might be:

                      diff --git a/api/symbols/PanningTool.html b/api/symbols/PanningTool.html
                      index 5ada3630e..4c51af920 100644
                      --- a/api/symbols/PanningTool.html
                      +++ b/api/symbols/PanningTool.html
                      @@ -1,4 +1,4 @@
                      -PanningTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PanningTool

                      Hierarchy

                      +PanningTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PanningTool

                      Hierarchy

                      The PanningTool supports manual panning, where the user can shift the Diagram.position by dragging the mouse.

                      This tool is a standard mouse-move tool, the ToolManager.panningTool. diff --git a/api/symbols/ParallelLayout.html b/api/symbols/ParallelLayout.html index 3c6f5d72c..d45e5f612 100644 --- a/api/symbols/ParallelLayout.html +++ b/api/symbols/ParallelLayout.html @@ -1,4 +1,4 @@ -ParallelLayout | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ParallelLayout Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +ParallelLayout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ParallelLayout Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      A custom TreeLayout that can be used for laying out stylized flowcharts. Each layout requires a single "Split" node and a single "Merge" node. The "Split" node should be the root of a tree-like structure if one excludes links to the "Merge" node. diff --git a/api/symbols/ParallelRouteLink.html b/api/symbols/ParallelRouteLink.html index fa7b64fd2..a591c9fe6 100644 --- a/api/symbols/ParallelRouteLink.html +++ b/api/symbols/ParallelRouteLink.html @@ -1,4 +1,4 @@ -ParallelRouteLink | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ParallelRouteLink Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +ParallelRouteLink | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ParallelRouteLink Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      This custom Link class customizes its route to go parallel to other links connecting the same ports, if the link is not orthogonal and is not Bezier curved.

                      If you want to experiment with this extension, try the Parallel Route Links sample.

                      diff --git a/api/symbols/Part.html b/api/symbols/Part.html index f20b0c593..088980916 100644 --- a/api/symbols/Part.html +++ b/api/symbols/Part.html @@ -1,4 +1,4 @@ -Part | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Part

                      Hierarchy

                      +Part | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Part

                      Hierarchy

                      This is the base class for all user-manipulated top-level objects. Because it inherits from Panel, it is automatically a visual container of other GraphObjects. diff --git a/api/symbols/PathFigure.html b/api/symbols/PathFigure.html index fbd14973f..993d65667 100644 --- a/api/symbols/PathFigure.html +++ b/api/symbols/PathFigure.html @@ -1,4 +1,4 @@ -PathFigure | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PathFigure

                      Hierarchy

                      • PathFigure
                      +PathFigure | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PathFigure

                      Hierarchy

                      • PathFigure

                      A PathFigure represents a section of a Geometry. It is a single connected series of two-dimensional geometric PathSegments.

                      diff --git a/api/symbols/PathSegment.html b/api/symbols/PathSegment.html index 65b001209..35f0308c1 100644 --- a/api/symbols/PathSegment.html +++ b/api/symbols/PathSegment.html @@ -1,4 +1,4 @@ -PathSegment | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PathSegment

                      Hierarchy

                      • PathSegment
                      +PathSegment | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PathSegment

                      Hierarchy

                      • PathSegment

                      A PathSegment represents a straight line or curved segment of a path between two or more points that are part of a PathFigure. The very first point is given by the PathFigure.startX and PathFigure.startY properties. diff --git a/api/symbols/Picture.html b/api/symbols/Picture.html index 8bed6e415..0d7618240 100644 --- a/api/symbols/Picture.html +++ b/api/symbols/Picture.html @@ -1,4 +1,4 @@ -Picture | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Picture

                      Hierarchy

                      +Picture | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Picture

                      Hierarchy

                      A Picture is a GraphObject that shows an image, video-frame, or Canvas element.

                      You can specify what to show by either setting the source URL property to a URL string or the element property to an HTMLImageElement, diff --git a/api/symbols/Placeholder.html b/api/symbols/Placeholder.html index fa3d7ec7a..a413a4866 100644 --- a/api/symbols/Placeholder.html +++ b/api/symbols/Placeholder.html @@ -1,4 +1,4 @@ -Placeholder | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Placeholder

                      Hierarchy

                      +Placeholder | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Placeholder

                      Hierarchy

                      If a Placeholder is in the visual tree of a Group, it represents the area of all of the member Parts of that Group. If a Placeholder is in the visual tree of an Adornment, it represents the area of the Adornment.adornedObject. Unlike other GraphObjects, the Placeholder measures itself based on these criteria, and not on its own desiredSize or scale. diff --git a/api/symbols/Point.html b/api/symbols/Point.html index 2f23e49f8..8eb9ddc1f 100644 --- a/api/symbols/Point.html +++ b/api/symbols/Point.html @@ -1,4 +1,4 @@ -Point | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Point

                      Hierarchy

                      • Point
                      +Point | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Point

                      Hierarchy

                      • Point

                      A Point represents an x- and y-coordinate pair in two-dimensional space.

                      Use the static functions Point.parse and Point.stringify to convert to and from a standard string representation that is independent of the current locale.

                      diff --git a/api/symbols/PolygonDrawingTool.html b/api/symbols/PolygonDrawingTool.html index 622b3d17d..fac8262ad 100644 --- a/api/symbols/PolygonDrawingTool.html +++ b/api/symbols/PolygonDrawingTool.html @@ -1,4 +1,4 @@ -PolygonDrawingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PolygonDrawingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • PolygonDrawingTool
                      +PolygonDrawingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PolygonDrawingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • PolygonDrawingTool

                      The PolygonDrawingTool class lets the user draw a new polygon or polyline shape by clicking where the corners should go. Right click or type ENTER to finish the operation.

                      Set isPolygon to false if you want this tool to draw open unfilled polyline shapes. diff --git a/api/symbols/PolylineLinkingTool.html b/api/symbols/PolylineLinkingTool.html index a49ede723..e86660ab3 100644 --- a/api/symbols/PolylineLinkingTool.html +++ b/api/symbols/PolylineLinkingTool.html @@ -1,4 +1,4 @@ -PolylineLinkingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PolylineLinkingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +PolylineLinkingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PolylineLinkingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      The PolylineLinkingTool class the user to draw a new Link by clicking where the route should go, until clicking on a valid target port.

                      This tool supports routing both orthogonal and straight links. diff --git a/api/symbols/PortShiftingTool.html b/api/symbols/PortShiftingTool.html index 64bafb0db..2206b8a53 100644 --- a/api/symbols/PortShiftingTool.html +++ b/api/symbols/PortShiftingTool.html @@ -1,4 +1,4 @@ -PortShiftingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PortShiftingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • PortShiftingTool
                      +PortShiftingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class PortShiftingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • PortShiftingTool

                      The PortShiftingTool class lets a user move a port on a Node.

                      This tool only works when the Node has a port (any GraphObject) marked with a non-null and non-empty portId that is positioned in a Spot Panel, diff --git a/api/symbols/Quadtree.html b/api/symbols/Quadtree.html index e73523197..2b1b3b273 100644 --- a/api/symbols/Quadtree.html +++ b/api/symbols/Quadtree.html @@ -1,4 +1,4 @@ -Quadtree | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Quadtree<T> Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Quadtree
                      +Quadtree | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Quadtree<T> Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Quadtree

                      Implementation of the quadtree data structure using the Rect class. Each Quadtree has defined bounds found at bounds, an array of member rectangles, and an array of child nodes diff --git a/api/symbols/RadialLayout.html b/api/symbols/RadialLayout.html index 268d45ae6..a23425b53 100644 --- a/api/symbols/RadialLayout.html +++ b/api/symbols/RadialLayout.html @@ -1,4 +1,4 @@ -RadialLayout | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RadialLayout Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +RadialLayout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RadialLayout Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      Given a root Node, this arranges connected nodes in concentric rings, layered by the minimum link distance from the root.

                      If you want to experiment with this extension, try the Radial Layout sample.

                      diff --git a/api/symbols/RealtimeDragSelectingTool.html b/api/symbols/RealtimeDragSelectingTool.html index 70b7014c0..c20aa2100 100644 --- a/api/symbols/RealtimeDragSelectingTool.html +++ b/api/symbols/RealtimeDragSelectingTool.html @@ -1,4 +1,4 @@ -RealtimeDragSelectingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RealtimeDragSelectingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +RealtimeDragSelectingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RealtimeDragSelectingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      The RealtimeDragSelectingTool class lets the user select and deselect Parts within the DragSelectingTool.box during a drag, not just at the end of the drag.

                      If you want to experiment with this extension, try the Realtime Drag Selecting sample.

                      diff --git a/api/symbols/Rect.html b/api/symbols/Rect.html index 5c95b0975..e83a88610 100644 --- a/api/symbols/Rect.html +++ b/api/symbols/Rect.html @@ -1,4 +1,4 @@ -Rect | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Rect

                      Hierarchy

                      • Rect
                      +Rect | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Rect

                      Hierarchy

                      • Rect

                      A Rect describes a rectangular two-dimensional area as a top-left point (x and y values) and a size (width and height values).

                      Use the static functions Rect.parse and Rect.stringify to convert to and from diff --git a/api/symbols/RelinkingTool.html b/api/symbols/RelinkingTool.html index 76a61267c..f0b300209 100644 --- a/api/symbols/RelinkingTool.html +++ b/api/symbols/RelinkingTool.html @@ -1,4 +1,4 @@ -RelinkingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RelinkingTool

                      Hierarchy

                      +RelinkingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RelinkingTool

                      Hierarchy

                      The RelinkingTool allows the user to reconnect an existing Link if the Link.relinkableTo and/or Link.relinkableFrom properties are true.

                      diff --git a/api/symbols/RescalingTool.html b/api/symbols/RescalingTool.html index dd93ff6ad..a04bdffd3 100644 --- a/api/symbols/RescalingTool.html +++ b/api/symbols/RescalingTool.html @@ -1,4 +1,4 @@ -RescalingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RescalingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +RescalingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class RescalingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      A custom tool for rescaling an object.

                      Install the RescalingTool as a mouse-down tool by calling: myDiagram.toolManager.mouseDownTools.add(new RescalingTool());

                      diff --git a/api/symbols/ResizeMultipleTool.html b/api/symbols/ResizeMultipleTool.html index 8bf4084bc..3f9652f2d 100644 --- a/api/symbols/ResizeMultipleTool.html +++ b/api/symbols/ResizeMultipleTool.html @@ -1,4 +1,4 @@ -ResizeMultipleTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ResizeMultipleTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +ResizeMultipleTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ResizeMultipleTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      The ResizeMultipleTool class lets the user resize multiple objects at once.

                      If you want to experiment with this extension, try the Resize Multiple sample.

                      Index

                      Constructors

                      Methods

                      Inherited Members

                      Constructors

                      • diff --git a/api/symbols/ResizingTool.html b/api/symbols/ResizingTool.html index c597ced6f..4fb2ea1ee 100644 --- a/api/symbols/ResizingTool.html +++ b/api/symbols/ResizingTool.html @@ -1,4 +1,4 @@ -ResizingTool | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class ResizingTool

                        Hierarchy

                        +ResizingTool | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class ResizingTool

                        Hierarchy

                        The ResizingTool is used to interactively change the size of a GraphObject in the selected Part or Node by setting its GraphObject.desiredSize property. You may want to save the size to the model by using a TwoWay Binding on the "desiredSize" property diff --git a/api/symbols/Robot.html b/api/symbols/Robot.html index 1b5e593f5..622647e0b 100644 --- a/api/symbols/Robot.html +++ b/api/symbols/Robot.html @@ -1,4 +1,4 @@ -Robot | GoJS API

                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class Robot Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        • Robot
                        +Robot | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class Robot Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        • Robot

                        A class for simulating mouse and keyboard input.

                        As a special hack, this supports limited simulation of drag-and-drop between Diagrams, by setting both the sourceDiagram and targetDiagram properties diff --git a/api/symbols/RotateMultipleTool.html b/api/symbols/RotateMultipleTool.html index 1fb2a8da0..de79289da 100644 --- a/api/symbols/RotateMultipleTool.html +++ b/api/symbols/RotateMultipleTool.html @@ -1,4 +1,4 @@ -RotateMultipleTool | GoJS API

                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RotateMultipleTool Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        +RotateMultipleTool | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RotateMultipleTool Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        The RotateMultipleTool class lets the user rotate multiple objects at a time. When more than one part is selected, rotates all parts, revolving them about their collective center. If the control key is held down during rotation, rotates all parts individually.

                        diff --git a/api/symbols/RotatingTool.html b/api/symbols/RotatingTool.html index 8a62bca82..7920b20e7 100644 --- a/api/symbols/RotatingTool.html +++ b/api/symbols/RotatingTool.html @@ -1,4 +1,4 @@ -RotatingTool | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RotatingTool

                        Hierarchy

                        +RotatingTool | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RotatingTool

                        Hierarchy

                        The RotatingTool is used to interactively change the GraphObject.angle of a GraphObject by setting its GraphObject.angle property. You may want to save the angle to the model by using a TwoWay Binding on the "angle" property diff --git a/api/symbols/RowColumnDefinition.html b/api/symbols/RowColumnDefinition.html index a4ec9ebc3..01f4e94a9 100644 --- a/api/symbols/RowColumnDefinition.html +++ b/api/symbols/RowColumnDefinition.html @@ -1,4 +1,4 @@ -RowColumnDefinition | GoJS API

                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RowColumnDefinition

                        Hierarchy

                        • RowColumnDefinition
                        +RowColumnDefinition | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RowColumnDefinition

                        Hierarchy

                        • RowColumnDefinition

                        The RowColumnDefinition class describes constraints on a row or a column in a Panel of type Panel.Table. It also provides information about the actual layout after the diff --git a/api/symbols/RowResizingTool.html b/api/symbols/RowResizingTool.html index cf9fed399..570c184c2 100644 --- a/api/symbols/RowResizingTool.html +++ b/api/symbols/RowResizingTool.html @@ -1,4 +1,4 @@ -RowResizingTool | GoJS API

                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RowResizingTool Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        +RowResizingTool | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class RowResizingTool Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        The RowResizingTool class lets the user resize each row of a named Table Panel in a selected Part.

                        If you want to experiment with this extension, try the Column Resizing sample.

                        Index

                        Inherited Members

                        Constructors

                        • diff --git a/api/symbols/SectorReshapingTool.html b/api/symbols/SectorReshapingTool.html index 10bd08b40..c86eb31b5 100644 --- a/api/symbols/SectorReshapingTool.html +++ b/api/symbols/SectorReshapingTool.html @@ -1,4 +1,4 @@ -SectorReshapingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SectorReshapingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Tool
                            • SectorReshapingTool
                          +SectorReshapingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SectorReshapingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Tool
                            • SectorReshapingTool

                          The SectorReshapingTool class lets the user interactively modify the angles of a "pie"-shaped sector of a circle. When a node is selected, this shows two handles for changing the angles of the sides of the sector and one handle for changing the radius.

                          This depends on there being three data properties, "angle", "sweep", and "radius", diff --git a/api/symbols/SerpentineLayout.html b/api/symbols/SerpentineLayout.html index e2bec732b..864fb7212 100644 --- a/api/symbols/SerpentineLayout.html +++ b/api/symbols/SerpentineLayout.html @@ -1,4 +1,4 @@ -SerpentineLayout | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SerpentineLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +SerpentineLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SerpentineLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          A custom Layout that lays out a chain of nodes in a snake-like fashion.

                          This layout assumes the graph is a chain of Nodes, positioning nodes in horizontal rows back and forth, alternating between left-to-right diff --git a/api/symbols/Set.html b/api/symbols/Set.html index 021391647..8124942e0 100644 --- a/api/symbols/Set.html +++ b/api/symbols/Set.html @@ -1,4 +1,4 @@ -Set | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Set<T>

                          Hierarchy

                          • Set
                          +Set | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Set<T>

                          Hierarchy

                          • Set

                          NOTE: For 2.0 the constructor argument has changed. Set now optionally accepts a collection, and only checks types in TypeScript.

                          An unordered iterable collection that cannot contain two instances of the same value. diff --git a/api/symbols/Shape.html b/api/symbols/Shape.html index 384b0d7de..7a99db773 100644 --- a/api/symbols/Shape.html +++ b/api/symbols/Shape.html @@ -1,4 +1,4 @@ -Shape | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Shape

                          Hierarchy

                          +Shape | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Shape

                          Hierarchy

                          A Shape is a GraphObject that shows a geometric figure. The Geometry determines what is drawn; the properties fill and stroke diff --git a/api/symbols/Size.html b/api/symbols/Size.html index 8961ffd97..315279ff3 100644 --- a/api/symbols/Size.html +++ b/api/symbols/Size.html @@ -1,4 +1,4 @@ -Size | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Size

                          Hierarchy

                          • Size
                          +Size | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Size

                          Hierarchy

                          • Size

                          A Size describes a width and a height in two-dimensional coordinates. The width and height must both be non-negative.

                          Use the static functions Size.parse and Size.stringify to convert to and from diff --git a/api/symbols/SnapLinkReshapingTool.html b/api/symbols/SnapLinkReshapingTool.html index a5239253a..9367b3d01 100644 --- a/api/symbols/SnapLinkReshapingTool.html +++ b/api/symbols/SnapLinkReshapingTool.html @@ -1,4 +1,4 @@ -SnapLinkReshapingTool | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SnapLinkReshapingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +SnapLinkReshapingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SnapLinkReshapingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          The SnapLinkReshapingTool class lets the user snap link reshaping handles to the nearest grid point. If avoidsNodes is true and the link is orthogonal, it also avoids reshaping the link so that any adjacent segments cross over any avoidable nodes.

                          diff --git a/api/symbols/SpiralLayout.html b/api/symbols/SpiralLayout.html index f815bac18..927a16584 100644 --- a/api/symbols/SpiralLayout.html +++ b/api/symbols/SpiralLayout.html @@ -1,4 +1,4 @@ -SpiralLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SpiralLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +SpiralLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SpiralLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          A custom Layout that lays out a chain of nodes in a spiral.

                          This layout assumes the graph is a chain of Nodes, spacing controls the spacing between nodes.

                          diff --git a/api/symbols/Spot.html b/api/symbols/Spot.html index 62590929d..cbc866eeb 100644 --- a/api/symbols/Spot.html +++ b/api/symbols/Spot.html @@ -1,4 +1,4 @@ -Spot | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Spot

                          Hierarchy

                          • Spot
                          +Spot | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Spot

                          Hierarchy

                          • Spot

                          A Spot represents a relative point from (0,0) to (1,1) within the bounds of a rectangular area plus an absolute offset.

                          Use the static functions Spot.parse and Spot.stringify to convert to and from diff --git a/api/symbols/SpotRotatingTool.html b/api/symbols/SpotRotatingTool.html index a70f11826..bd1b92116 100644 --- a/api/symbols/SpotRotatingTool.html +++ b/api/symbols/SpotRotatingTool.html @@ -1,4 +1,4 @@ -SpotRotatingTool | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SpotRotatingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +SpotRotatingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SpotRotatingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          A custom RotatingTool that also supports the user moving the point about which the object is rotated.

                          This tool uses two separate Adornments -- the regular one holding the rotation handle and an additional one named "MovingSpot" that holds the handle for interactively moving the diff --git a/api/symbols/SwimLaneLayout.html b/api/symbols/SwimLaneLayout.html index 0ba73a7f6..c7e7ef6a9 100644 --- a/api/symbols/SwimLaneLayout.html +++ b/api/symbols/SwimLaneLayout.html @@ -1,4 +1,4 @@ -SwimLaneLayout | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SwimLaneLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +SwimLaneLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class SwimLaneLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          A custom LayeredDigraphLayout that knows about "lanes" and that positions each node in its respective lane.

                          This assumes that each Node.data.lane property is a string that names the lane the node should be in. diff --git a/api/symbols/TableLayout.html b/api/symbols/TableLayout.html index 9d7b73d84..3229de11b 100644 --- a/api/symbols/TableLayout.html +++ b/api/symbols/TableLayout.html @@ -1,4 +1,4 @@ -TableLayout | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TableLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +TableLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TableLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          This Layout positions non-Link Parts into a table according to the values of GraphObject.row, GraphObject.column, GraphObject.rowSpan, GraphObject.columnSpan, GraphObject.alignment, GraphObject.stretch. diff --git a/api/symbols/TextBlock.html b/api/symbols/TextBlock.html index 1b7c69133..b1388aee9 100644 --- a/api/symbols/TextBlock.html +++ b/api/symbols/TextBlock.html @@ -1,4 +1,4 @@ -TextBlock | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TextBlock

                          Hierarchy

                          +TextBlock | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TextBlock

                          Hierarchy

                          A TextBlock is a GraphObject that displays a text string in a given font.

                          The size and appearance of the text is specified by font, which takes a well-formed CSS string as its value. diff --git a/api/symbols/TextEditingTool.html b/api/symbols/TextEditingTool.html index ea391720b..d3e15478f 100644 --- a/api/symbols/TextEditingTool.html +++ b/api/symbols/TextEditingTool.html @@ -1,4 +1,4 @@ -TextEditingTool | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TextEditingTool

                          Hierarchy

                          +TextEditingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TextEditingTool

                          Hierarchy

                          The TextEditingTool is used to let the user interactively edit text in place. This sets the TextBlock.text property; you may want to save the changed text to the model by using a TwoWay Binding on the "text" property of editable TextBlocks.

                          diff --git a/api/symbols/Tool.html b/api/symbols/Tool.html index dd40eb010..942094f48 100644 --- a/api/symbols/Tool.html +++ b/api/symbols/Tool.html @@ -1,4 +1,4 @@ -Tool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Tool Abstract

                          Hierarchy

                          +Tool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Tool Abstract

                          Hierarchy

                          Tools handle mouse, keyboard, and touch events. The currently running tool, Diagram.currentTool, receives all input events from the Diagram via canonicalized InputEvents.

                          diff --git a/api/symbols/ToolManager.html b/api/symbols/ToolManager.html index ecb649fb7..2ec6725b5 100644 --- a/api/symbols/ToolManager.html +++ b/api/symbols/ToolManager.html @@ -1,4 +1,4 @@ -ToolManager | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ToolManager

                          Hierarchy

                          +ToolManager | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ToolManager

                          Hierarchy

                          This special Tool is responsible for managing all of the Diagram's mode-less tools, which you can access as the Diagram.toolManager.

                          Mode-less tools are tools that are present in one of the following lists: diff --git a/api/symbols/Transaction.html b/api/symbols/Transaction.html index c95e7862f..8455471c0 100644 --- a/api/symbols/Transaction.html +++ b/api/symbols/Transaction.html @@ -1,4 +1,4 @@ -Transaction | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Transaction

                          Hierarchy

                          • Transaction
                          +Transaction | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Transaction

                          Hierarchy

                          • Transaction

                          A Transaction holds a list of ChangedEvents collected during a transaction, as the value of the read-only changes property.

                          Start a transaction by calling UndoManager.startTransaction diff --git a/api/symbols/TreeEdge.html b/api/symbols/TreeEdge.html index d3ece7eea..3a7704570 100644 --- a/api/symbols/TreeEdge.html +++ b/api/symbols/TreeEdge.html @@ -1,4 +1,4 @@ -TreeEdge | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TreeEdge

                          Hierarchy

                          +TreeEdge | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class TreeEdge

                          Hierarchy

                          This holds TreeLayout-specific information about Links.

                          This class inherits from LayoutEdge.

                          Index

                          Inherited Members

                          Constructors

                          • diff --git a/api/symbols/TreeLayout.html b/api/symbols/TreeLayout.html index ec27c1753..303a15a29 100644 --- a/api/symbols/TreeLayout.html +++ b/api/symbols/TreeLayout.html @@ -1,4 +1,4 @@ -TreeLayout | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class TreeLayout

                            Hierarchy

                            +TreeLayout | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class TreeLayout

                            Hierarchy

                            This layout positions nodes of a tree-structured graph in layers (rows or columns).

                            For a discussion and examples of the most commonly used properties, see Trees page in the Introduction. @@ -81,10 +81,10 @@ does not modify the size or shape of any node, the nodes will just be laid out in a line, one per row, and the breadth is determined by the broadest node. -The distance between rows is specified by rowSpacing. +The distance between rows is specified by alternateRowSpacing. To make room for the links that go around earlier rows to get to later rows, when the alignment is not a "center" alignment, the -rowIndent property specifies that space at the +alternateRowIndent property specifies that space at the start of each row. This sets the alternateDefaults' property of the same name.

                          • @@ -126,18 +126,19 @@

                            The default value is 50.

                            This is the distance between a parent node and its first row of children, in case there are multiple rows of its children. -The rowSpacing property determines the distance +The alternateNodeSpacing property determines the distance between siblings. +The alternateRowSpacing property determines the distance between rows of children. Negative values may cause children to overlap with the parent. This sets the alternateDefaults' property of the same name.

                          • Gets or sets the alternate fraction of the node's depth for which the children's layer starts overlapped with the parent's layer.

                            -

                            The default value is 0.0 -- there is overlap between layers only if layerSpacing is negative. -A value of 1.0 and a zero layerSpacing will cause child nodes to completely overlap the parent.

                            +

                            The default value is 0.0 -- there is overlap between layers only if alternateLayerSpacing is negative. +A value of 1.0 and a zero alternateLayerSpacing will cause child nodes to completely overlap the parent.

                            A value greater than zero may still cause overlap between layers, -unless the value of layerSpacing is large enough. +unless the value of alternateLayerSpacing is large enough. A value of zero might still allow overlap between layers, -if layerSpacing is negative. +if alternateLayerSpacing is negative. This sets the alternateDefaults' property of the same name.

                          • Gets or sets the alternate indentation of the first child.

                            @@ -150,9 +151,9 @@ you can set this to be the breadth of the parent node. This sets the alternateDefaults' property of the same name.

                        • -

                          Gets or sets the fraction of this node's breadth is added to nodeIndent +

                          Gets or sets the fraction of this node's breadth is added to alternateNodeIndent to determine any spacing at the start of the children.

                          -

                          The default value is 0.0 -- the only indentation is specified by nodeIndent. +

                          The default value is 0.0 -- the only indentation is specified by alternateNodeIndent. When the value is 1.0, the children will be indented past the breadth of the parent node.

                          This property is only sensible when the alignment is AlignmentStart or AlignmentEnd.

                          @@ -182,7 +183,7 @@

                          The default value is 25.

                          This property is only used when there is more than one row of children for a given parent node. -layerSpacing determines the distance between +The alternateLayerSpacing property determines the distance between the parent node and its first row of child nodes. This sets the alternateDefaults' property of the same name.

                        • @@ -190,14 +191,14 @@ ToSpot for each child node port.

                          The default value is true -- this may modify the spot of the ports of the children nodes, if the node has only a single port.

                          -

                          The spot used depends on the value of childPortSpot. +

                          The spot used depends on the value of alternateChildPortSpot. This sets the alternateDefaults' property of the same name.

                        • Gets or sets whether the TreeLayout should set the FromSpot for this parent node port.

                          The default value is true -- this may modify the spot of the port of this node, the parent, if the node has only a single port.

                          -

                          The spot used depends on the value of portSpot. +

                          The spot used depends on the value of alternatePortSpot. This sets the alternateDefaults' property of the same name.

                        • Gets or sets the alternate sorting policy for ordering the immediate children of a vertex. @@ -210,8 +211,8 @@

                          Gets or sets the default direction for tree growth.

                          The default value is 0; the value must be one of: 0, 90, 180, 270.

                          These values are in degrees, where 0 is along the positive X axis, -and where 90 is along the positive Y axis. -This sets the rootDefaults' property of the same name.

                          +and where 90 is along the positive Y axis.

                          +

                          This sets the rootDefaults' property of the same name.

                      • Gets or sets the spot that children nodes' ports get as their ToSpot.

                        The default value is Spot.Default.

                        @@ -248,18 +249,18 @@ to assign a ToSpot based on the parent node's TreeVertex.angle. If the value is other than NoSpot, it is just assigned. When path is PathSource, -the port's FromSpot is set instead of the ToSpot. -This sets the rootDefaults' property of the same name.

                        +the port's FromSpot is set instead of the ToSpot.

                        +

                        This sets the rootDefaults' property of the same name.

                      • Gets or sets whether this layout should find all Nodes whose category is "Comment" and @@ -281,13 +282,13 @@

                    • Gets or sets the distance between a parent node and its children.

                      -

                      The default value is 50.

                      -

                      This is the distance between a parent node and its first row -of children, in case there are multiple rows of its children. -The rowSpacing property determines the distance -between rows of children. +

                      This is the distance between a parent node and the layer of its children. Negative values may cause children to overlap with the parent. -This sets the rootDefaults' property of the same name.

                      +The default value is 50.

                      +

                      The nodeSpacing property determines the distance between siblings. +The rowSpacing property determines the distance +between multiple rows or columns of children.

                      +

                      This sets the rootDefaults' property of the same name.

                    • Gets or sets the fraction of the node's depth for which the children's layer starts overlapped with the parent's layer.

                      The default value is 0.0 -- there is overlap between layers only if layerSpacing is negative. @@ -295,8 +296,8 @@

                      A value greater than zero may still cause overlap between layers, unless the value of layerSpacing is large enough. A value of zero might still allow overlap between layers, -if layerSpacing is negative. -This sets the rootDefaults' property of the same name.

                      +if layerSpacing is negative.

                      +

                      This sets the rootDefaults' property of the same name.

                    • Gets or sets the manner in which the nodes are aligned in layers. Must be TreeLayout.LayerIndividual, TreeLayout.LayerSiblings, @@ -311,21 +312,23 @@ Having a positive value is useful if you want to reserve space at the start of the row of children for some reason. For example, if you want to pretend the parent node is infinitely deep, -you can set this to be the breadth of the parent node. -This sets the rootDefaults' property of the same name.

                      +you can set this to be the breadth of the parent node.

                      +

                      This sets the rootDefaults' property of the same name.

                  • Gets or sets the fraction of this node's breadth is added to nodeIndent to determine any spacing at the start of the children.

                    The default value is 0.0 -- the only indentation is specified by nodeIndent. When the value is 1.0, the children will be indented past the breadth of the parent node.

                    This property is only sensible when the alignment -is AlignmentStart or AlignmentEnd. -This sets the rootDefaults' property of the same name.

                    +is AlignmentStart or AlignmentEnd.

                    +

                    This sets the rootDefaults' property of the same name.

                  • Gets or sets the distance between child nodes.

                    -

                    The default value is 20.

                    -

                    A negative value causes sibling nodes to overlap. -This sets the rootDefaults' property of the same name.

                    +

                    This is the distance between sibling nodes. +A negative value causes sibling nodes to overlap. +The default value is 20.

                    +

                    The layerSpacing property determines the distance between a parent node and the layer of its children.

                    +

                    This sets the rootDefaults' property of the same name.

                  • Gets or sets how the tree should be constructed from the TreeEdges connecting TreeVertexes. @@ -339,8 +342,8 @@ to assign a FromSpot based on the parent node's TreeVertex.angle. If the value is other than NoSpot, it is just assigned. When path is PathSource, -the port's ToSpot is set instead of the FromSpot. -This sets the rootDefaults' property of the same name.

                    +the port's ToSpot is set instead of the FromSpot.

                    +

                    This sets the rootDefaults' property of the same name.

                • Gets or sets the object holding the default values for root TreeVertexes.

                  The values for the following inheritable properties are actually stored in this object: @@ -364,30 +367,31 @@ if the alignment is not a "Center" alignment.

                  The default value is 10. The value should be non-negative.

                  This is used to leave room for the links that connect a parent node -with the child nodes that are in additional rows. -This sets the rootDefaults' property of the same name.

                  +with the child nodes that are in additional rows.

                  +

                  This sets the rootDefaults' property of the same name.

                • -

                  Gets or sets the distance between rows of children.

                  +

                  Gets or sets the distance between rows or columns of a parent node's immediate children.

                  The default value is 25.

                  This property is only used when there is more than one row of children for a given parent node. -layerSpacing determines the distance between -the parent node and its first row of child nodes. -This sets the rootDefaults' property of the same name.

                  +The nodeSpacing property determines the distance between siblings. +The layerSpacing property determines the distance between +the parent node and its first row or column of child nodes.

                  +

                  This sets the rootDefaults' property of the same name.

                • Gets or sets whether the TreeLayout should set the ToSpot for each child node port.

                  The default value is true -- this may modify the spot of the ports of the children nodes, if the node has only a single port.

                  -

                  The spot used depends on the value of childPortSpot. -This sets the rootDefaults' property of the same name.

                  +

                  The spot used depends on the value of childPortSpot.

                  +

                  This sets the rootDefaults' property of the same name.

                • Gets or sets whether the TreeLayout should set the FromSpot for this parent node port.

                  The default value is true -- this may modify the spot of the port of this node, the parent, if the node has only a single port.

                  -

                  The spot used depends on the value of portSpot. -This sets the rootDefaults' property of the same name.

                  +

                  The spot used depends on the value of portSpot.

                  +

                  This sets the rootDefaults' property of the same name.

                • Gets or sets the default sorting policy for ordering the immediate children of a vertex. Must be TreeLayout.SortingForwards, TreeLayout.SortingReverse, diff --git a/api/symbols/TreeMapLayout.html b/api/symbols/TreeMapLayout.html index f49c96bd2..b3ab92830 100644 --- a/api/symbols/TreeMapLayout.html +++ b/api/symbols/TreeMapLayout.html @@ -1,4 +1,4 @@ -TreeMapLayout | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class TreeMapLayout Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  +TreeMapLayout | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class TreeMapLayout Extension

                  This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                  Hierarchy

                  A custom Layout that lays out hierarchical data using nested rectangles.

                  If you want to experiment with this extension, try the Tree Map Layout sample.

                  Index

                  Inherited Members

                  Constructors

                  • diff --git a/api/symbols/TreeModel.html b/api/symbols/TreeModel.html index b31eba9e0..97c8c650e 100644 --- a/api/symbols/TreeModel.html +++ b/api/symbols/TreeModel.html @@ -1,4 +1,4 @@ -TreeModel | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class TreeModel

                    Hierarchy

                    +TreeModel | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class TreeModel

                    Hierarchy

                    TreeModels support tree-structured graphs of nodes and links. Each node can have at most one "tree parent"; cycles are not permitted. The reference to the parent node's key is a property of the child node data.

                    diff --git a/api/symbols/TreeNetwork.html b/api/symbols/TreeNetwork.html index 9a8a5ab7f..729c92865 100644 --- a/api/symbols/TreeNetwork.html +++ b/api/symbols/TreeNetwork.html @@ -1,4 +1,4 @@ -TreeNetwork | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class TreeNetwork

                    Hierarchy

                    +TreeNetwork | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class TreeNetwork

                    Hierarchy

                    This class represents an abstract graph of TreeVertexes and TreeEdges that can be constructed based on the Nodes and Links of a Diagram so that the TreeLayout can operate independently of the diagram until it diff --git a/api/symbols/TreeVertex.html b/api/symbols/TreeVertex.html index bb13487ed..20a681f75 100644 --- a/api/symbols/TreeVertex.html +++ b/api/symbols/TreeVertex.html @@ -1,4 +1,4 @@ -TreeVertex | GoJS API

                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class TreeVertex

                    Hierarchy

                    +TreeVertex | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class TreeVertex

                    Hierarchy

                    This holds TreeLayout-specific information about Nodes.

                    This class inherits from LayoutVertex.

                    Index

                    Inherited Members

                    Constructors

                    • diff --git a/api/symbols/UndoManager.html b/api/symbols/UndoManager.html index f7a6712ff..148d56182 100644 --- a/api/symbols/UndoManager.html +++ b/api/symbols/UndoManager.html @@ -1,4 +1,4 @@ -UndoManager | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class UndoManager

                      Hierarchy

                      • UndoManager
                      +UndoManager | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class UndoManager

                      Hierarchy

                      • UndoManager

                      An UndoManager observes and records model and diagram changes in transactions and supports undo/redo operations. You will need to set the isEnabled property to true in order for diff --git a/api/symbols/ZoomSlider.html b/api/symbols/ZoomSlider.html index e1627a831..61310b8ae 100644 --- a/api/symbols/ZoomSlider.html +++ b/api/symbols/ZoomSlider.html @@ -1,4 +1,4 @@ -ZoomSlider | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ZoomSlider Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • ZoomSlider
                      +ZoomSlider | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class ZoomSlider Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • ZoomSlider

                      This class implements a zoom slider for GoJS diagrams. The constructor takes two arguments:

                        diff --git a/assets/css/style.css b/assets/css/style.css index 19d12eee3..b0c417547 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1 +1 @@ -/*! tailwindcss v2.0.3 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,::after,::before{box-sizing:border-box}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji'}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}body{font-size:.875rem;line-height:1.25rem;line-height:1.5;letter-spacing:0}img{aspect-ratio:attr(width)/attr(height)}.box{margin:1rem;padding:1rem}.bg-danger{--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity))}.bg-info{--tw-bg-opacity:1;background-color:rgba(254,243,199,var(--tw-bg-opacity))}.diagramStyling{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}h1{font-weight:700;font-size:2.25rem;line-height:2.5rem;line-height:1;margin-bottom:.75rem}h2{font-weight:700;font-size:1.875rem;line-height:2.25rem;line-height:1;margin-bottom:.75rem}h3{font-weight:600;font-size:1.5rem;line-height:2rem;line-height:1;margin-bottom:.75rem}h4{font-weight:600;font-size:1.25rem;line-height:1.75rem;line-height:1;margin-bottom:.75rem}a{--tw-text-opacity:1;color:rgba(3,102,214,var(--tw-text-opacity));text-decoration:none;transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms;transition-duration:.2s}a:hover{--tw-text-opacity:1;color:rgba(31,73,99,var(--tw-text-opacity));box-shadow:0 -1px 0 0 #fff inset,0 -2px 0 0 rgba(31,73,99,.45) inset}.button a,.sidebar-nav a,.topnav-link a{--tw-text-opacity:1;color:rgba(98,127,145,var(--tw-text-opacity))}.button a:hover,.sidebar-nav a:hover,.topnav-link a:hover{box-shadow:inherit}footer a{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity));box-shadow:0 -1px 0 0 rgba(255,255,255,.35) inset,0 -2px 0 0 rgba(31,73,99,.45) inset}footer a:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}ol,p,ul{padding-bottom:.75rem}ol,ul{list-style-position:inside;list-style-type:disc;padding-left:1rem;padding-right:1rem}input,textarea{--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity));border-radius:.125rem;border-width:1px;padding:.5rem}select{--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity));border-radius:.125rem;border-width:1px}pre{background:#272822;padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em;color:#fff}code[class*=lang],pre[class*=lang],pre[class*=lang] code{background:#272822;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo,Monaco,Consolas,"Andale Mono","Ubuntu Mono","Courier New",monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity));border-radius:.125rem}canvas:focus{outline:2px solid transparent;outline-offset:2px}.button,button{--tw-bg-opacity:1;background-color:rgba(31,73,99,var(--tw-bg-opacity));border-radius:.25rem;display:inline-block;margin:.25rem;padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;padding-right:.5rem;--tw-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.button:hover,button:hover{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity));--tw-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity));transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms;transition-duration:.2s}.bigger{font-weight:700;margin-top:.5rem;margin-bottom:.5rem;padding-top:1rem;padding-bottom:1rem;padding-left:1rem;padding-right:1rem}.sidebar-nav>a{border-radius:.5rem;display:block;font-weight:600;padding-top:.25rem;padding-bottom:.25rem;padding-left:1rem;padding-right:1rem}.sidebar-nav>a:hover{--tw-bg-opacity:1;background-color:rgba(31,73,99,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.topnav-link{border-radius:.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:.5rem;padding-right:.5rem;--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.topnav-link:hover{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity));--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.sample-item{margin-top:.5rem;margin-bottom:.5rem;padding-left:.5rem;padding-right:.5rem;width:15rem}.sample-item-inner{--tw-bg-opacity:1;background-color:rgba(249,250,251,var(--tw-bg-opacity));border-radius:.5rem;height:100%;overflow:hidden;--tw-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1),0 4px 6px -2px rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.sample-item-inner h2{font-size:1.125rem;line-height:1.75rem;padding-top:.5rem;padding-left:1rem}.sample-item-inner p{justify-content:space-between;line-height:1.25;padding:.5rem}.sample-item img{display:block;width:224px;height:224px}.feature-grid div{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity));border-top-width:1px;margin-top:2rem;padding-top:2rem}.feature-grid:nth-child(n)>:first-child,.feature-grid:nth-child(n)>:nth-child(2){border-top-width:0;margin-top:0;padding-top:0}@media (min-width:1024px){.feature-grid:nth-child(n)>:nth-child(3){border-top-width:0;margin-top:0;padding-top:0}}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-nwoods-primary{--tw-bg-opacity:1;background-color:rgba(31,73,99,var(--tw-bg-opacity))}.bg-nwoods-secondary{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity))}.hover\:bg-nwoods-secondary:hover{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity))}.border-collapse{border-collapse:collapse}.border-gray-600{--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity))}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-b{border-bottom-width:1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-grow{flex-grow:1}.flex-shrink-0{flex-shrink:0}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-6{height:1.5rem}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.leading-none{line-height:1}.leading-tight{line-height:1.25}.leading-normal{line-height:1.5}.list-none{list-style-type:none}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mt-6{margin-top:1.5rem}.mb-8{margin-bottom:2rem}.max-w-5xl{max-width:64rem}.max-w-screen-lg{max-width:1024px}.max-w-screen-xl{max-width:1280px}.min-h-screen{min-height:100vh}.opacity-0{opacity:0}.opacity-50{opacity:.5}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.overflow-hidden{overflow:hidden}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.py-0{padding-top:0;padding-bottom:0}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-12{padding-left:3rem;padding-right:3rem}.pb-0{padding-bottom:0}.pt-4{padding-top:1rem}.pb-4{padding-bottom:1rem}.pt-6{padding-top:1.5rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-16{padding-bottom:4rem}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.resize{resize:both}*{--tw-shadow:0 0 #0000}.shadow{--tw-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.1),0 1px 2px 0 rgba(0, 0, 0, 0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1),0 4px 6px -2px rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}*{--tw-ring-inset:var(--tw-empty, );/*!*//*!*/--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59, 130, 246, 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.text-center{text-align:center}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-nwoods-secondary{--tw-text-opacity:1;color:rgba(98,127,145,var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.italic{font-style:italic}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.underline{text-decoration:underline}.no-underline{text-decoration:none}.hover\:no-underline:hover{text-decoration:none}.tracking-normal{letter-spacing:0}.tracking-wide{letter-spacing:.025em}.visible{visibility:visible}.invisible{visibility:hidden}.break-words{overflow-wrap:break-word}.w-6{width:1.5rem}.w-12{width:3rem}.w-64{width:16rem}.w-auto{width:auto}.w-4\/5{width:80%}.w-5\/6{width:83.333333%}.w-full{width:100%}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.gap-y-10{row-gap:2.5rem}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.row-span-2{grid-row:span 2/span 2}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{100%,75%{transform:scale(2);opacity:0}}@keyframes ping{100%,75%{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@media (min-width:640px){.sm\:block{display:block}.sm\:hidden{display:none}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:p-0{padding:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:w-1\/2{width:50%}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:768px){.md\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:flex-row{flex-direction:row}.md\:mb-6{margin-bottom:1.5rem}.md\:min-h-screen{min-height:100vh}.md\:overflow-y-auto{overflow-y:auto}.md\:p-8{padding:2rem}.md\:px-0{padding-left:0;padding-right:0}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:pb-0{padding-bottom:0}.md\:pl-4{padding-left:1rem}.md\:text-left{text-align:left}.md\:w-40{width:10rem}.md\:w-48{width:12rem}.md\:w-2\/5{width:40%}.md\:w-3\/5{width:60%}.md\:w-full{width:100%}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:1024px){.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}.lg\:mr-0{margin-right:0}.lg\:ml-4{margin-left:1rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:w-48{width:12rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:max-w-screen-xl{max-width:1280px}} \ No newline at end of file +/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,::after,::before{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji'}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::after,::before{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}body{font-size:.875rem;line-height:1.25rem;line-height:1.5;letter-spacing:0}img{aspect-ratio:attr(width)/attr(height)}.box{margin:1rem;padding:1rem}.bg-danger{--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity))}.bg-info{--tw-bg-opacity:1;background-color:rgba(254,243,199,var(--tw-bg-opacity))}.diagramStyling{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}h1{margin-bottom:.75rem;font-size:2.25rem;line-height:2.5rem;font-weight:700;line-height:1}h2{margin-bottom:.75rem;font-size:1.875rem;line-height:2.25rem;font-weight:700;line-height:1}h3{margin-bottom:.75rem;font-size:1.5rem;line-height:2rem;font-weight:600;line-height:1}h4{margin-bottom:.75rem;font-size:1.25rem;line-height:1.75rem;font-weight:600;line-height:1}a{--tw-text-opacity:1;color:rgba(3,102,214,var(--tw-text-opacity));text-decoration:none;transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms;transition-duration:.2s}a:hover{--tw-text-opacity:1;color:rgba(31,73,99,var(--tw-text-opacity));box-shadow:0 -1px 0 0 #fff inset,0 -2px 0 0 rgba(31,73,99,.45) inset}.button a,.sidebar-nav a,.topnav-link a{--tw-text-opacity:1;color:rgba(98,127,145,var(--tw-text-opacity))}.button a:hover,.sidebar-nav a:hover,.topnav-link a:hover{box-shadow:inherit}footer a{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity));box-shadow:0 -1px 0 0 rgba(255,255,255,.35) inset,0 -2px 0 0 rgba(31,73,99,.45) inset}footer a:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}ol,p,ul{padding-bottom:.75rem}ol,ul{list-style-position:inside;list-style-type:disc;padding-left:1rem;padding-right:1rem}input,textarea{border-radius:.125rem;border-width:1px;--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity));padding:.5rem}select{border-radius:.125rem;border-width:1px;--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity))}pre{background:#272822;padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em;color:#fff}code[class*=lang],pre[class*=lang],pre[class*=lang] code{background:#272822;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo,Monaco,Consolas,"Andale Mono","Ubuntu Mono","Courier New",monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}code{border-radius:.125rem;--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}canvas:focus{outline:2px solid transparent;outline-offset:2px}.button,button{margin:.25rem;display:inline-block;border-radius:.25rem;--tw-bg-opacity:1;background-color:rgba(31,73,99,var(--tw-bg-opacity));padding-left:.5rem;padding-right:.5rem;padding-top:.25rem;padding-bottom:.25rem;--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity));--tw-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.button:hover,button:hover{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity));--tw-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms;transition-duration:.2s}.bigger{margin-top:.5rem;margin-bottom:.5rem;padding-left:1rem;padding-right:1rem;padding-top:1rem;padding-bottom:1rem;font-weight:700}.sidebar-nav>a{display:block;border-radius:.5rem;padding-left:1rem;padding-right:1rem;padding-top:.25rem;padding-bottom:.25rem;font-weight:600}.sidebar-nav>a:hover{--tw-bg-opacity:1;background-color:rgba(31,73,99,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.topnav-link{border-radius:.5rem;padding-left:.5rem;padding-right:.5rem;padding-top:.5rem;padding-bottom:.5rem;--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.topnav-link:hover{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity));--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.sample-item{margin-top:.5rem;margin-bottom:.5rem;width:15rem;padding-left:.5rem;padding-right:.5rem}.sample-item-inner{height:100%;overflow:hidden;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgba(249,250,251,var(--tw-bg-opacity));--tw-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1),0 4px 6px -2px rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.sample-item-inner h2{padding-top:.5rem;padding-left:1rem;font-size:1.125rem;line-height:1.75rem}.sample-item-inner p{justify-content:space-between;padding:.5rem;line-height:1.25}.sample-item img{display:block;width:224px;height:224px}.feature-grid div{margin-top:2rem;border-top-width:1px;--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity));padding-top:2rem}.feature-grid:nth-child(n)>:first-child,.feature-grid:nth-child(n)>:nth-child(2){margin-top:0;border-top-width:0;padding-top:0}@media (min-width:1024px){.feature-grid:nth-child(n)>:nth-child(3){margin-top:0;border-top-width:0;padding-top:0}}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.row-span-2{grid-row:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mt-0{margin-top:0}.mt-6{margin-top:1.5rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-8{margin-bottom:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-6{height:1.5rem}.min-h-screen{min-height:100vh}.w-6{width:1.5rem}.w-12{width:3rem}.w-64{width:16rem}.w-auto{width:auto}.w-4\/5{width:80%}.w-5\/6{width:83.333333%}.w-full{width:100%}.max-w-5xl{max-width:64rem}.max-w-screen-lg{max-width:1024px}.max-w-screen-xl{max-width:1280px}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{100%,75%{transform:scale(2);opacity:0}}@keyframes ping{100%,75%{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,100%{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.gap-y-10{row-gap:2.5rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-b{border-bottom-width:1px}.border-gray-600{--tw-border-opacity:1;border-color:rgba(75,85,99,var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-nwoods-primary{--tw-bg-opacity:1;background-color:rgba(31,73,99,var(--tw-bg-opacity))}.bg-nwoods-secondary{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity))}.hover\:bg-nwoods-secondary:hover{--tw-bg-opacity:1;background-color:rgba(98,127,145,var(--tw-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.px-12{padding-left:3rem;padding-right:3rem}.py-0{padding-top:0;padding-bottom:0}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pb-0{padding-bottom:0}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-16{padding-bottom:4rem}.text-center{text-align:center}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.leading-normal{line-height:1.5}.tracking-normal{letter-spacing:0}.tracking-wide{letter-spacing:.025em}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-nwoods-secondary{--tw-text-opacity:1;color:rgba(98,127,145,var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.underline{text-decoration:underline}.no-underline{text-decoration:none}.hover\:no-underline:hover{text-decoration:none}.opacity-0{opacity:0}.opacity-50{opacity:.5}*,::after,::before{--tw-shadow:0 0 #0000}.shadow{--tw-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.1),0 1px 2px 0 rgba(0, 0, 0, 0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1),0 4px 6px -2px rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}*,::after,::before{--tw-ring-inset:var(--tw-empty, );/*!*//*!*/--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59, 130, 246, 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.filter{--tw-blur:var(--tw-empty, );/*!*//*!*/--tw-brightness:var(--tw-empty, );/*!*//*!*/--tw-contrast:var(--tw-empty, );/*!*//*!*/--tw-grayscale:var(--tw-empty, );/*!*//*!*/--tw-hue-rotate:var(--tw-empty, );/*!*//*!*/--tw-invert:var(--tw-empty, );/*!*//*!*/--tw-saturate:var(--tw-empty, );/*!*//*!*/--tw-sepia:var(--tw-empty, );/*!*//*!*/--tw-drop-shadow:var(--tw-empty, );/*!*//*!*/filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur:blur(8px)}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms}@media (min-width:640px){.sm\:block{display:block}.sm\:hidden{display:none}.sm\:w-1\/2{width:50%}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:p-0{padding:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:768px){.md\:mb-6{margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:min-h-screen{min-height:100vh}.md\:w-40{width:10rem}.md\:w-48{width:12rem}.md\:w-2\/5{width:40%}.md\:w-3\/5{width:60%}.md\:w-full{width:100%}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.md\:overflow-y-auto{overflow-y:auto}.md\:p-8{padding:2rem}.md\:px-0{padding-left:0;padding-right:0}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:pb-0{padding-bottom:0}.md\:pl-4{padding-left:1rem}.md\:text-left{text-align:left}}@media (min-width:1024px){.lg\:mr-0{margin-right:0}.lg\:ml-4{margin-left:1rem}.lg\:w-48{width:12rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width:1280px){.xl\:max-w-screen-xl{max-width:1280px}} \ No newline at end of file diff --git a/assets/images/document.png b/assets/images/document.png new file mode 100644 index 000000000..363e61090 Binary files /dev/null and b/assets/images/document.png differ diff --git a/assets/images/folder.png b/assets/images/folder.png new file mode 100644 index 000000000..4b1598477 Binary files /dev/null and b/assets/images/folder.png differ diff --git a/assets/images/picture.png b/assets/images/picture.png new file mode 100644 index 000000000..9f26517e8 Binary files /dev/null and b/assets/images/picture.png differ diff --git a/changelog.html b/changelog.html index cfdb267c3..085241472 100644 --- a/changelog.html +++ b/changelog.html @@ -320,6 +320,22 @@

                        Easier Manipulation and Customization of Geometries


                        +

                        Changes for 2.2.15

                        +
                          +
                        • + Fixed non-Path Geometry copies not to have a null value for Geometry.figures. +
                        • +
                        • + Improved the calculation of the midpoint of Bezier curve Links that have exactly three points in their route. +
                        • +
                        • + Fixed some empty Table panels causing an exception. +
                        • +
                        • + Loading the GoJS library twice is now a console warning, instead of an error. +
                        • +
                        +

                        Changes for 2.2.14

                        • @@ -330,7 +346,6 @@

                          Changes for 2.2.14

                        -

                        Changes for 2.2.13

                        • diff --git a/extensions/Figures.js b/extensions/Figures.js index 3738742ae..3df040398 100644 --- a/extensions/Figures.js +++ b/extensions/Figures.js @@ -423,6 +423,34 @@ go.Shape.defineFigureGenerator("XLine", function(shape, w, h) { // predefined i .add(new go.PathSegment(go.PathSegment.Line, w, h))); }); +go.Shape.defineFigureGenerator('LineRight', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.25 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, h))); +}); + +go.Shape.defineFigureGenerator('LineDown', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.25 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.75 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.25 * h))); +}); + +go.Shape.defineFigureGenerator('LineLeft', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.75 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, h))); +}); + +go.Shape.defineFigureGenerator('LineUp', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.75 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.25 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.75 * h))); +}); + // OPTIONAL figures, not predefined in the v2.0 library: diff --git a/extensions/ParallelLayout.js b/extensions/ParallelLayout.js index 786765804..716670a95 100644 --- a/extensions/ParallelLayout.js +++ b/extensions/ParallelLayout.js @@ -85,7 +85,7 @@ ParallelLayout.prototype.isSwitch = function(node) { } /** - * Return an Array holding the Split node and the Merge node for this layout. + * Find and remember the Split node and the Merge node for this layout. * This signals an error if there is not exactly one Node that {@link #isSplit} * and exactly one Node that {@link #isMerge}. * This can be overridden; any override must set {@link #splitNode} and {@link #mergeNode}. diff --git a/extensions/RotateMultipleTool.js b/extensions/RotateMultipleTool.js index c1adab808..7c7437224 100644 --- a/extensions/RotateMultipleTool.js +++ b/extensions/RotateMultipleTool.js @@ -54,6 +54,9 @@ RotateMultipleTool.prototype.doActivate = function() { tool.walkTree(part, infos); }); this._initialInfo = infos; + + // forget the rotationPoint since we use _centerPoint instead + this.rotationPoint = new go.Point(NaN, NaN); } /** diff --git a/extensions/ScrollingTable.js b/extensions/ScrollingTable.js index b250c67a8..bc5dbeaf3 100644 --- a/extensions/ScrollingTable.js +++ b/extensions/ScrollingTable.js @@ -200,7 +200,7 @@ go.GraphObject.defineBuilder("ScrollingTable", function(args) { var needed = idx > 0 || last < table.rowCount-1; bar.opacity = needed ? 1.0 : 0.5; if (thumb) { - thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)); + thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)) - (thumb instanceof go.Shape ? thumb.strokeWidth : 0); thumb.alignment = new go.Spot(0.5, (Math.min(table.rowCount, (idx+0.5)) / table.rowCount), 0, 0); } } diff --git a/extensionsJSM/Figures.js b/extensionsJSM/Figures.js index f8f49de71..f86ba2d15 100644 --- a/extensionsJSM/Figures.js +++ b/extensionsJSM/Figures.js @@ -360,6 +360,30 @@ go.Shape.defineFigureGenerator('XLine', (shape, w, h) => { .add(new go.PathSegment(go.PathSegment.Move, 0, 0)) .add(new go.PathSegment(go.PathSegment.Line, w, h))); }); +go.Shape.defineFigureGenerator('LineRight', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.25 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, h))); +}); +go.Shape.defineFigureGenerator('LineDown', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.25 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.75 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.25 * h))); +}); +go.Shape.defineFigureGenerator('LineLeft', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.75 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, h))); +}); +go.Shape.defineFigureGenerator('LineUp', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.75 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.25 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.75 * h))); +}); // OPTIONAL figures, not predefined in the v2.0 library: go.Shape.defineFigureGenerator('AsteriskLine', (shape, w, h) => { const offset = .2 / Math.SQRT2; diff --git a/extensionsJSM/Figures.ts b/extensionsJSM/Figures.ts index e0d02e7a1..f7843ec44 100644 --- a/extensionsJSM/Figures.ts +++ b/extensionsJSM/Figures.ts @@ -401,6 +401,34 @@ go.Shape.defineFigureGenerator('XLine', (shape, w, h) => { // predefined in 2.0 .add(new go.PathSegment(go.PathSegment.Line, w, h))); }); +go.Shape.defineFigureGenerator('LineRight', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.25 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, h))); +}); + +go.Shape.defineFigureGenerator('LineDown', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.25 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.75 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.25 * h))); +}); + +go.Shape.defineFigureGenerator('LineLeft', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.75 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, h))); +}); + +go.Shape.defineFigureGenerator('LineUp', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.75 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.25 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.75 * h))); +}); + // OPTIONAL figures, not predefined in the v2.0 library: diff --git a/extensionsJSM/PackedLayout.html b/extensionsJSM/PackedLayout.html index 750629e29..a44a0be3e 100644 --- a/extensionsJSM/PackedLayout.html +++ b/extensionsJSM/PackedLayout.html @@ -260,8 +260,7 @@

                          GoJS

                          aspectRatio: parseFloat(aspectRatio.value), size: new go.Size(parseFloat(layoutWidth.value), parseFloat(layoutHeight.value)), spacing: parseFloat(nodeSpacing.value), - hasCircularNodes: hasCircularNodes.checked, - arrangesToOrigin: false + hasCircularNodes: hasCircularNodes.checked }; disableInputs(params); if (sameSides.checked !== sameSidesPrevious @@ -275,7 +274,15 @@

                          GoJS

                          } myDiagram.startTransaction('packed layout'); generateNodeData(); - myDiagram.layout = go.GraphObject.make(PackedLayout, params /* defined above */); + var lay = myDiagram.layout; + lay.packShape = params.packShape; + lay.packMode = params.packMode; + lay.aspectRatio = params.aspectRatio; + lay.size = params.size; + lay.spacing = params.spacing; + lay.sortOrder = params.sortOrder; + lay.sortMode = params.sortMode; + lay.hasCircularNodes = params.hasCircularNodes; myDiagram.commitTransaction('packed layout'); } diff --git a/extensionsJSM/PackedLayout.js b/extensionsJSM/PackedLayout.js index 1ec8e2003..50e6a7df3 100644 --- a/extensionsJSM/PackedLayout.js +++ b/extensionsJSM/PackedLayout.js @@ -398,6 +398,7 @@ export class PackedLayout extends go.Layout { diagram.startTransaction('Layout'); this._bounds = new go.Rect(); this._enclosingCircle = null; + this._fixedSizeModeSpacing = 0; // push all nodes in parts iterator to an array for easy sorting const it = this.collectParts(coll).iterator; const nodes = []; diff --git a/extensionsJSM/PackedLayout.ts b/extensionsJSM/PackedLayout.ts index 797fa9191..cc92e5cf3 100644 --- a/extensionsJSM/PackedLayout.ts +++ b/extensionsJSM/PackedLayout.ts @@ -527,6 +527,7 @@ export class PackedLayout extends go.Layout { if (diagram !== null) diagram.startTransaction('Layout'); this._bounds = new go.Rect(); this._enclosingCircle = null; + this._fixedSizeModeSpacing = 0; // push all nodes in parts iterator to an array for easy sorting const it = this.collectParts(coll).iterator; diff --git a/extensionsJSM/RotateMultipleTool.js b/extensionsJSM/RotateMultipleTool.js index 7b818b516..c569a848a 100644 --- a/extensionsJSM/RotateMultipleTool.js +++ b/extensionsJSM/RotateMultipleTool.js @@ -50,6 +50,8 @@ export class RotateMultipleTool extends go.RotatingTool { tool.walkTree(part, infos); }); this._initialInfo = infos; + // forget the rotationPoint since we use _centerPoint instead + this.rotationPoint = new go.Point(NaN, NaN); } /** * @hidden @internal diff --git a/extensionsJSM/RotateMultipleTool.ts b/extensionsJSM/RotateMultipleTool.ts index 353e23365..d8596a555 100644 --- a/extensionsJSM/RotateMultipleTool.ts +++ b/extensionsJSM/RotateMultipleTool.ts @@ -56,6 +56,9 @@ export class RotateMultipleTool extends go.RotatingTool { tool.walkTree(part, infos); }); this._initialInfo = infos; + + // forget the rotationPoint since we use _centerPoint instead + this.rotationPoint = new go.Point(NaN, NaN); } /** diff --git a/extensionsJSM/ScrollingTable.js b/extensionsJSM/ScrollingTable.js index da3b9698c..764155ec2 100644 --- a/extensionsJSM/ScrollingTable.js +++ b/extensionsJSM/ScrollingTable.js @@ -212,7 +212,7 @@ go.GraphObject.defineBuilder("ScrollingTable", args => { const needed = idx > 0 || last < table.rowCount - 1; bar.opacity = needed ? 1.0 : 0.5; if (thumb) { - thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)); + thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)) - (thumb instanceof go.Shape ? thumb.strokeWidth : 0); thumb.alignment = new go.Spot(0.5, (Math.min(table.rowCount, (idx + 0.5)) / table.rowCount), 0, 0); } } diff --git a/extensionsJSM/ScrollingTable.ts b/extensionsJSM/ScrollingTable.ts index 62f78df91..88c8bb352 100644 --- a/extensionsJSM/ScrollingTable.ts +++ b/extensionsJSM/ScrollingTable.ts @@ -210,7 +210,7 @@ go.GraphObject.defineBuilder("ScrollingTable", args => { const needed = idx > 0 || last < table.rowCount-1; bar.opacity = needed ? 1.0 : 0.5; if (thumb) { - thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)); + thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)) - (thumb instanceof go.Shape ? thumb.strokeWidth : 0); thumb.alignment = new go.Spot(0.5, (Math.min(table.rowCount, (idx+0.5)) / table.rowCount), 0, 0); } } diff --git a/extensionsTS/Figures.js b/extensionsTS/Figures.js index c0cf9af58..4bbf2c258 100644 --- a/extensionsTS/Figures.js +++ b/extensionsTS/Figures.js @@ -390,6 +390,30 @@ .add(new go.PathSegment(go.PathSegment.Move, 0, 0)) .add(new go.PathSegment(go.PathSegment.Line, w, h))); }); + go.Shape.defineFigureGenerator('LineRight', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.25 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, h))); + }); + go.Shape.defineFigureGenerator('LineDown', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.25 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.75 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.25 * h))); + }); + go.Shape.defineFigureGenerator('LineLeft', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.75 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, h))); + }); + go.Shape.defineFigureGenerator('LineUp', function (shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.75 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.25 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.75 * h))); + }); // OPTIONAL figures, not predefined in the v2.0 library: go.Shape.defineFigureGenerator('AsteriskLine', function (shape, w, h) { var offset = .2 / Math.SQRT2; diff --git a/extensionsTS/Figures.ts b/extensionsTS/Figures.ts index 6d58aecfc..51c70f3be 100644 --- a/extensionsTS/Figures.ts +++ b/extensionsTS/Figures.ts @@ -401,6 +401,34 @@ go.Shape.defineFigureGenerator('XLine', (shape, w, h) => { // predefined in 2.0 .add(new go.PathSegment(go.PathSegment.Line, w, h))); }); +go.Shape.defineFigureGenerator('LineRight', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.25 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, h))); +}); + +go.Shape.defineFigureGenerator('LineDown', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.25 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.75 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.25 * h))); +}); + +go.Shape.defineFigureGenerator('LineLeft', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0.75 * w, 0, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.25 * w, 0.5 * h)) + .add(new go.PathSegment(go.PathSegment.Line, 0.75 * w, h))); +}); + +go.Shape.defineFigureGenerator('LineUp', function(shape, w, h) { + return new go.Geometry() + .add(new go.PathFigure(0, 0.75 * h, false) + .add(new go.PathSegment(go.PathSegment.Line, 0.5 * w, 0.25 * h)) + .add(new go.PathSegment(go.PathSegment.Line, w, 0.75 * h))); +}); + // OPTIONAL figures, not predefined in the v2.0 library: diff --git a/extensionsTS/PackedLayout.js b/extensionsTS/PackedLayout.js index 57c367902..4a8ee5e09 100644 --- a/extensionsTS/PackedLayout.js +++ b/extensionsTS/PackedLayout.js @@ -481,6 +481,7 @@ var __extends = (this && this.__extends) || (function () { diagram.startTransaction('Layout'); this._bounds = new go.Rect(); this._enclosingCircle = null; + this._fixedSizeModeSpacing = 0; // push all nodes in parts iterator to an array for easy sorting var it = this.collectParts(coll).iterator; var nodes = []; diff --git a/extensionsTS/PackedLayout.ts b/extensionsTS/PackedLayout.ts index bf8ec0a6b..de3736900 100644 --- a/extensionsTS/PackedLayout.ts +++ b/extensionsTS/PackedLayout.ts @@ -527,6 +527,7 @@ export class PackedLayout extends go.Layout { if (diagram !== null) diagram.startTransaction('Layout'); this._bounds = new go.Rect(); this._enclosingCircle = null; + this._fixedSizeModeSpacing = 0; // push all nodes in parts iterator to an array for easy sorting const it = this.collectParts(coll).iterator; diff --git a/extensionsTS/PackedScript.js b/extensionsTS/PackedScript.js index f87d74960..9cd62848c 100644 --- a/extensionsTS/PackedScript.js +++ b/extensionsTS/PackedScript.js @@ -44,7 +44,7 @@ $(go.Diagram, 'myDiagramDiv', // must be the ID or reference to div { 'animationManager.isEnabled': true, - layout: $(PackedLayout_js_1.PackedLayout), + layout: $(PackedLayout_js_1.PackedLayout, { arrangesToOrigin: false }), scale: 0.75, isReadOnly: true }); // Nodes have a template with bindings for size, shape, and fill color @@ -162,8 +162,7 @@ aspectRatio: parseFloat(aspectRatio.value), size: new go.Size(parseFloat(layoutWidth.value), parseFloat(layoutHeight.value)), spacing: parseFloat(nodeSpacing.value), - hasCircularNodes: hasCircularNodes.checked, - arrangesToOrigin: false + hasCircularNodes: hasCircularNodes.checked }; disableInputs(params); if (sameSides.checked !== sameSidesPrevious @@ -177,7 +176,15 @@ } myDiagram.startTransaction('packed layout'); generateNodeData(); - myDiagram.layout = go.GraphObject.make(PackedLayout_js_1.PackedLayout, params /* defined above */); + var lay = myDiagram.layout; + lay.packShape = params.packShape; + lay.packMode = params.packMode; + lay.aspectRatio = params.aspectRatio; + lay.size = params.size; + lay.spacing = params.spacing; + lay.sortOrder = params.sortOrder; + lay.sortMode = params.sortMode; + lay.hasCircularNodes = params.hasCircularNodes; myDiagram.commitTransaction('packed layout'); } exports.rebuildGraph = rebuildGraph; diff --git a/extensionsTS/PackedScript.ts b/extensionsTS/PackedScript.ts index 2011dcb72..85ad93009 100644 --- a/extensionsTS/PackedScript.ts +++ b/extensionsTS/PackedScript.ts @@ -23,7 +23,6 @@ interface PackedLayoutParams { size: go.Size; spacing: number; hasCircularNodes: boolean; - arrangesToOrigin: boolean; } let myDiagram: go.Diagram; @@ -52,7 +51,7 @@ export function init() { $(go.Diagram, 'myDiagramDiv', // must be the ID or reference to div { 'animationManager.isEnabled': true, - layout: $(PackedLayout), + layout: $(PackedLayout, { arrangesToOrigin: false }), scale: 0.75, isReadOnly: true }); @@ -186,8 +185,7 @@ export function rebuildGraph() { aspectRatio: parseFloat(aspectRatio.value), size: new go.Size(parseFloat(layoutWidth.value), parseFloat(layoutHeight.value)), spacing: parseFloat(nodeSpacing.value), - hasCircularNodes: hasCircularNodes.checked, - arrangesToOrigin: false + hasCircularNodes: hasCircularNodes.checked }; disableInputs(params); @@ -204,7 +202,15 @@ export function rebuildGraph() { myDiagram.startTransaction('packed layout'); generateNodeData(); - myDiagram.layout = go.GraphObject.make(PackedLayout, params /* defined above */); + var lay = myDiagram.layout as PackedLayout; + lay.packShape = params.packShape; + lay.packMode = params.packMode; + lay.aspectRatio = params.aspectRatio; + lay.size = params.size; + lay.spacing = params.spacing; + lay.sortOrder = params.sortOrder; + lay.sortMode = params.sortMode; + lay.hasCircularNodes = params.hasCircularNodes; myDiagram.commitTransaction('packed layout'); } diff --git a/extensionsTS/RotateMultipleTool.js b/extensionsTS/RotateMultipleTool.js index bea96b5fe..f396d1541 100644 --- a/extensionsTS/RotateMultipleTool.js +++ b/extensionsTS/RotateMultipleTool.js @@ -79,6 +79,8 @@ var __extends = (this && this.__extends) || (function () { tool.walkTree(part, infos); }); this._initialInfo = infos; + // forget the rotationPoint since we use _centerPoint instead + this.rotationPoint = new go.Point(NaN, NaN); }; /** * @hidden @internal diff --git a/extensionsTS/RotateMultipleTool.ts b/extensionsTS/RotateMultipleTool.ts index 840ca9f0c..de0dc2252 100644 --- a/extensionsTS/RotateMultipleTool.ts +++ b/extensionsTS/RotateMultipleTool.ts @@ -56,6 +56,9 @@ export class RotateMultipleTool extends go.RotatingTool { tool.walkTree(part, infos); }); this._initialInfo = infos; + + // forget the rotationPoint since we use _centerPoint instead + this.rotationPoint = new go.Point(NaN, NaN); } /** diff --git a/extensionsTS/ScrollingTable.js b/extensionsTS/ScrollingTable.js index 3154b1d34..a800dc633 100644 --- a/extensionsTS/ScrollingTable.js +++ b/extensionsTS/ScrollingTable.js @@ -223,7 +223,7 @@ var needed = idx > 0 || last < table.rowCount - 1; bar.opacity = needed ? 1.0 : 0.5; if (thumb) { - thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)); + thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)) - (thumb instanceof go.Shape ? thumb.strokeWidth : 0); thumb.alignment = new go.Spot(0.5, (Math.min(table.rowCount, (idx + 0.5)) / table.rowCount), 0, 0); } } diff --git a/extensionsTS/ScrollingTable.ts b/extensionsTS/ScrollingTable.ts index e43b9a3ca..9ec60804c 100644 --- a/extensionsTS/ScrollingTable.ts +++ b/extensionsTS/ScrollingTable.ts @@ -210,7 +210,7 @@ go.GraphObject.defineBuilder("ScrollingTable", args => { const needed = idx > 0 || last < table.rowCount-1; bar.opacity = needed ? 1.0 : 0.5; if (thumb) { - thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)); + thumb.height = Math.max((rows / table.rowCount) * availh, Math.min(availh, 10)) - (thumb instanceof go.Shape ? thumb.strokeWidth : 0); thumb.alignment = new go.Spot(0.5, (Math.min(table.rowCount, (idx+0.5)) / table.rowCount), 0, 0); } } diff --git a/intro/HTMLInteraction.html b/intro/HTMLInteraction.html index 8d15c68cc..2b5c99ede 100644 --- a/intro/HTMLInteraction.html +++ b/intro/HTMLInteraction.html @@ -85,6 +85,7 @@

                          GoJS

                          Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                          GoJS

                          Building from Source Platforms Deployment - Typings
                      diff --git a/intro/angular.html b/intro/angular.html index 0f89df754..31995f0a6 100644 --- a/intro/angular.html +++ b/intro/angular.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/animation.html b/intro/animation.html index 3337a3203..1cee2636f 100644 --- a/intro/animation.html +++ b/intro/animation.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/brush.html b/intro/brush.html index d3a4e21ce..ebd95f26d 100644 --- a/intro/brush.html +++ b/intro/brush.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/buildingObjects.html b/intro/buildingObjects.html index 2b583049f..94dd829a3 100644 --- a/intro/buildingObjects.html +++ b/intro/buildingObjects.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/buttons.html b/intro/buttons.html index 692382fce..8a248a340 100644 --- a/intro/buttons.html +++ b/intro/buttons.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/changedEvents.html b/intro/changedEvents.html index 37a27502e..2228505c0 100644 --- a/intro/changedEvents.html +++ b/intro/changedEvents.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/collections.html b/intro/collections.html index 67d664ca1..46a636901 100644 --- a/intro/collections.html +++ b/intro/collections.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/commands.html b/intro/commands.html index 704bac0db..4bbf1b1fc 100644 --- a/intro/commands.html +++ b/intro/commands.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/connectionPoints.html b/intro/connectionPoints.html index 8b5aa57f4..96273b9db 100644 --- a/intro/connectionPoints.html +++ b/intro/connectionPoints.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/contextMenus.html b/intro/contextMenus.html index 18b40e82a..af9386545 100644 --- a/intro/contextMenus.html +++ b/intro/contextMenus.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/dataBinding.html b/intro/dataBinding.html index aa47f5de8..3e4fcbd16 100644 --- a/intro/dataBinding.html +++ b/intro/dataBinding.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      @@ -410,6 +410,251 @@

                      The Relationships of Parts and Da The only references from diagram to model are the Diagram.model property and each node or link's Panel.data property.

                      +

                      Item Arrays, Model Data, and Panels

                      +

                      +Here's another diagram showing the relationships of data Objects in the model with GraphObjects +(Node, Panel, TextBlock, Picture) in the Diagram. +The Node is data bound to an Object in the Model.nodeDataArray that has several properties, +including one named "items" which is an Array. +One of the Panels in the Node has a data binding of the Panel.itemArray property with +the source property name being "items". +

                      +

                      +That Array has four Objects in it, each Object having "image" and "name" properties. +The Panel.itemTemplate of the Panel whose Panel.itemArray is bound to that Array is defined +so as to show a Panel with a RoundedRectangle Shape surrounding a Vertical Panel showing Picture over a TextBlock. +

                      +

                      +The green dashed links show how the Binding transfers the property value from the data Object +to the Picture or TextBlock GraphObject in the Node. +

                      + + + +

                      Binding string and number properties

                      It is easy to data bind GraphObject properties to data properties. diff --git a/intro/debugging.html b/intro/debugging.html index 542efded4..3dcef4dfd 100644 --- a/intro/debugging.html +++ b/intro/debugging.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/deployment.html b/intro/deployment.html index 67f7f52c7..0dab1b663 100644 --- a/intro/deployment.html +++ b/intro/deployment.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/events.html b/intro/events.html index 03313c480..ddc629094 100644 --- a/intro/events.html +++ b/intro/events.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/extensions.html b/intro/extensions.html index 12fbf388d..096300121 100644 --- a/intro/extensions.html +++ b/intro/extensions.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/geometry.html b/intro/geometry.html index 09c61c469..939449093 100644 --- a/intro/geometry.html +++ b/intro/geometry.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/graduatedPanels.html b/intro/graduatedPanels.html index fdeaae926..e018fb0bb 100644 --- a/intro/graduatedPanels.html +++ b/intro/graduatedPanels.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/grids.html b/intro/grids.html index 8f8cde8e3..1ce2f79fc 100644 --- a/intro/grids.html +++ b/intro/grids.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      @@ -289,7 +289,6 @@

                      Custom Grids

                      $(go.Shape, "LineV", { stroke: "green", interval: 5 }) ); - diagram.nodeTemplate = $(go.Node, "Auto", { resizable: true }, @@ -397,6 +396,31 @@

                      Custom Grids

                      This example limits dragging of all nodes by setting DraggingTool.isGridSnapEnabled to true.

                      +Another custom grid: dots +

                      +
                      
                      +  diagram.div.style.background = "white";
                      +
                      +  diagram.grid =
                      +    $(go.Panel, "Grid",
                      +      $(go.Shape, "LineH", { strokeWidth: 0.5, strokeDashArray: [0, 9.5, 0.5, 0] })
                      +    );
                      +
                      +  diagram.toolManager.draggingTool.isGridSnapEnabled = true;
                      +
                      +  diagram.nodeTemplate =
                      +    $(go.Node, "Auto",
                      +      $(go.Shape, "Rectangle", { fill: "white" }),
                      +      $(go.TextBlock, { margin: 5 },
                      +        new go.Binding("text", "key"))
                      +    );
                      +  var nodeDataArray = [
                      +    { key: "Alpha" }
                      +  ];
                      +  diagram.model = new go.GraphLinksModel(nodeDataArray);
                      +
                      + +

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

                      
                      diff --git a/intro/groups.html b/intro/groups.html
                      index d3a17a377..e0d114a43 100644
                      --- a/intro/groups.html
                      +++ b/intro/groups.html
                      @@ -85,6 +85,7 @@ 

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/highlighting.html b/intro/highlighting.html index 4a2a53532..dd93c421f 100644 --- a/intro/highlighting.html +++ b/intro/highlighting.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/index.html b/intro/index.html index 9da664988..f75cca6ab 100644 --- a/intro/index.html +++ b/intro/index.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/initialView.html b/intro/initialView.html index 9a4683958..b946ca7b6 100644 --- a/intro/initialView.html +++ b/intro/initialView.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/itemArrays.html b/intro/itemArrays.html index d59f511f6..8cb588301 100644 --- a/intro/itemArrays.html +++ b/intro/itemArrays.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/layers.html b/intro/layers.html index 5b0b19c1c..491b2a746 100644 --- a/intro/layers.html +++ b/intro/layers.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/layouts.html b/intro/layouts.html index dff8443f8..568ce5ba9 100644 --- a/intro/layouts.html +++ b/intro/layouts.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/legends.html b/intro/legends.html index 1a66f7bd9..ea5852ca7 100644 --- a/intro/legends.html +++ b/intro/legends.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/linkLabels.html b/intro/linkLabels.html index f6640a563..255749502 100644 --- a/intro/linkLabels.html +++ b/intro/linkLabels.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/links.html b/intro/links.html index 831783be6..7ba3cf468 100644 --- a/intro/links.html +++ b/intro/links.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/makingImages.html b/intro/makingImages.html index c081c5c08..ded4580f4 100644 --- a/intro/makingImages.html +++ b/intro/makingImages.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/makingSVG.html b/intro/makingSVG.html index ea8fb03d0..1028af625 100644 --- a/intro/makingSVG.html +++ b/intro/makingSVG.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/modules.html b/intro/modules.html index 5415fa711..5384e4f5f 100644 --- a/intro/modules.html +++ b/intro/modules.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/nodeScript.html b/intro/nodeScript.html index 158abcbc5..07e20812f 100644 --- a/intro/nodeScript.html +++ b/intro/nodeScript.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/nodes.html b/intro/nodes.html index 78a16487e..c6715707f 100644 --- a/intro/nodes.html +++ b/intro/nodes.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/overview.html b/intro/overview.html index afc7816d0..446d5b882 100644 --- a/intro/overview.html +++ b/intro/overview.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/palette.html b/intro/palette.html index e888e3677..56039c407 100644 --- a/intro/palette.html +++ b/intro/palette.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/panels.html b/intro/panels.html index af10df696..84f028f86 100644 --- a/intro/panels.html +++ b/intro/panels.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/performance.html b/intro/performance.html index a8b0d6a69..4486ab8ac 100644 --- a/intro/performance.html +++ b/intro/performance.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/permissions.html b/intro/permissions.html index 650b46d4d..20c6e5d32 100644 --- a/intro/permissions.html +++ b/intro/permissions.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/pictures.html b/intro/pictures.html index 5f4644bff..641c19280 100644 --- a/intro/pictures.html +++ b/intro/pictures.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/platforms.html b/intro/platforms.html index 278ab3e1b..fd83a9b0d 100644 --- a/intro/platforms.html +++ b/intro/platforms.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/ports.html b/intro/ports.html index f07ba221f..88b5ffbca 100644 --- a/intro/ports.html +++ b/intro/ports.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/printing.html b/intro/printing.html index f5a3c0fa3..35da782ad 100644 --- a/intro/printing.html +++ b/intro/printing.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/react.html b/intro/react.html index 326a2b491..b1cdf9bd0 100644 --- a/intro/react.html +++ b/intro/react.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/replacingDeleting.html b/intro/replacingDeleting.html index 9aa78387f..b5a60d7ef 100644 --- a/intro/replacingDeleting.html +++ b/intro/replacingDeleting.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/resizing.html b/intro/resizing.html index dab30a54c..81f3ef53d 100644 --- a/intro/resizing.html +++ b/intro/resizing.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/selection.html b/intro/selection.html index f8f5dbee4..0d6ddf141 100644 --- a/intro/selection.html +++ b/intro/selection.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/serverSideImages.html b/intro/serverSideImages.html index 11f15df3c..8b5614f9d 100644 --- a/intro/serverSideImages.html +++ b/intro/serverSideImages.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/shapes.html b/intro/shapes.html index 0474fbf0a..c986dd880 100644 --- a/intro/shapes.html +++ b/intro/shapes.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/sizedGroups.html b/intro/sizedGroups.html index 6e8366e13..80ee079a6 100644 --- a/intro/sizedGroups.html +++ b/intro/sizedGroups.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/sizing.html b/intro/sizing.html index 0b36b6c09..7b758c9f6 100644 --- a/intro/sizing.html +++ b/intro/sizing.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/source.html b/intro/source.html index 7b14cd82a..52c96eec8 100644 --- a/intro/source.html +++ b/intro/source.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/storage.html b/intro/storage.html index b3e128758..694b1c4ec 100644 --- a/intro/storage.html +++ b/intro/storage.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/subgraphs.html b/intro/subgraphs.html index fffa6042f..da7cf4685 100644 --- a/intro/subgraphs.html +++ b/intro/subgraphs.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/subtrees.html b/intro/subtrees.html index 84965bce8..eeff928ba 100644 --- a/intro/subtrees.html +++ b/intro/subtrees.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/tablePanels.html b/intro/tablePanels.html index d7117d0ec..a5228dc51 100644 --- a/intro/tablePanels.html +++ b/intro/tablePanels.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/templateMaps.html b/intro/templateMaps.html index fd415a10e..e992e4358 100644 --- a/intro/templateMaps.html +++ b/intro/templateMaps.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/testing.html b/intro/testing.html index ba716a360..33585577f 100644 --- a/intro/testing.html +++ b/intro/testing.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/textBlocks.html b/intro/textBlocks.html index ec965b283..aa87cd0bb 100644 --- a/intro/textBlocks.html +++ b/intro/textBlocks.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/tools.html b/intro/tools.html index 3a8a9e2ab..69e1ea267 100644 --- a/intro/tools.html +++ b/intro/tools.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/tooltips.html b/intro/tooltips.html index 03cd82624..27ba1e445 100644 --- a/intro/tooltips.html +++ b/intro/tooltips.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/transactions.html b/intro/transactions.html index b14cffa3c..22a8731d0 100644 --- a/intro/transactions.html +++ b/intro/transactions.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/trees.html b/intro/trees.html index 577266ea9..fc1ceb496 100644 --- a/intro/trees.html +++ b/intro/trees.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/typings.html b/intro/typings.html index b58308b4a..8572ae024 100644 --- a/intro/typings.html +++ b/intro/typings.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/usingModels.html b/intro/usingModels.html index 36489e31f..b5764c655 100644 --- a/intro/usingModels.html +++ b/intro/usingModels.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/validation.html b/intro/validation.html index 85a8a7da6..edde1c41e 100644 --- a/intro/validation.html +++ b/intro/validation.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/intro/viewport.html b/intro/viewport.html index 5c38c5af7..30c4fae8f 100644 --- a/intro/viewport.html +++ b/intro/viewport.html @@ -85,6 +85,7 @@

                      GoJS

                      Link Points Ports Nodes + Typings Debugging Layouts Trees @@ -126,7 +127,6 @@

                      GoJS

                      Building from Source Platforms Deployment - Typings
                      diff --git a/package.json b/package.json index d5002c370..ea7727732 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gojs", - "version": "2.2.14", + "version": "2.2.15", "description": "Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams", "keywords": [ "GoJS", "diagram", "chart", "tree", "flowchart", "orgchart", "uml", "bpmn", "graph", "editor", "drawing", "canvas", "svg", "hierarchy", "family-tree", "decision-tree", "mindmap", "treeview", "genogram", "ivr-tree", "parse-tree", "concept-map", "visualization", "entity-relationship", "er-diagram", "radial", "sankey", "pert", "gantt", "timeline", "swimlane", "workflow", "flow", "process", "state", "sequential-function", "grafcet", "sequence", "circuit", "dataflow", "data-flow", "planogram", "floorplan", "seating", "pipes", "layout", "tree-layout", "force-directed", "layered", "hierarchical", "circular", "fishbone", "ishikawa", "treemap", "tree-map", "subgraph", "network", "library", "typescript" ], "homepage": "https://gojs.net", diff --git a/release/go-debug-module.js b/release/go-debug-module.js index fd410c2ef..1430b6c30 100644 --- a/release/go-debug-module.js +++ b/release/go-debug-module.js @@ -1,8 +1,8 @@ /* - * GoJS v2.2.14 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.2.15 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2022 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.14/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.15/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function ba(a){var b=0;return function(){return bc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gthis.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.bb,d=this.pf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.bb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.ce();return!1};kb.prototype.Ad=function(){return this.next()}; -kb.prototype.first=function(){var a=this.Cb;this.ta=a.A;var b=a.s;this.bb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};kb.prototype.any=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};kb.prototype.all=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; -kb.prototype.each=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};kb.prototype.map=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new H;a.s=d;a.xb();return a.iterator}; -kb.prototype.filter=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};kb.prototype.ce=function(){this.key=-1;this.value=null;this.ta=-1;this.Cb.Kg=this};kb.prototype.toString=function(){return"ListIteratorBackwards("+this.bb+"/"+this.Cb.count+")"}; -oa.Object.defineProperties(kb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Cb.s.length}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.Ad;kb.prototype.next=kb.prototype.next;kb.prototype.reset=kb.prototype.reset;kb.className="ListIteratorBackwards"; +gb.prototype.reset=gb.prototype.reset;gb.className="SingletonIterator";function hb(a){this.Cb=a;this.qf=null;a.Ua=null;this.ta=a.A;this.bb=-1}hb.prototype.reset=function(){var a=this.Cb;a.Ua=null;this.ta=a.A;this.bb=-1};hb.prototype.next=function(){var a=this.Cb;if(a.A!==this.ta){if(0>this.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.bb,d=this.qf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.bb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.ce();return!1};ib.prototype.Ad=function(){return this.next()}; +ib.prototype.first=function(){var a=this.Cb;this.ta=a.A;var b=a.s;this.bb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};ib.prototype.any=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};ib.prototype.all=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; +ib.prototype.each=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};ib.prototype.map=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new H;a.s=d;a.xb();return a.iterator}; +ib.prototype.filter=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};ib.prototype.ce=function(){this.key=-1;this.value=null;this.ta=-1;this.Cb.Kg=this};ib.prototype.toString=function(){return"ListIteratorBackwards("+this.bb+"/"+this.Cb.count+")"}; +oa.Object.defineProperties(ib.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Cb.s.length}}});ib.prototype.first=ib.prototype.first;ib.prototype.hasNext=ib.prototype.Ad;ib.prototype.next=ib.prototype.next;ib.prototype.reset=ib.prototype.reset;ib.className="ListIteratorBackwards"; function H(a){Za(this);this._isFrozen=!1;this.s=[];this.A=0;this.Kg=this.Ua=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=H.prototype;t.xb=function(){var a=this.A;a++;999999999a||a>=b.length)&&Ba(a,"0 <= i < length",H,"elt:i");return b[a]};t.get=function(a){return this.N(a)};t.ad=function(a,b){G&&E(a,H,"setElt:i");var c=this.s;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",H,"setElt:i");this._isFrozen&&xa(this,a);c[a]=b};t.set=function(a,b){this.ad(a,b)};t.first=function(){var a=this.s;return 0===a.length?null:a[0]}; @@ -52,19 +52,19 @@ H.prototype.copy=function(){var a=new H,b=this.s;0=f)return this;(0>b||b>=e-1)&&Ba(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a=e)for(c=d.slice(b),c.sort(a),a=b;a=this.s.length)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new hb(this)}},iteratorBackwards:{configurable:!0, -enumerable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Kg;return null!==a?(a.reset(),a):new kb(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.Ei;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.zv;H.prototype.toArray=H.prototype.Ka;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.sb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Hb; +enumerable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Kg;return null!==a?(a.reset(),a):new ib(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.Ei;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.zv;H.prototype.toArray=H.prototype.Ka;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.sb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Hb; H.prototype.pop=H.prototype.pop;H.prototype.last=H.prototype.lc;H.prototype.first=H.prototype.first;H.prototype.set=H.prototype.set;H.prototype.setElt=H.prototype.ad;H.prototype.get=H.prototype.get;H.prototype.elt=H.prototype.N;H.prototype.indexOf=H.prototype.indexOf;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.clear=H.prototype.clear;H.prototype.addAll=H.prototype.addAll;H.prototype.push=H.prototype.push;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.pa; -H.prototype.freeze=H.prototype.freeze;H.className="List";function mb(a){this.hg=a;a.Ua=null;this.ta=a.A;this.xa=null}mb.prototype.reset=function(){var a=this.hg;a.Ua=null;this.ta=a.A;this.xa=null};mb.prototype.next=function(){var a=this.hg;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};mb.prototype.Ad=function(){return this.next()}; -mb.prototype.first=function(){var a=this.hg;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null};mb.prototype.any=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};mb.prototype.all=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0}; -mb.prototype.each=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this};mb.prototype.map=function(a){var b=this.hg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;)c.add(a(e.value)),b.A!==d&&Da(b),e=e.Aa;return c.iterator};mb.prototype.filter=function(a){var b=this.hg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;){var f=e.value;a(f)&&c.add(f);b.A!==d&&Da(b);e=e.Aa}return c.iterator}; -mb.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.hg.Ua=this};mb.prototype.toString=function(){return null!==this.xa?"SetIterator@"+this.xa.value:"SetIterator"};oa.Object.defineProperties(mb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.hg.Ub}}});mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset; -mb.className="SetIterator";function I(a){Za(this);this._isFrozen=!1;this.Vb={};this.Ub=0;this.Ua=null;this.A=0;this.jf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.xb=function(){var a=this.A;a++;999999999=this.Ub)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new mb(this)}}});I.prototype.toList=I.prototype.yv;I.prototype.toArray=I.prototype.Ka; I.prototype.clear=I.prototype.clear;I.prototype.retainAll=I.prototype.oA;I.prototype.removeAll=I.prototype.Xo;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.first=I.prototype.first;I.prototype.containsAny=I.prototype.Ry;I.prototype.containsAll=I.prototype.Qy;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.addAll=I.prototype.addAll;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.pa;I.prototype.freeze=I.prototype.freeze; var pb=1;I.className="Set";I.uniqueHash=Za;I.hashIdUnique=nb;I.hashId=lb;function qb(a){this.ra=a;this.ta=a.A;this.xa=null}qb.prototype.reset=function(){this.ta=this.ra.A;this.xa=null};qb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=this.key=a=b.key,!0;this.ce();return!1};qb.prototype.Ad=function(){return this.next()}; @@ -75,31 +75,31 @@ qb.className="MapKeySetIterator";function rb(a){I.call(this);Za(this);this._isFr t.clear=function(){v("This Set is read-only: "+this.toString())};t.first=function(){var a=this.ra.ja;return null!==a?a.key:null};rb.prototype.any=function(a){for(var b=this.ra.ja;null!==b;){if(a(b.key))return!0;b=b.Aa}return!1};rb.prototype.all=function(a){for(var b=this.ra.ja;null!==b;){if(!a(b.key))return!1;b=b.Aa}return!0};rb.prototype.each=function(a){for(var b=this.ra.ja;null!==b;)a(b.key),b=b.Aa;return this}; rb.prototype.map=function(a){for(var b=new I,c=this.ra.ja;null!==c;)b.add(a(c.key)),c=c.Aa;return b};rb.prototype.filter=function(a){for(var b=new I,c=this.ra.ja;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Aa}return b};rb.prototype.copy=function(){return new rb(this.ra)};rb.prototype.zv=function(){var a=new I,b=this.ra.Vb,c;for(c in b)a.add(b[c].key);return a};rb.prototype.Ka=function(){var a=this.ra.Vb,b=Array(this.ra.Ub),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; rb.prototype.yv=function(){var a=new H,b=this.ra.Vb,c;for(c in b)a.add(b[c].key);return a};oa.Object.defineProperties(rb.prototype,{count:{configurable:!0,get:function(){return this.ra.Ub}},size:{configurable:!0,get:function(){return this.ra.Ub}},iterator:{configurable:!0,get:function(){return 0>=this.ra.Ub?fb:new qb(this.ra)}}});rb.prototype.toList=rb.prototype.yv;rb.prototype.toArray=rb.prototype.Ka;rb.prototype.toSet=rb.prototype.zv; -rb.prototype.first=rb.prototype.first;rb.prototype.clear=rb.prototype.clear;rb.prototype["delete"]=rb.prototype.delete;rb.prototype.remove=rb.prototype.remove;rb.prototype.has=rb.prototype.has;rb.prototype.contains=rb.prototype.contains;rb.prototype.add=rb.prototype.add;rb.prototype.thaw=rb.prototype.pa;rb.prototype.freeze=rb.prototype.freeze;rb.className="MapKeySet";function ub(a){this.ra=a;a.hf=null;this.ta=a.A;this.xa=null} -ub.prototype.reset=function(){var a=this.ra;a.hf=null;this.ta=a.A;this.xa=null};ub.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};ub.prototype.Ad=function(){return this.next()};ub.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -ub.prototype.any=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};ub.prototype.all=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};ub.prototype.each=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this}; -ub.prototype.map=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.value)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};ub.prototype.filter=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.value;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};ub.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.hf=this}; +rb.prototype.first=rb.prototype.first;rb.prototype.clear=rb.prototype.clear;rb.prototype["delete"]=rb.prototype.delete;rb.prototype.remove=rb.prototype.remove;rb.prototype.has=rb.prototype.has;rb.prototype.contains=rb.prototype.contains;rb.prototype.add=rb.prototype.add;rb.prototype.thaw=rb.prototype.pa;rb.prototype.freeze=rb.prototype.freeze;rb.className="MapKeySet";function ub(a){this.ra=a;a.jf=null;this.ta=a.A;this.xa=null} +ub.prototype.reset=function(){var a=this.ra;a.jf=null;this.ta=a.A;this.xa=null};ub.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};ub.prototype.Ad=function(){return this.next()};ub.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +ub.prototype.any=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};ub.prototype.all=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};ub.prototype.each=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this}; +ub.prototype.map=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.value)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};ub.prototype.filter=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.value;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};ub.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.jf=this}; ub.prototype.toString=function(){return null!==this.xa?"MapValueSetIterator@"+this.xa.value:"MapValueSetIterator"};oa.Object.defineProperties(ub.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Ub}}});ub.prototype.first=ub.prototype.first;ub.prototype.hasNext=ub.prototype.Ad;ub.prototype.next=ub.prototype.next;ub.prototype.reset=ub.prototype.reset;ub.className="MapValueSetIterator"; function ob(a,b){this.key=a;this.value=b;this.nl=this.Aa=null}ob.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};ob.className="KeyValuePair";function vb(a){this.ra=a;a.Ua=null;this.ta=a.A;this.xa=null}vb.prototype.reset=function(){var a=this.ra;a.Ua=null;this.ta=a.A;this.xa=null}; vb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.key=b.key,this.value=b.value,!0;this.ce();return!1};vb.prototype.Ad=function(){return this.next()};vb.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;return null!==a?(this.xa=a,this.key=a.key,this.value=a.value,a):null}; vb.prototype.any=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};vb.prototype.all=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};vb.prototype.each=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d),b.A!==c&&Da(b),d=d.Aa;return this}; vb.prototype.map=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};vb.prototype.filter=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)a(e)&&d.add(e),b.A!==c&&Da(b),e=e.Aa;return d.iterator};vb.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.Ua=this};vb.prototype.toString=function(){return null!==this.xa?"MapIterator@"+this.xa:"MapIterator"}; oa.Object.defineProperties(vb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Ub}}});vb.prototype.first=vb.prototype.first;vb.prototype.hasNext=vb.prototype.Ad;vb.prototype.next=vb.prototype.next;vb.prototype.reset=vb.prototype.reset;vb.className="MapIterator"; -function yb(a){Za(this);this._isFrozen=!1;this.Vb={};this.Ub=0;this.hf=this.Ua=null;this.A=0;this.jf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=yb.prototype;t.xb=function(){var a=this.A;a++;999999999=this.count)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new vb(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?fb:new qb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return fb; -var a=this.hf;return null!==a?(a.reset(),a):new ub(this)}}});yb.prototype.toKeySet=yb.prototype.Nf;yb.prototype.toArray=yb.prototype.Ka;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete;yb.prototype.remove=yb.prototype.remove;yb.prototype.get=yb.prototype.get;yb.prototype.getValue=yb.prototype.L;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.first=yb.prototype.first;yb.prototype.addAll=yb.prototype.addAll; +var a=this.jf;return null!==a?(a.reset(),a):new ub(this)}}});yb.prototype.toKeySet=yb.prototype.Of;yb.prototype.toArray=yb.prototype.Ka;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete;yb.prototype.remove=yb.prototype.remove;yb.prototype.get=yb.prototype.get;yb.prototype.getValue=yb.prototype.L;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.first=yb.prototype.first;yb.prototype.addAll=yb.prototype.addAll; yb.prototype.set=yb.prototype.set;yb.prototype.add=yb.prototype.add;yb.prototype.thaw=yb.prototype.pa;yb.prototype.freeze=yb.prototype.freeze;yb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var zb,Ab,Bb,Cb,Db;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; -K.prototype.vg=function(a,b){G&&(A(a,"number",K,"setTo:x"),A(b,"number",K,"setTo:y"),this.la());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(w(a,K,K,"set:p"),this.la());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; +K.prototype.wg=function(a,b){G&&(A(a,"number",K,"setTo:x"),A(b,"number",K,"setTo:y"),this.la());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(w(a,K,K,"set:p"),this.la());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Eb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new K(c,e)}return new K} -function Fb(a){G&&w(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ni=function(a,b){return this.J===a&&this.K===b};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(w(a,K,K,"add:p"),this.la());this.J+=a.x;this.K+=a.y;return this};t.qe=function(a){G&&(w(a,K,K,"subtract:p"),this.la());this.J-=a.x;this.K-=a.y;return this}; +function Fb(a){G&&w(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ni=function(a,b){return this.J===a&&this.K===b};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(w(a,K,K,"add:p"),this.la());this.J+=a.x;this.K+=a.y;return this};t.re=function(a){G&&(w(a,K,K,"subtract:p"),this.la());this.J-=a.x;this.K-=a.y;return this}; t.offset=function(a,b){G&&(E(a,K,"offset:dx"),E(b,K,"offset:dy"),this.la());this.J+=a;this.K+=b;return this};K.prototype.rotate=function(a){G&&(E(a,K,"rotate:angle"),this.la());if(0===a)return this;var b=this.J,c=this.K;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.J=a*b-d*c;this.K=d*b+a*c;return this};t=K.prototype; -t.scale=function(a,b){G&&(E(a,K,"scale:sx"),E(b,K,"scale:sy"),this.la());this.J*=a;this.K*=b;return this};t.Cf=function(a){G&&w(a,K,K,"distanceSquaredPoint:p");var b=a.x-this.J;a=a.y-this.K;return b*b+a*a};t.zd=function(a,b){G&&(E(a,K,"distanceSquared:px"),E(b,K,"distanceSquared:py"));a-=this.J;b-=this.K;return a*a+b*b};t.normalize=function(){G&&this.la();var a=this.J,b=this.K,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c} t.Py=function(a,b){G&&(w(a,K,K,"compareWithLineSegmentPoint:p"),w(b,K,K,"compareWithLineSegmentPoint:q"));return L.Gl(a.x,a.y,b.x,b.y,this.x,this.y)};t.eA=function(a,b,c,d){G&&(E(a,K,"projectOntoLineSegment:px"),E(b,K,"projectOntoLineSegment:py"),E(c,K,"projectOntoLineSegment:qx"),E(d,K,"projectOntoLineSegment:qy"));L.qh(a,b,c,d,this.J,this.K,this);return this}; t.fA=function(a,b){G&&(w(a,K,K,"projectOntoLineSegmentPoint:p"),w(b,K,K,"projectOntoLineSegmentPoint:q"));L.qh(a.x,a.y,b.x,b.y,this.J,this.K,this);return this};t.tA=function(a,b,c,d){G&&(E(a,K,"snapToGrid:originx"),E(b,K,"snapToGrid:originy"),E(c,K,"snapToGrid:cellwidth"),E(d,K,"snapToGrid:cellheight"));L.Eo(this.J,this.K,a,b,c,d,this);return this};t.uA=function(a,b){G&&(w(a,K,K,"snapToGridPoint:p"),w(b,Hb,K,"snapToGridPoint:q"));L.Eo(this.J,this.K,a.x,a.y,b.width,b.height,this);return this}; @@ -111,61 +111,61 @@ t.u=function(){return isFinite(this.x)&&isFinite(this.y)};K.alloc=function(){var oa.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",K,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",K,"y"),this.la(a));this.K=a}}});K.prototype.isReal=K.prototype.u;K.prototype.setSpot=K.prototype.Di;K.prototype.setRectSpot=K.prototype.Ci;K.prototype.snapToGridPoint=K.prototype.uA;K.prototype.snapToGrid=K.prototype.tA; K.prototype.projectOntoLineSegmentPoint=K.prototype.fA;K.prototype.projectOntoLineSegment=K.prototype.eA;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(E(a,K,"intersectingLineSegments:a1x"),E(b,K,"intersectingLineSegments:a1y"),E(c,K,"intersectingLineSegments:a2x"),E(d,K,"intersectingLineSegments:a2y"),E(e,K,"intersectingLineSegments:b1x"),E(f,K,"intersectingLineSegments:b1y"),E(g,K,"intersectingLineSegments:b2x"),E(h,K,"intersectingLineSegments:b2y"));return L.Nl(a,b,c,d,e,f,g,h)}; K.prototype.compareWithLineSegmentPoint=K.prototype.Py;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(E(a,K,"compareWithLineSegment:a1x"),E(b,K,"compareWithLineSegment:a1y"),E(c,K,"compareWithLineSegment:a2x"),E(d,K,"compareWithLineSegment:a2y"),E(e,K,"compareWithLineSegment:b1x"),E(f,K,"compareWithLineSegment:b1y"));return L.Gl(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.cb;K.prototype.normalize=K.prototype.normalize; -K.prototype.distanceSquared=K.prototype.zd;K.prototype.distanceSquaredPoint=K.prototype.Cf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.qe;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.fb;K.prototype.equalTo=K.prototype.ni;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.vg;var Ob=[];K.className="Point";K.parse=Eb;K.stringify=Fb; +K.prototype.distanceSquared=K.prototype.zd;K.prototype.distanceSquaredPoint=K.prototype.Df;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.re;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.fb;K.prototype.equalTo=K.prototype.ni;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.wg;var Ob=[];K.className="Point";K.parse=Eb;K.stringify=Fb; K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb;K.Origin=zb=(new K(0,0)).na();K.InfiniteTopLeft=Ab=(new K(-Infinity,-Infinity)).na();K.InfiniteBottomRight=Bb=(new K(Infinity,Infinity)).na();K.SixPoint=Cb=(new K(6,6)).na();K.NoPoint=Db=(new K(NaN,NaN)).na();K.parse=Eb;K.stringify=Fb;K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb; -function Hb(a,b){void 0===a?this.fa=this.ga=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.ga=a,this.fa=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Pb,Qb,Rb,Sb,Tb,Ub,Yb;Hb.prototype.assign=function(a){this.ga=a.ga;this.fa=a.fa;return this};Hb.prototype.h=function(a,b){this.ga=a;this.fa=b;return this}; -Hb.prototype.vg=function(a,b){G&&(A(a,"number",Hb,"setTo:w"),A(b,"number",Hb,"setTo:h"),0>a&&Ba(a,">= 0",Hb,"setTo:w"),0>b&&Ba(b,">= 0",Hb,"setTo:h"),this.la());this.ga=a;this.fa=b;return this};Hb.prototype.set=function(a){G&&(w(a,Hb,Hb,"set:s"),this.la());this.ga=a.ga;this.fa=a.fa;return this};Hb.prototype.copy=function(){var a=new Hb;a.ga=this.ga;a.fa=this.fa;return a};t=Hb.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +function Hb(a,b){void 0===a?this.da=this.fa=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.fa=a,this.da=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Pb,Qb,Rb,Sb,Tb,Ub,Vb;Hb.prototype.assign=function(a){this.fa=a.fa;this.da=a.da;return this};Hb.prototype.h=function(a,b){this.fa=a;this.da=b;return this}; +Hb.prototype.wg=function(a,b){G&&(A(a,"number",Hb,"setTo:w"),A(b,"number",Hb,"setTo:h"),0>a&&Ba(a,">= 0",Hb,"setTo:w"),0>b&&Ba(b,">= 0",Hb,"setTo:h"),this.la());this.fa=a;this.da=b;return this};Hb.prototype.set=function(a){G&&(w(a,Hb,Hb,"set:s"),this.la());this.fa=a.fa;this.da=a.da;return this};Hb.prototype.copy=function(){var a=new Hb;a.fa=this.fa;a.da=this.da;return a};t=Hb.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; -function Zb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Hb(c,e)}return new Hb}function $b(a){G&&w(a,Hb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.D=function(a){return a instanceof Hb?this.ga===a.width&&this.fa===a.height:!1};t.ni=function(a,b){return this.ga===a&&this.fa===b}; -t.fb=function(a){return L.C(this.ga,a.width)&&L.C(this.fa,a.height)};t.u=function(){return isFinite(this.width)&&isFinite(this.height)};Hb.alloc=function(){var a=ac.pop();return void 0===a?new Hb:a};Hb.free=function(a){ac.push(a)}; -oa.Object.defineProperties(Hb.prototype,{width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(A(a,"number",Hb,"width"),this.la(a));0>a&&Ba(a,">= 0",Hb,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",Hb,"height"),this.la(a));0>a&&Ba(a,">= 0",Hb,"height");this.fa=a}}});Hb.prototype.isReal=Hb.prototype.u;Hb.prototype.equalsApprox=Hb.prototype.fb;Hb.prototype.equalTo=Hb.prototype.ni; -Hb.prototype.equals=Hb.prototype.D;Hb.prototype.set=Hb.prototype.set;Hb.prototype.setTo=Hb.prototype.vg;var ac=[];Hb.className="Size";Hb.parse=Zb;Hb.stringify=$b;Hb.ZeroSize=Pb=(new Hb(0,0)).na();Hb.OneSize=Qb=(new Hb(1,1)).na();Hb.SixSize=Rb=(new Hb(6,6)).na();Hb.EightSize=Sb=(new Hb(8,8)).na();Hb.TenSize=Tb=(new Hb(10,10)).na();Hb.InfiniteSize=Ub=(new Hb(Infinity,Infinity)).na();Hb.NoSize=Yb=(new Hb(NaN,NaN)).na();Hb.parse=Zb;Hb.stringify=$b; -function M(a,b,c,d){void 0===a?this.fa=this.ga=this.K=this.J=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.J=a,this.K=b,this.ga=c,this.fa=d):a instanceof K?(c=a.x,a=a.y,b instanceof K?(d=b.x,b=b.y,this.J=Math.min(c,d),this.K=Math.min(a,b),this.ga=Math.abs(c-d),this.fa=Math.abs(a-b)):b instanceof Hb?(this.J=c,this.K=a,this.ga=b.width,this.fa=b.height):v("Incorrect second argument supplied to Rect constructor "+b)):v("Invalid arguments to Rect constructor: "+ -a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.J=a.J;this.K=a.K;this.ga=a.ga;this.fa=a.fa;return this};t.h=function(a,b,c,d){this.J=a;this.K=b;this.ga=c;this.fa=d;return this};function bc(a,b,c){a.ga=b;a.fa=c}t.vg=function(a,b,c,d){G&&(A(a,"number",M,"setTo:x"),A(b,"number",M,"setTo:y"),A(c,"number",M,"setTo:w"),A(d,"number",M,"setTo:h"),0>c&&Ba(c,">= 0",M,"setTo:w"),0>d&&Ba(d,">= 0",M,"setTo:h"),this.la());this.J=a;this.K=b;this.ga=c;this.fa=d;return this}; -t.set=function(a){G&&(w(a,M,M,"set:r"),this.la());this.J=a.J;this.K=a.K;this.ga=a.ga;this.fa=a.fa;return this};t.bd=function(a){G&&(w(a,K,M,"setPoint:p"),this.la());this.J=a.x;this.K=a.y;return this};t.sA=function(a){G&&(w(a,Hb,M,"setSize:s"),this.la());this.ga=a.width;this.fa=a.height;return this};M.prototype.copy=function(){var a=new M;a.J=this.J;a.K=this.K;a.ga=this.ga;a.fa=this.fa;return a};t=M.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +function Zb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Hb(c,e)}return new Hb}function $b(a){G&&w(a,Hb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.D=function(a){return a instanceof Hb?this.fa===a.width&&this.da===a.height:!1};t.ni=function(a,b){return this.fa===a&&this.da===b}; +t.fb=function(a){return L.C(this.fa,a.width)&&L.C(this.da,a.height)};t.Bc=function(a,b){G&&(E(a,Hb,"inflate:w"),E(b,Hb,"inflate:h"));a=this.width+a;this.fa=0<=a?a:0;b=this.height+b;this.da=0<=b?b:0;return this};t.u=function(){return isFinite(this.width)&&isFinite(this.height)};Hb.alloc=function(){var a=ac.pop();return void 0===a?new Hb:a};Hb.free=function(a){ac.push(a)}; +oa.Object.defineProperties(Hb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",Hb,"width"),this.la(a));0>a&&Ba(a,">= 0",Hb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.da},set:function(a){G&&(A(a,"number",Hb,"height"),this.la(a));0>a&&Ba(a,">= 0",Hb,"height");this.da=a}}});Hb.prototype.isReal=Hb.prototype.u;Hb.prototype.inflate=Hb.prototype.Bc;Hb.prototype.equalsApprox=Hb.prototype.fb; +Hb.prototype.equalTo=Hb.prototype.ni;Hb.prototype.equals=Hb.prototype.D;Hb.prototype.set=Hb.prototype.set;Hb.prototype.setTo=Hb.prototype.wg;var ac=[];Hb.className="Size";Hb.parse=Zb;Hb.stringify=$b;Hb.ZeroSize=Pb=(new Hb(0,0)).na();Hb.OneSize=Qb=(new Hb(1,1)).na();Hb.SixSize=Rb=(new Hb(6,6)).na();Hb.EightSize=Sb=(new Hb(8,8)).na();Hb.TenSize=Tb=(new Hb(10,10)).na();Hb.InfiniteSize=Ub=(new Hb(Infinity,Infinity)).na();Hb.NoSize=Vb=(new Hb(NaN,NaN)).na();Hb.parse=Zb;Hb.stringify=$b; +function M(a,b,c,d){void 0===a?this.da=this.fa=this.K=this.J=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.J=a,this.K=b,this.fa=c,this.da=d):a instanceof K?(c=a.x,a=a.y,b instanceof K?(d=b.x,b=b.y,this.J=Math.min(c,d),this.K=Math.min(a,b),this.fa=Math.abs(c-d),this.da=Math.abs(a-b)):b instanceof Hb?(this.J=c,this.K=a,this.fa=b.width,this.da=b.height):v("Incorrect second argument supplied to Rect constructor "+b)):v("Invalid arguments to Rect constructor: "+ +a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.J=a.J;this.K=a.K;this.fa=a.fa;this.da=a.da;return this};t.h=function(a,b,c,d){this.J=a;this.K=b;this.fa=c;this.da=d;return this};function bc(a,b,c){a.fa=b;a.da=c}t.wg=function(a,b,c,d){G&&(A(a,"number",M,"setTo:x"),A(b,"number",M,"setTo:y"),A(c,"number",M,"setTo:w"),A(d,"number",M,"setTo:h"),0>c&&Ba(c,">= 0",M,"setTo:w"),0>d&&Ba(d,">= 0",M,"setTo:h"),this.la());this.J=a;this.K=b;this.fa=c;this.da=d;return this}; +t.set=function(a){G&&(w(a,M,M,"set:r"),this.la());this.J=a.J;this.K=a.K;this.fa=a.fa;this.da=a.da;return this};t.bd=function(a){G&&(w(a,K,M,"setPoint:p"),this.la());this.J=a.x;this.K=a.y;return this};t.sA=function(a){G&&(w(a,Hb,M,"setSize:s"),this.la());this.fa=a.width;this.da=a.height;return this};M.prototype.copy=function(){var a=new M;a.J=this.J;a.K=this.K;a.fa=this.fa;a.da=this.da;return a};t=M.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function cc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new M(c,e,f,g)}return new M}function dc(a){G&&w(a,M);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()} -t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.D=function(a){return a instanceof M?this.J===a.x&&this.K===a.y&&this.ga===a.width&&this.fa===a.height:!1};t.ni=function(a,b,c,d){return this.J===a&&this.K===b&&this.ga===c&&this.fa===d};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)&&L.C(this.ga,a.width)&&L.C(this.fa,a.height)};function ec(a,b){return L.ha(a.J,b.x)&&L.ha(a.K,b.y)&&L.ha(a.ga,b.width)&&L.ha(a.fa,b.height)} -t.ea=function(a){G&&w(a,K,M,"containsPoint:p");return this.J<=a.x&&this.J+this.ga>=a.x&&this.K<=a.y&&this.K+this.fa>=a.y};t.Qe=function(a){G&&w(a,M,M,"containsRect:r");return this.J<=a.x&&a.x+a.width<=this.J+this.ga&&this.K<=a.y&&a.y+a.height<=this.K+this.fa}; -t.contains=function(a,b,c,d){G?(E(a,M,"contains:x"),E(b,M,"contains:y"),void 0===c?c=0:E(c,M,"contains:w"),void 0===d?d=0:E(d,M,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.J<=a&&a+c<=this.J+this.ga&&this.K<=b&&b+d<=this.K+this.fa};t.offset=function(a,b){G&&(E(a,M,"offset:dx"),E(b,M,"offset:dy"),this.la());this.J+=a;this.K+=b;return this}; -t.Wc=function(a,b){G&&(E(a,M,"inflate:w"),E(b,M,"inflate:h"));return fc(this,b,a,b,a)};t.so=function(a){G&&w(a,gc,M,"addMargin:m");return fc(this,a.top,a.right,a.bottom,a.left)};t.xv=function(a){G&&w(a,gc,M,"subtractMargin:m");return fc(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){G&&(E(a,M,"grow:t"),E(b,M,"grow:r"),E(c,M,"grow:b"),E(d,M,"grow:l"));return fc(this,a,b,c,d)}; -function fc(a,b,c,d,e){G&&a.la();var f=a.ga;c+e<=-f?(a.J+=f/2,a.ga=0):(a.J-=e,a.ga+=c+e);c=a.fa;b+d<=-c?(a.K+=c/2,a.fa=0):(a.K-=b,a.fa+=b+d);return a}t.yx=function(a){G&&w(a,M,M,"intersectRect:r");return hc(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){G&&(E(a,M,"intersect:x"),E(b,M,"intersect:y"),E(c,M,"intersect:w"),E(d,M,"intersect:h"),(0>c||0>d)&&v("Rect.intersect:Width and height cannot be negative"));return hc(this,a,b,c,d)}; -function hc(a,b,c,d,e){G&&a.la();var f=Math.max(a.J,b),g=Math.max(a.K,c);b=Math.min(a.J+a.ga,b+d);c=Math.min(a.K+a.fa,c+e);a.J=f;a.K=g;a.ga=Math.max(0,b-f);a.fa=Math.max(0,c-g);return a}t.Yc=function(a){G&&w(a,M,M,"intersectsRect:r");return this.Wu(a.x,a.y,a.width,a.height)}; -t.Wu=function(a,b,c,d){G&&(E(a,M,"intersects:x"),E(b,M,"intersects:y"),E(a,M,"intersects:w"),E(b,M,"intersects:h"),(0>c||0>d)&&v("Rect.intersects:Width and height cannot be negative"));var e=this.ga,f=this.J;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.fa;c=this.K;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; -function kc(a,b){var c=a.ga,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.fa;a=a.K;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Ye=function(a){G&&w(a,K,M,"unionPoint:p");return lc(this,a.x,a.y,0,0)};t.cd=function(a){G&&w(a,M,M,"unionRect:r");return lc(this,a.J,a.K,a.ga,a.fa)}; -t.Bv=function(a,b,c,d){G?(E(a,M,"union:x"),E(b,M,"union:y"),void 0===c?c=0:E(c,M,"union:w"),void 0===d?d=0:E(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.la()):(void 0===c&&(c=0),void 0===d&&(d=0));return lc(this,a,b,c,d)};function lc(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.ga,b+d);c=Math.max(a.K+a.fa,c+e);a.J=f;a.K=g;a.ga=b-f;a.fa=c-g;return a} -t.Di=function(a,b,c){G&&(E(a,M,"setSpot:x"),E(b,M,"setSpot:y"),w(c,Ib,M,"setSpot:spot"),this.la());this.J=a-c.offsetX-c.x*this.ga;this.K=b-c.offsetY-c.y*this.fa;return this}; +t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.D=function(a){return a instanceof M?this.J===a.x&&this.K===a.y&&this.fa===a.width&&this.da===a.height:!1};t.ni=function(a,b,c,d){return this.J===a&&this.K===b&&this.fa===c&&this.da===d};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)&&L.C(this.fa,a.width)&&L.C(this.da,a.height)};function ec(a,b){return L.ha(a.J,b.x)&&L.ha(a.K,b.y)&&L.ha(a.fa,b.width)&&L.ha(a.da,b.height)} +t.ga=function(a){G&&w(a,K,M,"containsPoint:p");return this.J<=a.x&&this.J+this.fa>=a.x&&this.K<=a.y&&this.K+this.da>=a.y};t.Re=function(a){G&&w(a,M,M,"containsRect:r");return this.J<=a.x&&a.x+a.width<=this.J+this.fa&&this.K<=a.y&&a.y+a.height<=this.K+this.da}; +t.contains=function(a,b,c,d){G?(E(a,M,"contains:x"),E(b,M,"contains:y"),void 0===c?c=0:E(c,M,"contains:w"),void 0===d?d=0:E(d,M,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.J<=a&&a+c<=this.J+this.fa&&this.K<=b&&b+d<=this.K+this.da};t.offset=function(a,b){G&&(E(a,M,"offset:dx"),E(b,M,"offset:dy"),this.la());this.J+=a;this.K+=b;return this}; +t.Bc=function(a,b){G&&(E(a,M,"inflate:w"),E(b,M,"inflate:h"));return fc(this,b,a,b,a)};t.so=function(a){G&&w(a,gc,M,"addMargin:m");return fc(this,a.top,a.right,a.bottom,a.left)};t.xv=function(a){G&&w(a,gc,M,"subtractMargin:m");return fc(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){G&&(E(a,M,"grow:t"),E(b,M,"grow:r"),E(c,M,"grow:b"),E(d,M,"grow:l"));return fc(this,a,b,c,d)}; +function fc(a,b,c,d,e){G&&a.la();var f=a.fa;c+e<=-f?(a.J+=f/2,a.fa=0):(a.J-=e,a.fa+=c+e);c=a.da;b+d<=-c?(a.K+=c/2,a.da=0):(a.K-=b,a.da+=b+d);return a}t.zx=function(a){G&&w(a,M,M,"intersectRect:r");return hc(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){G&&(E(a,M,"intersect:x"),E(b,M,"intersect:y"),E(c,M,"intersect:w"),E(d,M,"intersect:h"),(0>c||0>d)&&v("Rect.intersect:Width and height cannot be negative"));return hc(this,a,b,c,d)}; +function hc(a,b,c,d,e){G&&a.la();var f=Math.max(a.J,b),g=Math.max(a.K,c);b=Math.min(a.J+a.fa,b+d);c=Math.min(a.K+a.da,c+e);a.J=f;a.K=g;a.fa=Math.max(0,b-f);a.da=Math.max(0,c-g);return a}t.Yc=function(a){G&&w(a,M,M,"intersectsRect:r");return this.Wu(a.x,a.y,a.width,a.height)}; +t.Wu=function(a,b,c,d){G&&(E(a,M,"intersects:x"),E(b,M,"intersects:y"),E(a,M,"intersects:w"),E(b,M,"intersects:h"),(0>c||0>d)&&v("Rect.intersects:Width and height cannot be negative"));var e=this.fa,f=this.J;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.da;c=this.K;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; +function ic(a,b){var c=a.fa,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.da;a=a.K;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Ze=function(a){G&&w(a,K,M,"unionPoint:p");return lc(this,a.x,a.y,0,0)};t.cd=function(a){G&&w(a,M,M,"unionRect:r");return lc(this,a.J,a.K,a.fa,a.da)}; +t.Bv=function(a,b,c,d){G?(E(a,M,"union:x"),E(b,M,"union:y"),void 0===c?c=0:E(c,M,"union:w"),void 0===d?d=0:E(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.la()):(void 0===c&&(c=0),void 0===d&&(d=0));return lc(this,a,b,c,d)};function lc(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.fa,b+d);c=Math.max(a.K+a.da,c+e);a.J=f;a.K=g;a.fa=b-f;a.da=c-g;return a} +t.Di=function(a,b,c){G&&(E(a,M,"setSpot:x"),E(b,M,"setSpot:y"),w(c,Ib,M,"setSpot:spot"),this.la());this.J=a-c.offsetX-c.x*this.fa;this.K=b-c.offsetY-c.y*this.da;return this}; function mc(a,b,c,d,e,f,g,h){G?(E(a,M,"contains:rx"),E(b,M,"contains:ry"),E(c,M,"contains:rw"),E(d,M,"contains:rh"),E(e,M,"contains:x"),E(f,M,"contains:y"),void 0===g?g=0:E(g,M,"contains:w"),void 0===h?h=0:E(h,M,"contains:h"),(0>c||0>d||0>g||0>h)&&v("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} function nc(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersects:rx"),E(b,M,"intersects:ry"),E(c,M,"intersects:rw"),E(d,M,"intersects:rh"),E(e,M,"intersects:x"),E(f,M,"intersects:y"),E(g,M,"intersects:w"),E(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Oz=function(){return 0===this.width&&0===this.height}; M.alloc=function(){var a=oc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=oc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){oc.push(a)}; -oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"y"),this.la(a));this.K=a}},width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(A(a,"number",M,"width"),this.la(a));0>a&&Ba(a,">= 0",M,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.fa}, -set:function(a){G&&(A(a,"number",M,"height"),this.la(a));0>a&&Ba(a,">= 0",M,"height");this.fa=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"left"),this.la(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"top"),this.la(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.ga},set:function(a){G&&(E(a,M,"right"),this.la(a));this.J+=a-(this.J+this.ga)}}, -bottom:{configurable:!0,get:function(){return this.K+this.fa},set:function(a){G&&(E(a,M,"top"),this.la(a));this.K+=a-(this.K+this.fa)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(w(a,K,M,"position"),this.la(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Hb(this.ga,this.fa)},set:function(a){G&&(w(a,Hb,M,"size"),this.la(a));this.ga=a.width;this.fa=a.height}},center:{configurable:!0, -enumerable:!0,get:function(){return new K(this.J+this.ga/2,this.K+this.fa/2)},set:function(a){G&&(w(a,K,M,"center"),this.la(a));this.J=a.x-this.ga/2;this.K=a.y-this.fa/2}},centerX:{configurable:!0,get:function(){return this.J+this.ga/2},set:function(a){G&&(E(a,M,"centerX"),this.la(a));this.J=a-this.ga/2}},centerY:{configurable:!0,get:function(){return this.K+this.fa/2},set:function(a){G&&(E(a,M,"centerY"),this.la(a));this.K=a-this.fa/2}}});M.prototype.isEmpty=M.prototype.Oz; -M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersectsLineSegment:x"),E(b,M,"intersectsLineSegment:y"),E(c,M,"intersectsLineSegment:w"),E(d,M,"intersectsLineSegment:h"),E(e,M,"intersectsLineSegment:p1x"),E(f,M,"intersectsLineSegment:p1y"),E(g,M,"intersectsLineSegment:p2x"),E(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.zx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Di; -M.prototype.union=M.prototype.Bv;M.prototype.unionRect=M.prototype.cd;M.prototype.unionPoint=M.prototype.Ye;M.prototype.intersects=M.prototype.Wu;M.prototype.intersectsRect=M.prototype.Yc;M.prototype.intersect=M.prototype.Vu;M.prototype.intersectRect=M.prototype.yx;M.prototype.grow=M.prototype.Iz;M.prototype.subtractMargin=M.prototype.xv;M.prototype.addMargin=M.prototype.so;M.prototype.inflate=M.prototype.Wc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; -M.prototype.containsRect=M.prototype.Qe;M.prototype.containsPoint=M.prototype.ea;M.prototype.equalsApprox=M.prototype.fb;M.prototype.equalTo=M.prototype.ni;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.sA;M.prototype.setPoint=M.prototype.bd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.vg;var pc=null,qc=null,oc=[];M.className="Rect";M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;M.ZeroRect=pc=(new M(0,0,0,0)).na();M.NoRect=qc=(new M(NaN,NaN,NaN,NaN)).na(); -M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;function gc(a,b,c,d){void 0===a?this.Ee=this.ve=this.Ne=this.Oe=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}gc.prototype.assign=function(a){this.Oe=a.Oe;this.Ne=a.Ne;this.ve=a.ve;this.Ee=a.Ee;return this}; -gc.prototype.vg=function(a,b,c,d){G&&(A(a,"number",gc,"setTo:t"),A(b,"number",gc,"setTo:r"),A(c,"number",gc,"setTo:b"),A(d,"number",gc,"setTo:l"),this.la());this.Oe=a;this.Ne=b;this.ve=c;this.Ee=d;return this};gc.prototype.set=function(a){G&&(w(a,gc,gc,"assign:m"),this.la());this.Oe=a.Oe;this.Ne=a.Ne;this.ve=a.ve;this.Ee=a.Ee;return this};gc.prototype.copy=function(){var a=new gc;a.Oe=this.Oe;a.Ne=this.Ne;a.ve=this.ve;a.Ee=this.Ee;return a};t=gc.prototype; +oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"y"),this.la(a));this.K=a}},width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",M,"width"),this.la(a));0>a&&Ba(a,">= 0",M,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.da}, +set:function(a){G&&(A(a,"number",M,"height"),this.la(a));0>a&&Ba(a,">= 0",M,"height");this.da=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"left"),this.la(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"top"),this.la(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.fa},set:function(a){G&&(E(a,M,"right"),this.la(a));this.J+=a-(this.J+this.fa)}}, +bottom:{configurable:!0,get:function(){return this.K+this.da},set:function(a){G&&(E(a,M,"top"),this.la(a));this.K+=a-(this.K+this.da)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(w(a,K,M,"position"),this.la(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Hb(this.fa,this.da)},set:function(a){G&&(w(a,Hb,M,"size"),this.la(a));this.fa=a.width;this.da=a.height}},center:{configurable:!0, +enumerable:!0,get:function(){return new K(this.J+this.fa/2,this.K+this.da/2)},set:function(a){G&&(w(a,K,M,"center"),this.la(a));this.J=a.x-this.fa/2;this.K=a.y-this.da/2}},centerX:{configurable:!0,get:function(){return this.J+this.fa/2},set:function(a){G&&(E(a,M,"centerX"),this.la(a));this.J=a-this.fa/2}},centerY:{configurable:!0,get:function(){return this.K+this.da/2},set:function(a){G&&(E(a,M,"centerY"),this.la(a));this.K=a-this.da/2}}});M.prototype.isEmpty=M.prototype.Oz; +M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersectsLineSegment:x"),E(b,M,"intersectsLineSegment:y"),E(c,M,"intersectsLineSegment:w"),E(d,M,"intersectsLineSegment:h"),E(e,M,"intersectsLineSegment:p1x"),E(f,M,"intersectsLineSegment:p1y"),E(g,M,"intersectsLineSegment:p2x"),E(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.Ax(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Di; +M.prototype.union=M.prototype.Bv;M.prototype.unionRect=M.prototype.cd;M.prototype.unionPoint=M.prototype.Ze;M.prototype.intersects=M.prototype.Wu;M.prototype.intersectsRect=M.prototype.Yc;M.prototype.intersect=M.prototype.Vu;M.prototype.intersectRect=M.prototype.zx;M.prototype.grow=M.prototype.Iz;M.prototype.subtractMargin=M.prototype.xv;M.prototype.addMargin=M.prototype.so;M.prototype.inflate=M.prototype.Bc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; +M.prototype.containsRect=M.prototype.Re;M.prototype.containsPoint=M.prototype.ga;M.prototype.equalsApprox=M.prototype.fb;M.prototype.equalTo=M.prototype.ni;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.sA;M.prototype.setPoint=M.prototype.bd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.wg;var pc=null,qc=null,oc=[];M.className="Rect";M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;M.ZeroRect=pc=(new M(0,0,0,0)).na();M.NoRect=qc=(new M(NaN,NaN,NaN,NaN)).na(); +M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;function gc(a,b,c,d){void 0===a?this.Fe=this.we=this.Oe=this.Pe=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}gc.prototype.assign=function(a){this.Pe=a.Pe;this.Oe=a.Oe;this.we=a.we;this.Fe=a.Fe;return this}; +gc.prototype.wg=function(a,b,c,d){G&&(A(a,"number",gc,"setTo:t"),A(b,"number",gc,"setTo:r"),A(c,"number",gc,"setTo:b"),A(d,"number",gc,"setTo:l"),this.la());this.Pe=a;this.Oe=b;this.we=c;this.Fe=d;return this};gc.prototype.set=function(a){G&&(w(a,gc,gc,"assign:m"),this.la());this.Pe=a.Pe;this.Oe=a.Oe;this.we=a.we;this.Fe=a.Fe;return this};gc.prototype.copy=function(){var a=new gc;a.Pe=this.Pe;a.Oe=this.Oe;a.we=this.we;a.Fe=this.Fe;return a};t=gc.prototype; t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function rc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new gc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new gc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new gc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new gc(c,e):new gc(c,e,f,g)}return new gc} -function wc(a){G&&w(a,gc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.D=function(a){return a instanceof gc?this.Oe===a.top&&this.Ne===a.right&&this.ve===a.bottom&&this.Ee===a.left:!1};t.ni=function(a,b,c,d){return this.Oe===a&&this.Ne===b&&this.ve===c&&this.Ee===d}; -t.fb=function(a){return L.C(this.Oe,a.top)&&L.C(this.Ne,a.right)&&L.C(this.ve,a.bottom)&&L.C(this.Ee,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};gc.alloc=function(){var a=xc.pop();return void 0===a?new gc:a};gc.free=function(a){xc.push(a)}; -oa.Object.defineProperties(gc.prototype,{top:{configurable:!0,get:function(){return this.Oe},set:function(a){G&&(E(a,gc,"top"),this.la(a));this.Oe=a}},right:{configurable:!0,get:function(){return this.Ne},set:function(a){G&&(E(a,gc,"right"),this.la(a));this.Ne=a}},bottom:{configurable:!0,get:function(){return this.ve},set:function(a){G&&(E(a,gc,"bottom"),this.la(a));this.ve=a}},left:{configurable:!0,get:function(){return this.Ee},set:function(a){G&& -(E(a,gc,"left"),this.la(a));this.Ee=a}}});gc.prototype.isReal=gc.prototype.u;gc.prototype.equalsApprox=gc.prototype.fb;gc.prototype.equalTo=gc.prototype.ni;gc.prototype.equals=gc.prototype.D;gc.prototype.set=gc.prototype.set;gc.prototype.setTo=gc.prototype.vg;var yc=null,zc=null,xc=[];gc.className="Margin";gc.parse=rc;gc.stringify=wc;gc.ZeroMargin=yc=(new gc(0,0,0,0)).na();gc.TwoMargin=zc=(new gc(2,2,2,2)).na();gc.parse=rc;gc.stringify=wc; -function Ib(a,b,c,d){void 0===a?this.ke=this.je=this.K=this.J=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1}var Ec,Fc,Gc,Hc,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,ed,fd,gd,hd,id,jd,kd,ld,md,pd,qd,rd,sd,td;Ib.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.je=a.je;this.ke=a.ke;return this}; -Ib.prototype.vg=function(a,b,c,d){G&&(ud(a,"setTo:x"),ud(b,"setTo:y"),vd(c,"setTo:offx"),vd(d,"setTo:offy"),this.la());this.J=a;this.K=b;this.je=c;this.ke=d;return this};Ib.prototype.set=function(a){G&&(w(a,Ib,Ib,"set:s"),this.la());this.J=a.J;this.K=a.K;this.je=a.je;this.ke=a.ke;return this};Ib.prototype.copy=function(){var a=new Ib;a.J=this.J;a.K=this.K;a.je=this.je;a.ke=this.ke;return a};t=Ib.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; -t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function wd(a,b){a.J=NaN;a.K=NaN;a.je=b;return a} +function sc(a){G&&w(a,gc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.D=function(a){return a instanceof gc?this.Pe===a.top&&this.Oe===a.right&&this.we===a.bottom&&this.Fe===a.left:!1};t.ni=function(a,b,c,d){return this.Pe===a&&this.Oe===b&&this.we===c&&this.Fe===d}; +t.fb=function(a){return L.C(this.Pe,a.top)&&L.C(this.Oe,a.right)&&L.C(this.we,a.bottom)&&L.C(this.Fe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};gc.alloc=function(){var a=xc.pop();return void 0===a?new gc:a};gc.free=function(a){xc.push(a)}; +oa.Object.defineProperties(gc.prototype,{top:{configurable:!0,get:function(){return this.Pe},set:function(a){G&&(E(a,gc,"top"),this.la(a));this.Pe=a}},right:{configurable:!0,get:function(){return this.Oe},set:function(a){G&&(E(a,gc,"right"),this.la(a));this.Oe=a}},bottom:{configurable:!0,get:function(){return this.we},set:function(a){G&&(E(a,gc,"bottom"),this.la(a));this.we=a}},left:{configurable:!0,get:function(){return this.Fe},set:function(a){G&& +(E(a,gc,"left"),this.la(a));this.Fe=a}}});gc.prototype.isReal=gc.prototype.u;gc.prototype.equalsApprox=gc.prototype.fb;gc.prototype.equalTo=gc.prototype.ni;gc.prototype.equals=gc.prototype.D;gc.prototype.set=gc.prototype.set;gc.prototype.setTo=gc.prototype.wg;var yc=null,zc=null,xc=[];gc.className="Margin";gc.parse=rc;gc.stringify=sc;gc.ZeroMargin=yc=(new gc(0,0,0,0)).na();gc.TwoMargin=zc=(new gc(2,2,2,2)).na();gc.parse=rc;gc.stringify=sc; +function Ib(a,b,c,d){void 0===a?this.le=this.ke=this.K=this.J=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1}var Ec,Fc,Gc,Hc,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,ed,fd,gd,hd,id,jd,kd,ld,md,pd,qd,rd,sd,td;Ib.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.ke=a.ke;this.le=a.le;return this}; +Ib.prototype.wg=function(a,b,c,d){G&&(ud(a,"setTo:x"),ud(b,"setTo:y"),vd(c,"setTo:offx"),vd(d,"setTo:offy"),this.la());this.J=a;this.K=b;this.ke=c;this.le=d;return this};Ib.prototype.set=function(a){G&&(w(a,Ib,Ib,"set:s"),this.la());this.J=a.J;this.K=a.K;this.ke=a.ke;this.le=a.le;return this};Ib.prototype.copy=function(){var a=new Ib;a.J=this.J;a.K=this.K;a.ke=this.ke;a.le=this.le;return a};t=Ib.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function wd(a,b){a.J=NaN;a.K=NaN;a.ke=b;return a} function ud(a,b){(isNaN(a)||1a)&&Ba(a,"0 <= "+b+" <= 1",Ib,b)}function vd(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&Ba(a,"real number, not NaN or Infinity",Ib,b)} function xd(a){if("string"===typeof a){a=a.trim();if("None"===a)return Ec;if("TopLeft"===a)return Fc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Gc;if("TopRight"===a)return Hc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Jc;if("Center"===a)return Kc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Lc;if("BottomLeft"===a)return Mc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Nc;if("BottomRight"===a)return Oc;if("TopSide"===a)return Qc;if("LeftSide"=== a)return Rc;if("RightSide"===a)return Sc;if("BottomSide"===a)return Tc;if("TopBottomSides"===a)return Uc;if("LeftRightSides"===a)return Vc;if("TopLeftSides"===a)return Wc;if("TopRightSides"===a)return Xc;if("BottomLeftSides"===a)return Yc;if("BottomRightSides"===a)return Zc;if("NotTopSide"===a)return $c;if("NotLeftSide"===a)return ad;if("NotRightSide"===a)return ed;if("NotBottomSide"===a)return fd;if("AllSides"===a)return gd;if("Default"===a)return hd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=L.Mv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);L.Mv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=L.Mv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);L.Mv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Or:function(a,b,c,d,e,f,g,h,k,l,m,n){if(L.Yb(a,b,g,h,n,c,d)&&L.Yb(a,b,g,h,n,e,f))return L.Yb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var x=(d+q)/2,y=(c+u)/2;return L.Or(a, -b,p,r,d,c,x,y,k,l,m,n)||L.Or(x,y,q,u,e,f,g,h,k,l,m,n)},Ky:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Jy:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Nb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))lc(l,a,b,0,0),lc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ -2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Dl(a,b,m,n,d,c,q,u,k,l);L.Dl(q,u,p,r,e,f,g,h,k,l)}return l},Pe:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Pe(a,b,m,n,d,c,q,u,k,l);L.Pe(q,u,p,r,e,f,g,h,k,l)}return l},gv:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,e,f,l,c,d))return L.Yb(a, +b,p,r,d,c,x,y,k,l,m,n)||L.Or(x,y,q,u,e,f,g,h,k,l,m,n)},Uw:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Ky:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Nb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))lc(l,a,b,0,0),lc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ +2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Dl(a,b,m,n,d,c,q,u,k,l);L.Dl(q,u,p,r,e,f,g,h,k,l)}return l},Qe:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Qe(a,b,m,n,d,c,q,u,k,l);L.Qe(q,u,p,r,e,f,g,h,k,l)}return l},gv:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,e,f,l,c,d))return L.Yb(a, b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2;return L.gv(a,b,m,n,p,r,g,h,k,l)||L.gv(p,r,c,d,e,f,g,h,k,l)},NA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},fv:function(a,b,c,d,e,f,g,h){if(L.Yb(a,b,e,f,g,c,d))lc(h,a,b,0,0),lc(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;L.fv(a,b,k,l,m,n,g,h);L.fv(m,n,c,d,e,f,g,h)}return h},To:function(a,b,c,d,e,f,g,h){if(L.Yb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;L.To(a,b,k,l,m,n,g,h);L.To(m,n,c,d,e,f,g,h)}return h},uo:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(L.Yb(a,b,g,h,p,c,d)&&L.Yb(a,b,g,h,p,e,f)){if(!L.Nl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,x=(c+e)/2,y=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+x)/2;c=(u+y)/2;x=(x+e)/ 2;y=(y+f)/2;var z=(d+x)/2,B=(c+y)/2,C=Infinity,D=!1,J=0,U=0;L.uo(a,b,q,u,d,c,z,B,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var x=(c+e)/2,y=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+x)/2;c=(u+y)/2;x=(x+e)/2;y=(y+f)/2;var z=(d+x)/2,B=(c+y)/2;r+=L.vo(a,b,q,u,d,c,z,B,k,l,m,n,p);r+=L.vo(z,B,x,y,e,f,g,h,k,l,m,n,p)}return r},qh:function(a,b,c,d,e,f,g){if(L.ha(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(L.ha(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, -b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(L.ha(h,g))return L.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(L.ha(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return L.qh(a,b,c,d,e,g*(e-a)+b,k)},LA:function(a,b,c,d,e){return L.Ve(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},KA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},Hf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(L.Ve(a,b,a, -d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},JA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, -h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},es:function(a,b,c){return L.zx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},zx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):mc(a,b,c,d,e,f)||mc(a,b,c,d,g,h)||L.Nl(a,b,k,b,e,f,g,h)||L.Nl(k,b,k,l,e,f,g,h)||L.Nl(k,l,a,l,e,f,g,h)||L.Nl(a,l,a,b,e,f,g,h)?!0:!1},Nl:function(a,b,c,d,e,f,g,h){return 0>=L.Gl(a,b,c,d,e,f)*L.Gl(a,b,c,d,g,h)&&0>=L.Gl(e,f,g,h,a,b)*L.Gl(e, -f,g,h,c,d)},Gl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Ro:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Zw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5a)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, +b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(L.ha(h,g))return L.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(L.ha(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return L.qh(a,b,c,d,e,g*(e-a)+b,k)},LA:function(a,b,c,d,e){return L.We(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},KA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},If:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(L.We(a,b,a, +d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},JA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, +h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},es:function(a,b,c){return L.Ax(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},Ax:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):mc(a,b,c,d,e,f)||mc(a,b,c,d,g,h)||L.Nl(a,b,k,b,e,f,g,h)||L.Nl(k,b,k,l,e,f,g,h)||L.Nl(k,l,a,l,e,f,g,h)||L.Nl(a,l,a,b,e,f,g,h)?!0:!1},Nl:function(a,b,c,d,e,f,g,h){return 0>=L.Gl(a,b,c,d,e,f)*L.Gl(a,b,c,d,g,h)&&0>=L.Gl(e,f,g,h,a,b)*L.Gl(e, +f,g,h,c,d)},Gl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Ro:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},$w:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fc,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case N.v:var b=new M(this.startX,this.startY,0,0);b.Bv(this.endX,this.endY,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 N.G:b=new M(this.startX,this.startY,0,0);b.Bv(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.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 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case N.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=C-1?!0:null!==l[u+1].match(D)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());x===x.toLowerCase()&&(b=B.x+b,c=B.y+c);a.h(b,c)}function f(){e(B);return B}function g(){e(z);return z}function h(){var a=y.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?B:new K(2*B.x-z.x,2*B.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2");a=a.replace(k,"$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(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;ag&&(g+=360),q.startAngle+=g);0>a&&(q.startAngle=180-q.startAngle,q.sweepAngle=-q.sweepAngle); 0>d&&(q.startAngle=-q.startAngle,q.sweepAngle=-q.sweepAngle);q.radiusX*=Math.sqrt(a*a+c*c);void 0!==q.radiusY&&(q.radiusY*=Math.sqrt(b*b+d*d));break;case $d:g=q.endX;h=q.endY;q.endX=g*a+h*c+e;q.endY=g*b+h*d+f;if(0===q.radiusX||0===q.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),q.xAxisRotation+=g);0>a&&(q.xAxisRotation=180-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);0>d&&(q.xAxisRotation=-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);q.radiusX*=Math.sqrt(a*a+c*c); q.radiusY*=Math.sqrt(b*b+d*d);break;default:v("Unknown Segment type: "+q.type)}}}}this._isInvalidBounds=!0;return this}; -t.ea=function(a,b){void 0===b&&(b=0);var c=this.nd,d=this.od,e=this.Cc,f=this.Dc;switch(this.type){case N.j:return L.Yb(c,d,e,f,b,a.x,a.y);case N.v:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ea(a);M.free(g);return a;case N.G:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return fe(this,a,b,!0,!1);default:return!1}}; -function fe(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.m:return fe(this,a,b,!0,!1);default:return!1}}; +function fe(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; -t.ox=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; +t.px=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Ru=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Math.abs(e-c)?0<=a-h?90:270:1>Math.abs(a-h)?0<=e-c?0:180:180*Math.atan2(a-h,e-c)/Math.PI,b;g+=m}}return b}; -t.px=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; +t.qx=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=K.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Le=a,this.$h=0,G&&E(d,ke,"x1"),this.ai=Math.max(d,0),G&&E(e,ke,"y1"),this.Rg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= -!0)):(G&&E(d,ke,"x1"),this.Le=d,G&&E(e,ke,"y1"),this.$h=e,G&&E(f,ke,"x2"),a===Zd&&(f=Math.max(f,0)),this.ai=f,"number"===typeof g?(a===Zd&&(g=Math.max(g,0)),this.Rg=g):this.Rg=0);this.$d=null}ke.prototype.copy=function(){var a=new ke;a.wa=this.wa;a.m=this.m&-2;a.Cc=this.Cc;a.Dc=this.Dc;a.Le=this.Le;a.$h=this.$h;a.ai=this.ai;a.Rg=this.Rg;return a};t=ke.prototype; +function ke(a,b,c,d,e,f,g,h){Za(this);void 0===a?a=Dd:G&&ab(a,ke,ke,"constructor:type");this.wa=a;this.o=2;void 0!==b?(G&&E(b,ke,"ex"),this.Dc=b):this.Dc=0;void 0!==c?(G&&E(c,ke,"ey"),this.Ec=c):this.Ec=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===$d?(a=f%360,0>a&&(a+=360),this.Me=a,this.$h=0,G&&E(d,ke,"x1"),this.ai=Math.max(d,0),G&&E(e,ke,"y1"),this.Rg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= +!0)):(G&&E(d,ke,"x1"),this.Me=d,G&&E(e,ke,"y1"),this.$h=e,G&&E(f,ke,"x2"),a===Zd&&(f=Math.max(f,0)),this.ai=f,"number"===typeof g?(a===Zd&&(g=Math.max(g,0)),this.Rg=g):this.Rg=0);this.$d=null}ke.prototype.copy=function(){var a=new ke;a.wa=this.wa;a.o=this.o&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Me=this.Me;a.$h=this.$h;a.ai=this.ai;a.Rg=this.Rg;return a};t=ke.prototype; t.fb=function(a){if(!(a instanceof ke)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Wd:case Dd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Xd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Yd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Zd:return L.C(this.startAngle, a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case $d:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.ub=function(a){a.classType===ke?this.type=a:Ea(this,a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Wd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Dd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Xd:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Yd:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Zd:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case $d:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function ae(a,b){if(null!==a.$d&&!1===b._isInvalidBounds)return a.$d;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$d=[],a.$d;b=a.Le;var e=a.$h,f=L.Zw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=L.Zw(0,0,b>f?b:f,m,m+g,!0);f=Jb.alloc();f.reset();f.translate(c,d);f.rotate(a.Le,0,0);f.scale(k,r);N.Ma(b,f); +function ae(a,b){if(null!==a.$d&&!1===b._isInvalidBounds)return a.$d;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$d=[],a.$d;b=a.Me;var e=a.$h,f=L.$w(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=L.$w(0,0,b>f?b:f,m,m+g,!0);f=Jb.alloc();f.reset();f.translate(c,d);f.rotate(a.Me,0,0);f.scale(k,r);N.Ma(b,f); Jb.free(f);a.$d=b;return a.$d} -oa.Object.defineProperties(ke.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.m&1)},set:function(a){this.m=a?this.m|1:this.m&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.m&2)},set:function(a){this.m=a?this.m|2:this.m&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.m&8)},set:function(a){this.isClosed!==a&&(this.m=a?this.m|8:this.m&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, -get:function(){return this.wa},set:function(a){G&&ab(a,ke,ke,"type");this._isFrozen&&xa(this,a);this.wa=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Cc},set:function(a){G&&E(a,ke,"endX");this._isFrozen&&xa(this,a);this.Cc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"endY");this._isFrozen&&xa(this,a);this.Dc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, -get:function(){return this.Le},set:function(a){G&&E(a,ke,"point1X");this._isFrozen&&xa(this,a);this.Le=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"point1Y");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.ai},set:function(a){G&&E(a,ke,"point2X");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, -get:function(){return this.Rg},set:function(a){G&&E(a,ke,"point2Y");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Le},set:function(a){G&&E(a,ke,"centerX");this._isFrozen&&xa(this,a);this.Le=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"centerY");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, -get:function(){return this.ai},set:function(a){G&&E(a,ke,"radiusX");0>a&&Ba(a,">= zero",ke,"radiusX");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.Rg},set:function(a){G&&E(a,ke,"radiusY");0>a&&Ba(a,">= zero",ke,"radiusY");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Cc},set:function(a){G&&E(a,ke,"startAngle");this._isFrozen&&xa(this, -a);a%=360;0>a&&(a+=360);this.Cc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Dc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.m&4)},set:function(a){this._isFrozen&&xa(this,a);this.m=a?this.m|4:this.m&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== -(this.m&16)},set:function(a){this._isFrozen&&xa(this,a);this.m=a?this.m|16:this.m&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Le},set:function(a){G&&E(a,ke,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Le=a;this._isInvalidBounds=!0}}});ke.prototype.equalsApprox=ke.prototype.fb; -var Wd=new F(ke,"Move",0),Dd=new F(ke,"Line",1),Xd=new F(ke,"Bezier",2),Yd=new F(ke,"QuadraticBezier",3),Zd=new F(ke,"Arc",4),$d=new F(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Wd;ke.Line=Dd;ke.Bezier=Xd;ke.QuadraticBezier=Yd;ke.Arc=Zd;ke.SvgArc=$d;function me(){this.H=null;this.pu=(new K(0,0)).freeze();this.at=(new K(0,0)).freeze();this.rp=this.Dq=0;this.sp=1;this.Kh="";this.Ir=this.Kp=!1;this.Ip=this.vp=0;this.zg=this.bq=this.iq=!1;this.Pp=null;this.Dr=0;this.yd=this.zr=null} -me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.H=this.H;a.pu.assign(this.viewPoint);a.at.assign(this.documentPoint);a.Dq=this.Dq;a.rp=this.rp;a.sp=this.sp;a.Kh=this.Kh;a.Kp=this.Kp;a.Ir=this.Ir;a.vp=this.vp;a.Ip=this.Ip;a.iq=this.iq;a.bq=this.bq;a.zg=this.zg;a.Pp=this.Pp;a.Dr=this.Dr;a.zr=this.zr;a.yd=this.yd;return a}; +oa.Object.defineProperties(ke.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.o&1)},set:function(a){this.o=a?this.o|1:this.o&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.o&2)},set:function(a){this.o=a?this.o|2:this.o&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.o&8)},set:function(a){this.isClosed!==a&&(this.o=a?this.o|8:this.o&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, +get:function(){return this.wa},set:function(a){G&&ab(a,ke,ke,"type");this._isFrozen&&xa(this,a);this.wa=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"endX");this._isFrozen&&xa(this,a);this.Dc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Ec},set:function(a){G&&E(a,ke,"endY");this._isFrozen&&xa(this,a);this.Ec=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, +get:function(){return this.Me},set:function(a){G&&E(a,ke,"point1X");this._isFrozen&&xa(this,a);this.Me=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"point1Y");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.ai},set:function(a){G&&E(a,ke,"point2X");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, +get:function(){return this.Rg},set:function(a){G&&E(a,ke,"point2Y");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Me},set:function(a){G&&E(a,ke,"centerX");this._isFrozen&&xa(this,a);this.Me=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"centerY");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, +get:function(){return this.ai},set:function(a){G&&E(a,ke,"radiusX");0>a&&Ba(a,">= zero",ke,"radiusX");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.Rg},set:function(a){G&&E(a,ke,"radiusY");0>a&&Ba(a,">= zero",ke,"radiusY");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"startAngle");this._isFrozen&&xa(this, +a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Ec},set:function(a){G&&E(a,ke,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.o&4)},set:function(a){this._isFrozen&&xa(this,a);this.o=a?this.o|4:this.o&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== +(this.o&16)},set:function(a){this._isFrozen&&xa(this,a);this.o=a?this.o|16:this.o&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Me},set:function(a){G&&E(a,ke,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Me=a;this._isInvalidBounds=!0}}});ke.prototype.equalsApprox=ke.prototype.fb; +var Wd=new F(ke,"Move",0),Dd=new F(ke,"Line",1),Xd=new F(ke,"Bezier",2),Yd=new F(ke,"QuadraticBezier",3),Zd=new F(ke,"Arc",4),$d=new F(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Wd;ke.Line=Dd;ke.Bezier=Xd;ke.QuadraticBezier=Yd;ke.Arc=Zd;ke.SvgArc=$d;function me(){this.H=null;this.pu=(new K(0,0)).freeze();this.at=(new K(0,0)).freeze();this.rp=this.Dq=0;this.sp=1;this.Kh="";this.Ir=this.Kp=!1;this.Ip=this.vp=0;this.Ag=this.bq=this.iq=!1;this.Pp=null;this.Dr=0;this.yd=this.zr=null} +me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.H=this.H;a.pu.assign(this.viewPoint);a.at.assign(this.documentPoint);a.Dq=this.Dq;a.rp=this.rp;a.sp=this.sp;a.Kh=this.Kh;a.Kp=this.Kp;a.Ir=this.Ir;a.vp=this.vp;a.Ip=this.Ip;a.iq=this.iq;a.bq=this.bq;a.Ag=this.Ag;a.Pp=this.Pp;a.Dr=this.Dr;a.zr=this.zr;a.yd=this.yd;return a}; me.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};me.prototype.Ho=function(a,b){var c=this.diagram;if(null===c)return b;ne(c,this.event,a,b);return b}; me.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;ne(c,this.event,a,b);b.assign(c.Es(b));return b}; oa.Object.defineProperties(me.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.pu},set:function(a){w(a,K,me,"viewPoint");this.pu.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.at},set:function(a){w(a,K,me,"documentPoint");this.at.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq= a}},button:{configurable:!0,get:function(){return this.rp},set:function(a){this.rp=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{configurable:!0,get:function(){return this.sp},set:function(a){this.sp=a}},key:{configurable:!0,get:function(){return this.Kh},set:function(a){this.Kh=a}},down:{configurable:!0,get:function(){return this.Kp},set:function(a){this.Kp=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.Ir},set:function(a){this.Ir=a}},clickCount:{configurable:!0,get:function(){return this.vp},set:function(a){this.vp=a}},delta:{configurable:!0,get:function(){return this.Ip},set:function(a){this.Ip=a}},isMultiTouch:{configurable:!0,get:function(){return this.iq},set:function(a){this.iq=a}},handled:{configurable:!0,get:function(){return this.bq},set:function(a){this.bq=a}},bubbles:{configurable:!0, -get:function(){return this.zg},set:function(a){this.zg=a}},event:{configurable:!0,get:function(){return this.Pp},set:function(a){this.Pp=a}},isTouchEvent:{configurable:!0,get:function(){var a=sa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=sa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.Dr},set:function(a){this.Dr=a}},targetDiagram:{configurable:!0, +get:function(){return this.Ag},set:function(a){this.Ag=a}},event:{configurable:!0,get:function(){return this.Pp},set:function(a){this.Pp=a}},isTouchEvent:{configurable:!0,get:function(){var a=sa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=sa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.Dr},set:function(a){this.Dr=a}},targetDiagram:{configurable:!0, get:function(){return this.zr},set:function(a){this.zr=a}},targetObject:{configurable:!0,get:function(){return this.yd},set:function(a){this.yd=a}},control:{configurable:!0,get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{configurable:!0,get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{configurable:!0, get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{configurable:!0,get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{configurable:!0,get: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},set:function(a){this.buttons= a?this.buttons|1:this.buttons&-2}},right:{configurable:!0,get: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},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{configurable:!0,get: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},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});me.prototype.getMultiTouchDocumentPoint=me.prototype.Cz;me.prototype.getMultiTouchViewPoint=me.prototype.Ho;me.className="InputEvent";function oe(){this.H=null;this.Ca="";this.Mq=this.vr=null}oe.prototype.copy=function(){var a=new oe;a.H=this.H;a.Ca=this.Ca;a.vr=this.vr;a.Mq=this.Mq;return a}; oe.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; oa.Object.defineProperties(oe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},subject:{configurable:!0,get:function(){return this.vr},set:function(a){this.vr=a}},parameter:{configurable:!0,get:function(){return this.Mq},set:function(a){this.Mq=a}}});oe.className="DiagramEvent"; -function pe(){this.Am=qe;this.qf=this.Cq="";this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}pe.prototype.clear=function(){this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}; -pe.prototype.copy=function(){var a=new pe;a.Am=this.Am;a.Cq=this.Cq;a.qf=this.qf;a.fc=this.fc;a.H=this.H;a.Jn=this.Jn;var b=this.Ln;a.Ln=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Kn;a.Kn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Fn;a.Fn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.En;a.En=Ga(b)&&"function"===typeof b.M?b.M():b;return a};pe.prototype.ub=function(a){a.classType===pe?this.change=a:Ea(this,a)}; +function pe(){this.Am=qe;this.rf=this.Cq="";this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}pe.prototype.clear=function(){this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}; +pe.prototype.copy=function(){var a=new pe;a.Am=this.Am;a.Cq=this.Cq;a.rf=this.rf;a.fc=this.fc;a.H=this.H;a.Jn=this.Jn;var b=this.Ln;a.Ln=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Kn;a.Kn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Fn;a.Fn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.En;a.En=Ga(b)&&"function"===typeof b.M?b.M():b;return a};pe.prototype.ub=function(a){a.classType===pe?this.change=a:Ea(this,a)}; pe.prototype.toString=function(){var a="";a=this.change===re?a+"* ":this.change===qe?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===re?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ra(this.object)),null!==this.oldValue&&(a+=" old: "+Ra(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ra(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};pe.prototype.L=function(a){return a?this.oldValue:this.newValue};pe.prototype.Ez=function(a){return a?this.oldParam:this.newParam};pe.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; pe.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};pe.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};pe.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; oa.Object.defineProperties(pe.prototype,{model:{configurable:!0,get:function(){return this.fc},set:function(a){this.fc=a}},diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},change:{configurable:!0,get:function(){return this.Am},set:function(a){G&&ab(a,pe,pe,"change");this.Am=a}},modelChange:{configurable:!0,get:function(){return this.Cq},set:function(a){G&&A(a,"string",pe,"modelChange");this.Cq=a}},propertyName:{configurable:!0, -enumerable:!0,get:function(){return this.qf},set:function(a){G&&"string"!==typeof a&&A(a,"function",pe,"propertyName");this.qf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Am===re&&("CommittedTransaction"===this.qf||"FinishedUndo"===this.qf||"FinishedRedo"===this.qf)}},object:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn=a}},oldValue:{configurable:!0,get:function(){return this.Ln},set:function(a){this.Ln= +enumerable:!0,get:function(){return this.rf},set:function(a){G&&"string"!==typeof a&&A(a,"function",pe,"propertyName");this.rf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Am===re&&("CommittedTransaction"===this.rf||"FinishedUndo"===this.rf||"FinishedRedo"===this.rf)}},object:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn=a}},oldValue:{configurable:!0,get:function(){return this.Ln},set:function(a){this.Ln= a}},oldParam:{configurable:!0,get:function(){return this.Kn},set:function(a){this.Kn=a}},newValue:{configurable:!0,get:function(){return this.Fn},set:function(a){this.Fn=a}},newParam:{configurable:!0,get:function(){return this.En},set:function(a){this.En=a}}});pe.prototype.redo=pe.prototype.redo;pe.prototype.canRedo=pe.prototype.canRedo;pe.prototype.undo=pe.prototype.undo;pe.prototype.canUndo=pe.prototype.canUndo;pe.prototype.getParam=pe.prototype.Ez; -pe.prototype.getValue=pe.prototype.L;pe.prototype.clear=pe.prototype.clear;var re=new F(pe,"Transaction",-1),qe=new F(pe,"Property",0),se=new F(pe,"Insert",1),te=new F(pe,"Remove",2);pe.className="ChangedEvent";pe.Transaction=re;pe.Property=qe;pe.Insert=se;pe.Remove=te;function ue(){this.o=(new H).freeze();this.Ca="";this.j=!1} +pe.prototype.getValue=pe.prototype.L;pe.prototype.clear=pe.prototype.clear;var re=new F(pe,"Transaction",-1),qe=new F(pe,"Property",0),se=new F(pe,"Insert",1),te=new F(pe,"Remove",2);pe.className="ChangedEvent";pe.Transaction=re;pe.Property=qe;pe.Insert=se;pe.Remove=te;function ue(){this.m=(new H).freeze();this.Ca="";this.j=!1} ue.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.ad(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -oa.Object.defineProperties(ue.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ue.prototype.optimize=ue.prototype.gk;ue.prototype.redo=ue.prototype.redo;ue.prototype.canRedo=ue.prototype.canRedo;ue.prototype.undo=ue.prototype.undo;ue.prototype.canUndo=ue.prototype.canUndo; -ue.prototype.clear=ue.prototype.clear;ue.className="Transaction";function ve(){this.Ht=new I;this.Gd=!1;this.v=(new H).freeze();this.Be=-1;this.o=999;this.De=!1;this.Ep=null;this.gi=0;this.j=!1;G&&(this.j=!0);this.He=(new H).freeze();this.il=new H;this.it=!0;this.st=this.gq=this.vt=this.ut=!1} +oa.Object.defineProperties(ue.prototype,{changes:{configurable:!0,get:function(){return this.m}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ue.prototype.optimize=ue.prototype.gk;ue.prototype.redo=ue.prototype.redo;ue.prototype.canRedo=ue.prototype.canRedo;ue.prototype.undo=ue.prototype.undo;ue.prototype.canUndo=ue.prototype.canUndo; +ue.prototype.clear=ue.prototype.clear;ue.className="Transaction";function ve(){this.Ht=new I;this.Gd=!1;this.v=(new H).freeze();this.Ce=-1;this.m=999;this.Ee=!1;this.Ep=null;this.gi=0;this.j=!1;G&&(this.j=!0);this.Ie=(new H).freeze();this.il=new H;this.it=!0;this.st=this.gq=this.vt=this.ut=!1} ve.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.N(d),null!==f&&f.clear(),b.sb(d),a.gq=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.N(0),null!==f&&f.clear(),b.sb(0),a.Be--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Be++);b.freeze()}a.isInternalTransaction||a.Pb("CommittedTransaction",c,e)}else{a.De=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| -a.Pb("RolledBackTransaction",c,e),a.De=!1}null!==e&&e.clear()}a.Ep=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.N(e),null!==b&&b.undo(),c.pa(),c.sb(e);c.freeze()}return!1}ve.prototype.canUndo=function(){if(!this.isEnabled||0a.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.N(d),null!==f&&f.clear(),b.sb(d),a.gq=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.N(0),null!==f&&f.clear(),b.sb(0),a.Ce--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Ce++);b.freeze()}a.isInternalTransaction||a.Pb("CommittedTransaction",c,e)}else{a.Ee=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| +a.Pb("RolledBackTransaction",c,e),a.Ee=!1}null!==e&&e.clear()}a.Ep=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.N(e),null!==b&&b.undo(),c.pa(),c.sb(e);c.freeze()}return!1}ve.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.it&&(a=a.diagram,null!==a&&!1===a.xi||Fa("Change not within a transaction: "+c.toString()))}}; ve.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; oa.Object.defineProperties(ve.prototype,{models:{configurable:!0,get:function(){return this.Ht.iterator}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){this.Gd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.N(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; -oa.Object.defineProperties(xe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",xe,"name");this.Ca=a}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",xe,"isEnabled");this.Gd=a}},isActive:{configurable:!0,get:function(){return this.ob},set:function(a){A(a,"boolean", -xe,"isActive");this.ob=a}},transactionResult:{configurable:!0,get:function(){return this.Ki},set:function(a){null!==a&&A(a,"string",xe,"transactionResult");this.Ki=a}}});xe.prototype.startTransaction=xe.prototype.Ja;xe.className="Tool";function Ua(){xe.call(this);this.name="ToolManager";this.jb=new H;this.tb=new H;this.Ib=new H;this.G=this.aa=850;this.o=(new Hb(2,2)).na();this.Ma=5E3;this.ma=Be;this.v=Ie;this.Dp=this.j=null;this.Hj=-1}na(Ua,xe);Ua.prototype.initializeStandardTools=function(){}; +oa.Object.defineProperties(xe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof P&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",xe,"name");this.Ca=a}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",xe,"isEnabled");this.Gd=a}},isActive:{configurable:!0,get:function(){return this.ob},set:function(a){A(a,"boolean", +xe,"isActive");this.ob=a}},transactionResult:{configurable:!0,get:function(){return this.Ki},set:function(a){null!==a&&A(a,"string",xe,"transactionResult");this.Ki=a}}});xe.prototype.startTransaction=xe.prototype.Ja;xe.className="Tool";function Ua(){xe.call(this);this.name="ToolManager";this.jb=new H;this.tb=new H;this.Ib=new H;this.G=this.$=850;this.m=(new Hb(2,2)).na();this.Ma=5E3;this.ma=Be;this.v=Ie;this.Dp=this.j=null;this.Hj=-1}na(Ua,xe);Ua.prototype.initializeStandardTools=function(){}; Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Ce&&this.Dp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Je&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Ke){b.bubbles=!0;return}if(this.gestureBehavior===Je)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; for(var d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Me;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Hf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Hf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.Jx&&d.T("LinkRelinked",c,d.Jx),c.toPort!==d.Kx&&d.T("LinkRelinked",c,d.Kx)):If(e,g,f,k,h):If(e,null,null,null,null)}}}}Oe.prototype.doDragOver=function(){}; +function nf(a,b,c){var d=!1,e=a.Fg.length,f=0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ne;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Hf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Hf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.Kx&&d.T("LinkRelinked",c,d.Kx),c.toPort!==d.Lx&&d.T("LinkRelinked",c,d.Lx)):If(e,g,f,k,h):If(e,null,null,null,null)}}}}Oe.prototype.doDragOver=function(){}; function Jf(a,b){var c=a.diagram;a.dragsLink&&vf(a,!0);hf(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;Kf(a,e,f);f=yf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Re){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof T&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Re){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof T&&Lf(c,d,a);M.free(a)}}}function Kf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof wf||(c=a.mouseDrop,null!==c&&c(b))}function Lf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Qe(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof R},!0,function(a){return a instanceof R},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Sd(b)&&c.isAvoiding&&c.gb()} +c.selection.iterator;b.next();)d=b.value,d instanceof T&&Lf(c,d,a);M.free(a)}}}function Kf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof wf||(c=a.mouseDrop,null!==c&&c(b))}function Lf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Re(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof R},!0,function(a){return a instanceof R},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Sd(b)&&c.isAvoiding&&c.gb()} Oe.prototype.doDropOnto=function(){};Oe.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(qf(this,!1),Ue(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts)):this.mayMove()?(lf(this),sf(this,this.draggedParts,!0)):this.mayDragOut()?(qf(this,!1),sf(this,this.copiedParts,!1)):lf(this),uf(this,a.lastInput.documentPoint))}}; Oe.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(lf(this),qf(this,!0),Ue(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts),null!==this.copiedParts&&(a.T("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,lf(this),this.mayMove()&&(sf(this,this.draggedParts, -!0),uf(this,a.lastInput.documentPoint)));this.Tm=!0;Jf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Nf():this.draggedParts.Nf();this.copiedParts=null;b&&Mf(this);a.ab();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.T(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.T("ChangedSelection",a.selection)}}}; -Oe.prototype.simulatedMouseMove=function(a,b,c){if(null===Re)return!1;var d=Re.diagram;c instanceof Q||(c=null);var e=Ve;c!==e&&(null!==e&&e!==d&&(e.wg(),Re.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ve=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Qe.contains(e)||Qe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +!0),uf(this,a.lastInput.documentPoint)));this.Tm=!0;Jf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Of():this.draggedParts.Of();this.copiedParts=null;b&&Mf(this);a.ab();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.T(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.T("ChangedSelection",a.selection)}}}; +Oe.prototype.simulatedMouseMove=function(a,b,c){if(null===Re)return!1;var d=Re.diagram;c instanceof P||(c=null);var e=Ve;c!==e&&(null!==e&&e!==d&&(e.xg(),Re.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ve=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Qe.contains(e)||Qe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;M.free(f); -f=a.pr;g=new yb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof R&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Md())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.eb(),g.add(k,a.Md(h))));K.free(h);a.copiedParts=g;Se(a,g.Nf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ +f=a.pr;g=new yb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof R&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Md())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.eb(),g.add(k,a.Md(h))));K.free(h);a.copiedParts=g;Se(a,g.Of());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ 2)));a.doUpdateCursor(null,!0)}}}Oe.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Bs=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.un=null};Oe.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; oa.Object.defineProperties(Oe.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.tb},set:function(a){A(a,"boolean",Oe,"isCopyEnabled");this.tb=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"boolean",Oe,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.ma},set:function(a){w(a,Pe,Oe,"dragOptions");this.ma=a}},isGridSnapEnabled:{configurable:!0, enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){A(a,"boolean",Oe,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.jb},set:function(a){A(a,"boolean",Oe,"isComplexRoutingRealtime");this.jb=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){A(a,"boolean",Oe,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){w(a,Hb,Oe,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){w(a,Ib,Oe,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){w(a,K,Oe,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){A(a,"boolean",Oe,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){A(a,"boolean",Oe,"dragsTree"); -this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Mc},set:function(a){this.Mc=a}},nodropCursor:{configurable:!0,get:function(){return this.Nc},set:function(a){this.Nc=a}},currentPart:{configurable:!0,get:function(){return this.aa},set:function(a){null!==a&&w(a,S,Oe,"currentPart");this.aa=a}},copiedParts:{configurable:!0, -get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Nf():null!==this.draggedParts?this.draggedParts.Nf():this.te}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&w(a,R,Oe,"draggedLink");this.diagram.draggedLink=a}}, +this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Nc},set:function(a){this.Nc=a}},nodropCursor:{configurable:!0,get:function(){return this.Oc},set:function(a){this.Oc=a}},currentPart:{configurable:!0,get:function(){return this.$},set:function(a){null!==a&&w(a,S,Oe,"currentPart");this.$=a}},copiedParts:{configurable:!0, +get:function(){return this.m},set:function(a){this.m=a}},draggedParts:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Of():null!==this.draggedParts?this.draggedParts.Of():this.ue}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&w(a,R,Oe,"draggedLink");this.diagram.draggedLink=a}}, isDragOutStarted:{configurable:!0,get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{configurable:!0,get:function(){return this.pr},set:function(a){w(a,K,Oe,"startPoint");this.pr.D(a)||this.pr.assign(a)}},delay:{configurable:!0,get:function(){return this.Jk},set:function(a){A(a,"number",Oe,"delay");this.Jk=a}}});Oe.prototype.getDraggingSource=Oe.prototype.Bz;var Re=null,Ve=null;Oe.className="DraggingTool";Qe=new H; Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Re&&Re.doCancel();xe.prototype.doCancel.call(this)}; -function Pf(){0=d&&(d=.1);var e=this,f=b.sg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof T){var k=g.oa(Kc,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;k=d&&(d=.1);var e=this,f=b.tg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof T){var k=g.oa(Kc,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Do(b).count>=c)return!1}return!0}; Pf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Qd(b).count>=c)return!1}return!0}; @@ -423,12 +423,12 @@ function Rf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLab Pf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Sf){if(d===Tf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Uf(this,a,b,c,!0)}if(d===Vf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== a)return!1;return!Uf(this,a,b,c,!0)}if(d===Wf)return a===b?a=!0:(d=new I,d.add(b),a=Xf(this,d,a,b,c)),!a;if(d===Yf)return!Uf(this,a,b,c,!1);if(d===Zf)return a===b?a=!0:(d=new I,d.add(b),a=$f(this,d,a,b,c)),!a}return!0};function Uf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Uf(a,g,c,d,e)))return!0}return!1} function Xf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Xf(a,b,g,d,e)))return!0}return!1}function $f(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&$f(a,b,h,d,e))return!0}}return!1} -oa.Object.defineProperties(Pf.prototype,{portGravity:{configurable:!0,get:function(){return this.te},set:function(a){A(a,"number",Pf,"portGravity");0<=a&&(this.te=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Ma},set:function(a){A(a,"boolean",Pf,"isUnconnectedLinkValid");this.Ma=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Ii}, +oa.Object.defineProperties(Pf.prototype,{portGravity:{configurable:!0,get:function(){return this.ue},set:function(a){A(a,"number",Pf,"portGravity");0<=a&&(this.ue=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Ma},set:function(a){A(a,"boolean",Pf,"isUnconnectedLinkValid");this.Ma=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Ii}, set:function(a){w(a,R,Pf,"temporaryLink");this.Ii=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Hi},set:function(a){w(a,T,Pf,"temporaryFromNode");if(this.Hi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){w(a,O,Pf,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.U.indexOf(this.j);b.sb(c);b.Hb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Ji}, -set:function(a){w(a,T,Pf,"temporaryToNode");if(this.Ji=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){w(a,O,Pf,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.U.indexOf(this.o);b.sb(c);b.Hb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Ib},set:function(a){null!==a&&w(a,R,Pf,"originalLink");this.Ib=a}},originalFromNode:{configurable:!0,get:function(){return this.jb}, -set:function(a){null!==a&&w(a,T,Pf,"originalFromNode");this.jb=a}},originalFromPort:{configurable:!0,get:function(){return this.tb},set:function(a){null!==a&&w(a,O,Pf,"originalFromPort");this.tb=a}},originalToNode:{configurable:!0,get:function(){return this.Mc},set:function(a){null!==a&&w(a,T,Pf,"originalToNode");this.Mc=a}},originalToPort:{configurable:!0,get:function(){return this.Nc},set:function(a){null!==a&&w(a,O,Pf,"originalToPort");this.Nc=a}},isForwards:{configurable:!0, -enumerable:!0,get:function(){return this.ma},set:function(a){A(a,"boolean",Pf,"isForwards");this.ma=a}},validPortsCache:{configurable:!0,get:function(){return this.jp}},targetPort:{configurable:!0,get:function(){return this.Rf},set:function(a){null!==a&&w(a,O,Pf,"targetPort");this.Rf=a}},linkValidation:{configurable:!0,get:function(){return this.oj},set:function(a){null!==a&&A(a,"function",Pf,"linkValidation");this.oj=a}},portTargeted:{configurable:!0, -get:function(){return this.Qf},set:function(a){null!==a&&A(a,"function",Pf,"portTargeted");this.Qf=a}}});Pf.className="LinkingBaseTool";function ag(){0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof V)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};ug.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -ug.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.Ja(this.name),this.Jq.set(this.adornedObject.oa(this.handle.alignment.dv())),this.Mn.set(this.adornedObject.part.location),this.vw.set(this.adornedObject.desiredSize),this.et=this.computeCellSize(),this.gt= -this.computeMinSize(),this.ft=this.computeMaxSize(),this.isActive=!0))};ug.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};ug.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b}; +ug.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ja(this.name),this.Jq.set(this.adornedObject.oa(this.handle.alignment.dv())),this.Mn.set(this.adornedObject.part.location),this.vw.set(this.adornedObject.desiredSize),this.et=this.computeCellSize(),this.gt= +this.computeMinSize(),this.ft=this.computeMaxSize(),this.isActive=!0))};ug.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ve=this.handle=null;this.isActive=a.isMouseCaptured=!1};ug.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b}; ug.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};ug.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.gt,c=this.ft,d=this.et,e=this.adornedObject.$r(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.td();K.free(e)}}; ug.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.gt,c=this.ft,d=this.et,e=this.adornedObject.$r(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);K.free(e);a.ab();this.transactionResult=this.name;a.T("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -ug.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.eb();c=c.oa(this.handle.alignment.dv());if(a instanceof wf){var d=new H;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Pe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().qe(c),!0,e)}else a.location=a.location.copy().qe(c).add(this.oppositePoint);b.td()}}; +ug.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.eb();c=c.oa(this.handle.alignment.dv());if(a instanceof wf){var d=new H;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Pe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.td()}}; ug.prototype.computeResize=function(a,b,c,d,e,f){b.kc()&&(b=Kc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=K.alloc();L.Eo(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), @@ -496,283 +496,283 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig ug.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};ug.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ -d,b.y=-d);return a.oa(b)};Bg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.Wq=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Bg.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b};Bg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.oa(b)};Bg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ve=this.handle=null;this.Wq=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Bg.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b};Bg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; Bg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};Bg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.ab();this.transactionResult=this.name;a.T("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; -Bg.prototype.rotate=function(a){G&&E(a,Bg,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.eb();var c=b.locationObject,d=b.rotateObject;if(c===d||c.ug(d))c=this.Mn.copy(),b.location=c.qe(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.td()}}; +Bg.prototype.rotate=function(a){G&&E(a,Bg,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.eb();var c=b.locationObject,d=b.rotateObject;if(c===d||c.vg(d))c=this.Mn.copy(),b.location=c.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.td()}}; Bg.prototype.computeRotate=function(a){a=this.rotationPoint.cb(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.si());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -oa.Object.defineProperties(Bg.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&w(a,O,Bg,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(w(a,O,Bg,"handle"),!(a.part instanceof Ce)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.ue},set:function(a){if(null!==a&&(w(a,O, -Bg,"handle"),a.part instanceof Ce))throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.ma},set:function(a){A(a,"number",Bg,"snapAngleMultiple");this.ma=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.aa},set:function(a){A(a,"number",Bg,"snapAngleEpsilon");this.aa=a}},originalAngle:{configurable:!0,get:function(){return this.uw}},rotationPoint:{configurable:!0, -enumerable:!0,get:function(){return this.Wq},set:function(a){this.Wq=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"number",Bg,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){A(a,"number",Bg,"handleDistance");this.G=a}}});Bg.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); +oa.Object.defineProperties(Bg.prototype,{handleArchetype:{configurable:!0,get:function(){return this.m},set:function(a){null!==a&&w(a,O,Bg,"handleArchetype");this.m=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(w(a,O,Bg,"handle"),!(a.part instanceof Ce)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.ve},set:function(a){if(null!==a&&(w(a,O, +Bg,"handle"),a.part instanceof Ce))throw Error("new handle must not be in an Adornment: "+a);this.ve=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.ma},set:function(a){A(a,"number",Bg,"snapAngleMultiple");this.ma=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.$},set:function(a){A(a,"number",Bg,"snapAngleEpsilon");this.$=a}},originalAngle:{configurable:!0,get:function(){return this.uw}},rotationPoint:{configurable:!0, +get:function(){return this.Wq},set:function(a){this.Wq=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"number",Bg,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){A(a,"number",Bg,"handleDistance");this.G=a}}});Bg.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); function Cg(){xe.call(this);0e.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};bh.prototype.doStart=function(){lh=this;null!==this.textBlock&&this.doActivate()}; -bh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof ch&&(this.textBlock=b,null!==b.part)){a.animationManager.Bc();this.isActive=!0;this.ta=ih;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.di=this.textBlock.copy();var d=new M(this.textBlock.oa(Fc),this.textBlock.oa(Oc));a.pv(d);c.show(b,a,this);this.currentTextEditor=c}}}};bh.prototype.doCancel=function(){this.stopTool()}; +bh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof ch&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.ta=ih;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.di=this.textBlock.copy();var d=new M(this.textBlock.oa(Fc),this.textBlock.oa(Oc));a.pv(d);c.show(b,a,this);this.currentTextEditor=c}}}};bh.prototype.doCancel=function(){this.stopTool()}; bh.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};bh.prototype.doMouseDown=function(){this.isActive&&this.acceptText(mh)};bh.prototype.acceptText=function(a){switch(a){case mh:if(this.ta===oh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.ta===ih||this.ta===kh||this.ta===jh)this.ta=ph,qh(this);break;case rh:case gh:case hh:if(gh!==a||!0!==this.textBlock.isMultiline)if(this.ta===ih||this.ta===kh||this.ta===jh)this.ta=ph,qh(this)}}; function qh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ja(a.name),a.ta=oh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.T("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.ta=kh,a.doError(e,f))}} bh.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};bh.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};bh.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.ta=eh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};bh.prototype.doStop=function(){lh=null}; -bh.prototype.isValidText=function(a,b,c){w(a,ch,bh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};bh.prototype.Hx=function(a){var b=this.di;b.text=a;b.measure(this.textBlock.Lh,Infinity);return b}; -oa.Object.defineProperties(bh.prototype,{textBlock:{configurable:!0,get:function(){return this.ma},set:function(a){null!==a&&w(a,ch,bh,"textBlock");this.ma=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Me||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, -get:function(){return this.aa},set:function(a){ab(a,bh,bh,"starting");this.aa=a}},textValidation:{configurable:!0,get:function(){return this.Dj},set:function(a){null!==a&&A(a,"function",bh,"textValidation");this.Dj=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&A(a,"number",bh,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&A(a, -"boolean",bh,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.ta},set:function(a){this.ta!==a&&(ab(a,bh,bh,"starting"),this.ta=a)}}});bh.prototype.measureTemporaryTextBlock=bh.prototype.Hx; +bh.prototype.isValidText=function(a,b,c){w(a,ch,bh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};bh.prototype.Ix=function(a){var b=this.di;b.text=a;b.measure(this.textBlock.Lh,Infinity);return b}; +oa.Object.defineProperties(bh.prototype,{textBlock:{configurable:!0,get:function(){return this.ma},set:function(a){null!==a&&w(a,ch,bh,"textBlock");this.ma=a}},currentTextEditor:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Me||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, +get:function(){return this.$},set:function(a){ab(a,bh,bh,"starting");this.$=a}},textValidation:{configurable:!0,get:function(){return this.Dj},set:function(a){null!==a&&A(a,"function",bh,"textValidation");this.Dj=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&A(a,"number",bh,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&A(a,"boolean", +bh,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.ta},set:function(a){this.ta!==a&&(ab(a,bh,bh,"starting"),this.ta=a)}}});bh.prototype.measureTemporaryTextBlock=bh.prototype.Ix; var rh=new F(bh,"LostFocus",0),mh=new F(bh,"MouseDown",1),hh=new F(bh,"Tab",2),gh=new F(bh,"Enter",3),sh=new F(bh,"SingleClick",0),dh=new F(bh,"SingleClickSelected",1),nh=new F(bh,"DoubleClick",2),eh=new F(bh,"StateNone",0),ih=new F(bh,"StateActive",1),jh=new F(bh,"StateEditing",2),ph=new F(bh,"StateValidating",3),kh=new F(bh,"StateInvalid",4),oh=new F(bh,"StateValidated",5),lh=null;bh.className="TextEditingTool";bh.LostFocus=rh;bh.MouseDown=mh;bh.Tab=hh;bh.Enter=gh;bh.SingleClick=sh; bh.SingleClickSelected=dh;bh.DoubleClick=nh;bh.StateNone=eh;bh.StateActive=ih;bh.StateEditing=jh;bh.StateValidating=ph;bh.StateInvalid=kh;bh.StateValidated=oh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); -function th(a){uh||(vh(),uh=!0);this.H=ye;this.Qk=this.Eb=this.kq=this.ec=!1;this.Iw=!0;this.Rk=wh;this.ym=!1;this.Ih=this.Gd=!0;this.Fg=600;this.Vv=this.Gw=!1;this.Yd=new I;this.be=new xh;this.be.Xd=this;this.Li=new I;this.hu=new I;this.Er=new I;this.ql=new I;a&&Object.assign(this,a)}th.prototype.Xe=function(a){this.H=a};th.prototype.canStart=function(){return!0};function yh(a,b){a.Gd&&a.canStart(b)&&(a.Yd.add(b),a.defaultAnimation.isAnimating&&a.Bc(),zh(a.H),a.Eb=!0)} -function Ah(a){if(a.Gd&&a.Eb){var b=a.be,c=a.H,d=a.Yd.contains("Model");d&&(a.Qk=!0,a.Rk===wh?(b.isViewportUnconstrained=!0,b.xc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Rk===Bh&&b.xc.clear(),a.Iw=a.Rk===Ch&&c.Wt.D(c.va)?!0:!1,c.T("InitialAnimationStarting",a));d&&!a.Ih||0===b.xc.count?(a.Yd.clear(),a.Eb=!1,b.xc.clear(),Dh(b,c),a.Qk=!1,c.R()):(a.Yd.clear(),c.ng=!1,d=b.xc.get(c),c.autoScale!==Eh&&null!==d&&(delete d.start.scale,delete d.end.scale), -sa.requestAnimationFrame(function(){!1===a.Eb||b.ec||(c.Se("temporaryPixelRatio")&&Te(c),Fh(c),a.Eb=!1,b.start(),b.ec&&(Gh(a),c.ab(),Hh(b,0),Nf(c,!0),Ih(a),c.T("AnimationStarting",a)))}))}}function Jh(a){return a.Yd.contains("Trigger")&&1===a.Yd.count}function Kh(a,b,c,d){a.isTicking||Jh(a)||b instanceof R&&(null!==b.fromNode||null!==b.toNode)||a.be.add(b,"position",c,d,!1)}t=th.prototype;t.ss=function(a){return this.be.ss(a)};t.Yu=function(a){return this.be.Yu(a)}; -function Lh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function Oh(a,b){for(b=b.findLinksConnected();b.next();){var c=b.value;c.sf=c.points.copy();a.ql.add(c)}}function Rh(a,b,c,d,e){null===a&&(a=[0,0,0,0]);null===b&&(b=[0,0,0,0]);var f=a[0],g=a[1],h=a[2];a=a[3];var k=b[0],l=b[1],m=b[2];b=b[3];if(0===h||100===h)f=k,g=l;else if(0===m||100===m)k=f,l=g;180f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function vh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new yb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&Ba(a,">= 1",th,"duration");this.Fg=a}},isAnimating:{configurable:!0, +oa.Object.defineProperties(th.prototype,{animationReasons:{configurable:!0,get:function(){return this.Yd}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",th,"isEnabled");(this.Gd=a)&&this.Li.each(function(a){a.isAnimating||Infinity!==a.runCount||a.start()})}},duration:{configurable:!0,get:function(){return this.Gg},set:function(a){A(a,"number",th,"duration");1>a&&Ba(a,">= 1",th,"duration");this.Gg=a}},isAnimating:{configurable:!0, enumerable:!0,get:function(){return this.ec}},isTicking:{configurable:!0,get:function(){return this.kq}},isInitial:{configurable:!0,get:function(){return this.Ih},set:function(a){A(a,"boolean",th,"isInitial");this.Ih=a}},defaultAnimation:{configurable:!0,get:function(){return this.be}},activeAnimations:{configurable:!0,get:function(){return this.Li}},initialAnimationStyle:{configurable:!0,get:function(){return this.Rk},set:function(a){G&& -ab(a,th,th,"initialAnimationStyle");this.Rk=a}}});th.prototype.stopAnimation=th.prototype.Bc;var bi=null,uh=!1,wh=new F(th,"Default",1),Ch=new F(th,"AnimateLocations",2),Bh=new F(th,"None",3);th.className="AnimationManager";th.defineAnimationEffect=function(a,b){uh||(vh(),uh=!0);bi.add(a,b)};th.Default=wh;th.AnimateLocations=Ch;th.None=Bh; -function xh(a){this.nu=this.Fw=this.Xd=this.H=null;this.Zk=this.ec=this.j=!1;this.Xm=this.Nd=0;this.Cp=this.dt=ci;this.Yk=this.Wn=!1;this.Vt=1;this.Tt=0;this.Ed=this.Fg=NaN;this.Zv=0;this.Ym=null;this.o=zb;this.xc=new yb;this.Lt=new yb;this.Al=new I;this.Mt=new I;this.Wv=di;a&&Object.assign(this,a)}xh.prototype.suspend=function(){this.Zk=!0};xh.prototype.advanceTo=function(a,b){b&&(this.Zk=!1);this.Wn&&a>=this.Ed&&(this.Yk=!0,a-=this.Ed);this.Zv=a;Mh(this,!0);Gh(this.Xd);Nf(this.H);Ih(this.Xd);this.H.redraw()}; -function Dh(a,b){a.Lt.clear();a.Yk=!1;a.Tt=0;a.Ed=NaN;0=this.Ed&&(this.Yk=!0,a-=this.Ed);this.Zv=a;Mh(this,!0);Gh(this.Xd);Nf(this.H);Ih(this.Xd);this.H.redraw()}; +function Dh(a,b){a.Lt.clear();a.Yk=!1;a.Tt=0;a.Ed=NaN;0a.Xm?a.Ed:d-a.Nd;b&&(e=a.Zv,ea.Xm&&(a.Wn&&!a.Yk?(a.Nd=+new Date,a.Xm=a.Nd+a.Ed,a.Yk=!0):a.Il(!1))}}} function Hh(a,b){for(var c=a.Ed,d=a.xc.iterator,e=a.Yk;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Cp,b,c,a)}}}t.stop=function(){if(!this.ec)return this;this.Il(!0);return this}; t.Il=function(a){null!==this.nu&&this.nu.Yn.remove(this.Fw);if(this.ec){var b=this.H,c=this.Xd;this.Zk=this.ec=c.Qk=!1;Gh(c);for(var d=this.xc,e=this.Al.iterator;e.next();)b.remove(e.value);for(e=this.Mt.iterator;e.next();)e.value.w();e=this.Wn;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Ju,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Bu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Bu?k[n]:l[n],this.Cp,this.Ed,this.Ed,this)}h.Bu&&void 0!==m.location&&g instanceof S&&(g.location=m.location);h.jv&&g instanceof S&&g.Zb(!1)}b.ns.clear();mf(b,!1);b.ab();b.R();Nf(b,!0);if(c.defaultAnimation===this){for(n=c.ql.iterator;n.next();)e=n.value,null!==e.rf&&(e.points=e.rf,e.rf=null);c.ql.clear()}Nf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Wv);Ih(c);this.Tt++;!a&&this.Vt>this.Tt?(this.Yk=!1,this.start()):(this.Ym&&this.Ym(this),Dh(this,null),c.Il(this),b.Sb())}}; +h.Bu?k[n]:l[n],this.Cp,this.Ed,this.Ed,this)}h.Bu&&void 0!==m.location&&g instanceof S&&(g.location=m.location);h.jv&&g instanceof S&&g.Zb(!1)}b.ns.clear();mf(b,!1);b.ab();b.R();Nf(b,!0);if(c.defaultAnimation===this){for(n=c.ql.iterator;n.next();)e=n.value,null!==e.sf&&(e.points=e.sf,e.sf=null);c.ql.clear()}Nf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Wv);Ih(c);this.Tt++;!a&&this.Vt>this.Tt?(this.Yk=!1,this.start()):(this.Ym&&this.Ym(this),Dh(this,null),c.Il(this),b.Sb())}}; t.Kj=function(a,b){var c=b.actualBounds,d=null;b instanceof wf&&(d=b.placeholder);null!==d?(c=d.oa(Fc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof wf)for(a=a.memberParts;a.next();)d=a.value,d instanceof T&&this.Kj(d,b)}; t.Ij=function(a,b){if(a.isVisible()){var c=null;b instanceof wf&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.xc;c.contains(a)&&(c.L(a).jv=!0);if(a instanceof wf)for(a=a.memberParts;a.next();)c=a.value,c instanceof T&&this.Ij(c,b)}};t.Fz=function(a){var b=this.Lt.get(a);null===b&&(b={},this.Lt.add(a,b));return b}; -oa.Object.defineProperties(xh.prototype,{duration:{configurable:!0,get:function(){return this.Fg},set:function(a){A(a,"number",xh,"duration");1>a&&Ba(a,">= 1",xh,"duration");this.Fg=a}},reversible:{configurable:!0,get:function(){return this.Wn},set:function(a){this.Wn=a}},runCount:{configurable:!0,get:function(){return this.Vt},set:function(a){0a&&Ba(a,">= 1",xh,"duration");this.Gg=a}},reversible:{configurable:!0,get:function(){return this.Wn},set:function(a){this.Wn=a}},runCount:{configurable:!0,get:function(){return this.Vt},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}xh.className="Animation";xh.EaseLinear=function(a,b,c,d){return c*a/d+b};xh.EaseInOutQuad=ci;xh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};xh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};xh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};xh.EaseOutExpo=ei; -function ki(a,b,c){this.start=a;this.end=b;this.Ju={};this.Bu=c;this.jv=!1}ki.className="AnimationState";function li(a,b,c){this.yd=null;this.qf=a;this.io=c||mi;this.vk=null;void 0!==b&&(this.vk=b,void 0===c&&(this.io=ni))}li.prototype.copy=function(){var a=new li(this.qf);a.io=this.io;var b=this.vk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.vk=c}return a}; +xh.prototype.addTemporaryPart=xh.prototype.Fy;function ci(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}xh.className="Animation";xh.EaseLinear=function(a,b,c,d){return c*a/d+b};xh.EaseInOutQuad=ci;xh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};xh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};xh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};xh.EaseOutExpo=ei; +function ki(a,b,c){this.start=a;this.end=b;this.Ju={};this.Bu=c;this.jv=!1}ki.className="AnimationState";function li(a,b,c){this.yd=null;this.rf=a;this.io=c||mi;this.vk=null;void 0!==b&&(this.vk=b,void 0===c&&(this.io=ni))}li.prototype.copy=function(){var a=new li(this.rf);a.io=this.io;var b=this.vk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.vk=c}return a}; function oi(a,b){a=a.vk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} -oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.qf},set:function(a){this.qf=a}},animationSettings:{configurable:!0,get:function(){return this.vk},set:function(a){this.vk=a}},startCondition:{configurable:!0,get:function(){return this.io},set:function(a){G&&ab(a,li,li,"startCondition");this.io=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; -li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Za(this);this.H=null;this.Ra=new H;this.Ca="";this.yb=1;this.o=!1;this.j=this.Zh=this.v=this.Vi=this.Ui=this.Ti=this.Si=this.Qi=this.Ri=this.Pi=this.Xi=this.Oi=this.Wi=this.Ni=this.Mi=!0;this.Nn=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){this.Ra.clear();this.Nn.length=0};t.Xe=function(a){this.H=a}; +oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{configurable:!0,get:function(){return this.vk},set:function(a){this.vk=a}},startCondition:{configurable:!0,get:function(){return this.io},set:function(a){G&&ab(a,li,li,"startCondition");this.io=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; +li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Za(this);this.H=null;this.Ra=new H;this.Ca="";this.yb=1;this.m=!1;this.j=this.Zh=this.v=this.Vi=this.Ui=this.Ti=this.Si=this.Qi=this.Ri=this.Pi=this.Xi=this.Oi=this.Wi=this.Ni=this.Mi=!0;this.Nn=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){this.Ra.clear();this.Nn.length=0};t.Ye=function(a){this.H=a}; t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ra.iterator;h.next();){var k=h.value;k instanceof wf?e++:k instanceof T?d++:k instanceof R?f++:k instanceof Ce?g++:c++}h="";0c.Aq||h.height*e>c.Aq?b.zc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| +t.li=function(a,b,c,d,e,f,g){if(!g||vg(b)){if(null!==d&&b instanceof R&&(b.isOrthogonal&&d.push(b),!1===b.Dd))return;g=!1;for(d=b.containingGroup;null!==d;)g?null!==d.pb&&f.zx(d.pb):null!==d.pb&&(g=!0,f.assign(d.pb)),d=d.containingGroup;var h=b.actualBounds;d=!1;if(g&&b.isVisible()){if(!f.Yc(h))return;d=!f.Re(h)}d&&(a.save(),a.beginPath(),a.rect(f.x,f.y,f.width,f.height),a.clip());h.width*e>c.Aq||h.height*e>c.Aq?b.zc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(ti(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ti(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),ti(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.js()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Tc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ib(qe,a,this,b,c,d,e)};t.vi=function(a,b,c){var d=this.Ra;b.Mh=this;if(a>=d.count)a=d.count;else if(d.N(a)===b)return-1;d.Hb(a,b);b.Ko(c);d=this.diagram;null!==d&&(c?d.R():d.vi(b));ui(this,a,b);return a}; +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ib(qe,a,this,b,c,d,e)};t.vi=function(a,b,c){var d=this.Ra;b.Mh=this;if(a>=d.count)a=d.count;else if(d.N(a)===b)return-1;d.Hb(a,b);b.Ko(c);d=this.diagram;null!==d&&(c?d.R():d.vi(b));ui(this,a,b);return a}; t.rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.rc(a,b,c);var d=this.Ra;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.N(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Lo(c);d.sb(a);d=this.diagram;null!==d&&(c?d.R():d.rc(b));b.Mh=null;return a}; function ui(a,b,c){b=vi(a,b,c);if(c instanceof wf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ra.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.N(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.sb(b);a.Hb(f,c);return f}for(g=NaN;0<=--f&&(g=a.N(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.sb(b);a.Hb(h,c);return h}for(k=NaN;++h< e&&(k=a.N(h).zOrder,isNaN(k)););}return b} oa.Object.defineProperties(qi.prototype,{parts:{configurable:!0,get:function(){return this.Ra.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ra.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.H}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",qi,"name");var b=this.Ca;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= -c.layers;c.next();)c.value.name===a&&v("Layer.name is already present in this diagram: "+a);this.Ca=a;this.g("name",b,a);for(a=this.Ra.iterator;a.next();)a.value.layerName=this.Ca}}},opacity:{configurable:!0,get:function(){return this.yb},set:function(a){var b=this.yb;b!==a&&(A(a,"number",qi,"opacity"),(0>a||1a||1=a)return b;for(var c=this.$a.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; -Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; +function P(a,b){wi||(xi(),wi=!0);Za(this);ye=this;this.Bb=!0;this.Qa=null;this.Ga=this.Ha=0;this.Na=null;if(ah){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.pl=null;yi.add("Model",zi);var e=this;this.Ib=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.ca){b.diagram.ca=!1;try{var c=a.change;""===a.modelChange&&c===qe&&b.updateDataBindings(a.object, +a.propertyName)}finally{b.diagram.ca=!0}}};this.Nc=function(a){e.partManager.doModelChanged(a)};this.$t=this.cu=null;Ai(this);this.model=Bi();this.Xg=!0;Ci(this);this.layout=new Di;this.Xg=!1;this.jk=this.kk=this.ik=this.hk=this.aA=this.dk=this.Gv=null;this.Wo=function(){};this.preventDefault=null;this.kn=!1;this.Hh=new Ei;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Fi(this,a):b=a);this.Bb=!1;b&&this.im(b);return this}var Gi,ye; +function Ai(a){a.Xd=new th;a.Xd.Ye(a);a.Fb=17;a.yw=!1;a.mn=!1;a.Ut="default";a.$a=new H;a.qy=new yb;a.Rx();a.Qx();a.yb=1;a.va=(new K(NaN,NaN)).freeze();a.Wt=new K(NaN,NaN);a.Ea=1;a.Gp=1;a.ot=(new K(NaN,NaN)).freeze();a.pt=NaN;a.Gt=1E-4;a.Ct=100;a.Gb=new Jb;a.ru=(new K(NaN,NaN)).freeze();a.jt=(new M(NaN,NaN,NaN,NaN)).freeze();a.zj=(new gc(0,0,0,0)).freeze();a.Aj=di;a.fu=!1;a.Rt=null;a.Yt=null;a.yh=Eh;a.Ak=hd;a.Ig=Eh;a.eq=hd;a.nt=Fc;a.qt=Fc;a.hd=!0;a.hn=!1;a.De=new I;a.Eh=new yb;a.Sm=!0;a.lp=250;a.wk= +-1;a.np=(new gc(16,16,16,16)).freeze();a.og=!1;a.Kk=!1;a.Zm=!0;a.Sp=new me;a.Sp.diagram=a;a.Sg=new me;a.Sg.diagram=a;a.kj=new me;a.kj.diagram=a;a.Cg=null;a.pf=null;a.iu=!1;Hi(a);a.fi=new I;a.xt=!0;a.mu=Ii;a.iw=!1;a.ou=Sf;a.Xs="auto";a.Fp="auto";a.zh=null;a.Fh=null;a.Bh=null;a.Vh=null;a.Th=null;a.Sh=null;a.It=null;a.Qh=null;a.mt=!1;a.Rh=null;a.Uh=null;a.ei=null;a.Ch=null;a.Jt=!1;a.Qt={};a.ml=[null,null];a.Xg=!1;a.Aw=!1;a.gu=!1;a.$s=!1;a.kw=!0;a.jd=!1;a.hj=!1;a.Lw=!0;a.Ce=-2;a.Qg=new yb;a.Rn=new H; +a.Jg=!1;a.Gd=!0;a.Js=!0;a.Mi=!0;a.Ni=!0;a.Ks=!1;a.Ls=!0;a.Wi=!0;a.Oi=!0;a.Xi=!0;a.Ns=!0;a.Pi=!0;a.Ri=!0;a.Qi=!0;a.Si=!0;a.Ti=!0;a.Ui=!0;a.Vi=!0;a.Os=!0;a.Qs=!0;a.jw=!1;a.Xk=!1;a.en=!0;a.fn=!0;a.Ms=!0;a.Ps=!0;a.au=16;a.eu=16;a.$q=!1;a.Zt=!1;a.du=0;a.bu=0;a.zb=(new gc(5)).freeze();a.zw=(new I).freeze();a.Dt=999999999;a.gw=(new I).freeze();a.ej=!0;a.fj=!0;a.gj=!0;a.hf=!1;a.$f=!1;a.xh=!0;a.bg=!1;a.py=new I;a.hw=new I;a.bi=null;a.Tv=new Hb(8,8);a.Uv=999;a.tw=1;a.Bw=0;a.qd={scale:1,position:new K,bounds:new M, +Vw:new Hb,Jx:new Hb,Cx:!1};a.Jw=(new M(NaN,NaN,NaN,NaN)).freeze();a.mo=(new Hb(NaN,NaN)).freeze();a.Jp=(new M(NaN,NaN,NaN,NaN)).freeze();a.yt=!1;a.Pg=new yb;var b=new T,c=new ch;c.bind(new Ji("text","",Ra));b.add(c);a.ly=b;a.Pg.add("",b);b=new T;c=new ch;c.stroke="brown";c.bind(new Ji("text","",Ra));b.add(c);a.Pg.add("Comment",b);b=new T;b.selectable=!1;b.avoidable=!1;c=new Qf;c.figure="Ellipse";c.fill="black";c.stroke=null;c.desiredSize=(new Hb(3,3)).na();b.add(c);a.Pg.add("LinkLabel",b);a.dj=new yb; +b=new wf;b.selectionObjectName="GROUPPANEL";b.type=V.Vertical;c=new ch;c.font="bold 12pt sans-serif";c.bind(new Ji("text","",Ra));b.add(c);c=new V(V.Auto);c.name="GROUPPANEL";var d=new Qf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new wg;d.padding=(new gc(5,5,5,5)).na();c.add(d);b.add(c);a.jy=b;a.dj.add("",b);a.Oh=new yb;b=new R;c=new Qf;c.isPanelMain=!0;b.add(c);c=new Qf;c.toArrow="Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.ky=b;a.Oh.add("", +b);b=new R;c=new Qf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Oh.add("Comment",b);b=new Ce;b.type=V.Auto;c=new Qf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new wg;c.margin=(new gc(1.5,1.5,1.5,1.5)).na();b.add(c);a.Kt=b;a.lt=b;b=new Ce;b.type=V.Link;c=new Qf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.At=b;a.ee=null;a.aq=!1;a.Dk=null;a.partManager=new zi;a.toolManager=new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager; +a.currentTool=a.defaultTool;a.bt=null;a.Rm=new Pe;a.Nt=null;a.Ot=null;a.xr=!1;a.commandHandler=Ki();a.yr=!1;a.Up=null;a.Vp=Db;a.Hw=!1;a.qc=1;a.ci=null;a.Aq=1;a.Eq=0;a.rw=[0,0,0,0,0];a.Fq=0;a.lq=1;a.mw=0;a.nw=new K;a.yy=500;a.mp=new K;a.wt=!1}P.prototype.clear=function(){this.animationManager.Cc();this.model.clear();Li=null;Mi="";Ni(this,!1);this.Rn.clear();Oi();this.Qg.clear();this.bi=null;this.ab();this.eb();this.R()}; +function Ni(a,b){a.animationManager.Cc(!0);a.zw=(new I).freeze();a.gw=(new I).freeze();var c=a.skipsUndoManager,d=null!==a.fc&&void 0!==a.fc;d&&(a.skipsUndoManager=!0);var e=null;null!==a.ee&&(e=a.ee.part,null!==e&&a.remove(e));var f=[],g=a.$a.length;if(b){for(b=0;b=a)return b;for(var c=this.$a.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};P.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; +P.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; function Ri(a){var b=a.Na.Xa;b instanceof HTMLCanvasElement&&(a.addEventListener(b,"pointerdown",a.hk,!1),a.addEventListener(b,"pointermove",a.ik,!1),a.addEventListener(b,"pointerup",a.kk,!1),a.addEventListener(b,"pointerout",a.jk,!1),a.addEventListener(b,"pointerenter",a.$y,!1),a.addEventListener(b,"pointerleave",a.az,!1),a.addEventListener(b,"wheel",a.dk,!1),a.addEventListener(b,"keydown",a.Rz,!1),a.addEventListener(b,"keyup",a.Sz,!1),a.addEventListener(b,"blur",a.My,!1),a.addEventListener(b,"focus", -a.Ny,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(sa,"resize",a.Gv,!1),Ya&&a.addEventListener(b,"touchstart",function(a){a.preventDefault()},!1))}function Te(a){30q&&(this.position=x.h(-(b.scrollWidth-this.Ha)+y-this.Ha/e+m,this.position.y))),a.ty&&this.allowVerticalScroll&&(hu&&(this.position= -x.h(this.position.x,-(b.scrollHeight-this.Ga)+a.scrollTop-this.Ga/e+f))),K.free(x),Wi(this),this.fj=this.$q=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);zh(this);return Xi(this,a)}; +"gray";c.strokeWidth=1;c.interval=10;b.add(c);c=new S;c.add(b);c.layerName="Grid";c.zOrder=0;c.isInDocumentBounds=!1;c.isAnimated=!1;c.pickable=!1;c.locationObjectName="GRID";a.add(c);a.partManager.parts.remove(c);b.visible=!1;return b}function Ti(){this.H.Zt?this.H.Zt=!1:this.H.isEnabled?this.H.ax(this):Ui(this.H)}function Vi(a){this.H.isEnabled?(this.H.du=a.target.scrollTop,this.H.bu=a.target.scrollLeft):Ui(this.H)} +P.prototype.ax=function(a){if(null!==this.Na){var b=this.cu,c=this.$t;this.$q=!0;var d=this.documentBounds,e=this.viewportBounds,f=this.zj,g=d.x-f.left,h=d.y-f.top,k=d.width+f.left+f.right,l=d.height+f.top+f.bottom,m=d.right+f.right;f=d.bottom+f.bottom;var n=e.x;d=e.y;var p=e.width,r=e.height,q=e.right,u=e.bottom;e=this.scale;var x=a.scrollLeft;if(this.mn)switch(this.Ut){case "negative":x=x+a.scrollWidth-a.clientWidth;break;case "reverse":x=a.scrollWidth-x-a.clientWidth}var y=x;pq&&(this.position=x.h(-(b.scrollWidth-this.Ha)+y-this.Ha/e+m,this.position.y))),a.uy&&this.allowVerticalScroll&&(hu&&(this.position= +x.h(this.position.x,-(b.scrollHeight-this.Ga)+a.scrollTop-this.Ga/e+f))),K.free(x),Wi(this),this.fj=this.$q=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};P.prototype.computeBounds=function(a){void 0===a&&(a=new M);zh(this);return Xi(this,a)}; function Xi(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.so(a.zb),b;for(var c=!0,d=a.$a.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===mj?(b=k>h?(g-a.Fb)/d:(f-a.Fb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.Aj;this.Aj=di;this.scale=hj(this,lj);a!==di&&(Yi(this,!1),ij(this,this.documentBounds,this.Ha/this.Ea,this.Ga/this.Ea,this.Ak,!1));this.Aj=a};t=Q.prototype; -t.DA=function(a,b){void 0===b&&(b=lj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===lj||b===mj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ha;var f=this.Ga;e=b===mj?f/d>e/c?(f-(this.gf?this.Fb:0))/d:(e-(this.Zf?this.Fb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; -t.Fy=function(a,b){this.eb();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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))};t.Az=function(a){if(a instanceof O){this.Up=a;var b=K.alloc();this.Vp=this.ep(a.oa(Fc,b));K.free(b)}else this.Up=null,this.Vp=Db}; +P.prototype.computePartsBounds=function(a,b){void 0===b&&(b=!1);var c=null;if(Ha(a))for(var d=0;dc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===mj?(b=k>h?(g-a.Fb)/d:(f-a.Fb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +P.prototype.zoomToFit=function(){var a=this.Aj;this.Aj=di;this.scale=hj(this,lj);a!==di&&(Yi(this,!1),ij(this,this.documentBounds,this.Ha/this.Ea,this.Ga/this.Ea,this.Ak,!1));this.Aj=a};t=P.prototype; +t.DA=function(a,b){void 0===b&&(b=lj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===lj||b===mj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ha;var f=this.Ga;e=b===mj?f/d>e/c?(f-(this.hf?this.Fb:0))/d:(e-(this.$f?this.Fb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; +t.Gy=function(a,b){this.eb();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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))};t.Az=function(a){if(a instanceof O){this.Up=a;var b=K.alloc();this.Vp=this.ep(a.oa(Fc,b));K.free(b)}else this.Up=null,this.Vp=Db}; function ij(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.Up){var l=K.alloc();l=a.Up.oa(Fc,l);h=l.x-a.Vp.x/a.scale;k=l.y-a.Vp.y/a.scale;e=Ec;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.zj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.ml[0])b=a.ml[c];else return;c=a.Na;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ha/c.width*c.left,b.clientY-a.Ga/c.height*c.top))}Q.prototype.ab=function(){this.ej||(this.ej=!0,this.Sb(!0))};function vj(a){a.jd||zh(a);a.eb()}Q.prototype.redraw=function(){this.Bb||this.jd||(this.R(),jj(this),this.td())};t=Q.prototype;t.Qz=function(){return this.ng}; -t.Vy=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Bc();b.isEnabled=!1;Nf(this);this.ag=!1;this.Wt=new K(NaN,NaN);b.isEnabled=c;this.jd=!0;var d=this;null!==a&&va(function(){d.jd=!1;yh(b,"Model");a(d)},1)};t.Sb=function(a){void 0===a&&(a=!1);if(!0!==this.ng&&!(this.Bb||!1===a&&this.jd)){this.ng=!0;var b=this;sa.requestAnimationFrame(function(){b.ng&&b.td()})}};t.td=function(){if(!this.Zm||this.ng)this.Zm&&(this.Zm=!1),Nf(this)}; +function ne(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.ml[0])b=a.ml[c];else return;c=a.Na;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ha/c.width*c.left,b.clientY-a.Ga/c.height*c.top))}P.prototype.ab=function(){this.ej||(this.ej=!0,this.Sb(!0))};function vj(a){a.jd||zh(a);a.eb()}P.prototype.redraw=function(){this.Bb||this.jd||(this.R(),jj(this),this.td())};t=P.prototype;t.Qz=function(){return this.og}; +t.Vy=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Cc();b.isEnabled=!1;Nf(this);this.bg=!1;this.Wt=new K(NaN,NaN);b.isEnabled=c;this.jd=!0;var d=this;null!==a&&va(function(){d.jd=!1;yh(b,"Model");a(d)},1)};t.Sb=function(a){void 0===a&&(a=!1);if(!0!==this.og&&!(this.Bb||!1===a&&this.jd)){this.og=!0;var b=this;sa.requestAnimationFrame(function(){b.og&&b.td()})}};t.td=function(){if(!this.Zm||this.og)this.Zm&&(this.Zm=!1),Nf(this)}; function kj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Bb||!a.fj||Ui(a)||(b&&zh(a),c&&Yi(a,!1))} -function Nf(a,b){if(!a.jd&&(a.ng=!1,null!==a.Qa||a.mo.u())){a.jd=!0;var c=a.animationManager,d=a.Rn;if(!c.isAnimating&&0!==d.length){for(var e=d.s,f=e.length,g=0;gb;b++){var c=a.Ce.iterator;if(null===c||0===a.Ce.count)break;a.Ce=new I;a.Fv(c,a.Ce);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof wf&&0!==(a.Y&65536)!==!1&&(a.Y=a.Y^65536)})}} +function zh(a){if(0!==a.De.count&&(a.jd||!a.animationManager.isTicking)){for(var b=0;23>b;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new I;a.Fv(c,a.De);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof wf&&0!==(a.Y&65536)!==!1&&(a.Y=a.Y^65536)})}} t.Fv=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof wf||(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof wf&&c.isVisible()&&Aj(this,c);for(a.reset();a.next();)c=a.value,c instanceof R&&c.isVisible()&&(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Ce&&c.isVisible()&&(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function Aj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof wf?(Bj(f)||Cj(f)||Dj(f))&&Aj(a,f):f instanceof R?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;en&&(z=U.left,B= -U.right),y.height>J&&(C=U.top,D=U.bottom)):(z=U.left,B=U.right,C=U.top,D=U.bottom);U=y.width+z+B;var aa=y.height+C+D;z=y.x-z;var Y=e.x;B=y.right+B;var W=e.right+r;C=y.y-C;var P=e.y;y=y.bottom+D;D=e.bottom+q;var la="1px",fa="1px";e=a.scale;u=U>u/e;x=aa>x/e;a.scrollMode===di&&(u||x)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1W+1&&(u=Math.max((B-W)*e+a.Ha,u)),n+r+1D+1&&(u=Math.max((y-D)*e+a.Ga,u)),J+q+1W+1&&(r=Math.max((B-W)*e+a.Ha,r)),n+1D+1&&(q=Math.max((y-D)*e+r,q)),J+1W+1&&(b=a.position.x*e));if(a.mn)switch(a.Ut){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(J+1D+1&&(l.scrollTop=a.position.y*e));u=a.Ha;x=a.Ga;l.style.width=u+(a.Zf?a.Fb:0)+"px";l.style.height=x+(a.gf?a.Fb:0)+"px";return c!==u||d!==x||a.animationManager.Eb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; -t.add=function(a){w(a,S,Q,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Vj(a.layerName),null===b&&(b=this.Vj("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.vi(99999999,a,a.diagram===this);0<=c&&this.ib(se,"parts",b,null,a,null,c);b.isTemporary||this.ab();a.F(1);c=a.layerChanged;null!==c&&c(a,null, -b)}};t.vi=function(a){this.partManager.vi(a);var b=this;Oj(a,function(a){Pj(b,a)});(a instanceof Ce||a instanceof wf&&null!==a.placeholder)&&a.w();null!==a.data&&Oj(a,function(a){Qj(b.partManager,a)});!0!==Cj(a)&&!0!==Dj(a)||this.Ce.add(a);Rj(a,!0,this);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()}; -t.rc=function(a){a.Mj();this.partManager.rc(a);var b=this;null!==a.data&&Oj(a,function(a){Tj(b.partManager,a,b)});this.Ce.remove(a);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()};t.remove=function(a){w(a,S,Q,"remove:part");Uj(this,a,!0)}; +Math.floor(k.y),Math.ceil(k.width),Math.ceil(k.height));f.clip();f.setTransform(h,0,0,h,0,0);f.transform(l.m11,l.m12,l.m21,l.m22,l.dx,l.dy);f.Vc();G&&G.El&&G.Gu&&G.Gu(this,f);h=this.$a.s;b=h.length;this.Vd(h,b,this,this.viewportBounds);Fj(this,f);f.globalAlpha=this.yb;for(g=0;gn&&(z=U.left,B= +U.right),y.height>J&&(C=U.top,D=U.bottom)):(z=U.left,B=U.right,C=U.top,D=U.bottom);U=y.width+z+B;var aa=y.height+C+D;z=y.x-z;var Y=e.x;B=y.right+B;var W=e.right+r;C=y.y-C;var Q=e.y;y=y.bottom+D;D=e.bottom+q;var la="1px",fa="1px";e=a.scale;u=U>u/e;x=aa>x/e;a.scrollMode===di&&(u||x)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1W+1&&(u=Math.max((B-W)*e+a.Ha,u)),n+r+1D+1&&(u=Math.max((y-D)*e+a.Ga,u)),J+q+1W+1&&(r=Math.max((B-W)*e+a.Ha,r)),n+1D+1&&(q=Math.max((y-D)*e+r,q)),J+1W+1&&(b=a.position.x*e));if(a.mn)switch(a.Ut){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(J+1D+1&&(l.scrollTop=a.position.y*e));u=a.Ha;x=a.Ga;l.style.width=u+(a.$f?a.Fb:0)+"px";l.style.height=x+(a.hf?a.Fb:0)+"px";return c!==u||d!==x||a.animationManager.Eb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=P.prototype; +t.add=function(a){w(a,S,P,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Vj(a.layerName),null===b&&(b=this.Vj("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.vi(99999999,a,a.diagram===this);0<=c&&this.ib(se,"parts",b,null,a,null,c);b.isTemporary||this.ab();a.F(1);c=a.layerChanged;null!==c&&c(a,null, +b)}};t.vi=function(a){this.partManager.vi(a);var b=this;Oj(a,function(a){Pj(b,a)});(a instanceof Ce||a instanceof wf&&null!==a.placeholder)&&a.w();null!==a.data&&Oj(a,function(a){Qj(b.partManager,a)});!0!==Cj(a)&&!0!==Dj(a)||this.De.add(a);Rj(a,!0,this);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()}; +t.rc=function(a){a.Mj();this.partManager.rc(a);var b=this;null!==a.data&&Oj(a,function(a){Tj(b.partManager,a,b)});this.De.remove(a);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()};t.remove=function(a){w(a,S,P,"remove:part");Uj(this,a,!0)}; function Uj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.F(2),c&&b.Sj(),c=d.rc(-1,b,!1),0<=c&&a.ib(te,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.vs=function(a,b){void 0===b&&(b=!1);if(Ha(a))for(var c=a.length,d=0;dd&&this.ab();return this}; -t.zy=function(a,b){ak(this,a,b);a.Xe(this);var c=this.$a,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.fc&&this.ib(te,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.ab();return this}; -t.jA=function(a){w(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.$a,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ra.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.fc&&this.ib(te,"layers",this,a,null,c,null);this.R();this.ab()}}};t.Vj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; -t.Qw=function(a){A(a,"function",Q,"addModelChangedListener:listener");null===this.nf&&(this.nf=new H);this.nf.add(a);this.model.fh(a);return this};t.lA=function(a){A(a,"function",Q,"removeModelChangedListener:listener");null!==this.nf&&(this.nf.remove(a),0===this.nf.count&&(this.nf=null));this.model.mk(a)};t.fh=function(a){A(a,"function",Q,"addChangedListener:listener");null===this.Bg&&(this.Bg=new H);this.Bg.add(a);return this}; -t.mk=function(a){A(a,"function",Q,"removeChangedListener:listener");null!==this.Bg&&(this.Bg.remove(a),0===this.Bg.count&&(this.Bg=null))};t.Pr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==re&&(this.isModified=!0);if(null!==this.Bg)for(var b=this.Bg,c=b.length,d=0;dd&&this.ab();return this}; +t.Ay=function(a,b){ak(this,a,b);a.Ye(this);var c=this.$a,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.fc&&this.ib(te,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.ab();return this}; +t.jA=function(a){w(a,qi,P,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.$a,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ra.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.fc&&this.ib(te,"layers",this,a,null,c,null);this.R();this.ab()}}};t.Vj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.Qw=function(a){A(a,"function",P,"addModelChangedListener:listener");null===this.pf&&(this.pf=new H);this.pf.add(a);this.model.fh(a);return this};t.lA=function(a){A(a,"function",P,"removeModelChangedListener:listener");null!==this.pf&&(this.pf.remove(a),0===this.pf.count&&(this.pf=null));this.model.mk(a)};t.fh=function(a){A(a,"function",P,"addChangedListener:listener");null===this.Cg&&(this.Cg=new H);this.Cg.add(a);return this}; +t.mk=function(a){A(a,"function",P,"removeChangedListener:listener");null!==this.Cg&&(this.Cg.remove(a),0===this.Cg.count&&(this.Cg=null))};t.Pr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==re&&(this.isModified=!0);if(null!==this.Cg)for(var b=this.Cg,c=b.length,d=0;dn.Ra.indexOf(r)&&n.vi(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Xb(),n.rc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof qi&&(b?(r.Xe(this),this.$a.Hb(p,r)):this.$a.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==re&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};Q.prototype.Ja=function(a){return this.undoManager.Ja(a)};Q.prototype.kb=function(a){return this.undoManager.kb(a)};Q.prototype.Mf=function(){return this.undoManager.Mf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ja(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Mf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; -Q.prototype.hp=function(){this.partManager.hp()}; -function fk(a,b,c){var d=a.animationManager;if(a.Bb||a.jd)a.Ea=c,Pi(a),a=a.Ea,d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,a));else if(null===a.Na)a.Ea=c,Pi(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ha,g=a.Ga;e.width=a.Ha/b;e.height=a.Ga/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.If(Rc)?h=0:l.If(Sc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.If(Qc)?k=0:l.If(Tc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| +P.prototype.changeState=function(a,b){if(null!==a&&a.diagram===this){var c=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var d=a.change;if(d===qe){var e=a.object;bk(e,a.propertyName,a.L(b));if(e instanceof O){var f=e.part;null!==f&&f.Xb()}this.isModified=!0}else if(d===se){var g=a.object,h=a.newParam,k=a.newValue;if(g instanceof V)if("number"===typeof h&&k instanceof O){b?g.rc(h):g.Hb(h,k);var l=g.part;null!==l&&l.Xb()}else"number"===typeof h&&k instanceof ck&&(k.isRow?dk(g,h, +b?void 0:k):ek(g,h,b?void 0:k));else if(g instanceof qi){var m=!0===a.oldParam;"number"===typeof h&&k instanceof S&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Xb(),g.rc(m?h:-1,k,m)):g.vi(h,k,m))}else g instanceof P?"number"===typeof h&&k instanceof qi&&(b?this.$a.sb(h):(k.Ye(this),this.$a.Hb(h,k))):v("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===te){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof V)"number"===typeof p&&r instanceof O?b?n.Hb(p,r):n.rc(p): +"number"===typeof p&&r instanceof ck&&(r.isRow?dk(n,p,b?r:void 0):ek(n,p,b?r:void 0));else if(n instanceof qi){var q=!0===a.newParam;"number"===typeof p&&r instanceof S&&(b?0>n.Ra.indexOf(r)&&n.vi(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Xb(),n.rc(q?p:-1,r,q)))}else n instanceof P?"number"===typeof p&&r instanceof qi&&(b?(r.Ye(this),this.$a.Hb(p,r)):this.$a.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==re&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};P.prototype.Ja=function(a){return this.undoManager.Ja(a)};P.prototype.kb=function(a){return this.undoManager.kb(a)};P.prototype.Nf=function(){return this.undoManager.Nf()};P.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ja(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Nf(),this.skipsUndoManager=c}};P.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +P.prototype.hp=function(){this.partManager.hp()}; +function fk(a,b,c){var d=a.animationManager;if(a.Bb||a.jd)a.Ea=c,Pi(a),a=a.Ea,d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,a));else if(null===a.Na)a.Ea=c,Pi(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ha,g=a.Ga;e.width=a.Ha/b;e.height=a.Ga/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Jf(Rc)?h=0:l.Jf(Sc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Jf(Qc)?k=0:l.Jf(Tc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| (c=a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ea=c;Pi(a);a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Bb=!1;Yi(a,!1);c=a.Ea;d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,c));a.R();jj(a)}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||jj(this);Wi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Eh||d||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.Xk&&e instanceof Ua&&(this.lastInput.documentPoint=this.Es(this.lastInput.viewPoint),Le(e,this));this.Bb||this.invalidateViewport(a,b);xj(this);this.qd.scale=c;this.qd.position.x=a.x;this.qd.position.y=a.y;this.qd.bounds.assign(a);this.qd.Uw.width= -Math.round(a.width*c);this.qd.Uw.height=Math.round(a.height*c);this.qd.Ix.width=this.Ha;this.qd.Ix.height=this.Ga;this.qd.Bx=d;this.T("ViewportBoundsChanged",this.qd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Yc(b)&&a.gb()})}}; -function xj(a,b){var c=a.de;if(null!==c&&c.visible){for(var d=Hb.alloc(),e=1,f=1,g=c.U.s,h=g.length,k=0;km||(gk(l.figure)?f=f*m/L.nx(f,m):e=e*m/L.nx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Eo(a,g,0,0,d.width, -d.height,b);b.offset(-d.width,-d.height);Hb.free(d);c.part.location=b;K.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.T("ChangingSelection",b);for(var c=b.Ka(),d=c.length,e=0;em||(gk(l.figure)?f=f*m/L.ox(f,m):e=e*m/L.ox(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Eo(a,g,0,0,d.width, +d.height,b);b.offset(-d.width,-d.height);Hb.free(d);c.part.location=b;K.free(b)}}P.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.T("ChangingSelection",b);for(var c=b.Ka(),d=c.length,e=0;e=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, +function zk(a,b){null===a.bi||a.bi.fs||void 0!==b&&(!b.avoidable||b.isLinkLabel)||(a.bi.fs=!0)}P.prototype.Sr=function(a){this.mp.assign(a);this.computeAutoScrollPosition(this.mp).fb(this.position)?this.xg():Ak(this)}; +function Ak(a){-1===a.wk&&(a.wk=va(function(){if(-1!==a.wk&&(a.xg(),null!==a.lastInput.event)){var b=a.computeAutoScrollPosition(a.mp);b.fb(a.position)||(a.position=b,a.lastInput.documentPoint=a.Es(a.mp),a.doMouseMove(),a.ej=!0,b=M.alloc(),a.computeBounds(b),b.cd(a.documentBounds),Kj(a,b),M.free(b),a.hd=!0,a.td(),Ak(a))}},a.lp))}P.prototype.xg=function(){-1!==this.wk&&(sa.clearTimeout(this.wk),this.wk=-1)}; +P.prototype.computeAutoScrollPosition=function(a){var b=this.position,c=this.np;if(0>=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.fb(zb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); -M.free(d);K.free(f);return b};t=Q.prototype;t.ps=function(){return null};t.av=function(){return null};t.Dy=function(a,b){this.py.add(a,b)};t.yu=function(a){(this.Hw=a)||this.nodes.each(function(a){a instanceof wf&&(a.Qp=null)})}; -function Bk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].cl){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Qg.iterator;g.next();)if(!g.value[0].cl){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.Wz=function(a){if(!ah)return null;void 0===a&&(a={});a.returnType="Image";return this.Fx(a)}; -t.Fx=function(a){void 0===a&&(a={});return Bk(this,this.Xz,a)}; +M.free(d);K.free(f);return b};t=P.prototype;t.ps=function(){return null};t.av=function(){return null};t.Ey=function(a,b){this.qy.add(a,b)};t.yu=function(a){(this.Hw=a)||this.nodes.each(function(a){a instanceof wf&&(a.Qp=null)})}; +function Bk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].cl){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Qg.iterator;g.next();)if(!g.value[0].cl){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.Wz=function(a){if(!ah)return null;void 0===a&&(a={});a.returnType="Image";return this.Gx(a)}; +t.Gx=function(a){void 0===a&&(a={});return Bk(this,this.Xz,a)}; t.Xz=function(a,b,c){var d=Ck(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Dk+"data":e=d.getImageData(0,0,c.width,c.height);break;case Dk:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";if("function"===typeof c.msToBlob)return b(c.msToBlob()),"msToBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Ck(a,b,c,d){a.animationManager.Bc();a.td();if(null===a.Na)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Hb(Infinity,Infinity):new Hb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var r=b.document||document,q=b.elementFinished|| -null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new gc(m):m instanceof gc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.dc.Tc(!0);p=new Ek(null,r);var x=p.context;if(!(f||g||l||k)){p.width=a.Ha+Math.ceil(m.left+m.right);p.height=a.Ga+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== +function Ck(a,b,c,d){a.animationManager.Cc();a.td();if(null===a.Na)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Hb(Infinity,Infinity):new Hb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var r=b.document||document,q=b.elementFinished|| +null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new gc(m):m instanceof gc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.dc.Uc(!0);p=new Ek(null,r);var x=p.context;if(!(f||g||l||k)){p.width=a.Ha+Math.ceil(m.left+m.right);p.height=a.Ga+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Bo=q;Hj(a,d.context,m,new Hb(p.width,p.height),a.Ea,a.va,l,n,u,b);return d.context}a.Sm=!1;Hj(a,x,m,new Hb(p.width,p.height),a.Ea,a.va,l,n,u,b);a.Sm=!0;return p.context}var y=a.Gp,z=a.documentBounds.copy();z.xv(a.zb);if(u)for(var B=a.$a.s,C=B.length,D=0;Dy?(g=y,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=y,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new gc(0);null!==h&&(y=h.width,h=h.height,"SVG"!==c&&e&&!Fk&&G&&(f>y|| z>h)&&(Fa("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(f)+"x"+Math.ceil(z)+" vs 2000x2000) Consider increasing the max size."),Fk=!0),isNaN(y)&&(y=2E3),isNaN(h)&&(h=2E3),isFinite(y)&&(f=Math.min(f,y)),isFinite(h)&&(z=Math.min(z,h)));p.width=Math.ceil(f);p.height=Math.ceil(z);if("SVG"===c){if(null===d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Bo=q;Hj(a,d.context,m,new Hb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b); return d.context}a.Sm=!1;Hj(a,x,m,new Hb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b);a.Sm=!0;return p.context} -oa.Object.defineProperties(Q.prototype,{div:{configurable:!0,get:function(){return this.Qa},set:function(a){null!==a&&w(a,HTMLDivElement,Q,"div");if(this.Qa!==a){var b=this.Qa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Na&&(b=this.Na.Xa,this.removeEventListener(b,"pointermove",this.ik,!1),this.removeEventListener(b,"pointerdown",this.hk,!1),this.removeEventListener(b,"pointerup",this.kk,!1),this.removeEventListener(b,"pointerout",this.jk,!1),this.Na.bx()), -this.pl&&(this.pl.disconnect(),this.pl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Na=null,this.removeEventListener(sa,"resize",this.Gv,!1),this.removeEventListener(sa,"wheel",this.dk,!0),ye===this&&(ye=null)):this.ag=!1;this.Qa=null;if(null!==a){if(b=a.H)b.div=null;Fi(this,a);this.redraw()}}}}, -Sw:{configurable:!0,get:function(){return this.Eq}},xi:{configurable:!0,get:function(){return this.ag}},draggedLink:{configurable:!0,get:function(){return this.bt},set:function(a){this.bt!==a&&(this.bt=a,null!==a&&(this.Nt=a.fromPort,this.Ot=a.toPort))}},Jx:{configurable:!0,get:function(){return this.Nt},set:function(a){this.Nt=a}},Kx:{configurable:!0,get:function(){return this.Ot},set:function(a){this.Ot=a}},animationManager:{configurable:!0, -enumerable:!0,get:function(){return this.Xd}},undoManager:{configurable:!0,get:function(){return this.fc.undoManager}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg},set:function(a){A(a,"boolean",Q,"skipsUndoManager");this.Xg=a;this.fc.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.$s},set:function(a){this.$s=a}},opacity:{configurable:!0,get:function(){return this.yb},set:function(a){var b=this.yb; -b!==a&&(A(a,"number",Q,"opacity"),(0>a||1a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.au=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(A(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"), -this.eu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.kj},set:function(a){G&&w(a,me,Q,"lastInput");this.kj=a}},previousInput:{configurable:!0,get:function(){return this.Sg},set:function(a){G&&w(a,me,Q,"previousInput");this.Sg=a}},firstInput:{configurable:!0,get:function(){return this.Sp},set:function(a){G&&w(a,me,Q,"firstInput");this.Sp=a}},currentCursor:{configurable:!0,get:function(){return this.Xs}, -set:function(a){""===a&&(a=this.Fp);if(this.Xs!==a){A(a,"string",Q,"currentCursor");var b=this.Na,c=this.Qa;if(null!==b&&null!==c){this.Xs=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.Fp},set:function(a){""=== -a&&(a="auto");var b=this.Fp;b!==a&&(A(a,"string",Q,"defaultCursor"),this.Fp=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(null!==a&&A(a,"function",Q,"click"),this.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(null!==a&&A(a,"function",Q,"doubleClick"),this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0, -enumerable:!0,get:function(){return this.Bh},set:function(a){var b=this.Bh;b!==a&&(null!==a&&A(a,"function",Q,"contextClick"),this.Bh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.Vh},set:function(a){var b=this.Vh;b!==a&&(null!==a&&A(a,"function",Q,"mouseOver"),this.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.Th},set:function(a){var b=this.Th;b!==a&&(null!==a&&A(a,"function",Q,"mouseHover"), -this.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Sh},set:function(a){var b=this.Sh;b!==a&&(null!==a&&A(a,"function",Q,"mouseHold"),this.Sh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0,get:function(){return this.It},set:function(a){var b=this.It;b!==a&&(null!==a&&A(a,"function",Q,"mouseDragOver"),this.It=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Qh},set:function(a){var b= -this.Qh;b!==a&&(G&&null!==a&&A(a,"function",Q,"mouseDrop"),this.Qh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"boolean",Q,"handlesDragDropForTopLevelParts"),this.mt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Rh},set:function(a){var b=this.Rh;b!==a&&(null!==a&&A(a,"function",Q,"mouseEnter"),this.Rh=a,this.g("mouseEnter", -b,a))}},mouseLeave:{configurable:!0,get:function(){return this.Uh},set:function(a){var b=this.Uh;b!==a&&(null!==a&&A(a,"function",Q,"mouseLeave"),this.Uh=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Ch}, -set:function(a){var b=this.Ch;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ch=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(this.ob=a,a.Xe(this))}},toolManager:{configurable:!0,get:function(){return this.te},set:function(a){this.te!==a&&(w(a,Ua,Q,"toolManager"),this.te=a,a.diagram=this)}},defaultTool:{configurable:!0, -get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&(w(a,xe,Q,"defaultTool"),this.tb=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.jb},set:function(a){var b=this.jb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(w(a,xe,Q,"currentTool"),this.jb=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.zw}}, -maxSelectionCount:{configurable:!0,get:function(){return this.Dt},set:function(a){var b=this.Dt;if(b!==a)if(A(a,"number",Q,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Dt=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0, -enumerable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(w(a,Ce,Q,"nodeSelectionAdornmentTemplate"),this.Kt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.lt},set:function(a){var b=this.lt;b!==a&&(w(a,Ce,Q,"groupSelectionAdornmentTemplate"),this.lt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.At}, -set:function(a){var b=this.At;b!==a&&(w(a,Ce,Q,"linkSelectionAdornmentTemplate"),this.At=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.gw}},isModified:{configurable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.kn&&this.Be!==a.historyIndex:this.kn},set:function(a){if(this.kn!==a){A(a,"boolean",Q,"isModified");this.kn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Be= -b.historyIndex);a||hk(this)}}},model:{configurable:!0,get:function(){return this.fc},set:function(a){var b=this.fc;if(b!==a){w(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Bc(!0);var c=Ni(this,!0);this.ag=!1;this.Zm=!0;this.Be=-2;this.ng=!1;var d=this.Bb;this.Bb=!0;yh(this.animationManager,"Model");b&&(null!==this.nf&&this.nf.each(function(a){b.mk(a)}), -b.mk(this.Mc));this.fc=a;this.partManager=ik(this.fc.type);for(var e=0;ea||1a&&Ba(a,">= 0",P,"scrollHorizontalLineChange"),this.au=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(A(a,"number",P,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",P,"scrollVerticalLineChange"), +this.eu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.kj},set:function(a){G&&w(a,me,P,"lastInput");this.kj=a}},previousInput:{configurable:!0,get:function(){return this.Sg},set:function(a){G&&w(a,me,P,"previousInput");this.Sg=a}},firstInput:{configurable:!0,get:function(){return this.Sp},set:function(a){G&&w(a,me,P,"firstInput");this.Sp=a}},currentCursor:{configurable:!0,get:function(){return this.Xs}, +set:function(a){""===a&&(a=this.Fp);if(this.Xs!==a){A(a,"string",P,"currentCursor");var b=this.Na,c=this.Qa;if(null!==b&&null!==c){this.Xs=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.Fp},set:function(a){""=== +a&&(a="auto");var b=this.Fp;b!==a&&(A(a,"string",P,"defaultCursor"),this.Fp=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(null!==a&&A(a,"function",P,"click"),this.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(null!==a&&A(a,"function",P,"doubleClick"),this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0, +enumerable:!0,get:function(){return this.Bh},set:function(a){var b=this.Bh;b!==a&&(null!==a&&A(a,"function",P,"contextClick"),this.Bh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.Vh},set:function(a){var b=this.Vh;b!==a&&(null!==a&&A(a,"function",P,"mouseOver"),this.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.Th},set:function(a){var b=this.Th;b!==a&&(null!==a&&A(a,"function",P,"mouseHover"), +this.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Sh},set:function(a){var b=this.Sh;b!==a&&(null!==a&&A(a,"function",P,"mouseHold"),this.Sh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0,get:function(){return this.It},set:function(a){var b=this.It;b!==a&&(null!==a&&A(a,"function",P,"mouseDragOver"),this.It=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Qh},set:function(a){var b= +this.Qh;b!==a&&(G&&null!==a&&A(a,"function",P,"mouseDrop"),this.Qh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"boolean",P,"handlesDragDropForTopLevelParts"),this.mt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Rh},set:function(a){var b=this.Rh;b!==a&&(null!==a&&A(a,"function",P,"mouseEnter"),this.Rh=a,this.g("mouseEnter", +b,a))}},mouseLeave:{configurable:!0,get:function(){return this.Uh},set:function(a){var b=this.Uh;b!==a&&(null!==a&&A(a,"function",P,"mouseLeave"),this.Uh=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Ch}, +set:function(a){var b=this.Ch;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ch=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(this.ob=a,a.Ye(this))}},toolManager:{configurable:!0,get:function(){return this.ue},set:function(a){this.ue!==a&&(w(a,Ua,P,"toolManager"),this.ue=a,a.diagram=this)}},defaultTool:{configurable:!0, +get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&(w(a,xe,P,"defaultTool"),this.tb=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.jb},set:function(a){var b=this.jb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(w(a,xe,P,"currentTool"),this.jb=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.zw}}, +maxSelectionCount:{configurable:!0,get:function(){return this.Dt},set:function(a){var b=this.Dt;if(b!==a)if(A(a,"number",P,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Dt=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",P,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0, +enumerable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(w(a,Ce,P,"nodeSelectionAdornmentTemplate"),this.Kt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.lt},set:function(a){var b=this.lt;b!==a&&(w(a,Ce,P,"groupSelectionAdornmentTemplate"),this.lt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.At}, +set:function(a){var b=this.At;b!==a&&(w(a,Ce,P,"linkSelectionAdornmentTemplate"),this.At=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.gw}},isModified:{configurable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.kn&&this.Ce!==a.historyIndex:this.kn},set:function(a){if(this.kn!==a){A(a,"boolean",P,"isModified");this.kn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Ce= +b.historyIndex);a||hk(this)}}},model:{configurable:!0,get:function(){return this.fc},set:function(a){var b=this.fc;if(b!==a){w(a,X,P,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Cc(!0);var c=Ni(this,!0);this.bg=!1;this.Zm=!0;this.Ce=-2;this.og=!1;var d=this.Bb;this.Bb=!0;yh(this.animationManager,"Model");b&&(null!==this.pf&&this.pf.each(function(a){b.mk(a)}), +b.mk(this.Nc));this.fc=a;this.partManager=ik(this.fc.type);for(var e=0;ethis.scale&&(this.scale=a)):Ba(a,"> 0",Q,"minScale"))}},maxScale:{configurable:!0, -enumerable:!0,get:function(){return this.Ct},set:function(a){E(a,Q,"maxScale");var b=this.Ct;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.ru},set:function(a){this.ru.D(a)||(w(a,K,Q,"zoomPoint"),this.ru=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Ak},set:function(a){var b=this.Ak;b.D(a)||(w(a,Ib,Q,"contentAlignment"),this.Ak=a=a.M(), -this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.eq},set:function(a){var b=this.eq;b.D(a)||(w(a,Ib,Q,"initialContentAlignment"),this.eq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,Q,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.ab(),this.g("padding",b,a))}},partManager:{configurable:!0, -enumerable:!0,get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(w(a,zi,Q,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Xe(null),this.Nc=a,a.Xe(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}}, -layout:{configurable:!0,get:function(){return this.Pc},set:function(a){var b=this.Pc;b!==a&&(w(a,Di,Q,"layout"),this.Pc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.Sb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.xt},set:function(a){var b=this.xt;if(b!==a&&(A(a,"boolean",Q,"isTreePathToChildren"),this.xt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Gk(a.value)}},treeCollapsePolicy:{configurable:!0, -enumerable:!0,get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(a!==Ii&&a!==Pk&&a!==Tk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.mu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{configurable:!0,get:function(){return this.iw},set:function(a){this.iw=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.Tv},set:function(a){this.bi=null;this.Tv=new Hb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0, -get:function(){return this.Uv},set:function(a){this.Uv=Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.lp},set:function(a){var b=this.lp;E(a,Q,"scale");b!==a&&(this.lp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.np},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,Q,"autoScrollRegion");var b=this.np;b.D(a)||(this.np=a=a.M(),this.ab(),this.g("autoScrollRegion",b,a))}}}); -oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return Uk.lc()},set:function(a){Uk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return Vk}}});Q.prototype.makeImageData=Q.prototype.Fx;Q.prototype.makeImage=Q.prototype.Wz;Q.prototype.cacheGroupExternalLinks=Q.prototype.yu;Q.prototype.addRenderer=Q.prototype.Dy;Q.prototype.makeSVG=Q.prototype.av;Q.prototype.makeSvg=Q.prototype.ps;Q.prototype.stopAutoScroll=Q.prototype.wg; -Q.prototype.doAutoScroll=Q.prototype.Sr;Q.prototype.isUnoccupied=Q.prototype.ak;Q.prototype.raiseDiagramEvent=Q.prototype.T;Q.prototype.removeDiagramListener=Q.prototype.Wl;Q.prototype.addDiagramListener=Q.prototype.Jj;Q.prototype.findTreeRoots=Q.prototype.zz;Q.prototype.layoutDiagram=Q.prototype.Uz;Q.prototype.findTopLevelGroups=Q.prototype.rz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.sz;Q.prototype.ensureBounds=Q.prototype.eb;Q.prototype.findLinksByExample=Q.prototype.Vr; -Q.prototype.findNodesByExample=Q.prototype.Wr;Q.prototype.findLinkForData=Q.prototype.Jc;Q.prototype.findNodeForData=Q.prototype.oi;Q.prototype.findPartForData=Q.prototype.Kc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Qb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Ud;Q.prototype.transformViewToDoc=Q.prototype.Es;Q.prototype.transformRectDocToView=Q.prototype.zA;Q.prototype.transformDocToView=Q.prototype.ep; -Q.prototype.centerRect=Q.prototype.Qr;Q.prototype.scrollToRect=Q.prototype.pv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.Lz;Q.prototype.highlight=Q.prototype.Kz;Q.prototype.selectCollection=Q.prototype.qA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.hp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Mf; -Q.prototype.commitTransaction=Q.prototype.kb;Q.prototype.startTransaction=Q.prototype.Ja;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.ib;Q.prototype.removeChangedListener=Q.prototype.mk;Q.prototype.addChangedListener=Q.prototype.fh;Q.prototype.removeModelChangedListener=Q.prototype.lA;Q.prototype.addModelChangedListener=Q.prototype.Qw;Q.prototype.findLayer=Q.prototype.Vj;Q.prototype.removeLayer=Q.prototype.jA;Q.prototype.addLayerAfter=Q.prototype.zy; -Q.prototype.addLayerBefore=Q.prototype.Ow;Q.prototype.addLayer=Q.prototype.Cl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Rj;Q.prototype.removeParts=Q.prototype.vs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.zu;Q.prototype.setProperties=Q.prototype.im;Q.prototype.attach=Q.prototype.xu;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.Px;Q.prototype.setInputOption=Q.prototype.rA; -Q.prototype.getInputOption=Q.prototype.Ml;Q.prototype.resetRenderingHints=Q.prototype.Qx;Q.prototype.setRenderingHint=Q.prototype.Ux;Q.prototype.getRenderingHint=Q.prototype.Se;Q.prototype.maybeUpdate=Q.prototype.td;Q.prototype.requestUpdate=Q.prototype.Sb;Q.prototype.delayInitialization=Q.prototype.Vy;Q.prototype.isUpdateRequested=Q.prototype.Qz;Q.prototype.invalidateDocumentBounds=Q.prototype.ab;Q.prototype.findObjectsNear=Q.prototype.sg;Q.prototype.findPartsNear=Q.prototype.nz; -Q.prototype.findObjectsIn=Q.prototype.Ef;Q.prototype.findPartsIn=Q.prototype.mx;Q.prototype.findObjectsAt=Q.prototype.pi;Q.prototype.findPartsAt=Q.prototype.mz;Q.prototype.findObjectAt=Q.prototype.jc;Q.prototype.findPartAt=Q.prototype.Kl;Q.prototype.focusObject=Q.prototype.Az;Q.prototype.alignDocument=Q.prototype.Fy;Q.prototype.zoomToRect=Q.prototype.DA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.$w;Q.prototype.focus=Q.prototype.focus; -var yi=new yb,Qi=null,ah=void 0!==sa.document,Li=null,Mi="",Eh=new F(Q,"None",0),lj=new F(Q,"Uniform",1),mj=new F(Q,"UniformToFill",2),Sf=new F(Q,"CycleAll",10),Wf=new F(Q,"CycleNotDirected",11),Yf=new F(Q,"CycleNotDirectedFast",12),Zf=new F(Q,"CycleNotUndirected",13),Tf=new F(Q,"CycleDestinationTree",14),Vf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Ii=new F(Q,"TreeParentCollapsed",21),Pk=new F(Q,"AllParentsCollapsed",22),Tk=new F(Q,"AnyParentsCollapsed", -23),Uk=new H,Vk="2.2.14",Dk="image",Fk=!1,Wk=null,wi=!1; +if(!b.D(a)){w(a,K,P,"position");var c=this.viewportBounds.copy();this.va.assign(a);Qh(this.animationManager,b,this.va);this.Bb||null===this.Na&&!this.mo.u()?Pi(this):(this.Bb=!0,a=this.scale,ij(this,this.Jp,this.Ha/a,this.Ga/a,this.Ak,!1),this.Bb=!1);if(!this.Bb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Ea,!1)}K.free(b)}},initialPosition:{configurable:!0,get:function(){return this.ot},set:function(a){this.ot.D(a)||(w(a,K,P,"initialPosition"),this.ot=a.M())}},initialScale:{configurable:!0, +enumerable:!0,get:function(){return this.pt},set:function(a){this.pt!==a&&(A(a,"number",P,"initialScale"),this.pt=a)}},grid:{configurable:!0,get:function(){null===this.ee&&(this.ee=Si(this));return this.ee},set:function(a){var b=this.ee;if(b!==a){null===b&&(b=this.ee=Si(this));w(a,V,P,"grid");a.type!==V.Grid&&v("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b);this.ee=a;a.name="GRID";null!==c&&c.add(a);xj(this);this.R();this.g("grid",b,a)}}},viewportBounds:{configurable:!0, +enumerable:!0,get:function(){return this.Jw}},viewSize:{configurable:!0,get:function(){return this.mo},set:function(a){var b=this.viewSize;b.D(a)||(w(a,Hb,P,"viewSize"),this.mo=a=a.M(),this.Ga=this.Ha=0,a.u()?(this.Ha=a.width,this.Ga=a.height):null!==this.Qa&&(this.Ha=this.Qa.clientWidth||1,this.Ga=this.Qa.clientHeight||1),Pi(this),this.ab(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{configurable:!0,get:function(){return this.jt},set:function(a){var b=this.jt; +b.D(a)||(w(a,M,P,"fixedBounds"),(G&&Infinity===a.width||-Infinity===a.width||Infinity===a.height||-Infinity===a.height)&&v("fixedBounds width/height must not be Infinity"),this.jt=a=a.M(),this.ab(),this.g("fixedBounds",b,a))}},scrollMargin:{configurable:!0,get:function(){return this.zj},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"scrollMargin");var b=this.zj;b.D(a)||(this.zj=a=a.M(),this.g("scrollMargin",b,a),this.Wo())}},scrollMode:{configurable:!0,get:function(){return this.Aj}, +set:function(a){var b=this.Aj;b!==a&&(ab(a,P,P,"scrollMode"),this.Aj=a,a===di&&Yi(this,!1),this.g("scrollMode",b,a),this.R())}},scrollsPageOnFocus:{configurable:!0,get:function(){return this.fu},set:function(a){var b=this.fu;b!==a&&(A(a,"boolean",P,"scrollsPageOnFocus"),this.fu=a,this.g("scrollsPageOnFocus",b,a))}},positionComputation:{configurable:!0,get:function(){return this.Rt},set:function(a){var b=this.Rt;b!==a&&(null!==a&&A(a,"function",P,"positionComputation"), +this.Rt=a,Yi(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{configurable:!0,get:function(){return this.Yt},set:function(a){var b=this.Yt;b!==a&&(null!==a&&A(a,"function",P,"scaleComputation"),this.Yt=a,fk(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{configurable:!0,get:function(){return this.Jp}},isVirtualized:{configurable:!0,get:function(){return this.yt},set:function(a){var b=this.yt;b!==a&&(A(a,"boolean", +P,"isVirtualized"),this.yt=a,this.g("isVirtualized",b,a))}},scale:{configurable:!0,get:function(){return this.Ea},set:function(a){var b=this.Ea;E(a,P,"scale");b!==a&&fk(this,b,a)}},defaultScale:{configurable:!0,get:function(){return this.Gp},set:function(a){G&&E(a,P,"defaultScale");!G||0this.scale&&(this.scale=a)):Ba(a,"> 0",P,"minScale"))}},maxScale:{configurable:!0, +enumerable:!0,get:function(){return this.Ct},set:function(a){E(a,P,"maxScale");var b=this.Ct;b!==a&&(0 0",P,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.ru},set:function(a){this.ru.D(a)||(w(a,K,P,"zoomPoint"),this.ru=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Ak},set:function(a){var b=this.Ak;b.D(a)||(w(a,Ib,P,"contentAlignment"),this.Ak=a=a.M(), +this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.eq},set:function(a){var b=this.eq;b.D(a)||(w(a,Ib,P,"initialContentAlignment"),this.eq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.ab(),this.g("padding",b,a))}},partManager:{configurable:!0, +enumerable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(w(a,zi,P,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Ye(null),this.Oc=a,a.Ye(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}}, +layout:{configurable:!0,get:function(){return this.Qc},set:function(a){var b=this.Qc;b!==a&&(w(a,Di,P,"layout"),this.Qc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.Sb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.xt},set:function(a){var b=this.xt;if(b!==a&&(A(a,"boolean",P,"isTreePathToChildren"),this.xt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Gk(a.value)}},treeCollapsePolicy:{configurable:!0, +enumerable:!0,get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(a!==Ii&&a!==Pk&&a!==Tk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.mu=a,this.g("treeCollapsePolicy",b,a))}},Ve:{configurable:!0,get:function(){return this.iw},set:function(a){this.iw=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.Tv},set:function(a){this.bi=null;this.Tv=new Hb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0, +get:function(){return this.Uv},set:function(a){this.Uv=Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.lp},set:function(a){var b=this.lp;E(a,P,"scale");b!==a&&(this.lp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.np},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"autoScrollRegion");var b=this.np;b.D(a)||(this.np=a=a.M(),this.ab(),this.g("autoScrollRegion",b,a))}}}); +oa.Object.defineProperties(P,{licenseKey:{configurable:!0,get:function(){return Uk.lc()},set:function(a){Uk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return Vk}}});P.prototype.makeImageData=P.prototype.Gx;P.prototype.makeImage=P.prototype.Wz;P.prototype.cacheGroupExternalLinks=P.prototype.yu;P.prototype.addRenderer=P.prototype.Ey;P.prototype.makeSVG=P.prototype.av;P.prototype.makeSvg=P.prototype.ps;P.prototype.stopAutoScroll=P.prototype.xg; +P.prototype.doAutoScroll=P.prototype.Sr;P.prototype.isUnoccupied=P.prototype.ak;P.prototype.raiseDiagramEvent=P.prototype.T;P.prototype.removeDiagramListener=P.prototype.Wl;P.prototype.addDiagramListener=P.prototype.Jj;P.prototype.findTreeRoots=P.prototype.zz;P.prototype.layoutDiagram=P.prototype.Uz;P.prototype.findTopLevelGroups=P.prototype.rz;P.prototype.findTopLevelNodesAndLinks=P.prototype.sz;P.prototype.ensureBounds=P.prototype.eb;P.prototype.findLinksByExample=P.prototype.Vr; +P.prototype.findNodesByExample=P.prototype.Wr;P.prototype.findLinkForData=P.prototype.Kc;P.prototype.findNodeForData=P.prototype.oi;P.prototype.findPartForData=P.prototype.Lc;P.prototype.findLinkForKey=P.prototype.findLinkForKey;P.prototype.findNodeForKey=P.prototype.Qb;P.prototype.findPartForKey=P.prototype.findPartForKey;P.prototype.rebuildParts=P.prototype.Ud;P.prototype.transformViewToDoc=P.prototype.Es;P.prototype.transformRectDocToView=P.prototype.zA;P.prototype.transformDocToView=P.prototype.ep; +P.prototype.centerRect=P.prototype.Qr;P.prototype.scrollToRect=P.prototype.pv;P.prototype.scroll=P.prototype.scroll;P.prototype.highlightCollection=P.prototype.Lz;P.prototype.highlight=P.prototype.Kz;P.prototype.selectCollection=P.prototype.qA;P.prototype.select=P.prototype.select;P.prototype.updateAllRelationshipsFromData=P.prototype.hp;P.prototype.updateAllTargetBindings=P.prototype.updateAllTargetBindings;P.prototype.commit=P.prototype.commit;P.prototype.rollbackTransaction=P.prototype.Nf; +P.prototype.commitTransaction=P.prototype.kb;P.prototype.startTransaction=P.prototype.Ja;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.ib;P.prototype.removeChangedListener=P.prototype.mk;P.prototype.addChangedListener=P.prototype.fh;P.prototype.removeModelChangedListener=P.prototype.lA;P.prototype.addModelChangedListener=P.prototype.Qw;P.prototype.findLayer=P.prototype.Vj;P.prototype.removeLayer=P.prototype.jA;P.prototype.addLayerAfter=P.prototype.Ay; +P.prototype.addLayerBefore=P.prototype.Ow;P.prototype.addLayer=P.prototype.Cl;P.prototype.moveParts=P.prototype.moveParts;P.prototype.copyParts=P.prototype.Rj;P.prototype.removeParts=P.prototype.vs;P.prototype.remove=P.prototype.remove;P.prototype.add=P.prototype.add;P.prototype.clearDelayedGeometries=P.prototype.zu;P.prototype.setProperties=P.prototype.im;P.prototype.attach=P.prototype.xu;P.prototype.set=P.prototype.set;P.prototype.resetInputOptions=P.prototype.Qx;P.prototype.setInputOption=P.prototype.rA; +P.prototype.getInputOption=P.prototype.Ml;P.prototype.resetRenderingHints=P.prototype.Rx;P.prototype.setRenderingHint=P.prototype.Vx;P.prototype.getRenderingHint=P.prototype.Te;P.prototype.maybeUpdate=P.prototype.td;P.prototype.requestUpdate=P.prototype.Sb;P.prototype.delayInitialization=P.prototype.Vy;P.prototype.isUpdateRequested=P.prototype.Qz;P.prototype.invalidateDocumentBounds=P.prototype.ab;P.prototype.findObjectsNear=P.prototype.tg;P.prototype.findPartsNear=P.prototype.nz; +P.prototype.findObjectsIn=P.prototype.Ff;P.prototype.findPartsIn=P.prototype.nx;P.prototype.findObjectsAt=P.prototype.pi;P.prototype.findPartsAt=P.prototype.mz;P.prototype.findObjectAt=P.prototype.jc;P.prototype.findPartAt=P.prototype.Kl;P.prototype.focusObject=P.prototype.Az;P.prototype.alignDocument=P.prototype.Gy;P.prototype.zoomToRect=P.prototype.DA;P.prototype.zoomToFit=P.prototype.zoomToFit;P.prototype.diagramScroll=P.prototype.ax;P.prototype.focus=P.prototype.focus; +var yi=new yb,Qi=null,ah=void 0!==sa.document,Li=null,Mi="",Eh=new F(P,"None",0),lj=new F(P,"Uniform",1),mj=new F(P,"UniformToFill",2),Sf=new F(P,"CycleAll",10),Wf=new F(P,"CycleNotDirected",11),Yf=new F(P,"CycleNotDirectedFast",12),Zf=new F(P,"CycleNotUndirected",13),Tf=new F(P,"CycleDestinationTree",14),Vf=new F(P,"CycleSourceTree",15),di=new F(P,"DocumentScroll",1),fi=new F(P,"InfiniteScroll",2),Ii=new F(P,"TreeParentCollapsed",21),Pk=new F(P,"AllParentsCollapsed",22),Tk=new F(P,"AnyParentsCollapsed", +23),Uk=new H,Vk="2.2.15",Dk="image",Fk=!1,Wk=null,wi=!1; function xi(){if(ah){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d6038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Jb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Jb.prototype.Rd=Jb.prototype.Tw; -Wk=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",Q,"inherit");A(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){ah=a?void 0!==sa.document:!1}; -Q.isUsingDOM=function(){return ah};Q.None=Eh;Q.Uniform=lj;Q.UniformToFill=mj;Q.CycleAll=Sf;Q.CycleNotDirected=Wf;Q.CycleNotDirectedFast=Yf;Q.CycleNotUndirected=Zf;Q.CycleDestinationTree=Tf;Q.CycleSourceTree=Vf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Ii;Q.AllParentsCollapsed=Pk;Q.AnyParentsCollapsed=Tk;function Ei(){this.uy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.vd=this.j=!0:this.vd=null} -function Gj(a,b){b.dc.setTransform(b.qc,0,0,b.qc,0,0);b.dc.Uc();if(null===a.vd)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.vd=!0;if(ah){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=Uk.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); +Wk=a}}P.className="Diagram";P.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof P?b.H:null};P.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",P,"inherit");A(b,"function",P,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};P.useDOM=function(a){ah=a?void 0!==sa.document:!1}; +P.isUsingDOM=function(){return ah};P.None=Eh;P.Uniform=lj;P.UniformToFill=mj;P.CycleAll=Sf;P.CycleNotDirected=Wf;P.CycleNotDirectedFast=Yf;P.CycleNotUndirected=Zf;P.CycleDestinationTree=Tf;P.CycleSourceTree=Vf;P.DocumentScroll=di;P.InfiniteScroll=fi;P.TreeParentCollapsed=Ii;P.AllParentsCollapsed=Pk;P.AnyParentsCollapsed=Tk;function Ei(){this.vy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.vd=this.j=!0:this.vd=null} +function Gj(a,b){b.dc.setTransform(b.qc,0,0,b.qc,0,0);b.dc.Vc();if(null===a.vd)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.vd=!0;if(ah){var d=P[Va("76a115b6ed251eaf4692")];if(d)for(var e=Uk.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); f=Va(d[2]);if(-1g&&f!==Va("7da71ca0ad381e90")&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.vd=!(0<=g&&gk.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(sa.document[Va("78a712aa")]){sa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g); k=sa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8"));var l=sa.getComputedStyle(g).getPropertyValue(Va("75b817b0ea2202"));sa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g);if(k)if(g=sa[Va("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.vd=!1;break}else if(g&&g(Va("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& +"none",e.style.touchAction="none");a.Na=e;a.dc=e.context;d=a.dc;a.qc=a.computePixelRatio();a.viewSize.u()||(a.Ha=a.Qa.clientWidth||1,a.Ga=a.Qa.clientHeight||1);Nj(a,a.Ha,a.Ga);a.Qa.insertBefore(e.Xa,a.Qa.firstChild);e=new Ek(null);e.width=1;e.height=1;a.bw=e;a.my=e.context;if(ah){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ha+"px";e.style.height=a.Ga+"px";e.style.zIndex="1";f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Qa.appendChild(e); +e.appendChild(f);e.onscroll=Ti;e.addEventListener("pointerdown",Vi);e.H=a;e.ty=!0;e.uy=!0;a.cu=e;a.$t=f}a.Wo=ua(function(){a.ci=null;a.R()},300);a.Gv=ua(function(){Fh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.dk=function(b){if(a.isEnabled){var c=qj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& (d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0c||Math.abs(e.y-b.screenY)>c)?a.lq++:a.lq=1;d.clickCount=a.lq;a.mw=b.timeStamp;a.nw.vg(b.screenX,b.screenY); +b;else if(null!==c[1]&&c[1].pointerId===b.pointerId)c[1]=b,d=!0;else if(null===c[0])c[0]=b;else if(null===c[1])c[1]=b,d=!0;else{b.preventDefault();return}if(c="touch"===b.pointerType||"pen"===b.pointerType)a.iu=!1,a.wt=!0;var e=d;d=tj(a,b,!0,!1,!0,e);rj(a,b,d);d.targetDiagram=sj(b,b.target);d.targetObject=null;e||d.clone(a.Sp);e=a.nw;c=c?25:10;b.timeStamp-a.mwc||Math.abs(e.y-b.screenY)>c)?a.lq++:a.lq=1;d.clickCount=a.lq;a.mw=b.timeStamp;a.nw.wg(b.screenX,b.screenY); a.doMouseDown();1===b.button?b.preventDefault():uj(a,d,b)}};a.ik=function(b){if(a.isEnabled){a.Xk=!0;var c=a.ml;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}if(c[0].pointerId===b.pointerId){c=tj(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX,b.clientY);null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f= b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;rj(a,f,c);c.targetObject=null;a.doMouseMove();uj(a,c,b)}}};a.kk=function(b){if(a.isEnabled){a.Xk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Qt;if(c&&a.iu)delete d[b.pointerId],b.preventDefault();else if(d=a.ml,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]=null;d=tj(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY)); -null!==e&&e.H instanceof Q&&e.H!==a&&rj(e.H,b,d);null===e&&(e=b.target);rj(a,b,d);d.clickCount=a.lq;d.targetDiagram=sj(b,e);d.targetObject=null;a.doMouseUp();uj(a,d,b);c&&(a.wt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.jk=function(b){if(a.isEnabled){a.Xk=!1;var c=a.Qt;c[b.pointerId]&&delete c[b.pointerId];c=a.ml;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.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.ct=d.ba["d"+Xk[1]+Xk[2]+"wI"+Dk.slice(1,5)]["b"+Yk.slice(1,b)](d.ba,Wk,b,b);d.Tc(!0);Ri(a)}}Ei.className="DiagramHelper";function Xe(a){this.j=void 0===a?new K:a;this.o=new K}oa.Object.defineProperties(Xe.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}}});var Xk="DraggingInfo"; +null!==e&&e.H instanceof P&&e.H!==a&&rj(e.H,b,d);null===e&&(e=b.target);rj(a,b,d);d.clickCount=a.lq;d.targetDiagram=sj(b,e);d.targetObject=null;a.doMouseUp();uj(a,d,b);c&&(a.wt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.jk=function(b){if(a.isEnabled){a.Xk=!1;var c=a.Qt;c[b.pointerId]&&delete c[b.pointerId];c=a.ml;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.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.ct=d.ba["d"+Xk[1]+Xk[2]+"wI"+Dk.slice(1,5)]["b"+Yk.slice(1,b)](d.ba,Wk,b,b);d.Uc(!0);Ri(a)}}Ei.className="DiagramHelper";function Xe(a){this.j=void 0===a?new K:a;this.m=new K}oa.Object.defineProperties(Xe.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a}}});var Xk="DraggingInfo"; Xe.className="DraggingInfo";function Yj(a,b,c){this.node=a;this.info=b;this.Tu=c}Yj.className="DraggingNodeInfoPair";function Pe(){this.reset()}Pe.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Hb(NaN,NaN)).freeze();this.gridSnapCellSpot=Fc;this.gridSnapOrigin=(new K(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Pe.className="DraggingOptions"; -function Zk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;$k(c);b&&c.im(b);return c}na(Zk,Q);function $k(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=Gc;a.layout=new al}Zk.prototype.reset=function(){Q.prototype.reset.call(this);$k(this)};Zk.className="Palette"; -function bl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.aa=null;c.en=!1;c.fn=!1;c.G=!0;c.v=!0;c.ma=0;c.o=!1;c.sl=null;c.Ux("drawShadows",!1);a=new S;var e=new Qf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= -"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new gc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new cl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.Rf=function(){d.ab();dl(d)};c.Wd=function(){null!==d.observed&&(d.ab(),d.R())};c.Ma=function(){1>d.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Qf=function(){null!==d.observed&&dl(d)};c.autoScale=lj;c.Bb=!1;b&&Object.assign(c,b);return c}na(bl,Q);bl.prototype.computePixelRatio=function(){return 1}; -bl.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Na,b=this.dc;if(null!==a&&null!==b){Ej(this);if(null===this.sl){var c=new Ek(null);c.width=a.width;c.height=a.height;this.sl=c}try{this.Na=this.sl,this.dc=this.Na.context,this.dc.Tc(!0),this.dc.setTransform(1,0,0,1,0,0),this.dc.clearRect(0,0,this.Na.width,this.Na.height),el(this)}finally{this.Na=a,this.dc=b}}}Q.prototype.redraw.call(this)}; -bl.prototype.zc=function(){null===this.Qa&&v("No div specified");null===this.Na&&v("No canvas specified");if(!(this.Na instanceof Lj)&&(ri(this.box),this.hd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.xi){Ej(this);var b=this.Na;a=this.dc;a.Tc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?el(this):null!==this.sl&&(a.drawImage(this.sl.Xa,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +function Zk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=P.call(this,a)||this;else c=P.call(this)||this,b=a;$k(c);b&&c.im(b);return c}na(Zk,P);function $k(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=Gc;a.layout=new al}Zk.prototype.reset=function(){P.prototype.reset.call(this);$k(this)};Zk.className="Palette"; +function bl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=P.call(this,a)||this;else c=P.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.$=null;c.en=!1;c.fn=!1;c.G=!0;c.v=!0;c.ma=0;c.m=!1;c.sl=null;c.Vx("drawShadows",!1);a=new S;var e=new Qf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new gc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new cl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.Sf=function(){d.ab();dl(d)};c.Wd=function(){null!==d.observed&&(d.ab(),d.R())};c.Ma=function(){1>d.updateDelay?d.R():d.m||(d.m=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Rf=function(){null!==d.observed&&dl(d)};c.autoScale=lj;c.Bb=!1;b&&Object.assign(c,b);return c}na(bl,P);bl.prototype.computePixelRatio=function(){return 1}; +bl.prototype.redraw=function(){if(this.m&&1<=this.updateDelay){this.m=!1;var a=this.Na,b=this.dc;if(null!==a&&null!==b){Ej(this);if(null===this.sl){var c=new Ek(null);c.width=a.width;c.height=a.height;this.sl=c}try{this.Na=this.sl,this.dc=this.Na.context,this.dc.Uc(!0),this.dc.setTransform(1,0,0,1,0,0),this.dc.clearRect(0,0,this.Na.width,this.Na.height),el(this)}finally{this.Na=a,this.dc=b}}}P.prototype.redraw.call(this)}; +bl.prototype.zc=function(){null===this.Qa&&v("No div specified");null===this.Na&&v("No canvas specified");if(!(this.Na instanceof Lj)&&(ri(this.box),this.hd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.xi){Ej(this);var b=this.Na;a=this.dc;a.Uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?el(this):null!==this.sl&&(a.drawImage(this.sl.Xa,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.qc,this.qc),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.$a.s;for(var c=b.length,d=0;da&&(a=0);this.ma!==a&&(this.ma=a)}}});bl.className="Overview";function cl(){Oe.call(this);this.j=null}na(cl,Oe); cl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale?!1:b.allowZoom};fl.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);E(a,fl,"increaseZoom:factor");var b=this.diagram;b.autoScale===Eh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; fl.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);E(a,fl,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Eh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};fl.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);E(a,fl,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; fl.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);E(a,fl,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -fl.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Bc();a.redraw();var c=a.position,d=a.scale;yh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.su&&!isNaN(this.zt)&&a.documentBounds.D(this.qu)?(a.scale=this.zt,a.position=this.lw,this.su=NaN,this.qu=pc):(this.zt=d,this.lw=c.copy(),a.zoomToFit(),this.su=a.scale,this.qu=a.documentBounds.copy());Ah(b)};fl.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -fl.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w(a,S,fl,"part");var b=this.diagram;b.eb();if(null===a){try{null!==this.fg&&(this.fg.next()?a=this.fg.value:this.fg=null)}catch(k){this.fg=null}null===a&&(0a&&(a+=360));return a}; -t.Ff=function(){if(0!==(this.m&4096)===!1)return this.Lk;var a=this.Ea;return null!==this.panel?a*this.panel.Ff():a};t.$r=function(a,b){void 0===b&&(b=new K);b.assign(a);this.ne.Rd(b);return b};t.bs=function(a,b,c){return this.Xj(a.x,a.y,b.x,b.y,c)}; -t.Xj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.Hf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.Hf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +t.g=function(a,b,c){this.ib(qe,a,this,b,c)};t.Ge=function(a,b,c,d){var e=this.wc;e.h(a,b,c,d);if(1!==this.Ea||0!==this.Lb){null===this.Nb&&(this.Nb=new Jb);var f=this.Nb;f.reset();this.bo(f,a,b,c,d);f.fp(e)}};function wl(a,b,c,d){if(!1===a.pickable)return!1;d.multiply(a.transform);return c?a.Yc(b,d):a.hh(b,d)} +t.mx=function(a,b,c){if(!1===this.pickable)return!1;var d=this.naturalBounds;b=a.Df(b);return c?Lb(a.x,a.y,0,0,0,d.height)<=b||Lb(a.x,a.y,0,d.height,d.width,d.height)<=b||Lb(a.x,a.y,d.width,d.height,d.width,0)<=b||Lb(a.x,a.y,d.width,0,0,0)<=b:a.zd(0,0)<=b&&a.zd(0,d.height)<=b&&a.zd(d.width,0)<=b&&a.zd(d.width,d.height)<=b};t.se=function(){return!0}; +t.ga=function(a){G&&w(a,K,O,"containsPoint:p");var b=K.alloc();b.assign(a);this.transform.La(b);var c=this.actualBounds;if(!c.u())return K.free(b),!1;var d=this.diagram;if(null!==d&&d.wt){var e=d.Ml("extraTouchThreshold"),f=d.Ml("extraTouchArea"),g=f/2,h=this.naturalBounds;d=this.Gf()*d.scale;var k=1/d;if(h.width*da&&(a+=360));return a}; +t.Gf=function(){if(0!==(this.o&4096)===!1)return this.Lk;var a=this.Ea;return null!==this.panel?a*this.panel.Gf():a};t.$r=function(a,b){void 0===b&&(b=new K);b.assign(a);this.oe.Rd(b);return b};t.bs=function(a,b,c){return this.Xj(a.x,a.y,b.x,b.y,c)}; +t.Xj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.If(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.If(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; O.prototype.measure=function(a,b,c,d){if(!1!==Bj(this)){var e=this.Mg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=0;this instanceof Qf&&(g=this.strokeWidth);90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof V;switch(xl(this,!0)){case yg:g=e=0;h&&(b=a=Infinity); break;case Bd:isFinite(a)&&a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case jl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case kl:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.Db>a.width)))c=!0;this.m=c?this.m|256:this.m&-257;this.Jb.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Tl(f,this.Jb);yl(this,!1);M.free(f)};t=O.prototype;t.gh=function(){}; +this.xq>a.height||this.Db>a.width)))c=!0;this.o=c?this.o|256:this.o&-257;this.Jb.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Tl(f,this.Jb);yl(this,!1);M.free(f)};t=O.prototype;t.gh=function(){}; function zl(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.wc;c=a.Mg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=xl(a,!0);c===d&&f===e&&(b=yg);switch(b){case yg:if(c>d||f>e)wj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Bd:wj(a,!0);a.measure(d,e,0,0);break;case jl:wj(a,!0);a.measure(d,f,0,0);break;case kl:wj(a,!0),a.measure(c,e,0,0)}}} t.Tl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||Al(c,!0),this.R(),ec(a,b)||(c.oh(),this.In(c)))};t.In=function(a){null!==this.portId&&(Al(a,!0),a instanceof T&&Bl(a,this))}; -t.zc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof V&&(this.type===V.TableRow||this.type===V.TableColumn),e=this.Jb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Jb;d=this.gc;var g=this.areaBackground,h=this.cc;null===g&&null===h||a.Uc();null!==g&&(ti(this,a,g,!0,!0,d,e),g instanceof Cl&&g.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(g)):a.fillRect(e.x,e.y,e.width,e.height)); -null!==h&&(ti(this,a,h,!0,!1,d,e),h instanceof Cl&&h.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(h)):a.fillRect(e.x,e.y,e.width,e.height));this.mi(a,b)}else if(!this.ex(a,b)){this instanceof R&&this.ck(!1);G&&G.El&&G.bz&&G.bz(a,this);d=this.transform;g=this.panel;0!==(this.m&4096)===!0&&El(this);var k=this.part;h=!1;var l=0;if(k&&b.Se("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.qc}m=this.zi();var n;if(!(n=b.hj||!m)){var p=this.naturalBounds; +t.zc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof V&&(this.type===V.TableRow||this.type===V.TableColumn),e=this.Jb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Jb;d=this.gc;var g=this.areaBackground,h=this.cc;null===g&&null===h||a.Vc();null!==g&&(ti(this,a,g,!0,!0,d,e),g instanceof Cl&&g.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(g)):a.fillRect(e.x,e.y,e.width,e.height)); +null!==h&&(ti(this,a,h,!0,!1,d,e),h instanceof Cl&&h.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(h)):a.fillRect(e.x,e.y,e.width,e.height));this.mi(a,b)}else if(!this.gx(a,b)){this instanceof R&&this.ck(!1);G&&G.El&&G.bz&&G.bz(a,this);d=this.transform;g=this.panel;0!==(this.o&4096)===!0&&El(this);var k=this.part;h=!1;var l=0;if(k&&b.Te("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.qc}m=this.zi();var n;if(!(n=b.hj||!m)){var p=this.naturalBounds; n=this.wh;var r=n.m11,q=n.m21,u=n.dx,x=n.m12,y=n.m22,z=n.dy,B,C=B=0;n=B*r+C*q+u;var D=B*x+C*y+z;B=p.width+l;C=0;var J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);var U=Math.min(D,B);var aa=Math.max(n+0,J)-C;var Y=Math.max(D+0,B)-U;n=C;D=U;B=p.width+l;C=p.height+l;J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);U=Math.min(D,B);aa=Math.max(n+aa,J)-C;Y=Math.max(D+Y,B)-U;n=C;D=U;B=0;C=p.height+l;J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);U=Math.min(D,B);aa=Math.max(n+aa,J)-C;Y=Math.max(D+Y,B)-U;n=C;D=U;l=b.viewportBounds; -p=l.x;r=l.y;n=!(n>l.width+p||p>aa+n||D>l.height+r||r>Y+D)}if(n){n=0!==(this.m&256);a.clipInsteadOfFill&&(n=!1);this instanceof ch&&(a.font=this.font);if(n){D=g.re()?g.naturalBounds:g.actualBounds;null!==this.pb?(p=this.pb,aa=p.x,Y=p.y,l=p.width,p=p.height):(aa=Math.max(e.x,D.x),Y=Math.max(e.y,D.y),l=Math.min(e.right,D.right)-aa,p=Math.min(e.bottom,D.bottom)-Y);if(aa>e.width+e.x||e.x>D.width+D.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(aa,Y,l,p);a.clip()}if(m){if(!k.isVisible()){1!== -c&&(a.globalAlpha=f);return}h&&(D=k.shadowOffset,a.wv(D.x*b.scale*b.qc,D.y*b.scale*b.qc,k.shadowBlur),Fl(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?Fl(a):h&&!1===this.shadowVisible&&Gl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Uc(),ti(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof Cl&&this.areaBackground.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12, -d.m21,d.m22,d.dx,d.dy);h&&(null!==g&&0!==(g.m&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)&&null===this.shadowVisible&&Gl(a);null!==this.cc&&(a.Uc(),Hl(this,a,k,e));G&&G.El&&G.cz&&G.cz(a,this);h&&(null!==this.cc||null!==this.areaBackground||null!==g&&0!==(g.m&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)?(Il(this,!0),null===this.shadowVisible&&Gl(a)):Il(this,!1);this.mi(a,b);h&&0!==(this.m&512)===!0&&Fl(a);m&&h&&Gl(a);n&&(a.restore(),a.Tc(this instanceof -V));d.js()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22*b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function Hl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.fw();a instanceof Qf&&(e=a.ya.bounds,f=e.x,g=e.y,h=e.width,e=e.height);ti(a,b,a.cc,!0,!1,c,d);a.cc instanceof Cl&&a.cc.type===Dl?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.Df(a.cc)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.ex=function(){return!1};t.mi=function(){}; -function ti(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Jl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Qf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Kl)&&c.xe&&(c.type===Ll||c.zk===h&&c.Us===k))var m=c.xe;else{var n=0,p=0,r=0,q=0,u=0,x=0;x=u=0;e?(u=g.x,x=g.y):d||(u-=l/2,x-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ -c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=x;q+=x;if(c.type===Ml)m=b.createLinearGradient(n,p,r,q);else if(c.type===Dl)x=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,x=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,x);else if(c.type===Ll)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else Aa(c.type,"Brush type");if(c.type!==Ll&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.xe=m,null!== -m&&(c.zk=h,c.Us=k),null===m&&c.type===Ll&&-1!==c.zk)){c.zk=-1;var y=a.diagram;null!==y&&-1===c.zk&&va(function(){y.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.ug=function(a){if(a instanceof V)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Kf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Kf():!0}; -t.Jf=function(){for(var a=this instanceof V?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function El(a){if(0!==(a.m&2048)===!0){var b=a.Gb;b.reset();if(!a.Jb.u()||!a.wc.u()){Nl(a,!1);return}b.translate(a.Jb.x-a.wc.x,a.Jb.y-a.wc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.bo(b,c.x,c.y,c.width,c.height)}Nl(a,!1);Ol(a,!0)}0!==(a.m&4096)===!0&&(b=a.panel,null===b?(a.wh.set(a.Gb),a.Lk=a.scale,Ol(a,!1)):null!==b.ne&&(c=a.wh,c.reset(),b.re()?c.multiply(b.wh):null!==b.panel&&c.multiply(b.panel.wh),c.multiply(a.Gb),a.Lk=a.scale*b.Lk,Ol(a,!1)))} -t.bo=function(a,b,c,d,e){1!==this.Ea&&a.scale(this.Ea);if(0!==this.Lb){var f=K.alloc();f.Di(b,c,d,e,Kc);a.rotate(this.Lb,f.x,f.y);K.free(f)}};t.w=function(a){if(!Bj(this)){void 0===a&&(a=!1);wj(this,!0);yl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Zj=function(){Bj(this)||(wj(this,!0),yl(this,!0))};function Pl(a){if(!Cj(a)){var b=a.panel;null!==b?b.w():a.zi()&&(b=a.diagram,null!==b&&(b.Ce.add(a),a instanceof T&&a.Bd(),b.Sb()));yl(a,!0)}} -t.Wk=function(){0!==(this.m&2048)===!1&&(Nl(this,!0),Ol(this,!0))};t.Xu=function(){Ol(this,!0)};t.R=function(){var a=this.part;null!==a&&a.R()}; +p=l.x;r=l.y;n=!(n>l.width+p||p>aa+n||D>l.height+r||r>Y+D)}if(n){n=0!==(this.o&256);a.clipInsteadOfFill&&(n=!1);this instanceof ch&&(a.font=this.font);if(n){D=g.se()?g.naturalBounds:g.actualBounds;null!==this.pb?(p=this.pb,aa=p.x,Y=p.y,l=p.width,p=p.height):(aa=Math.max(e.x,D.x),Y=Math.max(e.y,D.y),l=Math.min(e.right,D.right)-aa,p=Math.min(e.bottom,D.bottom)-Y);if(aa>e.width+e.x||e.x>D.width+D.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(aa,Y,l,p);a.clip()}if(m){if(!k.isVisible()){1!== +c&&(a.globalAlpha=f);return}h&&(D=k.shadowOffset,a.wv(D.x*b.scale*b.qc,D.y*b.scale*b.qc,k.shadowBlur),Fl(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?Fl(a):h&&!1===this.shadowVisible&&Gl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Vc(),ti(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof Cl&&this.areaBackground.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12, +d.m21,d.m22,d.dx,d.dy);h&&(null!==g&&0!==(g.o&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)&&null===this.shadowVisible&&Gl(a);null!==this.cc&&(a.Vc(),Hl(this,a,k,e));G&&G.El&&G.cz&&G.cz(a,this);h&&(null!==this.cc||null!==this.areaBackground||null!==g&&0!==(g.o&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)?(Il(this,!0),null===this.shadowVisible&&Gl(a)):Il(this,!1);this.mi(a,b);h&&0!==(this.o&512)===!0&&Fl(a);m&&h&&Gl(a);n&&(a.restore(),a.Uc(this instanceof +V));d.js()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22*b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function Hl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.fw();a instanceof Qf&&(e=a.ya.bounds,f=e.x,g=e.y,h=e.width,e=e.height);ti(a,b,a.cc,!0,!1,c,d);a.cc instanceof Cl&&a.cc.type===Dl?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.Ef(a.cc)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.gx=function(){return!1};t.mi=function(){}; +function ti(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Jl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Qf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Kl)&&c.ye&&(c.type===Ll||c.zk===h&&c.Us===k))var m=c.ye;else{var n=0,p=0,r=0,q=0,u=0,x=0;x=u=0;e?(u=g.x,x=g.y):d||(u-=l/2,x-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=x;q+=x;if(c.type===Ml)m=b.createLinearGradient(n,p,r,q);else if(c.type===Dl)x=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,x=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,x);else if(c.type===Ll)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else Aa(c.type,"Brush type");if(c.type!==Ll&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ye=m,null!== +m&&(c.zk=h,c.Us=k),null===m&&c.type===Ll&&-1!==c.zk)){c.zk=-1;var y=a.diagram;null!==y&&-1===c.zk&&va(function(){y.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.vg=function(a){if(a instanceof V)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Lf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Lf():!0}; +t.Kf=function(){for(var a=this instanceof V?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; +function El(a){if(0!==(a.o&2048)===!0){var b=a.Gb;b.reset();if(!a.Jb.u()||!a.wc.u()){Nl(a,!1);return}b.translate(a.Jb.x-a.wc.x,a.Jb.y-a.wc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.bo(b,c.x,c.y,c.width,c.height)}Nl(a,!1);Ol(a,!0)}0!==(a.o&4096)===!0&&(b=a.panel,null===b?(a.wh.set(a.Gb),a.Lk=a.scale,Ol(a,!1)):null!==b.oe&&(c=a.wh,c.reset(),b.se()?c.multiply(b.wh):null!==b.panel&&c.multiply(b.panel.wh),c.multiply(a.Gb),a.Lk=a.scale*b.Lk,Ol(a,!1)))} +t.bo=function(a,b,c,d,e){1!==this.Ea&&a.scale(this.Ea);if(0!==this.Lb){var f=K.alloc();f.Di(b,c,d,e,Kc);a.rotate(this.Lb,f.x,f.y);K.free(f)}};t.w=function(a){if(!Bj(this)){void 0===a&&(a=!1);wj(this,!0);yl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Zj=function(){Bj(this)||(wj(this,!0),yl(this,!0))};function Pl(a){if(!Cj(a)){var b=a.panel;null!==b?b.w():a.zi()&&(b=a.diagram,null!==b&&(b.De.add(a),a instanceof T&&a.Bd(),b.Sb()));yl(a,!0)}} +t.Wk=function(){0!==(this.o&2048)===!1&&(Nl(this,!0),Ol(this,!0))};t.Xu=function(){Ol(this,!0)};t.R=function(){var a=this.part;null!==a&&a.R()}; function xl(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===V.Table)return Ql(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===V.Auto&&d.Ab()===a)return Rl(a,Bd,b);if(c===ll){if(null!==d){if(d.type===V.Spot&&d.Ab()===a)return Rl(a,Bd,b);c=d.defaultStretch;return c===ll?Rl(a,yg,b):Rl(a,c,b)}return Rl(a,yg,b)}return Rl(a,c,b)} function Ql(a,b,c,d){var e=a.stretch;if(e!==ll)return Rl(a,e,d);var f=e=null;switch(b.stretch){case kl:f=!0;break;case Bd:f=!0}switch(c.stretch){case jl:e=!0;break;case Bd:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===jl||b===Bd);null===f&&(f=b===kl||b===Bd);return!0===e&&!0===f?Rl(a,Bd,d):!0===e?Rl(a,jl,d):!0===f?Rl(a,kl,d):Rl(a,yg,d)} -function Rl(a,b,c){if(c)return b;if(b===yg)return yg;c=a.desiredSize;if(c.u())return yg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===jl)return yg;if(b===Bd)return kl}else{if(b===kl)return yg;if(b===Bd)return jl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===kl)return yg;if(b===Bd)return jl}else{if(b===jl)return yg;if(b===Bd)return kl}return b}function Il(a,b){a.m=b?a.m|512:a.m&-513}function tl(a){return 0!==(a.m&1024)}function Sl(a,b){a.m=b?a.m|1024:a.m&-1025} -function Nl(a,b){a.m=b?a.m|2048:a.m&-2049}function Ol(a,b){a.m=b?a.m|4096:a.m&-4097}function Bj(a){return 0!==(a.m&8192)}function wj(a,b){a.m=b?a.m|8192:a.m&-8193}function Cj(a){return 0!==(a.m&16384)}function yl(a,b){a.m=b?a.m|16384:a.m&-16385}t.Bi=function(a){this.eg=a};t.As=function(){};t.tv=function(a){this.va=a;Pl(this);return!0};t.hm=function(a,b){if(this.va.x!==a||this.va.y!==b)this.va.h(a,b),this.Wk()};t.fw=function(){return 0}; +function Rl(a,b,c){if(c)return b;if(b===yg)return yg;c=a.desiredSize;if(c.u())return yg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===jl)return yg;if(b===Bd)return kl}else{if(b===kl)return yg;if(b===Bd)return jl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===kl)return yg;if(b===Bd)return jl}else{if(b===jl)return yg;if(b===Bd)return kl}return b}function Il(a,b){a.o=b?a.o|512:a.o&-513}function tl(a){return 0!==(a.o&1024)}function Sl(a,b){a.o=b?a.o|1024:a.o&-1025} +function Nl(a,b){a.o=b?a.o|2048:a.o&-2049}function Ol(a,b){a.o=b?a.o|4096:a.o&-4097}function Bj(a){return 0!==(a.o&8192)}function wj(a,b){a.o=b?a.o|8192:a.o&-8193}function Cj(a){return 0!==(a.o&16384)}function yl(a,b){a.o=b?a.o|16384:a.o&-16385}t.Bi=function(a){this.fg=a};t.As=function(){};t.tv=function(a){this.va=a;Pl(this);return!0};t.hm=function(a,b){if(this.va.x!==a||this.va.y!==b)this.va.h(a,b),this.Wk()};t.fw=function(){return 0}; function Tl(a){var b=a.part;if(b instanceof T&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||Bl(b,a)}}function Ul(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof V?a instanceof T?a.Bd():a.nk(a,function(a){Tl(a)}):Tl(a))} t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new Ji(a,b,c,d):e=a;e.yd=this;a=this.jh();null!==a&&Vl(a)&&v("Cannot add a Binding to a template that has already been copied: "+e);null===this.localBindings&&(this.localBindings=new H);this.localBindings.add(e);return this};t.set=function(a){if(G)for(var b in a)(b.startsWith("_")||-1!==b.indexOf("."))&&v("Property with underscore or period passed to GraphObject.set. Did you mean to use GraphObject.assign?");Object.assign(this,a);return this}; t.xu=function(a){Wl(this,a);return this};t.apply=function(a){a(this);return this};t.im=function(a){Ij(this,a);return this};t.qz=function(){return this.jh()};t.jh=function(){for(var a=this instanceof V?this:this.panel;null!==a;){if(null!==a.allBindings)return a;a=a.panel}return null};t.Av=function(a){a.yd=this;null===this.animationTriggers&&(this.animationTriggers=new yb);this.animationTriggers.add(a.propertyName,a);return this}; -function Xl(a,b){for(var c=1;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new db;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Ij(a,e)}else Ij(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+ +ck?(a=d,w(b,ck,ck,"copyFrom:pd"),b.isRow?a.height=b.height:a.width=b.width,a.minimum=b.minimum,a.maximum=b.maximum,a.alignment=b.alignment,a.stretch=b.stretch,a.sizing=b.sizing,a.hg=null===b.separatorPadding?null:b.separatorPadding.M(),a.separatorStroke=b.separatorStroke,a.separatorStrokeWidth=b.separatorStrokeWidth,a.Bj=null,b.separatorDashArray&&(a.Bj=Ja(b.separatorDashArray)),a.background=b.background,a.coversSeparators=b.coversSeparators,a.ae=b.ae):v("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+ +a)}else if(b instanceof F)"function"===typeof a.ub?a.ub(b):Ea(a,b);else if(b instanceof $l)a.type=b;else if(b instanceof Ji)a instanceof O?a.bind(b):a instanceof ck?a.bind(b):v("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(b instanceof li)a instanceof O?a.Av(b):v("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(b instanceof je)a instanceof N&&a.type===N.m?a.figures.add(b):v("A PathFigure can only be added to a Path Geometry, not to: "+ +a);else if(b instanceof ke)a instanceof je?a.segments.add(b):v("A PathSegment can only be added to a PathFigure, not to: "+a);else if(b instanceof Di)a instanceof P?a.layout=b:a instanceof wf?a.layout=b:v("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(b))for(c=0;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new db;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Ij(a,e)}else Ij(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+ a)}function am(a,b){A(a,"string",O,"defineBuilder:name");A(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);Yl.add(a,b)} function bm(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} -oa.Object.defineProperties(O.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.pp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new rl),this.B.pp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Qf:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new rl),this.B.Qf=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.jp:null},set:function(a){this.srcBindings!== -a&&(null===this.B&&(this.B=new rl),this.B.jp=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Ji:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&A(a,"boolean",O,"shadowVisible"),ql(this),this.B.Ji=a,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Mc:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&A(a,"function",O,"enabledChanged"),ql(this), -this.B.Mc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.ar:mg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&ab(a,R,O,"segmentOrientation"),null===this.Wa&&(this.Wa=new cm),this.Wa.ar=a,this.w(),this.g("segmentOrientation",b,a),a===mg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.v:-Infinity},set:function(a){G&&A(a,"number",O,"segmentIndex");a= -Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Wa&&(this.Wa=new cm),this.Wa.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.o:0},set:function(a){G&&A(a,"number",O,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&v("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ea=a,this.w(),this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Lb},set:function(a){var b=this.Lb;b!==a&&(G&&E(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Ul(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0, enumerable:!0,get:function(){return this.fd},set:function(a){G&&w(a,Hb,O,"desiredSize");var b=a.width,c=a.height,d=this.fd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.fd=a=a.M(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",d,a),tl(this)&&(a=this.part,null!==a&&(ul(this,a,"width"),ul(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.fd.width},set:function(a){var b=this.fd.width;b===a||isNaN(b)&&isNaN(a)||(G&& A(a,"number",O,"width"),b=this.fd,this.fd=a=(new Hb(a,this.fd.height)).freeze(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",b,a),tl(this)&&(a=this.part,null!==a&&ul(this,a,"width")))}},height:{configurable:!0,get:function(){return this.fd.height},set:function(a){var b=this.fd.height;b===a||isNaN(b)&&isNaN(a)||(G&&A(a,"number",O,"height"),b=this.fd,this.fd=a=(new Hb(this.fd.width,a)).freeze(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",b,a),tl(this)&&(a= -this.part,null!==a&&ul(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Pb},set:function(a){var b=this.minSize;b.D(a)||(G&&w(a,Hb,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),ql(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Ub},set:function(a){var b=this.maxSize;b.D(a)||(G&&w(a,Hb,O,"maxSize"),a=a.copy(),isNaN(a.width)&& -(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),ql(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.wc}},naturalBounds:{configurable:!0,get:function(){return this.gc}},margin:{configurable:!0,get:function(){return this.Mg},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,O,"margin");var b=this.Mg;b.D(a)||(this.Mg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0, -enumerable:!0,get:function(){0!==(this.m&2048)===!0&&El(this);return this.Gb}},ne:{configurable:!0,get:function(){0!==(this.m&4096)===!0&&El(this);return this.wh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B?this.B.jb:null},set:function(a){this.animationTriggers!==a&&(ql(this),this.B.jb=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.Hi:yg},set:function(a){this.reshapingBehavior!==a&&(ql(this), -this.B.Hi=a)}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,O,"alignment"),a.kc()&&!a.Rb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.M(),Pl(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Cg},set:function(a){G&&E(a,O,"column");a=Math.round(a);var b=this.Cg;b!==a&&(0>a&&Ba(a,">= 0",O,"column"),this.Cg=a,this.w(),this.g("column", +this.part,null!==a&&ul(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Pb},set:function(a){var b=this.minSize;b.D(a)||(G&&w(a,Hb,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),ql(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.m:Ub},set:function(a){var b=this.maxSize;b.D(a)||(G&&w(a,Hb,O,"maxSize"),a=a.copy(),isNaN(a.width)&& +(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),ql(this),this.B.m=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.wc}},naturalBounds:{configurable:!0,get:function(){return this.gc}},margin:{configurable:!0,get:function(){return this.Mg},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,O,"margin");var b=this.Mg;b.D(a)||(this.Mg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0, +enumerable:!0,get:function(){0!==(this.o&2048)===!0&&El(this);return this.Gb}},oe:{configurable:!0,get:function(){0!==(this.o&4096)===!0&&El(this);return this.wh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B?this.B.jb:null},set:function(a){this.animationTriggers!==a&&(ql(this),this.B.jb=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.Hi:yg},set:function(a){this.reshapingBehavior!==a&&(ql(this), +this.B.Hi=a)}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,O,"alignment"),a.kc()&&!a.Rb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.M(),Pl(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Dg},set:function(a){G&&E(a,O,"column");a=Math.round(a);var b=this.Dg;b!==a&&(0>a&&Ba(a,">= 0",O,"column"),this.Dg=a,this.w(),this.g("column", b,a))}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Ib:1},set:function(a){G&&A(a,"number",O,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",O,"columnSpan"),ql(this),this.B.Ib=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.Xn},set:function(a){G&&E(a,O,"row");a=Math.round(a);var b=this.Xn;b!==a&&(0>a&&Ba(a,">= 0",O,"row"),this.Xn=a,this.w(),this.g("row",b,a))}},rowSpan:{configurable:!0, enumerable:!0,get:function(){return null!==this.B?this.B.Ii:1},set:function(a){G&&A(a,"number",O,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",O,"rowSpan"),ql(this),this.B.Ii=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Ki:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&A(a,"function",O,"spanAllocation"),ql(this),this.B.Ki=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0, enumerable:!0,get:function(){return this.tk},set:function(a){var b=this.tk;b.D(a)||(G&&w(a,Ib,O,"alignmentFocus"),!G||!a.kc()||a.Rb()||a.No()&&this instanceof T||v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.tk=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.Sn},set:function(a){var b=this.Sn;if(b!==a){G&&null!==a&&A(a,"string",O,"portId");var c=this.part;null===c||c instanceof T||v("Cannot set portID on a Link: "+ -a);null!==b&&null!==c&&em(c,this);this.Sn=a;null!==a&&null!==c&&(c.Te=!0,fm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0,get:function(){return null!==this.da?this.da.Gj:Ec},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,O,"toSpot"),a=a.M(),this.Xc(),this.da.Gj=a,this.g("toSpot",b,a),Tl(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.Ej:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&A(a,"number",O, -"toEndSegmentLength"),0>a&&Ba(a,">= 0",O,"toEndSegmentLength"),this.Xc(),this.da.Ej=a,this.g("toEndSegmentLength",b,a),Tl(this))}},toShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.Fj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",O,"toShortLength"),this.Xc(),this.da.Fj=a,this.g("toShortLength",b,a),Tl(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.da?this.da.Fr:null},set:function(a){var b=this.toLinkable; -b!==a&&(G&&null!==a&&A(a,"boolean",O,"toLinkable"),this.Xc(),this.da.Fr=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!==this.da?this.da.Gr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&A(a,"number",O,"toMaxLinks"),0>a&&Ba(a,">= 0",O,"toMaxLinks"),this.Xc(),this.da.Gr=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.da?this.da.cj:Ec},set:function(a){var b=this.fromSpot;b.D(a)||(G&& -w(a,Ib,O,"fromSpot"),a=a.M(),this.Xc(),this.da.cj=a,this.g("fromSpot",b,a),Tl(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.aj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&A(a,"number",O,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",O,"fromEndSegmentLength"),this.Xc(),this.da.aj=a,this.g("fromEndSegmentLength",b,a),Tl(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.bj:0},set:function(a){var b= -this.fromShortLength;b!==a&&(G&&A(a,"number",O,"fromShortLength"),this.Xc(),this.da.bj=a,this.g("fromShortLength",b,a),Tl(this))}},fromLinkable:{configurable:!0,get:function(){return null!==this.da?this.da.Xp:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&A(a,"boolean",O,"fromLinkable"),this.Xc(),this.da.Xp=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.da?this.da.Yp:Infinity},set:function(a){var b=this.fromMaxLinks; -b!==a&&(G&&A(a,"number",O,"fromMaxLinks"),0>a&&Ba(a,">= 0",O,"fromMaxLinks"),this.Xc(),this.da.Yp=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(A(a,"string",O,"cursor"),ql(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.zh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&A(a,"function",O,"click"),ql(this), +a);null!==b&&null!==c&&em(c,this);this.Sn=a;null!==a&&null!==c&&(c.Ue=!0,fm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gj:Ec},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,O,"toSpot"),a=a.M(),this.Xc(),this.ea.Gj=a,this.g("toSpot",b,a),Tl(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Ej:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&A(a,"number",O, +"toEndSegmentLength"),0>a&&Ba(a,">= 0",O,"toEndSegmentLength"),this.Xc(),this.ea.Ej=a,this.g("toEndSegmentLength",b,a),Tl(this))}},toShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",O,"toShortLength"),this.Xc(),this.ea.Fj=a,this.g("toShortLength",b,a),Tl(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fr:null},set:function(a){var b=this.toLinkable; +b!==a&&(G&&null!==a&&A(a,"boolean",O,"toLinkable"),this.Xc(),this.ea.Fr=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&A(a,"number",O,"toMaxLinks"),0>a&&Ba(a,">= 0",O,"toMaxLinks"),this.Xc(),this.ea.Gr=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.cj:Ec},set:function(a){var b=this.fromSpot;b.D(a)||(G&& +w(a,Ib,O,"fromSpot"),a=a.M(),this.Xc(),this.ea.cj=a,this.g("fromSpot",b,a),Tl(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.aj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&A(a,"number",O,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",O,"fromEndSegmentLength"),this.Xc(),this.ea.aj=a,this.g("fromEndSegmentLength",b,a),Tl(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.bj:0},set:function(a){var b= +this.fromShortLength;b!==a&&(G&&A(a,"number",O,"fromShortLength"),this.Xc(),this.ea.bj=a,this.g("fromShortLength",b,a),Tl(this))}},fromLinkable:{configurable:!0,get:function(){return null!==this.ea?this.ea.Xp:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&A(a,"boolean",O,"fromLinkable"),this.Xc(),this.ea.Xp=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.ea?this.ea.Yp:Infinity},set:function(a){var b=this.fromMaxLinks; +b!==a&&(G&&A(a,"number",O,"fromMaxLinks"),0>a&&Ba(a,">= 0",O,"fromMaxLinks"),this.Xc(),this.ea.Yp=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(A(a,"string",O,"cursor"),ql(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.zh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&A(a,"function",O,"click"),ql(this), this.B.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(null!==a&&A(a,"function",O,"doubleClick"),ql(this),this.B.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&A(a,"function",O,"contextClick"),ql(this),this.B.Bh=a,this.g("contextClick",b, a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Rh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseEnter"),ql(this),this.B.Rh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Uh:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseLeave"),ql(this),this.B.Uh=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0, get:function(){return null!==this.B?this.B.Vh:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&A(a,"function",O,"mouseOver"),ql(this),this.B.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.Th:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&A(a,"function",O,"mouseHover"),ql(this),this.B.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Sh: -null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&A(a,"function",O,"mouseHold"),ql(this),this.B.Sh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Wd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseDragEnter"),ql(this),this.B.Wd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Rf:null},set:function(a){var b= -this.mouseDragLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseDragLeave"),ql(this),this.B.Rf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&A(a,"function",O,"mouseDrop"),ql(this),this.B.Qh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.aa:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&& -A(a,"function",O,"actionDown"),ql(this),this.B.aa=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.ma:null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&A(a,"function",O,"actionMove"),ql(this),this.B.ma=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Ma:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&A(a,"function",O,"actionUp"),ql(this),this.B.Ma= +null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&A(a,"function",O,"mouseHold"),ql(this),this.B.Sh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Wd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseDragEnter"),ql(this),this.B.Wd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Sf:null},set:function(a){var b= +this.mouseDragLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseDragLeave"),ql(this),this.B.Sf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&A(a,"function",O,"mouseDrop"),ql(this),this.B.Qh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.$:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&& +A(a,"function",O,"actionDown"),ql(this),this.B.$=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.ma:null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&A(a,"function",O,"actionMove"),ql(this),this.B.ma=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Ma:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&A(a,"function",O,"actionUp"),ql(this),this.B.Ma= a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!==a&&(null!==a&&A(a,"function",O,"actionCancel"),ql(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.ei:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("GraphObject.toolTip must be an Adornment or HTMLInfo."), ql(this),this.B.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),ql(this),this.B.Ch=a,this.g("contextMenu",b,a))}}});O.prototype.trigger=O.prototype.Av;O.prototype.findBindingPanel=O.prototype.jh;O.prototype.findTemplateBinder=O.prototype.qz;O.prototype.setProperties=O.prototype.im; -O.prototype.apply=O.prototype.apply;O.prototype.attach=O.prototype.xu;O.prototype.set=O.prototype.set;O.prototype.isEnabledObject=O.prototype.Jf;O.prototype.isVisibleObject=O.prototype.Kf;O.prototype.isContainedBy=O.prototype.ug;O.prototype.getNearestIntersectionPoint=O.prototype.bs;O.prototype.getLocalPoint=O.prototype.$r;O.prototype.getDocumentScale=O.prototype.Ff;O.prototype.getDocumentAngle=O.prototype.si;O.prototype.getDocumentBounds=O.prototype.ti;O.prototype.getDocumentPoint=O.prototype.oa; -O.prototype.intersectsRect=O.prototype.Yc;O.prototype.containedInRect=O.prototype.hh;O.prototype.containsRect=O.prototype.Qe;O.prototype.containsPoint=O.prototype.ea;O.prototype.raiseChanged=O.prototype.g;O.prototype.raiseChangedEvent=O.prototype.ib;O.prototype.addCopyProperty=O.prototype.Nw;var Yl=null;O.className="GraphObject";Yl=new yb; +O.prototype.apply=O.prototype.apply;O.prototype.attach=O.prototype.xu;O.prototype.set=O.prototype.set;O.prototype.isEnabledObject=O.prototype.Kf;O.prototype.isVisibleObject=O.prototype.Lf;O.prototype.isContainedBy=O.prototype.vg;O.prototype.getNearestIntersectionPoint=O.prototype.bs;O.prototype.getLocalPoint=O.prototype.$r;O.prototype.getDocumentScale=O.prototype.Gf;O.prototype.getDocumentAngle=O.prototype.si;O.prototype.getDocumentBounds=O.prototype.ti;O.prototype.getDocumentPoint=O.prototype.oa; +O.prototype.intersectsRect=O.prototype.Yc;O.prototype.containedInRect=O.prototype.hh;O.prototype.containsRect=O.prototype.Re;O.prototype.containsPoint=O.prototype.ga;O.prototype.raiseChanged=O.prototype.g;O.prototype.raiseChangedEvent=O.prototype.ib;O.prototype.addCopyProperty=O.prototype.Nw;var Yl=null;O.className="GraphObject";Yl=new yb; am("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Xl(V,V.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof V){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xl(Qf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ib(0,0,2.76142374915397,2.761423749153969),spot2:new Ib(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Jf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= -c}};b.mouseLeave=function(a,b){b.Jf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Jf()&&b instanceof V&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Qf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram, -g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Qf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xl(Qf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ib(0,0,2.76142374915397,2.761423749153969),spot2:new Ib(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Kf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= +c}};b.mouseLeave=function(a,b){b.Kf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Kf()&&b instanceof V&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Qf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram, +g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Qf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); am("TreeExpanderButton",function(){var a=Xl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Xl(Qf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Sb},(new Ji("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).So()),{visible:!1},(new Ji("visible","isTreeLeaf",function(a){return!a})).So());a.click=function(a,c){c=c.part;c instanceof Ce&&(c=c.adornedPart);if(c instanceof T){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); @@ -1055,87 +1055,87 @@ a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};r am("ContextMenu",function(){return Xl(Ce,V.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Ji("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});am("ContextMenuButton",function(){var a=Xl("Button");a.stretch=jl;var b=a.lb("ButtonBorder");b instanceof Qf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Ib(0,0,2,3),b.spot2=new Ib(1,1,-2,-2));return a}); am("PanelExpanderButton",function(a){var b=bm(a,"COLLAPSIBLE"),c=Xl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Xl(Qf,{name:"ButtonIcon",strokeWidth:2},(new Ji("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).So(b))); a=c.lb("ButtonBorder");a instanceof Qf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.jh();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ja("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); -am("CheckBoxButton",function(a){var b=bm(a);a=Xl("Button",{desiredSize:new Hb(14,14)},Xl(Qf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Ag,visible:!1},""!==b?(new Ji("visible",b)).Gx():[]));a.click=function(a,d){if(d instanceof V){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.lb("ButtonIcon");c.Ja("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +am("CheckBoxButton",function(a){var b=bm(a);a=Xl("Button",{desiredSize:new Hb(14,14)},Xl(Qf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Ag,visible:!1},""!==b?(new Ji("visible",b)).Hx():[]));a.click=function(a,d){if(d instanceof V){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.lb("ButtonIcon");c.Ja("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.kb("checkbox")}}};return a}); am("CheckBox",function(a){a=bm(a);a=Xl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new gc(0,1,0,0)});var b=Xl(V,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});O.None=yg=new F(O,"None",0);O.Default=ll=new F(O,"Default",0);O.Vertical=kl=new F(O,"Vertical",4);O.Horizontal=jl=new F(O,"Horizontal",5);O.Fill=Bd=new F(O,"Fill",3);O.Uniform=Ag=new F(O,"Uniform",1); O.UniformToFill=ml=new F(O,"UniformToFill",2);O.FlipVertical=nl=new F(O,"FlipVertical",1);O.FlipHorizontal=ol=new F(O,"FlipHorizontal",2);O.FlipBoth=pl=new F(O,"FlipBoth",3);O.make=Xl;O.getBuilders=function(){var a=new yb,b;for(b in Yl)if(b!==b.toLowerCase()){var c=Yl.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};O.defineBuilder=am; O.build=function(a,b){var c=Yl.L(a);if("function"===typeof c&&(c=c(null),c instanceof O))return b&&c.set(b),c;v('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')};O.takeBuilderArgument=bm; -function rl(){this.oc=!1;this.Ca="";this.pp=-1;this.ob=this.jp=this.Qf=null;this.j="";this.jb=this.Ki=this.Mc=this.Ch=this.ei=this.G=this.Ma=this.ma=this.aa=this.Qh=this.Rf=this.Wd=this.Sh=this.Th=this.Vh=this.Uh=this.Rh=this.Bh=this.Fh=this.zh=null;this.v=Pb;this.o=Ub;this.kg=ll;this.Ib=this.Ii=1;this.Hi=yg;this.te=this.Ji=this.tb=null;this.Nc="category"} -rl.prototype.copy=function(){var a=new rl;a.Ca=this.Ca;a.pp=this.pp;a.Qf=this.Qf;a.ob=this.ob;a.j=this.j;a.zh=this.zh;a.Fh=this.Fh;a.Bh=this.Bh;a.Rh=this.Rh;a.Uh=this.Uh;a.Vh=this.Vh;a.Th=this.Th;a.Sh=this.Sh;a.Wd=this.Wd;a.Rf=this.Rf;a.Qh=this.Qh;a.aa=this.aa;a.ma=this.ma;a.Ma=this.Ma;a.G=this.G;a.ei=this.ei;a.Ch=this.Ch;a.Mc=this.Mc;a.Ki=this.Ki;a.jb=this.jb;a.v=this.v.M();a.o=this.o.M();a.kg=this.kg;a.Ii=this.Ii;a.Ib=this.Ib;a.Hi=this.Hi;a.tb=this.tb;a.Ji=this.Ji;a.te=this.te;a.Nc=this.Nc;return a}; -function cm(){this.v=-Infinity;this.o=0;this.G=zb;this.ar=mg;this.j=this.aa="None"}cm.prototype.copy=function(){var a=new cm;a.v=this.v;a.o=this.o;a.G=this.G.M();a.ar=this.ar;a.aa=this.aa;a.j=this.j;return a};cm.className="LinkElementSettings";function sl(){this.Gj=this.cj=hd;this.Fj=this.bj=this.Ej=this.aj=NaN;this.Fr=this.Xp=null;this.Gr=this.Yp=Infinity} +function rl(){this.oc=!1;this.Ca="";this.pp=-1;this.ob=this.jp=this.Rf=null;this.j="";this.jb=this.Ki=this.Nc=this.Ch=this.ei=this.G=this.Ma=this.ma=this.$=this.Qh=this.Sf=this.Wd=this.Sh=this.Th=this.Vh=this.Uh=this.Rh=this.Bh=this.Fh=this.zh=null;this.v=Pb;this.m=Ub;this.lg=ll;this.Ib=this.Ii=1;this.Hi=yg;this.ue=this.Ji=this.tb=null;this.Oc="category"} +rl.prototype.copy=function(){var a=new rl;a.Ca=this.Ca;a.pp=this.pp;a.Rf=this.Rf;a.ob=this.ob;a.j=this.j;a.zh=this.zh;a.Fh=this.Fh;a.Bh=this.Bh;a.Rh=this.Rh;a.Uh=this.Uh;a.Vh=this.Vh;a.Th=this.Th;a.Sh=this.Sh;a.Wd=this.Wd;a.Sf=this.Sf;a.Qh=this.Qh;a.$=this.$;a.ma=this.ma;a.Ma=this.Ma;a.G=this.G;a.ei=this.ei;a.Ch=this.Ch;a.Nc=this.Nc;a.Ki=this.Ki;a.jb=this.jb;a.v=this.v.M();a.m=this.m.M();a.lg=this.lg;a.Ii=this.Ii;a.Ib=this.Ib;a.Hi=this.Hi;a.tb=this.tb;a.Ji=this.Ji;a.ue=this.ue;a.Oc=this.Oc;return a}; +function cm(){this.v=-Infinity;this.m=0;this.G=zb;this.ar=mg;this.j=this.$="None"}cm.prototype.copy=function(){var a=new cm;a.v=this.v;a.m=this.m;a.G=this.G.M();a.ar=this.ar;a.$=this.$;a.j=this.j;return a};cm.className="LinkElementSettings";function sl(){this.Gj=this.cj=hd;this.Fj=this.bj=this.Ej=this.aj=NaN;this.Fr=this.Xp=null;this.Gr=this.Yp=Infinity} sl.prototype.copy=function(){var a=new sl;a.cj=this.cj.M();a.Gj=this.Gj.M();a.aj=this.aj;a.Ej=this.Ej;a.bj=this.bj;a.Fj=this.Fj;a.Xp=this.Xp;a.Fr=this.Fr;a.Yp=this.Yp;a.Gr=this.Gr;return a};sl.className="LinkSettings";function gm(){this.Za=[1,0,0,1,0,0]}gm.prototype.copy=function(){var a=new gm;a.Za[0]=this.Za[0];a.Za[1]=this.Za[1];a.Za[2]=this.Za[2];a.Za[3]=this.Za[3];a.Za[4]=this.Za[4];a.Za[5]=this.Za[5];return a}; -gm.prototype.translate=function(a,b){this.Za[4]+=this.Za[0]*a+this.Za[2]*b;this.Za[5]+=this.Za[1]*a+this.Za[3]*b};gm.prototype.scale=function(a,b){this.Za[0]*=a;this.Za[1]*=a;this.Za[2]*=b;this.Za[3]*=b};gm.className="STransform";function hm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Ww=[];this.pattern=null}hm.prototype.addColorStop=function(a,b){this.Ww.push({offset:a,color:b})};hm.className="SGradient"; +gm.prototype.translate=function(a,b){this.Za[4]+=this.Za[0]*a+this.Za[2]*b;this.Za[5]+=this.Za[1]*a+this.Za[3]*b};gm.prototype.scale=function(a,b){this.Za[0]*=a;this.Za[1]*=a;this.Za[2]*=b;this.Za[3]*=b};gm.className="STransform";function hm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Xw=[];this.pattern=null}hm.prototype.addColorStop=function(a,b){this.Xw.push({offset:a,color:b})};hm.className="SGradient"; function Lj(a,b){this.ownerDocument=a=void 0===b?sa.document:b;this.bA="http://www.w3.org/2000/svg";void 0!==a&&(this.Xa=this.$b("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Xa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Xa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.Bo=null;this.context=new im(this)} Lj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.style.width=c+"px",this.style.height=d+"px",this.Xa.setAttributeNS(null,"width",c+"px"),this.Xa.setAttributeNS(null,"height",d+"px"),this.Xa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.pw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.pw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Lj.prototype.$b=function(a,b,c){a=this.ownerDocument.createElementNS(this.bA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Lj.prototype.getBoundingClientRect=function(){return this.Xa.getBoundingClientRect()};Lj.prototype.focus=function(){this.Xa.focus()};Lj.prototype.bx=function(){this.ownerDocument=null}; +Lj.prototype.$b=function(a,b,c){a=this.ownerDocument.createElementNS(this.bA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Lj.prototype.getBoundingClientRect=function(){return this.Xa.getBoundingClientRect()};Lj.prototype.focus=function(){this.Xa.focus()};Lj.prototype.ex=function(){this.ownerDocument=null}; oa.Object.defineProperties(Lj.prototype,{width:{configurable:!0,get:function(){return this.Xa.width.baseVal.value},set:function(a){this.Xa.width=a}},height:{configurable:!0,get:function(){return this.Xa.height.baseVal.value},set:function(a){this.Xa.height=a}},style:{configurable:!0,get:function(){return this.Xa.style}}});Lj.className="SVGSurface"; -function im(a){this.Ds=a;this.svg=a.Xa;this.stack=[];this.sd=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Wg=this.kr=this.jr=0;this.ls=null;this.path=[];this.rt=!1;this.Zg=null;this.Cj=0;this.Re=new gm; +function im(a){this.Ds=a;this.svg=a.Xa;this.stack=[];this.sd=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Wg=this.kr=this.jr=0;this.ls=null;this.path=[];this.rt=!1;this.Zg=null;this.Cj=0;this.Se=new gm; jm(this,1,0,0,1,0,0);var b=pb++,c=this.$b("clipPath",{id:"mainClip"+b});c.appendChild(this.$b("rect",{x:0,y:0,width:a.width,height:a.height}));this.pw=c;this.Ds.Xa.appendChild(c);this.sd[0].setAttributeNS(null,"clip-path","url(#mainClip"+b+")");this.dA={}}t=im.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,r=b+n,q=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,q,a-m,b-n]),this.path.push(["A",c,c,0,1,q,p,r])):1E-6=Math.PI),q,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[]};t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){}; -t.clip=function(){this.addPath("clipPath",this.path,this.Re)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new hm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.clip=function(){this.addPath("clipPath",this.path,this.Se)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new hm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.dA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+pb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$b("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$b(Dk,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; t.createRadialGradient=function(a,b,c,d,e,f){var g=new hm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g}; t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width,n=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=n);d=d||0;e=e||0;f=f||0;g=g||0;h=h||0;k=k||0;a={x:0,y:0,width:m||d,height:n||e,href:l};L.ha(d,h)&&L.ha(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(a.preserveAspectRatio= -"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+pb++,g=this.$b("clipPath",{id:f}),g.appendChild(this.$b("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";km(this,Dk,a,this.Re,l);this.addElement(Dk,a)};t.fill=function(){this.addPath("fill",this.path,this.Re)}; -t.Df=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.Re);this.addElement("rect",a)};t.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};km(this,"fill",b,this.Re);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; +"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+pb++,g=this.$b("clipPath",{id:f}),g.appendChild(this.$b("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";km(this,Dk,a,this.Se,l);this.addElement(Dk,a)};t.fill=function(){this.addPath("fill",this.path,this.Se)}; +t.Ef=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.Se);this.addElement("rect",a)};t.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};km(this,"fill",b,this.Se);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.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"])}; -t.restore=function(){this.Re=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.lineDashOffset=a.lineDashOffset;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}; -t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(e=0;eg.width+g.x||g.x> -k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;jm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.zi()&&!this.isVisible())return!0;a.Re.Za=[1,0,0,1,0,0];(this instanceof ch&&1g.width+g.x||g.x> +k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;jm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.zi()&&!this.isVisible())return!0;a.Se.Za=[1,0,0,1,0,0];(this instanceof ch&&1b?(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.Cm?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.Cm?this.clip():this.fill()};t.Fi=function(){this.Cm||this.stroke()};t.wv=function(a,b,c){this.jr=a;this.kr=b;this.Wg=c}; -t.Tr=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Rr=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Tc=function(a){a&&(this.Ss="");this.Rs=this.Ts=""}; +t.quadraticCurveTo=function(a,b,c,d){this.ba.quadraticCurveTo(a,b,c,d)};t.rect=function(a,b,c,d){this.ba.rect(a,b,c,d)};t.restore=function(){this.ba.restore()};t.save=function(){this.Vc();this.ba.save()};Kl.prototype.rotate=function(a){this.Fl.rotate(57.2958*a,0,0)};t=Kl.prototype;t.setTransform=function(a,b,c,d,e,f){this.Fl.setTransform(a,b,c,d,e,f)};t.scale=function(a,b){this.Fl.scale(a,b)};t.translate=function(a,b){this.Fl.translate(a,b)};t.stroke=function(){this.ba.stroke()}; +t.transform=function(a,b,c,d,e,f){if(1!==a||0!==b||0!==c||1!==d||0!==e||0!==f){var g=this.Fl,h=g.m11*a+g.m21*b;a=g.m12*a+g.m22*b;b=g.m11*c+g.m21*d;c=g.m12*c+g.m22*d;g.dx=g.m11*e+g.m21*f+g.dx;g.dy=g.m12*e+g.m22*f+g.dy;g.m11=h;g.m12=a;g.m21=b;g.m22=c}};t.Vc=function(){var a=this.Fl;this.ba.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)}; +t.Ef=function(a){if(a instanceof Cl&&a.type===Dl){var b=a.zk;a=a.Us;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.Cm?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.Cm?this.clip():this.fill()};t.Fi=function(){this.Cm||this.stroke()};t.wv=function(a,b,c){this.jr=a;this.kr=b;this.Wg=c}; +t.Tr=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Rr=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Uc=function(a){a&&(this.Ss="");this.Rs=this.Ts=""}; oa.Object.defineProperties(Kl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.Rs!==a&&(this.Rs=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.Ss!==a&&(this.Ss=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, set:function(a){this.ba.lineCap=a}},lineDashOffset:{configurable:!0,get:function(){return this.ba.lineDashOffset},set:function(a){this.ba.lineDashOffset=a}},lineJoin:{configurable:!0,get:function(){return this.ba.lineJoin},set:function(a){this.ba.lineJoin=a}},lineWidth:{configurable:!0,get:function(){return this.ba.lineWidth},set:function(a){this.ba.lineWidth=a}},miterLimit:{configurable:!0,get:function(){return this.ba.miterLimit},set:function(a){this.ba.miterLimit= a}},shadowBlur:{configurable:!0,get:function(){return this.ba.shadowBlur},set:function(a){this.ba.shadowBlur=a}},shadowColor:{configurable:!0,get:function(){return this.ba.shadowColor},set:function(a){this.ba.shadowColor=a}},shadowOffsetX:{configurable:!0,get:function(){return this.ba.shadowOffsetX},set:function(a){this.ba.shadowOffsetX=a}},shadowOffsetY:{configurable:!0,get:function(){return this.ba.shadowOffsetY},set:function(a){this.ba.shadowOffsetY= a}},strokeStyle:{configurable:!0,get:function(){return this.ba.strokeStyle},set:function(a){this.Ts!==a&&(this.Ts=this.ba.strokeStyle=a)}},textAlign:{configurable:!0,get:function(){return this.ba.textAlign},set:function(a){this.ba.textAlign=a}},imageSmoothingEnabled:{configurable:!0,get:function(){return this.ba.imageSmoothingEnabled},set:function(a){this.ba.imageSmoothingEnabled=a}},clipInsteadOfFill:{configurable:!0,get:function(){return this.Cm}, -set:function(a){this.Cm=a}}});var mm=Object.freeze([]);Kl.className="CanvasSurfaceContext";function nm(){this.G=this.o=this.v=this.j=0}nm.className="ColorNumbers"; -function Cl(a,b){om||(pm(),om=!0);Za(this);this._isFrozen=!1;void 0===a?(this.wa=Jl,this.yk="black"):"string"===typeof a?(this.wa=Jl,G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.yk=a):(G&&ab(a,Cl,Cl,"constructor:type"),this.wa=a,this.yk="black");a=this.wa;a===Ml?(this.Nd=Gc,this.Mk=Nc):this.Mk=a===Dl?this.Nd=Kc:this.Nd=Ec;this.qr=0;this.Np=NaN;this.xe=this.Oq=this.we=null;this.Us=this.zk=0;b&&Object.assign(this,b)} -Cl.prototype.copy=function(){var a=new Cl;a.wa=this.wa;a.yk=this.yk;a.Nd=this.Nd.M();a.Mk=this.Mk.M();a.qr=this.qr;a.Np=this.Np;null!==this.we&&(a.we=this.we.copy());a.Oq=this.Oq;return a};t=Cl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.we&&this.we.freeze();return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.we&&this.we.pa();return this};t.ub=function(a){a.classType===Cl?this.type=a:Ea(this,a)}; +set:function(a){this.Cm=a}}});var mm=Object.freeze([]);Kl.className="CanvasSurfaceContext";function nm(){this.G=this.m=this.v=this.j=0}nm.className="ColorNumbers"; +function Cl(a,b){om||(pm(),om=!0);Za(this);this._isFrozen=!1;void 0===a?(this.wa=Jl,this.yk="black"):"string"===typeof a?(this.wa=Jl,G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.yk=a):(G&&ab(a,Cl,Cl,"constructor:type"),this.wa=a,this.yk="black");a=this.wa;a===Ml?(this.Nd=Gc,this.Mk=Nc):this.Mk=a===Dl?this.Nd=Kc:this.Nd=Ec;this.qr=0;this.Np=NaN;this.ye=this.Oq=this.xe=null;this.Us=this.zk=0;b&&Object.assign(this,b)} +Cl.prototype.copy=function(){var a=new Cl;a.wa=this.wa;a.yk=this.yk;a.Nd=this.Nd.M();a.Mk=this.Mk.M();a.qr=this.qr;a.Np=this.Np;null!==this.xe&&(a.xe=this.xe.copy());a.Oq=this.Oq;return a};t=Cl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.xe&&this.xe.freeze();return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.xe&&this.xe.pa();return this};t.ub=function(a){a.classType===Cl?this.type=a:Ea(this,a)}; t.toString=function(){var a="Brush(";if(this.type===Jl)a+=this.color;else if(a=this.type===Ml?a+"Linear ":this.type===Dl?a+"Radial ":this.type===Ll?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Cl,"addColorStop:loc");A(b,"string",Cl,"addColorStop:color");G&&!qm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.we&&(this.we=new yb);this.we.add(a,b);this.wa===Jl&&(this.type=Ml);this.xe=null;return this}; +t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Cl,"addColorStop:loc");A(b,"string",Cl,"addColorStop:color");G&&!qm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.xe&&(this.xe=new yb);this.xe.add(a,b);this.wa===Jl&&(this.type=Ml);this.ye=null;return this}; function qm(a){if("black"===a)return!0;if(""===a)return!1;G&&A(a,"string",Cl,"isValidColor");om||(pm(),om=!0);var b=rm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c} t.Vz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?sm:b;if(this.type===Jl)gi(this.color),this.color=tm(a,b);else if((this.type===Ml||this.type===Dl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,tm(a,b));return this};function um(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?sm:c;gi(a);return tm(b,c)} t.Uy=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?sm:b;if(this.type===Jl)gi(this.color),this.color=tm(-a,b);else if((this.type===Ml||this.type===Dl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,tm(-a,b));return this};function vm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?sm:c;gi(a);return tm(-b,c)} -function wm(a,b,c){gi(a);a=xm.j;var d=xm.v,e=xm.o,f=xm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((xm.j-a)*c+a)+", "+Math.round((xm.v-d)*c+d)+", "+Math.round((xm.o-e)*c+e)+", "+Math.round((xm.G-f)*c+f)+")"} -t.Ax=function(){if(this.type===Jl)return ym(this.color);if((this.type===Ml||this.type===Dl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Dl)return ym(a.first().value);if(null!==a.get(.5))return ym(a.get(.5));if(2===a.count)return a=a.Ka(),ym(wm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return ym(wm(a.get(c),a.get(d),1-f/e))}return!1}; -function ym(a){if(!a)return!1;if(a instanceof Cl)return a.Ax();gi(a);return 128>(299*xm.j+587*xm.v+114*xm.o)/1E3} -function tm(a,b){switch(b){case sm:b=100*zm(xm.j);var c=100*zm(xm.v),d=100*zm(xm.o);Am.j=.4124564*b+.3575761*c+.1804375*d;Am.v=.2126729*b+.7151522*c+.072175*d;Am.o=.0193339*b+.119192*c+.9503041*d;Am.G=xm.G;b=Bm(Am.j/Cm[0]);c=Bm(Am.v/Cm[1]);d=Bm(Am.o/Cm[2]);Dm.j=116*c-16;Dm.v=500*(b-c);Dm.o=200*(c-d);Dm.G=Am.G;Dm.j=Math.min(100,Math.max(0,Dm.j+100*a));a=(Dm.j+16)/116;b=a-Dm.o/200;Am.j=Cm[0]*Em(Dm.v/500+a);Am.v=Cm[1]*(Dm.j>Fm*Gm?Math.pow(a,3):Dm.j/Fm);Am.o=Cm[2]*Em(b);Am.G=Dm.G;a=-.969266*Am.j+1.8760108* -Am.v+.041556*Am.o;b=.0556434*Am.j+-.2040259*Am.v+1.0572252*Am.o;xm.j=255*Hm((3.2404542*Am.j+-1.5371385*Am.v+-.4985314*Am.o)/100);xm.v=255*Hm(a/100);xm.o=255*Hm(b/100);xm.G=Am.G;xm.j=Math.round(xm.j);255xm.j&&(xm.j=0);xm.v=Math.round(xm.v);255xm.v&&(xm.v=0);xm.o=Math.round(xm.o);255xm.o&&(xm.o=0);return"rgba("+xm.j+", "+xm.v+", "+xm.o+", "+xm.G+")";case Im:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ -ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){om||(pm(),om=!0);var b=rm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,xm.j=a[0],xm.v=a[1],xm.o=a[2],xm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),xm.j=0,xm.v=0,xm.o=0,xm.G=1)}} -function hi(){var a=xm.j/255,b=xm.v/255,c=xm.o/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=xm.G}function zm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Hm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function wm(a,b,c){gi(a);a=xm.j;var d=xm.v,e=xm.m,f=xm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((xm.j-a)*c+a)+", "+Math.round((xm.v-d)*c+d)+", "+Math.round((xm.m-e)*c+e)+", "+Math.round((xm.G-f)*c+f)+")"} +t.Bx=function(){if(this.type===Jl)return ym(this.color);if((this.type===Ml||this.type===Dl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Dl)return ym(a.first().value);if(null!==a.get(.5))return ym(a.get(.5));if(2===a.count)return a=a.Ka(),ym(wm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return ym(wm(a.get(c),a.get(d),1-f/e))}return!1}; +function ym(a){if(!a)return!1;if(a instanceof Cl)return a.Bx();gi(a);return 128>(299*xm.j+587*xm.v+114*xm.m)/1E3} +function tm(a,b){switch(b){case sm:b=100*zm(xm.j);var c=100*zm(xm.v),d=100*zm(xm.m);Am.j=.4124564*b+.3575761*c+.1804375*d;Am.v=.2126729*b+.7151522*c+.072175*d;Am.m=.0193339*b+.119192*c+.9503041*d;Am.G=xm.G;b=Bm(Am.j/Cm[0]);c=Bm(Am.v/Cm[1]);d=Bm(Am.m/Cm[2]);Dm.j=116*c-16;Dm.v=500*(b-c);Dm.m=200*(c-d);Dm.G=Am.G;Dm.j=Math.min(100,Math.max(0,Dm.j+100*a));a=(Dm.j+16)/116;b=a-Dm.m/200;Am.j=Cm[0]*Em(Dm.v/500+a);Am.v=Cm[1]*(Dm.j>Fm*Gm?Math.pow(a,3):Dm.j/Fm);Am.m=Cm[2]*Em(b);Am.G=Dm.G;a=-.969266*Am.j+1.8760108* +Am.v+.041556*Am.m;b=.0556434*Am.j+-.2040259*Am.v+1.0572252*Am.m;xm.j=255*Hm((3.2404542*Am.j+-1.5371385*Am.v+-.4985314*Am.m)/100);xm.v=255*Hm(a/100);xm.m=255*Hm(b/100);xm.G=Am.G;xm.j=Math.round(xm.j);255xm.j&&(xm.j=0);xm.v=Math.round(xm.v);255xm.v&&(xm.v=0);xm.m=Math.round(xm.m);255xm.m&&(xm.m=0);return"rgba("+xm.j+", "+xm.v+", "+xm.m+", "+xm.G+")";case Im:return hi(),ii.m=Math.min(100,Math.max(0,ii.m+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.m+"%, "+ +ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){om||(pm(),om=!0);var b=rm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,xm.j=a[0],xm.v=a[1],xm.m=a[2],xm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),xm.j=0,xm.v=0,xm.m=0,xm.G=1)}} +function hi(){var a=xm.j/255,b=xm.v/255,c=xm.m/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.m=Math.round(100*e);ii.G=xm.G}function zm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Hm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function Bm(a){return a>Gm?Math.pow(a,1/3):(Fm*a+16)/116}function Em(a){var b=a*a*a;return b>Gm?b:(116*a-16)/Fm}function dm(a,b){"string"===typeof a?G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Cl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function pm(){rm=ah?(new Ek(null)).context:null} -oa.Object.defineProperties(Cl.prototype,{type:{configurable:!0,get:function(){return this.wa},set:function(a){this._isFrozen&&xa(this,a);ab(a,Cl,Cl,"type");this.wa=a;this.start.kc()&&(a===Ml?this.start=Gc:a===Dl&&(this.start=Kc));this.end.kc()&&(a===Ml?this.end=Nc:a===Dl&&(this.end=Kc));this.xe=null}},color:{configurable:!0,get:function(){return this.yk},set:function(a){this._isFrozen&&xa(this,a);G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); -this.yk=a;this.xe=null}},start:{configurable:!0,get:function(){return this.Nd},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"start");this.Nd=a.M();this.xe=null}},end:{configurable:!0,get:function(){return this.Mk},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"end");this.Mk=a.M();this.xe=null}},startRadius:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"startRadius");0>a&&Ba(a,">= zero",Cl, -"startRadius");this.qr=a;this.xe=null}},endRadius:{configurable:!0,get:function(){return this.Np},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"endRadius");0>a&&Ba(a,">= zero",Cl,"endRadius");this.Np=a;this.xe=null}},colorStops:{configurable:!0,get:function(){return this.we},set:function(a){this._isFrozen&&xa(this,a);G&&w(a,yb,Cl,"colorStops");this.we=a;this.xe=null}},pattern:{configurable:!0,get:function(){return this.Oq},set:function(a){this._isFrozen&& -xa(this,a);this.Oq=a;this.xe=null}}});Cl.prototype.isDark=Cl.prototype.Ax;Cl.prototype.darkenBy=Cl.prototype.Uy;Cl.prototype.lightenBy=Cl.prototype.Vz;Cl.prototype.addColorStop=Cl.prototype.addColorStop;var Gm=216/24389,Fm=24389/27,Cm=[95.047,100,108.883],rm=null,xm=new nm,ii=new nm,Am=new nm,Dm=new nm,om=!1;Cl.className="Brush";var Jl;Cl.Solid=Jl=new F(Cl,"Solid",0);var Ml;Cl.Linear=Ml=new F(Cl,"Linear",1);var Dl;Cl.Radial=Dl=new F(Cl,"Radial",2);var Ll;Cl.Pattern=Ll=new F(Cl,"Pattern",4);var sm; +oa.Object.defineProperties(Cl.prototype,{type:{configurable:!0,get:function(){return this.wa},set:function(a){this._isFrozen&&xa(this,a);ab(a,Cl,Cl,"type");this.wa=a;this.start.kc()&&(a===Ml?this.start=Gc:a===Dl&&(this.start=Kc));this.end.kc()&&(a===Ml?this.end=Nc:a===Dl&&(this.end=Kc));this.ye=null}},color:{configurable:!0,get:function(){return this.yk},set:function(a){this._isFrozen&&xa(this,a);G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); +this.yk=a;this.ye=null}},start:{configurable:!0,get:function(){return this.Nd},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"start");this.Nd=a.M();this.ye=null}},end:{configurable:!0,get:function(){return this.Mk},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"end");this.Mk=a.M();this.ye=null}},startRadius:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"startRadius");0>a&&Ba(a,">= zero",Cl, +"startRadius");this.qr=a;this.ye=null}},endRadius:{configurable:!0,get:function(){return this.Np},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"endRadius");0>a&&Ba(a,">= zero",Cl,"endRadius");this.Np=a;this.ye=null}},colorStops:{configurable:!0,get:function(){return this.xe},set:function(a){this._isFrozen&&xa(this,a);G&&w(a,yb,Cl,"colorStops");this.xe=a;this.ye=null}},pattern:{configurable:!0,get:function(){return this.Oq},set:function(a){this._isFrozen&& +xa(this,a);this.Oq=a;this.ye=null}}});Cl.prototype.isDark=Cl.prototype.Bx;Cl.prototype.darkenBy=Cl.prototype.Uy;Cl.prototype.lightenBy=Cl.prototype.Vz;Cl.prototype.addColorStop=Cl.prototype.addColorStop;var Gm=216/24389,Fm=24389/27,Cm=[95.047,100,108.883],rm=null,xm=new nm,ii=new nm,Am=new nm,Dm=new nm,om=!1;Cl.className="Brush";var Jl;Cl.Solid=Jl=new F(Cl,"Solid",0);var Ml;Cl.Linear=Ml=new F(Cl,"Linear",1);var Dl;Cl.Radial=Dl=new F(Cl,"Radial",2);var Ll;Cl.Pattern=Ll=new F(Cl,"Pattern",4);var sm; Cl.Lab=sm=new F(Cl,"Lab",5);var Im;Cl.HSL=Im=new F(Cl,"HSL",6); Cl.randomColor=function(a,b){void 0===a&&(a=128);G&&(E(a,Cl,"randomColor:min"),(0>a||255b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+ -a};Cl.isValidColor=qm;Cl.lighten=function(a){return um(a)};Cl.lightenBy=um;Cl.darken=function(a){return vm(a)};Cl.darkenBy=vm;Cl.mix=wm;Cl.isDark=ym;function $l(){this.Ca="Base"}$l.prototype.measure=function(){};$l.prototype.Yz=function(a,b,c,d,e){a.measure(b,c,d,e)};$l.prototype.arrange=function(){};$l.prototype.Hy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};$l.prototype.hA=function(a){a.Zj()};$l.prototype.zc=function(){}; -oa.Object.defineProperties($l.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},classType:{configurable:!0,get:function(){return V}}});$l.prototype.remeasureObject=$l.prototype.hA;$l.prototype.arrangeElement=$l.prototype.Hy;$l.prototype.measureElement=$l.prototype.Yz;$l.className="PanelLayout";function Jm(){this.Ca="Base"}na(Jm,$l); +a};Cl.isValidColor=qm;Cl.lighten=function(a){return um(a)};Cl.lightenBy=um;Cl.darken=function(a){return vm(a)};Cl.darkenBy=vm;Cl.mix=wm;Cl.isDark=ym;function $l(){this.Ca="Base"}$l.prototype.measure=function(){};$l.prototype.Yz=function(a,b,c,d,e){a.measure(b,c,d,e)};$l.prototype.arrange=function(){};$l.prototype.Iy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};$l.prototype.hA=function(a){a.Zj()};$l.prototype.zc=function(){}; +oa.Object.defineProperties($l.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},classType:{configurable:!0,get:function(){return V}}});$l.prototype.remeasureObject=$l.prototype.hA;$l.prototype.arrangeElement=$l.prototype.Iy;$l.prototype.measureElement=$l.prototype.Yz;$l.className="PanelLayout";function Jm(){this.Ca="Base"}na(Jm,$l); Jm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Km(a);for(var k=0;kaa&&(tb=Math.max(aa-Af,0));var Hk=0===P.sa;P.pc=P.pc+tb;P.actual=P.sa+tb;aa=Math.max(aa-(tb+(Hk?Af:0)),0)}if(1===sc.columnSpan&&(Xb===yg||Xb===kl)){P=a.getColumnDefinition(Wb);var $i=P.Vc();tb=Math.max(dg-P.actual,0);tb+$i>U&&(tb=Math.max(U-$i,0));var fo=0===P.sa;P.pc=P.pc+tb;P.actual=P.sa+tb;U=Math.max(U- -(tb+(fo?$i:0)),0)}zf&&sc.Zj()}}}}}Pa(z);var ce=0,De=0;f=a.columnCount;for(var Ng=0;Ng=a.rowCount);bf++)P=a.getRowDefinition(bb.row+bf),tb=0,tb=Xb===Bd||Xb===kl?Math.max(P.minimum,0===Hd[bb.row+bf]?P.maximum:Math.min(Hd[bb.row+bf],P.maximum)):Math.max(P.minimum,isNaN(P.Gc)?P.maximum:Math.min(P.Gc,P.maximum)),Ud.height+=tb,Dc+=P.minimum;for(var dd=1;dd=a.columnCount);dd++)P=a.getColumnDefinition(bb.column+dd),tb=0,tb=Xb===Bd||Xb===jl?Math.max(P.minimum,0===Pc[bb.column+dd]?P.maximum:Math.min(Pc[bb.column+dd], -P.maximum)):Math.max(P.minimum,isNaN(P.Gc)?P.maximum:Math.min(P.Gc,P.maximum)),Ud.width+=tb,Lk+=P.minimum;xb.width+=Ud.width;xb.height+=Ud.height;var Zh=bb.margin,Ff=Zh.right+Zh.left,bj=Zh.top+Zh.bottom;bb.measure(xb.width,xb.height,Lk,Dc);for(var $h=bb.measuredBounds,Vd=Math.max($h.width+Ff,0),hg=Math.max($h.height+bj,0),Gf=0,ai=0;ai=a.rowCount);ai++)P=a.getRowDefinition(bb.row+ai),Gf+=P.total||0;if(Gf=cf)&&!(bb.row+Ge>=a.rowCount);Ge++){P=a.getRowDefinition(bb.row+Ge);var ef=P.sa||0,ff=df(bb,P,ee);G&&"number"!==typeof ff&&v(bb+" spanAllocation does not return a number: "+ff);P.actual=Math.min(P.maximum,ef+ff);P.sa!==ef&&(cf-=P.sa-ef)}for(;0Id&&(P.actual=Math.min(P.maximum,Id+cf),P.sa!==Id&&(cf-=P.sa-Id));if(0===P.index)break;P=a.getRowDefinition(P.index-1)}}for(var Qg=0,gf=0;gf=a.columnCount);gf++)P= -a.getColumnDefinition(bb.column+gf),Qg+=P.total||0;if(Qg=Rg)&&!(bb.column+ig>=a.columnCount);ig++){P=a.getColumnDefinition(bb.column+ig);var cj=P.sa||0,dj=He(bb,P,ho);G&&"number"!==typeof dj&&v(bb+" spanAllocation does not return a number: "+dj);P.actual=Math.min(P.maximum,cj+dj);P.sa!==cj&&(Rg-=P.sa-cj)}for(;0Mk&&(P.actual=Math.min(P.maximum, -Mk+Rg),P.sa!==Mk&&(Rg-=P.sa-Mk));if(0===P.index)break;P=a.getColumnDefinition(P.index-1)}}}}Pa(B);Hb.free(Ud);Hb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Pc&&Pa(Pc);var Sg=0,Tg=0,Nk=a.desiredSize,Lr=a.maxSize;Xb=xl(a,!0);var ej=De=ce=0,fj=0;f=a.columnCount;for(var Ok=0;Okaa&&(tb=Math.max(aa-Af,0));var Hk=0===Q.sa;Q.pc=Q.pc+tb;Q.actual=Q.sa+tb;aa=Math.max(aa-(tb+(Hk?Af:0)),0)}if(1===tc.columnSpan&&(Yb===yg||Yb===kl)){Q=a.getColumnDefinition(Xb);var $i=Q.Wc();tb=Math.max(dg-Q.actual,0);tb+$i>U&&(tb=Math.max(U-$i,0));var fo=0===Q.sa;Q.pc=Q.pc+tb;Q.actual=Q.sa+tb;U=Math.max(U- +(tb+(fo?$i:0)),0)}zf&&tc.Zj()}}}}}Pa(z);var ce=0,De=0;f=a.columnCount;for(var Ng=0;Ng=a.rowCount);bf++)Q=a.getRowDefinition(cb.row+bf),tb=0,tb=Yb===Bd||Yb===kl?Math.max(Q.minimum,0===Hd[cb.row+bf]?Q.maximum:Math.min(Hd[cb.row+bf],Q.maximum)):Math.max(Q.minimum,isNaN(Q.Hc)?Q.maximum:Math.min(Q.Hc,Q.maximum)),Ud.height+=tb,Dc+=Q.minimum;for(var dd=1;dd=a.columnCount);dd++)Q=a.getColumnDefinition(cb.column+dd),tb=0,tb=Yb===Bd||Yb===jl?Math.max(Q.minimum,0===Pc[cb.column+dd]?Q.maximum:Math.min(Pc[cb.column+dd], +Q.maximum)):Math.max(Q.minimum,isNaN(Q.Hc)?Q.maximum:Math.min(Q.Hc,Q.maximum)),Ud.width+=tb,Lk+=Q.minimum;xb.width+=Ud.width;xb.height+=Ud.height;var Zh=cb.margin,Ff=Zh.right+Zh.left,bj=Zh.top+Zh.bottom;cb.measure(xb.width,xb.height,Lk,Dc);for(var $h=cb.measuredBounds,Vd=Math.max($h.width+Ff,0),hg=Math.max($h.height+bj,0),Gf=0,ai=0;ai=a.rowCount);ai++)Q=a.getRowDefinition(cb.row+ai),Gf+=Q.total||0;if(Gf=cf)&&!(cb.row+Ge>=a.rowCount);Ge++){Q=a.getRowDefinition(cb.row+Ge);var ef=Q.sa||0,ff=df(cb,Q,ee);G&&"number"!==typeof ff&&v(cb+" spanAllocation does not return a number: "+ff);Q.actual=Math.min(Q.maximum,ef+ff);Q.sa!==ef&&(cf-=Q.sa-ef)}for(;0Id&&(Q.actual=Math.min(Q.maximum,Id+cf),Q.sa!==Id&&(cf-=Q.sa-Id));if(0===Q.index)break;Q=a.getRowDefinition(Q.index-1)}}for(var Qg=0,gf=0;gf=a.columnCount);gf++)Q= +a.getColumnDefinition(cb.column+gf),Qg+=Q.total||0;if(Qg=Rg)&&!(cb.column+ig>=a.columnCount);ig++){Q=a.getColumnDefinition(cb.column+ig);var cj=Q.sa||0,dj=He(cb,Q,ho);G&&"number"!==typeof dj&&v(cb+" spanAllocation does not return a number: "+dj);Q.actual=Math.min(Q.maximum,cj+dj);Q.sa!==cj&&(Rg-=Q.sa-cj)}for(;0Mk&&(Q.actual=Math.min(Q.maximum, +Mk+Rg),Q.sa!==Mk&&(Rg-=Q.sa-Mk));if(0===Q.index)break;Q=a.getColumnDefinition(Q.index-1)}}}}Pa(B);Hb.free(Ud);Hb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Pc&&Pa(Pc);var Sg=0,Tg=0,Nk=a.desiredSize,Lr=a.maxSize;Yb=xl(a,!0);var ej=De=ce=0,fj=0;f=a.columnCount;for(var Ok=0;Ok=a.rowCount);P++){var la=a.getRowDefinition(z+P);0!==la.sa&&(y.height+=la.total)}for(P=1;P=a.columnCount);P++)la=a.getColumnDefinition(C+P),0!==la.sa&&(y.width+=la.total);var fa=D.sa+y.width,za=B.sa+y.height;P=h;la=k;var Ma=fa,sb=za,wb=h,Vb=k,tb=fa,Ye=za;h+fa>c.width&&(tb=Math.max(c.width-h,0));k+za>c.height&&(Ye=Math.max(c.height-k,0));var ib=Y.alignment;if(ib.Rb()){ib=a.defaultAlignment;ib.mb()||(ib=Kc);var Ed=ib.x; -var Wb=ib.y;var Ze=ib.offsetX;ib=ib.offsetY;var Ic=D.alignment,bd=B.alignment;Ic.mb()&&(Ed=Ic.x,Ze=Ic.offsetX);bd.mb()&&(Wb=bd.y,ib=bd.offsetY)}else Ed=ib.x,Wb=ib.y,Ze=ib.offsetX,ib=ib.offsetY;if(isNaN(Ed)||isNaN(Wb))Wb=Ed=.5,ib=Ze=0;Ic=W.width;bd=W.height;var Ac=Y.margin,sc=Ac.left+Ac.right,zf=Ac.top+Ac.bottom,Fd=Ql(Y,B,D,!1);!isNaN(Y.desiredSize.width)||Fd!==Bd&&Fd!==jl||(Ic=Math.max(fa-sc,0));!isNaN(Y.desiredSize.height)||Fd!==Bd&&Fd!==kl||(bd=Math.max(za-zf,0));fa=Y.maxSize;za=Y.minSize;Ic=Math.min(fa.width, -Ic);bd=Math.min(fa.height,bd);Ic=Math.max(za.width,Ic);bd=Math.max(za.height,bd);fa=bd+zf;P+=Ma*Ed-(Ic+sc)*Ed+Ze+Ac.left;la+=sb*Wb-fa*Wb+ib+Ac.top;Y.visible&&(mc(wb,Vb,tb,Ye,P,la,W.width,W.height)?Y.arrange(P,la,Ic,bd):Y.arrange(P,la,Ic,bd,new M(wb,Vb,tb,Ye)))}}Hb.free(y);for(a=0;a=a.rowCount);Q++){var la=a.getRowDefinition(z+Q);0!==la.sa&&(y.height+=la.total)}for(Q=1;Q=a.columnCount);Q++)la=a.getColumnDefinition(C+Q),0!==la.sa&&(y.width+=la.total);var fa=D.sa+y.width,za=B.sa+y.height;Q=h;la=k;var Ma=fa,sb=za,wb=h,Wb=k,tb=fa,Ye=za;h+fa>c.width&&(tb=Math.max(c.width-h,0));k+za>c.height&&(Ye=Math.max(c.height-k,0));var jb=Y.alignment;if(jb.Rb()){jb=a.defaultAlignment; +jb.mb()||(jb=Kc);var Ed=jb.x;var Xb=jb.y;var Ze=jb.offsetX;jb=jb.offsetY;var Ic=D.alignment,bd=B.alignment;Ic.mb()&&(Ed=Ic.x,Ze=Ic.offsetX);bd.mb()&&(Xb=bd.y,jb=bd.offsetY)}else Ed=jb.x,Xb=jb.y,Ze=jb.offsetX,jb=jb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,jb=Ze=0;Ic=W.width;bd=W.height;var Ac=Y.margin,tc=Ac.left+Ac.right,zf=Ac.top+Ac.bottom,Fd=Ql(Y,B,D,!1);!isNaN(Y.desiredSize.width)||Fd!==Bd&&Fd!==jl||(Ic=Math.max(fa-tc,0));!isNaN(Y.desiredSize.height)||Fd!==Bd&&Fd!==kl||(bd=Math.max(za-zf,0));fa= +Y.maxSize;za=Y.minSize;Ic=Math.min(fa.width,Ic);bd=Math.min(fa.height,bd);Ic=Math.max(za.width,Ic);bd=Math.max(za.height,bd);fa=bd+zf;Q+=Ma*Ed-(Ic+tc)*Ed+Ze+Ac.left;la+=sb*Xb-fa*Xb+jb+Ac.top;Y.visible&&(mc(wb,Wb,tb,Ye,Q,la,W.width,W.height)?Y.arrange(Q,la,Ic,bd):Y.arrange(Q,la,Ic,bd,new M(wb,Wb,tb,Ye)))}}Hb.free(y);for(a=0;a=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.U.s,u=q.length,x=0;xB)){y=gk(y.figure);for(var C=0;CB&&z.push(D))}}}}q= +Ym.prototype.zc=function(a,b,c){c=a.Gf()*c.scale;0>=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.U.s,u=q.length,x=0;xB)){y=gk(y.figure);for(var C=0;CB&&z.push(D))}}}}q= a.U.s;u=q.length;for(x=0;xe*y*c))){B=J.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=y-Math.min(-B,y));B=Math.round(B%y);y=J.opacity;C=1;if(1!==y){if(0===y)continue;C=b.globalAlpha;b.globalAlpha=C*y}D=r[x];var U=!1,aa=J.strokeDashArray;null!==aa&&(U=!0,b.Tr(aa,J.strokeDashOffset));if("LineV"===J.figure&&null!==J.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;eb)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),B=z.measuredBounds,c.cd(B),r.push(B);else{var C=z.segmentIndex,D=z.segmentFraction,J=z.alignmentFocus;J.kc()&&(J=Kc);var U=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.ya;B=Na();Y.Ru(D,B);var W=K.allocAt(B[0],B[1]);W.add(k.i(0));Y.type=== -N.j?W.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&W.offset(-Y.startX,-Y.startY));Y=B[2];if(U!==mg){var P=k.computeAngle(z,U,Y);z.Lb=P}P=W.x-b.x;var la=W.y-b.y;K.free(W);Pa(B)}else if(C<-n||C>=n)B=K.alloc(),k.xg(),k.computeMidPoint(B),Y=k.midAngle,U!==mg&&(P=k.computeAngle(z,U,Y),z.Lb=P),P=B.x-b.x,la=B.y-b.y,K.free(B);else{P=0;0<=C?(la=m.N(C),B=Cfa+10?0<=C?Y.cb(la):la.cb(Y):fa>W+10?0<=C?B.cb(P):P.cb(B):0<=C?Y.cb(P):P.cb(Y)}else Y=0<=C?la.cb(B):B.cb(la);U!==mg&&(P=k.computeAngle(z,U,Y),z.Lb=P);P=la.x+(B.x-la.x)*D-b.x;la=la.y+(B.y-la.y)*D-b.y}z.measure(Infinity,Infinity,0,0);B=z.measuredBounds;W=z.naturalBounds;var za=0;z instanceof Qf&&(za=z.strokeWidth);fa=W.width+za;var Ma=W.height+za;q.reset();q.translate(-B.x,-B.y);q.scale(z.scale,z.scale);q.rotate(U===mg?z.angle:Y,fa/2,Ma/2);U!==bn&&U!==cn||q.rotate(90, -fa/2,Ma/2);U!==dn&&U!==en||q.rotate(-90,fa/2,Ma/2);U===fn&&(45Y||225Y)&&q.rotate(-Y,fa/2,Ma/2);W=new M(0,0,fa,Ma);u.Ci(W,J);q.La(u);J=-u.x+za/2*z.scale;z=-u.y+za/2*z.scale;x.assign(aa);za=isNaN(aa.x);var sb=isNaN(aa.y);if(za||sb){fa=fa/2+3;Ma=Ma/2+3;var wb=45<=Y&&135>=Y,Vb=225<=Y&&315>=Y;U===mg&&(wb||Vb)?(x.x=sb?fa:aa.y,x.y=za?Ma:aa.x,wb?0<=C||isNaN(C)&&.5>D||!za||(x.y=-Ma):Vb&&((0<=C||isNaN(C)&&.5>D)&&za&&(x.y=-Ma),sb&&(x.x=-fa))):(za&&(x.x=0<=C||isNaN(C)&&.5>D?fa:-fa),sb&&(x.y=-Ma), -x.rotate(Y))}else x.rotate(Y);P+=x.x;la+=x.y;W.set(B);W.h(P+J,la+z,B.width,B.height);r.push(W);c.cd(W)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.mg=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);bc(e,c.width||0,c.height||0);Jb.free(q);K.free(u);K.free(x)}}}}; -$m.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Ce||a instanceof R){var d=a,e=null;a instanceof Ce&&(e=a,d=e.adornedPart);var f=a instanceof Ce?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=K.alloc(),r=n,x=q,r.xg(),r.computeMidPoint(x),r=n.midAngle,l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,x=q.y, -K.free(q);else{u=0;0<=h?(q=b.s[h],x=hz+10?0<=h?r.cb(q):q.cb(r):z>y+10?0<=h?x.cb(u):u.cb(x):0<=h?r.cb(u):u.cb(r)}else r=0<=h?q.cb(x):x.cb(q);l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(x.x-q.x)*k;x=q.y+(x.y-q.y)*k}if(p.No())g.location=new K(n,x);else{p.kc()&&(p=Kc);q=Jb.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, +N.j?W.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&W.offset(-Y.startX,-Y.startY));Y=B[2];if(U!==mg){var Q=k.computeAngle(z,U,Y);z.Lb=Q}Q=W.x-b.x;var la=W.y-b.y;K.free(W);Pa(B)}else if(C<-n||C>=n)B=K.alloc(),k.yg(),k.computeMidPoint(B),Y=k.midAngle,U!==mg&&(Q=k.computeAngle(z,U,Y),z.Lb=Q),Q=B.x-b.x,la=B.y-b.y,K.free(B);else{Q=0;0<=C?(la=m.N(C),B=Cfa+10?0<=C?Y.cb(la):la.cb(Y):fa>W+10?0<=C?B.cb(Q):Q.cb(B):0<=C?Y.cb(Q):Q.cb(Y)}else Y=0<=C?la.cb(B):B.cb(la);U!==mg&&(Q=k.computeAngle(z,U,Y),z.Lb=Q);Q=la.x+(B.x-la.x)*D-b.x;la=la.y+(B.y-la.y)*D-b.y}z.measure(Infinity,Infinity,0,0);B=z.measuredBounds;W=z.naturalBounds;var za=0;z instanceof Qf&&(za=z.strokeWidth);fa=W.width+za;var Ma=W.height+za;q.reset();q.translate(-B.x,-B.y);q.scale(z.scale,z.scale);q.rotate(U===mg?z.angle:Y,fa/2,Ma/2);U!==bn&&U!==cn||q.rotate(90, +fa/2,Ma/2);U!==dn&&U!==en||q.rotate(-90,fa/2,Ma/2);U===fn&&(45Y||225Y)&&q.rotate(-Y,fa/2,Ma/2);W=new M(0,0,fa,Ma);u.Ci(W,J);q.La(u);J=-u.x+za/2*z.scale;z=-u.y+za/2*z.scale;x.assign(aa);za=isNaN(aa.x);var sb=isNaN(aa.y);if(za||sb){fa=fa/2+3;Ma=Ma/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;U===mg&&(wb||Wb)?(x.x=sb?fa:aa.y,x.y=za?Ma:aa.x,wb?0<=C||isNaN(C)&&.5>D||!za||(x.y=-Ma):Wb&&((0<=C||isNaN(C)&&.5>D)&&za&&(x.y=-Ma),sb&&(x.x=-fa))):(za&&(x.x=0<=C||isNaN(C)&&.5>D?fa:-fa),sb&&(x.y=-Ma), +x.rotate(Y))}else x.rotate(Y);Q+=x.x;la+=x.y;W.set(B);W.h(Q+J,la+z,B.width,B.height);r.push(W);c.cd(W)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.ng=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);bc(e,c.width||0,c.height||0);Jb.free(q);K.free(u);K.free(x)}}}}; +$m.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Ce||a instanceof R){var d=a,e=null;a instanceof Ce&&(e=a,d=e.adornedPart);var f=a instanceof Ce?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=K.alloc(),r=n,x=q,r.yg(),r.computeMidPoint(x),r=n.midAngle,l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,x=q.y, +K.free(q);else{u=0;0<=h?(q=b.s[h],x=hz+10?0<=h?r.cb(q):q.cb(r):z>y+10?0<=h?x.cb(u):u.cb(x):0<=h?r.cb(u):u.cb(r)}else r=0<=h?q.cb(x):x.cb(q);l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(x.x-q.x)*k;x=q.y+(x.y-q.y)*k}if(p.No())g.location=new K(n,x);else{p.kc()&&(p=Kc);q=Jb.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, 0,0);var B=g.naturalBounds;u=M.allocAt(0,0,B.width,B.height);y=K.alloc();y.Ci(u,p);q.La(y);p=-y.x;z=-y.y;var C=B.width,D=B.height;B=K.alloc();B.assign(m);var J=isNaN(m.x),U=isNaN(m.y);if(J||U){C=C/2+3;D=D/2+3;var aa=45<=r&&135>=r,Y=225<=r&&315>=r;l===mg&&(aa||Y)?(B.x=U?C:m.y,B.y=J?D:m.x,aa?0<=h||isNaN(h)&&.5>k||!J||(B.y=-D):Y&&((0<=h||isNaN(h)&&.5>k)&&J&&(B.y=-D),U&&(B.x=-C))):(J&&(B.x=0<=h||isNaN(h)&&.5>k?C:-C),U&&(B.y=-D),B.rotate(r))}else B.rotate(r);n+=B.x;x+=B.y;q.fp(u);p+=u.x;z+=u.y;h=K.allocAt(n+ p,x+z);g.move(h);K.free(h);K.free(B);K.free(y);M.free(u);Jb.free(q)}}null!==e?e.ck(!1):d.ck(!1)}}; -function an(a,b,c,d){if(!1!==Bj(d)){var e=d.strokeWidth;0===e&&a instanceof Ce&&a.type===V.Link&&a.adornedObject instanceof Qf&&(e=a.adornedObject.strokeWidth);e*=d.Ea;a instanceof R&&null!==a.ya?(a=a.ya.bounds,d.Fe(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Ce&&null!==a.adornedPart.ya?(a=a.adornedPart.ya.bounds,d.Fe(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Fe(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.ya?d.gc.h(0,0,e.width,e.height):d.gc.assign(d.ya.bounds);wj(d,!1)}} +function an(a,b,c,d){if(!1!==Bj(d)){var e=d.strokeWidth;0===e&&a instanceof Ce&&a.type===V.Link&&a.adornedObject instanceof Qf&&(e=a.adornedObject.strokeWidth);e*=d.Ea;a instanceof R&&null!==a.ya?(a=a.ya.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Ce&&null!==a.adornedPart.ya?(a=a.adornedPart.ya.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Ge(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.ya?d.gc.h(0,0,e.width,e.height):d.gc.assign(d.ya.bounds);wj(d,!1)}} function gn(){this.Ca="Base"}na(gn,$l); -gn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Ab();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var r=h.geometry,q=h.strokeWidth,u=r.flattenedSegments,x=r.flattenedLengths,y=r.flattenedTotalLength,z=u.length,B=0,C=0,D=Na(),J=0;Jfa&&(fa+=360);aa.push(fa)}B=P;C=la}D.push(aa)}if(null===a.graduatedIntervals){for(var za=[],Ma=a.U.s,sb=Ma.length,wb=0;wbYe))for(var ib=0;ibYe&&tb.push(Wb)}}}}a.graduatedIntervals=za}var Ze=a.graduatedIntervals;var Ic=a.U.s,bd=Ic.length,Ac=0,sc=0,zf=y;a.graduatedMarks= -[];for(var Fd,Sh=0;ShZi*Xb*y/a.graduatedRange&&null===Bc.graduatedSkip)){var Mg=x[0][0],Rd=0,tc=0;sc=y*Bc.graduatedStart-1E-4;zf=y*Bc.graduatedEnd+1E-4;var dg=Zi*Xb,Cc=a.graduatedTickBase;if(Cca.graduatedMin+dg&&(Cc-=Math.floor((Cc-a.graduatedMin)/dg)*dg);for(var Hk=Ze[Sh],$i=Cc,fo=1E-6*a.graduatedMax, -ce=1;Cc<=a.graduatedMax+fo;ce++){a:{for(var De=Hk.length,Ng=0;Ng-Th){var Cf=!1;break a}}Cf=!0}if(Cf&&(Cc>a.graduatedMax&&(Cc=a.graduatedMax),null===Bc.graduatedSkip||Bc instanceof ch&&!Bc.graduatedSkip(Cc,Bc)||Bc instanceof Qf&&!Bc.graduatedSkip(Cc,Bc))&&(Ac=(Cc-a.graduatedMin)*y/a.graduatedRange,Ac>y&&(Ac=y),sc<=Ac&&Ac<=zf)){for(var de=D[Rd][tc],$e=x[Rd][tc];RdMg&&tc< -x[Rd].length-1;)tc++,de=D[Rd][tc],$e=x[Rd][tc],Mg+=$e;if(Ac<=Mg)break;Rd++;tc=0;de=D[Rd][tc];$e=x[Rd][tc];Mg+=$e}var uc=u[Rd],Sd=uc[2*tc],Ik=uc[2*tc+1],Ee=(Ac-(Mg-$e))/$e,Uh=new K(Sd+(uc[2*tc+2]-Sd)*Ee+q/2-r.bounds.x,Ik+(uc[2*tc+3]-Ik)*Ee+q/2-r.bounds.y);Uh.scale(h.scale,h.scale);a:{var Gd=de,eg=D[Rd];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Og){var Vh=1-Math.abs(.5-Ee);de=(Gd*Vh+Td*(1-Vh))%360;break a}}}de=Gd}if(Bc instanceof ch){var nd="";null!==Bc.graduatedFunction?(nd=Bc.graduatedFunction(Cc,Bc),nd=null!==nd&&void 0!==nd?nd.toString():""):nd=(+Cc.toFixed(2)).toString();""!==nd&&Fd.push({Vl:Uh,angle:de,text:nd})}else Fd.push({Vl:Uh,angle:de})}Cc=$i+ce*dg}}}a.graduatedMarks.push(Fd)}Pa(D); -var xb=a.graduatedMarks;if(null!==xb)for(var aj=d.length,ic=0;icod;od++){switch(od){case 0:vc.h(Ud,Hd);break;case 1:vc.h(Ud+Wh,Hd);break;case 2:vc.h(Ud,Hd+gg);break;case 3:vc.h(Ud+Wh,Hd+gg)}vc.rotate(bb+jb.angle);vc.offset(Kk,Yh);0===Xh&&0===od?Pc.h(vc.x,vc.y,0,0):Pc.Ye(vc);vc.offset(-Kk,-Yh);vc.rotate(-bb-jb.angle)}K.free(vc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Pc);lc(af,Pc.x,Pc.y,Pc.width,Pc.height)}else if(jb instanceof ch){var cd=a,Lk=e;null===cd.temporaryTextBlock&&(cd.temporaryTextBlock=new ch);var Dc=cd.temporaryTextBlock;hn(Dc,jb); -var bf=jb.alignmentFocus;bf.kc()&&(bf=Gc);for(var dd=jb.segmentOrientation,Zh=jb.segmentOffset,Ff=new M,bj=0,$h=0,Vd=0,hg=0,Gf=0,ai=jc.length,cf=0;cffa&&(fa+=360);aa.push(fa)}B=Q;C=la}D.push(aa)}if(null===a.graduatedIntervals){for(var za=[],Ma=a.U.s,sb=Ma.length,wb=0;wbYe))for(var jb=0;jbYe&&tb.push(Xb)}}}}a.graduatedIntervals=za}var Ze=a.graduatedIntervals;var Ic=a.U.s,bd=Ic.length,Ac=0,tc=0,zf=y;a.graduatedMarks= +[];for(var Fd,Sh=0;ShZi*Yb*y/a.graduatedRange&&null===Bc.graduatedSkip)){var Mg=x[0][0],Rd=0,uc=0;tc=y*Bc.graduatedStart-1E-4;zf=y*Bc.graduatedEnd+1E-4;var dg=Zi*Yb,Cc=a.graduatedTickBase;if(Cca.graduatedMin+dg&&(Cc-=Math.floor((Cc-a.graduatedMin)/dg)*dg);for(var Hk=Ze[Sh],$i=Cc,fo=1E-6*a.graduatedMax, +ce=1;Cc<=a.graduatedMax+fo;ce++){a:{for(var De=Hk.length,Ng=0;Ng-Th){var Cf=!1;break a}}Cf=!0}if(Cf&&(Cc>a.graduatedMax&&(Cc=a.graduatedMax),null===Bc.graduatedSkip||Bc instanceof ch&&!Bc.graduatedSkip(Cc,Bc)||Bc instanceof Qf&&!Bc.graduatedSkip(Cc,Bc))&&(Ac=(Cc-a.graduatedMin)*y/a.graduatedRange,Ac>y&&(Ac=y),tc<=Ac&&Ac<=zf)){for(var de=D[Rd][uc],$e=x[Rd][uc];RdMg&&uc< +x[Rd].length-1;)uc++,de=D[Rd][uc],$e=x[Rd][uc],Mg+=$e;if(Ac<=Mg)break;Rd++;uc=0;de=D[Rd][uc];$e=x[Rd][uc];Mg+=$e}var vc=u[Rd],Sd=vc[2*uc],Ik=vc[2*uc+1],Ee=(Ac-(Mg-$e))/$e,Uh=new K(Sd+(vc[2*uc+2]-Sd)*Ee+q/2-r.bounds.x,Ik+(vc[2*uc+3]-Ik)*Ee+q/2-r.bounds.y);Uh.scale(h.scale,h.scale);a:{var Gd=de,eg=D[Rd];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Og){var Vh=1-Math.abs(.5-Ee);de=(Gd*Vh+Td*(1-Vh))%360;break a}}}de=Gd}if(Bc instanceof ch){var nd="";null!==Bc.graduatedFunction?(nd=Bc.graduatedFunction(Cc,Bc),nd=null!==nd&&void 0!==nd?nd.toString():""):nd=(+Cc.toFixed(2)).toString();""!==nd&&Fd.push({Vl:Uh,angle:de,text:nd})}else Fd.push({Vl:Uh,angle:de})}Cc=$i+ce*dg}}}a.graduatedMarks.push(Fd)}Pa(D); +var xb=a.graduatedMarks;if(null!==xb)for(var aj=d.length,jc=0;jcod;od++){switch(od){case 0:wc.h(Ud,Hd);break;case 1:wc.h(Ud+Wh,Hd);break;case 2:wc.h(Ud,Hd+gg);break;case 3:wc.h(Ud+Wh,Hd+gg)}wc.rotate(cb+kb.angle);wc.offset(Kk,Yh);0===Xh&&0===od?Pc.h(wc.x,wc.y,0,0):Pc.Ze(wc);wc.offset(-Kk,-Yh);wc.rotate(-cb-kb.angle)}K.free(wc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Pc);lc(af,Pc.x,Pc.y,Pc.width,Pc.height)}else if(kb instanceof ch){var cd=a,Lk=e;null===cd.temporaryTextBlock&&(cd.temporaryTextBlock=new ch);var Dc=cd.temporaryTextBlock;hn(Dc,kb); +var bf=kb.alignmentFocus;bf.kc()&&(bf=Gc);for(var dd=kb.segmentOrientation,Zh=kb.segmentOffset,Ff=new M,bj=0,$h=0,Vd=0,hg=0,Gf=0,ai=kc.length,cf=0;cfVd||225Vd)&&Id.rotate(-Vd,ef/2,ff/2);var Qg=M.allocAt(0,0,ef,ff),gf=K.alloc();gf.Ci(Qg,bf);Id.La(gf);var Rg=-gf.x,ho=-gf.y,He=K.alloc();He.assign(Zh);isNaN(He.x)&&(He.x=ef/2+3);isNaN(He.y)&&(He.y=-(ff/2+3));He.rotate(Vd);bj+=He.x+Rg;$h+=He.y+ho;var ig=new M(bj,$h,df.width,df.height),cj=new M(df.x,df.y,df.width,df.height),dj=new M(Ge.x,Ge.y,Ge.width,Ge.height); -ee.Tz=hg;ee.lineCount=Dc.lineCount;ee.lines=[Dc.Db,Dc.Lh,Dc.df,Dc.Ke,Dc.Oc,Dc.ac,Dc.ze];ee.actualBounds=ig;ee.measuredBounds=cj;ee.naturalBounds=dj;0===cf?Ff.assign(ig):Ff.cd(ig);K.free(He);K.free(gf);M.free(Qg);Jb.free(Id)}null!==cd.graduatedBounds&&cd.graduatedBounds.push(Ff);lc(Lk,Ff.x,Ff.y,Ff.width,Ff.height)}wj(jb,!1)}}}; +ee.Tz=hg;ee.lineCount=Dc.lineCount;ee.lines=[Dc.Db,Dc.Lh,Dc.ef,Dc.Le,Dc.Pc,Dc.ac,Dc.Ae];ee.actualBounds=ig;ee.measuredBounds=cj;ee.naturalBounds=dj;0===cf?Ff.assign(ig):Ff.cd(ig);K.free(He);K.free(gf);M.free(Qg);Jb.free(Id)}null!==cd.graduatedBounds&&cd.graduatedBounds.push(Ff);lc(Lk,Ff.x,Ff.y,Ff.width,Ff.height)}wj(kb,!1)}}}; gn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Ab(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=e&&(e=1);for(var g=f.actualBounds,h=a.U.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* +gn.prototype.zc=function(a,b,c){var d=c.hj;c.hj=!0;var e=a.naturalBounds,f=e.width;e=e.height;b.save();b.beginPath();b.rect(-1,-1,f+1,e+1);b.clip();f=a.Ab();f.zc(b,c);e=a.Gf()*c.scale;0>=e&&(e=1);for(var g=f.actualBounds,h=a.U.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* n.scale,x=n.alignmentFocus;x.kc()&&(x=Gc);for(var y=0;yf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ti(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.Tr(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-=p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.zb;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Rr()}}}} -function ln(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=nn(a,!0),l=nn(a,!1),m=0;mp)){var r=n.Vc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= +function ln(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=nn(a,!0),l=nn(a,!1),m=0;mp)){var r=n.Wc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= q;q=n.position+q;r+=n.actual;q+r>p&&(r=p-q);0>=r||(p=a.zb,ti(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,q+p.top,g.width-(p.left+p.right),r):b.fillRect(q+p.left,p.top,r,g.height-(p.top+p.bottom)))}}}}function nn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(q),K.free(q));K.free(m);f&&e.transform(g);return l}; t.w=function(a){if(!Bj(this)){O.prototype.w.call(this,a);a=null;if(this.wa===V.Auto||this.wa===V.Link)a=this.Ab();for(var b=this.U.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Bd:this.w(!0);this.measure(c+h,d+g,0,0);break;case jl:this.w(!0);this.measure(c+h,f+g,0,0);break;case kl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.wa.arrange(this,e,this.mg)}}; -t.ih=function(a){var b=this.naturalBounds,c=Km(this);if(mc(0,0,b.width,b.height,a.x,a.y)){b=this.U.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Kb(e.set(a),f.transform),f.ea(e))return K.free(e),!0}K.free(e);return null===this.cc&&null===this.areaBackground?!1:!0}return!1};t.Ur=function(a){if(this.bindingId===a)return this;for(var b=this.U.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Bd:this.w(!0);this.measure(c+h,d+g,0,0);break;case jl:this.w(!0);this.measure(c+h,f+g,0,0);break;case kl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.wa.arrange(this,e,this.ng)}}; +t.ih=function(a){var b=this.naturalBounds,c=Km(this);if(mc(0,0,b.width,b.height,a.x,a.y)){b=this.U.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Kb(e.set(a),f.transform),f.ga(e))return K.free(e),!0}K.free(e);return null===this.cc&&null===this.areaBackground?!1:!0}return!1};t.Ur=function(a){if(this.bindingId===a)return this;for(var b=this.U.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof V?m:null;p=Jb.alloc();p.set(g); -if(null!==m?m.Ef(a,b,c,d,e,p):wl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Jb.free(p)}}}void 0===f&&Jb.free(g);return d}void 0===f&&Jb.free(g);return!1};function un(a,b,c,d){for(var e=a.U.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof V&&un(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} -t.sg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.re(),k=h?a:Kb(K.allocAt(a.x,a.y),this.transform),l=h?b:Kb(K.allocAt(b.x,b.y),this.transform),m=k.Cf(l),n=0x.width||u.y>x.height||0>u.x+u.width||0>u.y+u.height))if(q.re()?(u=q.transform,Kb(k.set(a),u),Kb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof V?q:null,null!==q?q.sg(k,l,c,d,e,f):u.lx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; +t.Ff=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Jb.alloc(),g.reset());g.multiply(this.transform);if(this.hh(a,g))return un(this,b,c,e),void 0===f&&Jb.free(g),!0;if(this.Yc(a,g)){if(!this.isAtomic)for(var h=Km(this),k=this.U.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof V?m:null;p=Jb.alloc();p.set(g); +if(null!==m?m.Ff(a,b,c,d,e,p):wl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Jb.free(p)}}}void 0===f&&Jb.free(g);return d}void 0===f&&Jb.free(g);return!1};function un(a,b,c,d){for(var e=a.U.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof V&&un(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.tg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.se(),k=h?a:Kb(K.allocAt(a.x,a.y),this.transform),l=h?b:Kb(K.allocAt(b.x,b.y),this.transform),m=k.Df(l),n=0x.width||u.y>x.height||0>u.x+u.width||0>u.y+u.height))if(q.se()?(u=q.transform,Kb(k.set(a),u),Kb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof V?q:null,null!==q?q.tg(k,l,c,d,e,f):u.mx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; function Qm(a){var b=null;a instanceof Qf&&(b=a.spot1,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=Fc);return b}function Rm(a){var b=null;a instanceof Qf&&(b=a.spot2,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Oc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.ah=null;Bj(this)||this.w();b.w(!1);null!==b.portId?this.Te=!0:b instanceof V&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.Jf()||vn(this,b,!1);c=this.part;null!==c&&(c.Wh=null,c.cg=NaN,this.Te&&c instanceof T&&(c.Te=!0),c.Te&&c instanceof T&&(c.yc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.ib(te,"elements",this,b,null,d,null),c.ib(se,"elements",this,null,b,null,a)))};function wn(a,b){a.m=b?a.m|16777216:a.m&-16777217}t.remove=function(a){w(a,O,V,"remove:element");for(var b=this.U.s,c=b.length,d=-1,e=0;e=e.count&&a>=e.count)return; +e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.ah=null;Bj(this)||this.w();b.w(!1);null!==b.portId?this.Ue=!0:b instanceof V&&!0===b.Ue&&(this.Ue=!0);this.graduatedIntervals=null;this.Kf()||vn(this,b,!1);c=this.part;null!==c&&(c.Wh=null,c.dg=NaN,this.Ue&&c instanceof T&&(c.Ue=!0),c.Ue&&c instanceof T&&(c.yc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.ib(te,"elements",this,b,null,d,null),c.ib(se,"elements",this,null,b,null,a)))};function wn(a,b){a.o=b?a.o|16777216:a.o&-16777217}t.remove=function(a){w(a,O,V,"remove:element");for(var b=this.U.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",V,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new ck;c.Bi(this);c.isRow=!0;c.index=a;b[a]=c;this.ib(se,"rowdefs",this,null,c,null,a)}return b[a]}; V.prototype.nA=function(a){G&&E(a,V,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",V,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ib(te,"rowdefs",this,c,null,a,null);this.w()}}};function dk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof ck?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} V.prototype.getColumnDefinition=function(a){G&&E(a,V,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",V,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new ck;c.Bi(this);c.isRow=!1;c.index=a;b[a]=c;this.ib(se,"coldefs",this,null,c,null,a)}return b[a]};t=V.prototype; t.iA=function(a){G&&E(a,V,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",V,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ib(te,"coldefs",this,c,null,a,null);this.w()}}};function ek(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof ck?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} t.oz=function(a){if(0>a||this.type!==V.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==V.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;e=c.elements.count&&!(c instanceof S)){var d=!1;if(1===c.elements.count&&(d=null!==c.itemArray,!d))for(h=b.iterator;h.next();)if("itemArray"===h.value.targetProperty){d=!0;break}d||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),yn=!0)}}))} t.Sy=function(a){void 0===a&&(a=!1);var b=this.copy();pn(b,function(a){a instanceof V&&(a.allBindings=null,a.vb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Av(b.value.copy())}))});a&&xg(b);return b}; t.Pa=function(a){var b=this.allBindings;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.lb(e),null===d){G&&Fa("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d= -d.model.modelData;else continue;var f=this,g=c.Gi;if(-1!==g){if(f=this.Ur(g),null===f)continue}else null!==c.yd&&(f=c.yd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.jo;if(0!==e){if(!(f instanceof V))continue;1===e?f=f.getColumnDefinition(c.yl):2===e&&(f=f.getRowDefinition(c.yl))}void 0!==f&&c.Dv(f,d)}}};t.kx=function(a){if(void 0===a||null===a||null===this.ee)return null;A(a,"object",V,"findItemPanelForData");return this.ee.L(a)}; +d.model.modelData;else continue;var f=this,g=c.Gi;if(-1!==g){if(f=this.Ur(g),null===f)continue}else null!==c.yd&&(f=c.yd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.jo;if(0!==e){if(!(f instanceof V))continue;1===e?f=f.getColumnDefinition(c.yl):2===e&&(f=f.getRowDefinition(c.yl))}void 0!==f&&c.Dv(f,d)}}};t.lx=function(a){if(void 0===a||null===a||null===this.fe)return null;A(a,"object",V,"findItemPanelForData");return this.fe.L(a)}; function zn(a,b){a=a.U.s;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.rc(this.U.length-1,!1);An(this,this.itemArray)}; -function An(a,b){var c=sn(a);if(null===b||0===b.length)for(;a.U.length>c;)a.rc(a.U.length-1,!1);else if(a.U.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){xg(e);e=e.copy();if(0!==(e.m&16777216)){var f=a.jh();null!==f&&wn(f,!0)}"object"===typeof b&&(null===a.ee&&(a.ee=new yb),a.ee.add(b,e));f=c+sn(a);a.Hb(f,e);d&&(e.vb=b,En(a,f,c),e.vb=null);e.data=b}}} +function An(a,b){var c=sn(a);if(null===b||0===b.length)for(;a.U.length>c;)a.rc(a.U.length-1,!1);else if(a.U.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){xg(e);e=e.copy();if(0!==(e.o&16777216)){var f=a.jh();null!==f&&wn(f,!0)}"object"===typeof b&&(null===a.fe&&(a.fe=new yb),a.fe.add(b,e));f=c+sn(a);a.Hb(f,e);d&&(e.vb=b,En(a,f,c),e.vb=null);e.data=b}}} function En(a,b,c){for(a=a.U;ba&&Ba(a,">= 0",V,"padding"), a=new gc(a)):(w(a,gc,V,"padding"),0>a.left&&Ba(a.left,">= 0",V,"padding:value.left"),0>a.right&&Ba(a.right,">= 0",V,"padding:value.right"),0>a.top&&Ba(a.top,">= 0",V,"padding:value.top"),0>a.bottom&&Ba(a.bottom,">= 0",V,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.w(),this.g("padding",b,a))}},defaultAlignment:{configurable:!0,get:function(){return this.Om},set:function(a){var b=this.Om;b.D(a)||(G&&w(a,Ib,V,"defaultAlignment"),this.Om=a=a.M(),this.w(),this.g("defaultAlignment", -b,a))}},defaultStretch:{configurable:!0,get:function(){return this.Vf},set:function(a){var b=this.Vf;b!==a&&(ab(a,O,V,"defaultStretch"),this.Vf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.W?this.W.Hp:yc},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,V,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.W&&(this.W=new Jn),this.W.Hp=a,this.w(),this.g("defaultSeparatorPadding", +b,a))}},defaultStretch:{configurable:!0,get:function(){return this.Wf},set:function(a){var b=this.Wf;b!==a&&(ab(a,O,V,"defaultStretch"),this.Wf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.W?this.W.Hp:yc},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,V,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.W&&(this.W=new Jn),this.W.Hp=a,this.w(),this.g("defaultSeparatorPadding", b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.W?this.W.ma:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Cl)&&(a instanceof Cl&&a.freeze(),null===this.W&&(this.W=new Jn),this.W.ma=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.W?this.W.Ma:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; -b!==a&&isFinite(a)&&0<=a&&(null===this.W&&(this.W=new Jn),this.W.Ma=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.W?this.W.aa:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",V,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.Ib=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.W?this.W.jb:0},set:function(a){var b= -this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.jb=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;if(b!==a){var c=this instanceof S&&!(this instanceof Ce);c&&A(a,"object",V,"data");xg(this);this.vb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof R?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a, -this)):this instanceof S&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ee&&(null!==b&&c.ee.remove(b),null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Pa()}}},itemIndex:{configurable:!0,get:function(){return this.sn},set:function(a){var b=this.sn;b!==a&&(this.sn=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.ob:null},set:function(a){this.localBindings!== +this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.jb=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;if(b!==a){var c=this instanceof S&&!(this instanceof Ce);c&&A(a,"object",V,"data");xg(this);this.vb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof R?(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a, +this)):this instanceof S&&(null!==b&&c.df.remove(b),null!==a&&c.df.add(a,this))):(c=this.panel,null!==c&&null!==c.fe&&(null!==b&&c.fe.remove(b),null!==a&&c.fe.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Pa()}}},itemIndex:{configurable:!0,get:function(){return this.sn},set:function(a){var b=this.sn;b!==a&&(this.sn=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.ob:null},set:function(a){this.localBindings!== a&&(null===this.B&&(this.B=new rl),this.B.ob=a)}},itemArray:{configurable:!0,get:function(){return this.Jh},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Jh;if(b!==a||null!==a&&zn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Tj(c.partManager,this,c),this.Jh=a,null!==c&&null!==a&&Qj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||An(this,a)}}},itemTemplate:{configurable:!0, enumerable:!0,get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.L("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new yb}var b=this.itemTemplateMap.L("");b!==a&&(w(a,V,V,"itemTemplate"),(a instanceof S||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.iv())}},itemTemplateMap:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.te:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){w(a,yb,V,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof S||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}ql(this);this.B.te=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.iv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== -this.B?this.B.Nc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",V,"itemCategoryProperty"),ql(this),this.B.Nc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(A(a,"boolean",V,"isAtomic"),this.m^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== -(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(G&&(A(a,"boolean",V,"isClipping"),!a||this.type===V.Spot||this instanceof wf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.m^=2097152,this instanceof wf&&(this.pb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.m&33554432)},set:function(a){var b=0!==(this.m&33554432);b!==a&&(A(a,"boolean",V,"isOpposite"),this.m^=33554432,this.w(), -this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);if(b!==a){A(a,"boolean",V,"isEnabled");var c=null===this.panel||this.panel.Jf();this.m^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&vn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(G&&A(a,"string",V,"alignmentFocusName"), -this.$e=a,this.w(),this.g("alignmentFocusName",b,a))}}}); +enumerable:!0,get:function(){return null!==this.B?this.B.ue:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){w(a,yb,V,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof S||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}ql(this);this.B.ue=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.iv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== +this.B?this.B.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",V,"itemCategoryProperty"),ql(this),this.B.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(A(a,"boolean",V,"isAtomic"),this.o^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== +(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(G&&(A(a,"boolean",V,"isClipping"),!a||this.type===V.Spot||this instanceof wf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.o^=2097152,this instanceof wf&&(this.pb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.o&33554432)},set:function(a){var b=0!==(this.o&33554432);b!==a&&(A(a,"boolean",V,"isOpposite"),this.o^=33554432,this.w(), +this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);if(b!==a){A(a,"boolean",V,"isEnabled");var c=null===this.panel||this.panel.Kf();this.o^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&vn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.af},set:function(a){var b=this.af;b!==a&&(G&&A(a,"string",V,"alignmentFocusName"), +this.af=a,this.w(),this.g("alignmentFocusName",b,a))}}}); oa.Object.defineProperties(V,{Position:{configurable:!0,get:function(){return Zl.L("Position")}},Horizontal:{configurable:!0,get:function(){return Zl.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return Zl.L("Vertical")}},Spot:{configurable:!0,get:function(){return Zl.L("Spot")}},Auto:{configurable:!0,get:function(){return Zl.L("Auto")}},Table:{configurable:!0,get:function(){return Zl.L("Table")}},Viewbox:{configurable:!0, enumerable:!0,get:function(){return Zl.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return Zl.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return Zl.L("TableColumn")}},Link:{configurable:!0,get:function(){return Zl.L("Link")}},Grid:{configurable:!0,get:function(){return Zl.L("Grid")}},Graduated:{configurable:!0,get:function(){return Zl.L("Graduated")}}});V.prototype.rebuildItemElements=V.prototype.iv; -V.prototype.findItemPanelForData=V.prototype.kx;V.prototype.updateTargetBindings=V.prototype.Pa;V.prototype.copyTemplate=V.prototype.Sy;V.prototype.graduatedValueForPoint=V.prototype.Hz;V.prototype.graduatedPointForValue=V.prototype.Gz;V.prototype.findColumnForLocalX=V.prototype.gz;V.prototype.findRowForLocalY=V.prototype.oz;V.prototype.removeColumnDefinition=V.prototype.iA;V.prototype.removeRowDefinition=V.prototype.nA;V.prototype.removeAt=V.prototype.sb;V.prototype.remove=V.prototype.remove; +V.prototype.findItemPanelForData=V.prototype.lx;V.prototype.updateTargetBindings=V.prototype.Pa;V.prototype.copyTemplate=V.prototype.Sy;V.prototype.graduatedValueForPoint=V.prototype.Hz;V.prototype.graduatedPointForValue=V.prototype.Gz;V.prototype.findColumnForLocalX=V.prototype.gz;V.prototype.findRowForLocalY=V.prototype.oz;V.prototype.removeColumnDefinition=V.prototype.iA;V.prototype.removeRowDefinition=V.prototype.nA;V.prototype.removeAt=V.prototype.sb;V.prototype.remove=V.prototype.remove; V.prototype.insertAt=V.prototype.Hb;V.prototype.elt=V.prototype.N;V.prototype.add=V.prototype.add;V.prototype.findObject=V.prototype.lb;V.prototype.findInVisualTree=V.prototype.Jl;V.prototype.walkVisualTreeFrom=V.prototype.nk;V.prototype.findMainElement=V.prototype.Ab;var yn=!1,Gn=!1,Hn=null,Zl=new yb;V.className="Panel";V.definePanelLayout=In;In("Position",new Jm);In("Vertical",new Mm);In("Auto",new Pm);In("Link",new $m); -function Kn(){this.$p=0;this.G=100;this.ma=10;this.aa=0;this.di=this.o=this.j=this.v=null}Kn.prototype.copy=function(){var a=new Kn;a.$p=this.$p;a.G=this.G;a.ma=this.ma;a.aa=this.aa;a.v=this.v;a.j=this.j;a.o=this.o;a.di=this.di;return a};Kn.className="GradPanelSettings";function Jn(){this.Nc=[];this.Mc=[];this.j=this.tb=Ln;this.jb=this.Ib=0;this.Hp=yc;this.Ma=1;this.aa=this.ma=null;this.G=1;this.ob=this.o=this.v=null} -Jn.prototype.copy=function(a){for(var b=new Jn,c=this.Nc,d=c.length,e=b.Nc,f=0;fa&&Ba(a,">= 0",ck,"height"),this.Gc=a,this.actual=this.sa,null!== -this.panel&&this.panel.w(),this.Pb("height",b,a))}},width:{configurable:!0,get:function(){return this.Gc},set:function(a){var b=this.Gc;b!==a&&(G&&A(a,"number",ck,"width"),0>a&&Ba(a,">= 0",ck,"width"),this.Gc=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("width",b,a))}},minimum:{configurable:!0,get:function(){return this.rj},set:function(a){var b=this.rj;b!==a&&(G&&A(a,"number",ck,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",ck,"minimum"),this.rj=a,this.actual= +oa.Object.defineProperties(ck.prototype,{panel:{configurable:!0,get:function(){return this.fg}},isRow:{configurable:!0,get:function(){return this.jq},set:function(a){this.jq=a}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb=a}},height:{configurable:!0,get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(G&&A(a,"number",ck,"height"),0>a&&Ba(a,">= 0",ck,"height"),this.Hc=a,this.actual=this.sa,null!== +this.panel&&this.panel.w(),this.Pb("height",b,a))}},width:{configurable:!0,get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(G&&A(a,"number",ck,"width"),0>a&&Ba(a,">= 0",ck,"width"),this.Hc=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("width",b,a))}},minimum:{configurable:!0,get:function(){return this.rj},set:function(a){var b=this.rj;b!==a&&(G&&A(a,"number",ck,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",ck,"minimum"),this.rj=a,this.actual= this.sa,null!==this.panel&&this.panel.w(),this.Pb("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.pj},set:function(a){var b=this.pj;b!==a&&(G&&A(a,"number",ck,"maximum"),0>a&&Ba(a,">= 0",ck,"maximum"),this.pj=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,ck,"alignment"),this.Kb=a.M(),null!==this.panel&&this.panel.w(), -this.Pb("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.kg},set:function(a){var b=this.kg;b!==a&&(G&&ab(a,O,ck,"stretch"),this.kg=a,null!==this.panel&&this.panel.w(),this.Pb("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.gg},set:function(a){"number"===typeof a?a=new gc(a):null!==a&&G&&w(a,gc,ck,"separatorPadding");var b=this.gg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.gg=a,null!==this.panel&&this.panel.w(), +this.Pb("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(G&&ab(a,O,ck,"stretch"),this.lg=a,null!==this.panel&&this.panel.w(),this.Pb("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.hg},set:function(a){"number"===typeof a?a=new gc(a):null!==a&&G&&w(a,gc,ck,"separatorPadding");var b=this.hg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.hg=a,null!==this.panel&&this.panel.w(), this.Pb("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.$n},set:function(a){var b=this.$n;b!==a&&(null!==a&&dm(a,"RowColumnDefinition.separatorStroke"),a instanceof Cl&&a.freeze(),this.$n=a,null!==this.panel&&this.panel.w(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.ao},set:function(a){var b=this.ao;b!==a&&(this.ao=a,null!==this.panel&&this.panel.w(),this.Pb("separatorStrokeWidth", b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Bj},set:function(a){var b=this.Bj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",ck,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,x=Na(),y=2;yn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;y=0;q=x[y];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Pa(x);return}e>q?(z=e-q,e=q):z=0;var B=Math.sqrt(e*e/(1+p*p));0>n&&(B=-B);h+=B;k+=p*B;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.mi(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){y++;if(y===x.length){Pa(x);return}q=x[y];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Pa(x)}} -t.mi=function(a,b){var c=this.Sc,d=this.Nk;if(null!==c||null!==d){var e=this.ya;if(null!==e){a.Uc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ti(this,a,d,!0,!1,g,f);var h=this.part,k=this.lg;null===c||0!==k||null===h||!this.isPanelMain&&h.Ab()!==this||(k=h.type===V.Link&&h instanceof Ce&&"Selection"===h.category&&h.adornedObject instanceof Qf&&h.adornedPart.Ab()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ti(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= -this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Se("drawShadows")&&(f=h.isShadowed);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.Tr(k,this.strokeDashOffset));if(e.type===N.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.Fi();else if(e.type===N.v){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n-k);a.beginPath();a.rect(e, -p,l,k);null!==d&&a.Df(d);if(null!==c){h&&f&&Gl(a);if(0===l||0===k)a.beginPath(),a.rect(e,p,Math.max(l,.1),Math.max(k,.1));a.Fi();h&&f&&Fl(a)}}else if(e.type===N.G)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+L.yg*e,k-p,l+e,k-L.yg*p,l+e,k),a.bezierCurveTo(l+e,k+L.yg*p,l+L.yg*e,k+p,l,k+p),a.bezierCurveTo(l-L.yg*e,k+p,l-e,k+L.yg*p,l-e,k),a.bezierCurveTo(l-e,k-L.yg*p,l-L.yg*e,k-p,l,k-p), -a.closePath(),null!==d&&a.Df(d),null!==c&&(h&&f?(Gl(a),a.Fi(),Fl(a)):a.Fi());else if(e.type===N.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==r?r.endX:l.startX,null!==r?r.endY:l.startY)}else if(r=ae(u,l),x=r.length,0===x)a.lineTo(u.centerX,u.centerY);else for(var y=0;y(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.Yb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== -N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Wc(-d,-d);if(f.ea(a))return M.free(f),!1;f.Wc(d,d)}null!==this.stroke&&f.Wc(e,e);a=f.ea(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?he(c,a.x,a.y,e):fe(c,a,e,1(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.Yb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== +N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Bc(-d,-d);if(f.ga(a))return M.free(f),!1;f.Bc(d,d)}null!==this.stroke&&f.Bc(e,e);a=f.ga(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), +!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.m)return M.free(f),null===this.fill?he(c,a.x,a.y,e):fe(c,a,e,1=this.strokeWidth)m=L.Ve(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), -d=m*b);b=Na();a=new K;L.Ve(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* -(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),y-=q,z-= -u;r.contains(y,z);)y-=q,z-=u;e.x=h;e.y=k;for(u=0;u=this.strokeWidth)m=L.We(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), +d=m*b);b=Na();a=new K;L.We(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* +(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),y-=q,z-= +u;r.contains(y,z);)y-=q,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ha(k.y,a))&&(k.yb||L.ha(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} -t.lx=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.ih(a,!0))return!0;var e=a.Cf(b),f=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.ih(a,!0))return!0;var e=a.Df(b),f=e;1.5=e||Mb(b,f,0,-n)>= -e||Mb(b,f,0,n)>=e||Mb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Lb(a.x,a.y,f,h,k,h)>e&&Lb(a.x,a.y,k,l,f,l)>e&&Lb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?he(b,a.x,a.y,f):fe(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Xd:var p=Na();L.Pe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Yd:p=Na();L.To(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Zd:case $d:p=n.type===Zd?ae(n,f):be(n,f,g,m);var r=p.length;if(0===r){g=n.type===Zd?n.centerX:n.endX;m=n.type===Zd?n.centerY:n.endY;if(a.zd(g,m)> -e)return!1;break}n=null;for(var q=Na(),u=0;u=e||Mb(b,f,m,0)>=e?!1:!0}else if(b.type===N.m){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Lb(a.x,a.y,f,h,k,h)>e&&Lb(a.x,a.y,k,l,f,l)>e&&Lb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?he(b,a.x,a.y,f):fe(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Xd:var p=Na();L.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Yd:p=Na();L.To(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Zd:case $d:p=n.type===Zd?ae(n,f):be(n,f,g,m);var r=p.length;if(0===r){g=n.type===Zd?n.centerX:n.endX;m=n.type===Zd?n.centerY:n.endY;if(a.zd(g,m)> +e)return!1;break}n=null;for(var q=Na(),u=0;ub+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); +Qf.makeGeometry=function(a,b,c){if("None"!==a.toArrow)var d=Vn[a.toArrow];else"None"!==a.fromArrow?d=Vn[a.fromArrow]:(d=L.te[a.figure],"string"===typeof d&&(d=L.te[d]),void 0===d&&v("Unknown Shape.figure: "+a.figure),d=d(a,b,c),d.Uk=b,d.Tk=c);if(null===d){var e=L.te.Rectangle;"function"===typeof e&&(d=e(a,b,c))}G&&(d.bounds.width>b+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); return d};function Wn(a){var b=Vn[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=Vn[c];if(void 0===b){var d=null,e;for(e in L.qm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.qm[d],!1),Vn[d]=a,c!==d&&(Vn[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} -oa.Object.defineProperties(Qf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.ya?this.ya:this.Od},set:function(a){var b=this.ya,c=this.Od;if(b!==a){null!==a?(G&&w(a,N,Qf,"geometry"),this.Od=this.ya=a.freeze()):this.Od=this.ya=null;var d=this.part;null!==d&&(d.cg=NaN);this.w();this.g("geometry",b||c,a);tl(this)&&(a=this.part,null!==a&&ul(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, -set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){G&&A(a,"boolean",Qf,"isGeometryPositioned");var b=0!==(this.m&1048576);b!==a&&(G&&A(a,"boolean",Qf,"isGeometryPositioned"),this.m^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.Nk},set:function(a){var b= -this.Nk;b!==a&&(null!==a&&dm(a,"Shape.fill"),a instanceof Cl&&a.freeze(),this.Nk=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(null!==a&&dm(a,"Shape.stroke"),a instanceof Cl&&a.freeze(),this.Sc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;if(b!==a)if(G&&E(a,Qf,"strokeWidth"),0<=a){this.lg=a;this.w();var c=this.part; -null!==c&&(c.cg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Qf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.rr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Qf,"strokeCap"):(Nn(this),this.Sa.rr=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.sr:"miter"}, -set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Qf,"strokeJoin"):(Nn(this),this.Sa.sr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.tr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&E(a,Qf,"strokeMiterLimit"),1<=a){Nn(this);this.Sa.tr=a;this.R();var c=this.part;null!==c&&(c.cg=NaN);this.g("strokeMiterLimit", +oa.Object.defineProperties(Qf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.ya?this.ya:this.Od},set:function(a){var b=this.ya,c=this.Od;if(b!==a){null!==a?(G&&w(a,N,Qf,"geometry"),this.Od=this.ya=a.freeze()):this.Od=this.ya=null;var d=this.part;null!==d&&(d.dg=NaN);this.w();this.g("geometry",b||c,a);tl(this)&&(a=this.part,null!==a&&ul(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, +set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){G&&A(a,"boolean",Qf,"isGeometryPositioned");var b=0!==(this.o&1048576);b!==a&&(G&&A(a,"boolean",Qf,"isGeometryPositioned"),this.o^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.Nk},set:function(a){var b= +this.Nk;b!==a&&(null!==a&&dm(a,"Shape.fill"),a instanceof Cl&&a.freeze(),this.Nk=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Tc},set:function(a){var b=this.Tc;b!==a&&(null!==a&&dm(a,"Shape.stroke"),a instanceof Cl&&a.freeze(),this.Tc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.mg},set:function(a){var b=this.mg;if(b!==a)if(G&&E(a,Qf,"strokeWidth"),0<=a){this.mg=a;this.w();var c=this.part; +null!==c&&(c.dg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Qf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.rr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Qf,"strokeCap"):(Nn(this),this.Sa.rr=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.sr:"miter"}, +set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Qf,"strokeJoin"):(Nn(this),this.Sa.sr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.tr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&E(a,Qf,"strokeMiterLimit"),1<=a){Nn(this);this.Sa.tr=a;this.R();var c=this.part;null!==c&&(c.dg=NaN);this.g("strokeMiterLimit", b,a)}else G&&Ba(a,"value >= 1",Qf,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.Zg},set:function(a){var b=this.Zg;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Qf,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.dc!==a&&(c=!1);!1===b.Se("textGreeking")&& -(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case ol:a.translate(e,0);a.scale(-1,1);break;case nl:a.translate(0,f);a.scale(1,-1);break;case pl:a.translate(e,f),a.scale(-1,-1)}a.Uc();m=this.kd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.li(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Oc&&null!==this.ac)for(p=0;pe&&(r=e);d+=b;this.li(this.ac[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case ol:a.scale(-1, +t.mi=function(a,b){if(null!==this.Tc&&0!==this.hc.length&&null!==this.Be){var c=this.naturalBounds,d=this.actualBounds,e=c.width,f=c.height,g=co(this),h=a.textAlign=this.textAlign,k=b.mn;"start"===h?h=k?"right":"left":"end"===h&&(h=k?"left":"right");k=this.isUnderline;var l=this.isStrikethrough;ti(this,a,this.Tc,!0,!1,c,d);(k||l)&&ti(this,a,this.Tc,!1,!1,c,d);d=0;c=!1;var m=this.oe,n=m.dx-(g*m.m21+m.dx);m=m.dy-(g*m.m22+m.dy);var p=b.scale;8>(n*n+m*m)*p*p&&(c=!0);b.dc!==a&&(c=!1);!1===b.Te("textGreeking")&& +(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case ol:a.translate(e,0);a.scale(-1,1);break;case nl:a.translate(0,f);a.scale(1,-1);break;case pl:a.translate(e,f),a.scale(-1,-1)}a.Vc();m=this.kd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Ae)n=this.Db,n>e&&(n=e),this.li(this.Ae,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Pc&&null!==this.ac)for(p=0;pe&&(r=e);d+=b;this.li(this.ac[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case ol:a.scale(-1, 1);a.translate(-e,0);break;case nl:a.scale(1,-1);a.translate(0,-f);break;case pl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.li=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==eo?eo(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==lo?lo(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ n+g,d),b.stroke()))}; -t.Sl=function(a,b,c,d){this.Lh=a;var e=this.Ae;null!==Zn&&mo!==e&&(mo=Zn.font=e);this.Db=this.Ke=0;this.ze=this.ac=this.Oc=this.df=null;var f;if(isNaN(this.desiredSize.width)){e=this.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===no&&(g=g.trim());f=Math.max(f,oo(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=oo(e);e=Math.min(e, -a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=po(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.Db&&null!==this.Oc&&null!==this.ac&&this.overflow===qo&&(b=this.Ae,b=this.overflow===qo?ro(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,co(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.ac.length))){k=this.ac[h];for(b=Math.max(1, -a-b);oo(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Ke=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 +t.Sl=function(a,b,c,d){this.Lh=a;var e=this.Be;null!==Zn&&mo!==e&&(mo=Zn.font=e);this.Db=this.Le=0;this.Ae=this.ac=this.Pc=this.ef=null;var f;if(isNaN(this.desiredSize.width)){e=this.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===no&&(g=g.trim());f=Math.max(f,oo(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=oo(e);e=Math.min(e, +a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=po(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.Db&&null!==this.Pc&&null!==this.ac&&this.overflow===qo&&(b=this.Be,b=this.overflow===qo?ro(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,co(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.ac.length))){k=this.ac[h];for(b=Math.max(1, +a-b);oo(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Le=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 c&&1c;){var n=1;l=oo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=oo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);uo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.kd+k>a.maxLines)break}m=xo(a,g);for(l=oo(b+m);0a.maxLines))break}a.Ke=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Ke)}} -function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===Zn?8*a.length:Zn.measureText(a).width}function co(a){if(null!==a.df)return a.df;var b=a.Ae;if(null===Zn){var c=16;return a.df=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*Zn.measureText("M").width,Bo[b]=c,Co++);return a.df=c} +l=oo(l);e&&(b=b.trim());if(""!==b&&("\u00ad"===b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=oo(b),f=Math.max(f,m)),uo(a,b,n),k++,a.kd+k>a.maxLines))break}a.Le=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Le)}} +function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===Zn?8*a.length:Zn.measureText(a).width}function co(a){if(null!==a.ef)return a.ef;var b=a.Be;if(null===Zn){var c=16;return a.ef=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*Zn.measureText("M").width,Bo[b]=c,Co++);return a.ef=c} function ro(a){if(null===Zn)return 6;if(void 0!==Do[a]&&5E3>Eo)var b=Do[a];else b=Zn.measureText(so).width,Do[a]=b,Eo++;return b} -function po(a,b){var c=a.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,co(a)+d);if(0===c.length)return a.Db=0,a.kd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.kd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==wo){a.Ke=0;var k=Hb.alloc();vo(a,f,b,k);e+=k.height;Hb.free(k);a.kd+=a.Ke}else vo(a,f,b,null),e+=d,a.kd++;a.kd===a.maxLines&&(h=!0)}f=g+1}return a.xq=e} -oa.Object.defineProperties(ch.prototype,{font:{configurable:!0,get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(G&&(A(a,"string",ch,"font"),bo(a)||v('Not a valid font: "'+a+'"')),this.Ae=a,this.df=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.hc},set:function(a){var b=this.hc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.hc=a,this.w(),this.g("text",b,a))}},textAlign:{configurable:!0,get:function(){return null!== -this.ia?this.ia.Ar:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&A(a,"string",ch,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?($n(this),this.ia.Ar=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',ch,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.Yf:yg},set:function(a){var b=this.flip;b!==a&&(ab(a,O,ch,"flip"),$n(this),this.ia.Yf=a,this.R(),this.g("flip",b,a))}},verticalAlignment:{configurable:!0, +function po(a,b){var c=a.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,co(a)+d);if(0===c.length)return a.Db=0,a.kd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.kd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==wo){a.Le=0;var k=Hb.alloc();vo(a,f,b,k);e+=k.height;Hb.free(k);a.kd+=a.Le}else vo(a,f,b,null),e+=d,a.kd++;a.kd===a.maxLines&&(h=!0)}f=g+1}return a.xq=e} +oa.Object.defineProperties(ch.prototype,{font:{configurable:!0,get:function(){return this.Be},set:function(a){var b=this.Be;b!==a&&(G&&(A(a,"string",ch,"font"),bo(a)||v('Not a valid font: "'+a+'"')),this.Be=a,this.ef=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.hc},set:function(a){var b=this.hc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.hc=a,this.w(),this.g("text",b,a))}},textAlign:{configurable:!0,get:function(){return null!== +this.ia?this.ia.Ar:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&A(a,"string",ch,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?($n(this),this.ia.Ar=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',ch,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.Zf:yg},set:function(a){var b=this.flip;b!==a&&(ab(a,O,ch,"flip"),$n(this),this.ia.Zf=a,this.R(),this.g("flip",b,a))}},verticalAlignment:{configurable:!0, enumerable:!0,get:function(){return null!==this.ia?this.ia.Kr:kd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(w(a,Ib,ch,"verticalAlignment"),a.kc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),$n(this),this.ia.Kr=a,Pl(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.gc.u()){var a=Hb.alloc();vo(this,this.hc,999999,a);var b=a.width;Hb.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)|| -(b=c.width);isNaN(c.height)||(a=c.height);bc(this.gc,b,a)}return this.gc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(G&&A(a,"boolean",ch,"isMultiline"),this.m^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);b!==a&&(G&&A(a,"boolean",ch,"isUnderline"),this.m^=4194304,this.R(),this.g("isUnderline", -b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.m&8388608)},set:function(a){var b=0!==(this.m&8388608);b!==a&&(G&&A(a,"boolean",ch,"isStrikethrough"),this.m^=8388608,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.Nr:Fo},set:function(a){var b=this.wrap;b!==a&&(G&&ab(a,ch,ch,"wrap"),$n(this),this.ia.Nr=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!== -this.ia?this.ia.Lq:Go},set:function(a){var b=this.overflow;b!==a&&(G&&ab(a,ch,ch,"overflow"),$n(this),this.ia.Lq=a,this.w(),this.g("overflow",b,a))}},stroke:{configurable:!0,get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(null!==a&&dm(a,"TextBlock.stroke"),a instanceof Cl&&a.freeze(),this.Sc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.kd}},lineHeight:{configurable:!0,get:function(){return co(this)}}, -editable:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(G&&A(a,"boolean",ch,"editable"),this.m^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia?this.ia.Cr:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Me||v("TextBlock.textEditor must be an HTMLInfo."),$n(this),this.ia.Cr=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0, +(b=c.width);isNaN(c.height)||(a=c.height);bc(this.gc,b,a)}return this.gc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(G&&A(a,"boolean",ch,"isMultiline"),this.o^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);b!==a&&(G&&A(a,"boolean",ch,"isUnderline"),this.o^=4194304,this.R(),this.g("isUnderline", +b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.o&8388608)},set:function(a){var b=0!==(this.o&8388608);b!==a&&(G&&A(a,"boolean",ch,"isStrikethrough"),this.o^=8388608,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.Nr:Fo},set:function(a){var b=this.wrap;b!==a&&(G&&ab(a,ch,ch,"wrap"),$n(this),this.ia.Nr=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!== +this.ia?this.ia.Lq:Go},set:function(a){var b=this.overflow;b!==a&&(G&&ab(a,ch,ch,"overflow"),$n(this),this.ia.Lq=a,this.w(),this.g("overflow",b,a))}},stroke:{configurable:!0,get:function(){return this.Tc},set:function(a){var b=this.Tc;b!==a&&(null!==a&&dm(a,"TextBlock.stroke"),a instanceof Cl&&a.freeze(),this.Tc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.kd}},lineHeight:{configurable:!0,get:function(){return co(this)}}, +editable:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(G&&A(a,"boolean",ch,"editable"),this.o^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia?this.ia.Cr:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Me||v("TextBlock.textEditor must be an HTMLInfo."),$n(this),this.ia.Cr=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0, get:function(){return null!==this.ia?this.ia.Fd:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&A(a,"function",ch,"errorFunction"),$n(this),this.ia.Fd=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka?this.ka.Vk:1},set:function(a){var b=this.interval;G&&E(a,ch,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new Xn);this.ka.Vk=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null); this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&E(a,ch,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",ch,"maxLines"),$n(this),this.ia.vq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Oc?this.Oc:[this.Db],arrText:null!==this.ac?this.ac:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{configurable:!0,get:function(){return this.Bm},set:function(a){var b=this.Bm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",ch,"choices:value"),this.Bm=a,this.g("choices",b,a))}}}); +0>=a&&Ba(a,"> 0",ch,"maxLines"),$n(this),this.ia.vq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Pc?this.Pc:[this.Db],arrText:null!==this.ac?this.ac:[this.Ae],maxLineWidth:this.Db,fontHeight:this.ef}}},choices:{configurable:!0,get:function(){return this.Bm},set:function(a){var b=this.Bm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",ch,"choices:value"),this.Bm=a,this.g("choices",b,a))}}}); var eo=null,lo=null,wo=new F(ch,"None",0),to=new F(ch,"WrapFit",1),Fo=new F(ch,"WrapDesiredSize",2),yo=new F(ch,"WrapBreakAll",3),Go=new F(ch,"OverflowClip",0),qo=new F(ch,"OverflowEllipsis",1),no=new F(ch,"FormatTrim",0),Ao=new F(ch,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new db,Co=0,Do=new db,Eo=0,so="...",mo="",Zn=null,Yn=!1;ch.className="TextBlock"; -function ao(){this.oc=!1;this.Fd=null;this.Yf=yg;this.Wp=no;this.vq=Infinity;this.Lq=Go;this.nr=this.mr=0;this.Ar="start";this.Dj=this.Cr=this.Br=null;this.Kr=kd;this.Nr=Fo}ao.prototype.copy=function(){var a=new ao;a.Fd=this.Fd;a.Yf=this.Yf;a.Wp=this.Wp;a.vq=this.vq;a.Lq=this.Lq;a.mr=this.mr;a.nr=this.nr;a.Ar=this.Ar;a.Br=this.Br;a.Cr=this.Cr;a.Dj=this.Dj;a.Kr=this.Kr;a.Nr=this.Nr;return a};ch.getEllipsis=function(){return so};ch.setEllipsis=function(a){so=a;Do=new db;Eo=0};ch.getBaseline=function(){return eo}; -ch.setBaseline=function(a){eo=a};ch.getUnderline=function(){return lo};ch.setUnderline=function(a){lo=a};ch.isValidFont=bo;ch.FormatNone=Ao;ch.FormatTrim=no;ch.None=wo;ch.OverflowClip=Go;ch.OverflowEllipsis=qo;ch.WrapBreakAll=yo;ch.WrapDesiredSize=Fo;ch.WrapFit=to;function Xn(){this.Vk=1;this.v=0;this.j=1;this.o=this.G=null}Xn.prototype.copy=function(){var a=new Xn;a.Vk=this.Vk;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};Xn.className="GradElementSettings"; -function kk(a,b){O.call(this);this.Gg=null;this.fo="";this.Yg=qc;this.Pk=Bd;this.$g=this.Fd=null;this.Ok=Kc;this.Yf=yg;this.xl=null;this.jn=!1;this.Gh=!0;this.cl=!1;this.tl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;na(kk,O);kk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.Gg;a.fo=this.fo;a.Yg=this.Yg.M();a.Pk=this.Pk;a.Yf=this.Yf;a.Fd=this.Fd;a.$g=this.$g;a.Ok=this.Ok.M();a.Gh=this.Gh;a.tl=this.tl}; +function ao(){this.oc=!1;this.Fd=null;this.Zf=yg;this.Wp=no;this.vq=Infinity;this.Lq=Go;this.nr=this.mr=0;this.Ar="start";this.Dj=this.Cr=this.Br=null;this.Kr=kd;this.Nr=Fo}ao.prototype.copy=function(){var a=new ao;a.Fd=this.Fd;a.Zf=this.Zf;a.Wp=this.Wp;a.vq=this.vq;a.Lq=this.Lq;a.mr=this.mr;a.nr=this.nr;a.Ar=this.Ar;a.Br=this.Br;a.Cr=this.Cr;a.Dj=this.Dj;a.Kr=this.Kr;a.Nr=this.Nr;return a};ch.getEllipsis=function(){return so};ch.setEllipsis=function(a){so=a;Do=new db;Eo=0};ch.getBaseline=function(){return eo}; +ch.setBaseline=function(a){eo=a};ch.getUnderline=function(){return lo};ch.setUnderline=function(a){lo=a};ch.isValidFont=bo;ch.FormatNone=Ao;ch.FormatTrim=no;ch.None=wo;ch.OverflowClip=Go;ch.OverflowEllipsis=qo;ch.WrapBreakAll=yo;ch.WrapDesiredSize=Fo;ch.WrapFit=to;function Xn(){this.Vk=1;this.v=0;this.j=1;this.m=this.G=null}Xn.prototype.copy=function(){var a=new Xn;a.Vk=this.Vk;a.v=this.v;a.j=this.j;a.G=this.G;a.m=this.m;return a};Xn.className="GradElementSettings"; +function kk(a,b){O.call(this);this.Hg=null;this.fo="";this.Yg=qc;this.Pk=Bd;this.$g=this.Fd=null;this.Ok=Kc;this.Zf=yg;this.xl=null;this.jn=!1;this.Gh=!0;this.cl=!1;this.tl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;na(kk,O);kk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.Hg;a.fo=this.fo;a.Yg=this.Yg.M();a.Pk=this.Pk;a.Zf=this.Zf;a.Fd=this.Fd;a.$g=this.$g;a.Ok=this.Ok.M();a.Gh=this.Gh;a.tl=this.tl}; kk.prototype.ub=function(a){a===yg||a===Ag||a===ml?this.imageStretch=a:O.prototype.ub.call(this,a)};kk.prototype.toString=function(){return"Picture("+this.source+")#"+lb(this)};function Oi(a){void 0===a&&(a="");A(a,"string",kk,"clearCache:url");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new db,Io=0)} -function Jo(a,b){b.ny||(b.sq=function(c){b.hq=!0;b.dn=!1;var d=b.Dg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src")||"";var g=e.Qg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case Bd:m=d.width;n=d.height;break;case Ag:case ml:p===Ag?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===ml&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ -d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Ff()*b.scale;var q=m*p*n*p,u=h*g/q,x=c.__goCache;p=null;var y=Ko;if(c.hq&&void 0!==x&&4y*y)for(null===x.ki&&(Lo(x,4,k,l,c),Lo(x,16,k,l,c)),k=x.ki,l=k.length,q=0;qy*y)for(null===x.ki&&(Lo(x,4,k,l,c),Lo(x,16,k,l,c)),k=x.ki,l=k.length,q=0;qa)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Of[d];if(void 0!==e)return e;var f=a*L.yg;e=(new N).add((new je(a,0,!0)).add(new ke(Dd,b-a,0)).add(new ke(Xd,b,a,b-f,0,b,f)).add(new ke(Dd,b,c-a)).add(new ke(Xd,b-a,c,b,c-f,b-f,c)).add(new ke(Dd,a,c)).add(new ke(Xd,0,c-a,f,c,0,c-f)).add(new ke(Dd,0,a)).add((new ke(Xd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Pf[d];if(void 0!==e)return e;var f=a*L.zg;e=(new N).add((new je(a,0,!0)).add(new ke(Dd,b-a,0)).add(new ke(Xd,b,a,b-f,0,b,f)).add(new ke(Dd,b,c-a)).add(new ke(Xd,b-a,c,b,c-f,b-f,c)).add(new ke(Dd,a,c)).add(new ke(Xd,0,c-a,f,c,0,c-f)).add(new ke(Dd,0,a)).add((new ke(Xd,a,0,0,f,f,0)).close()));1e.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new I;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ue=!1}}; +t.xz=function(a){void 0===a&&(a=Infinity);A(a,"number",T,"findTreeParts:level");var b=new I;gl(b,this,!1,a,!0);return b};T.prototype.collapseTree=function(a){void 0===a&&(a=1);E(a,T,"collapseTree:level");1>a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ve){b.Ve=!0;var c=new I;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ve=!1}}; function wp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new I;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ue=!1}}; +T.prototype.expandTree=function(a){void 0===a&&(a=2);E(a,T,"expandTree:level");2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ve){b.Ve=!0;var c=new I;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ve=!1}}; function yp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Do():a.Qd();k.next();){var l=k.value;l.isTreeLink&&(h||l.Dd||l.gb(),l=l.Io(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Zb(!0),l.oh(),g&&e.Kj(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, a.h(b.x,b.y,0,0));return a};oa.Object.defineProperties(wg.prototype,{padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,wg,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.g("padding",b,a),this.w())}}});wg.className="Placeholder"; -function R(a){S.call(this,V.Link);this.Ta=8;this.ef=null;this.ff="";this.uf=this.$m=null;this.vf="";this.ko=null;this.rk=mg;this.Jm=0;this.Lm=mg;this.Mm=NaN;this.xj=Dp;this.eo=.5;this.xd=null;this.Ob=(new H).freeze();this.rf=this.Rc=null;this.ol=new M;this.ya=new N;this.v=this.o=this.Tf=this.Xf=null;this.ku=new K;this.Tp=this.Ew=this.Dw=null;this.kt=NaN;this.da=null;this.j=[];a&&Object.assign(this,a)}na(R,S); -R.prototype.cloneProtected=function(a){S.prototype.cloneProtected.call(this,a);a.Ta=this.Ta&-113;a.ff=this.ff;a.$m=this.$m;a.vf=this.vf;a.ko=this.ko;a.rk=this.rk;a.Jm=this.Jm;a.Lm=this.Lm;a.Mm=this.Mm;a.xj=this.xj;a.eo=this.eo;null!==this.da&&(a.da=this.da.copy())};t=R.prototype;t.Bf=function(a){S.prototype.Bf.call(this,a);this.ff=a.ff;this.vf=a.vf;a.Rc=null;a.gb();a.Tf=this.Tf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; -t.ub=function(a){a.classType===R?2===(a.value&2)?this.routing=a:a===pg||a===lg||a===kg?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==mg&&v("Unknown Link enum value for a Link property: "+a):S.prototype.ub.call(this,a)};t.Xc=function(){null===this.da&&(this.da=new sl)};t.Ai=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Cj(a)||Dj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Cj(a)||Dj(a))?!1:!0};t.tv=function(){return!1}; +function R(a){S.call(this,V.Link);this.Ta=8;this.ff=null;this.gf="";this.vf=this.$m=null;this.wf="";this.ko=null;this.rk=mg;this.Jm=0;this.Lm=mg;this.Mm=NaN;this.xj=Dp;this.eo=.5;this.xd=null;this.Ob=(new H).freeze();this.sf=this.Sc=null;this.ol=new M;this.ya=new N;this.v=this.m=this.Uf=this.Yf=null;this.ku=new K;this.Tp=this.Ew=this.Dw=null;this.kt=NaN;this.ea=null;this.j=[];a&&Object.assign(this,a)}na(R,S); +R.prototype.cloneProtected=function(a){S.prototype.cloneProtected.call(this,a);a.Ta=this.Ta&-113;a.gf=this.gf;a.$m=this.$m;a.wf=this.wf;a.ko=this.ko;a.rk=this.rk;a.Jm=this.Jm;a.Lm=this.Lm;a.Mm=this.Mm;a.xj=this.xj;a.eo=this.eo;null!==this.ea&&(a.ea=this.ea.copy())};t=R.prototype;t.Cf=function(a){S.prototype.Cf.call(this,a);this.gf=a.gf;this.wf=a.wf;a.Sc=null;a.gb();a.Uf=this.Uf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; +t.ub=function(a){a.classType===R?2===(a.value&2)?this.routing=a:a===pg||a===lg||a===kg?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==mg&&v("Unknown Link enum value for a Link property: "+a):S.prototype.ub.call(this,a)};t.Xc=function(){null===this.ea&&(this.ea=new sl)};t.Ai=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Cj(a)||Dj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Cj(a)||Dj(a))?!1:!0};t.tv=function(){return!1}; t.As=function(){};t.Zc=function(){return!1};R.prototype.computeAngle=function(a,b,c){return R.computeAngle(b,c)};R.computeAngle=function(a,b){switch(a){default:case mg:a=0;break;case jn:a=b;break;case bn:a=b+90;break;case dn:a=b-90;break;case Hp:a=b+180;break;case kn:a=L.Ro(b);90a&&(a-=180);break;case cn:a=L.Ro(b+90);90a&&(a-=180);break;case en:a=L.Ro(b-90);90a&&(a-=180);break;case fn:a=L.Ro(b);if(45a||225a)return 0;90a&&(a-=180)}return L.Ro(a)}; -function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.ix(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.ca,g.ca=!0);e(a,c,b);null!==g&&(g.ca=f)}!a.Dd||a.Dw!==c&&a.Ew!==c||a.gb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=R.prototype; +function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.jx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.ca,g.ca=!0);e(a,c,b);null!==g&&(g.ca=f)}!a.Dd||a.Dw!==c&&a.Ew!==c||a.gb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=R.prototype; t.oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&S.prototype.oh.call(this)};t.Io=function(a){G&&w(a,T,R,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Dz=function(a){G&&w(a,O,R,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function tp(a,b){null===a.xd&&(a.xd=new I);a.xd.add(b);a.w()} -t.Ko=function(a){S.prototype.Ko.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Lo=function(a){S.prototype.Lo.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; +t.Ko=function(a){S.prototype.Ko.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ff;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.vf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Lo=function(a){S.prototype.Lo.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ff;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.vf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; t.Sj=function(){this.Dd=!0;if(null!==this.xd){var a=this.diagram;if(null!==a)for(var b=this.xd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};R.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; R.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?S.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),S.prototype.move.call(this,a,!1),K.free(a));rf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; R.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};R.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; -R.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(Db),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.Qu(.5,a),a.add(this.i(0)),c=this.ya.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===pg){if(3===b)return this.i(1);d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);var e=this.i(c+1), -f=this.i(c+2);c=this.i(c+3);L.Ky(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a}; -R.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).cb(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.ox(.5);if(this.computeCurve()===pg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.Jy(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0c/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- +b.y)));return a}; +R.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).cb(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.px(.5);if(this.computeCurve()===pg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.Ky(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.cb(d)};t=R.prototype;t.i=function(a){return this.Ob.s[a]}; -t.bd=function(a,b){G&&(w(b,K,R,"setPoint"),b.u()||v("Link.setPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.ad(a,b)};t.P=function(a,b,c){G&&(E(b,R,"setPointAt:x"),E(c,R,"setPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.ad(a,new K(b,c))}; -t.Mz=function(a,b){G&&(w(b,K,R,"insertPoint"),b.u()||v("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.Hb(a,b)};t.l=function(a,b,c){G&&(E(b,R,"insertPointAt:x"),E(c,R,"insertPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.Hb(a,new K(b,c))}; -t.me=function(a){G&&(w(a,K,R,"addPoint"),a.u()||v("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.add(a)};t.yf=function(a,b){G&&(E(a,R,"insertPointAt:x"),E(b,R,"insertPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.add(new K(a,b))}; -t.lv=function(a){G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.sb(a)};t.Nj=function(){G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.clear()}; -function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.Dd,e=new H,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Eb?a.w():(a.ie.h(a.ie.x+b,a.ie.y+c),a.va.h(a.va.x+b,a.va.y+c),Pl(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= -a.i(a.pointsCount-1)));null!==g&&g.animationManager.Eb&&(b=g.animationManager,a.rf=e,b.ql.add(a));a.g("points",f,e)}}t.uh=function(){null===this.Rc&&(this.Rc=this.Ob,this.Ob=this.Ob.copy())}; -t.Af=function(){if(null!==this.Rc){for(var a=this.Rc,b=this.Ob,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= -(0>k?-1:1)*n+r,x=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var y=r,z=q;L.C(k,0)?z=0k?-1:1)*n+r,z=m*(y-r)+q);this.Nj();this.me(f);this.yf(u,x);this.yf(y,z);this.me(p);this.bd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.bd(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.me(d),this.yf(f,h),this.me(e);else{this.me(d);this.me(e);h=M.alloc();b.ti(h);k=h.ea(e);p.ti(h);l=h.ea(d);if(k||l)g=b.oa(Qp(g),new K),this.bd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.oa(Qp(c),new K),this.bd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Nj();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)x=this.computeEndSegmentLength(a,b,g,!0),r= +(0>k?-1:1)*n+r,x=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var y=r,z=q;L.C(k,0)?z=0k?-1:1)*n+r,z=m*(y-r)+q);this.Nj();this.ne(f);this.zf(u,x);this.zf(y,z);this.ne(p);this.bd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.bd(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ne(d),this.zf(f,h),this.ne(e);else{this.ne(d);this.ne(e);h=M.alloc();b.ti(h);k=h.ga(e);p.ti(h);l=h.ga(d);if(k||l)g=b.oa(Qp(g),new K),this.bd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.oa(Qp(c),new K),this.bd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Nj();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)x=this.computeEndSegmentLength(a,b,g,!0),r= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(x+=Math.abs(B)*(m?1:2)),0===r?q=x:90===r?u=x:180===r?q=-x:270===r?u=-x:(q=x*Math.cos(r*Math.PI/180),u=x*Math.sin(r*Math.PI/180)),g.kc()&&l&&(x=b.oa(Kc,K.alloc()),y=K.allocAt(x.x+1E3*q,x.y+1E3*u),this.getLinkPointFromPoint(a,b,x,y,!0,n),K.free(x),K.free(y));x=this.getLinkPoint(d,e,c,!1,m,a,b);var C=z=y=0;if(m||!k||l){var D=this.computeEndSegmentLength(d,e, c,!1);C=this.getLinkDirection(d,e,x,c,!1,m,a,b);l&&(k||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(C+=m?0:30,0>B&&(C+=180));0>C?C+=360:360<=C&&(C-=360);l&&(D+=Math.abs(B)*(m?1:2));0===C?y=D:90===C?z=D:180===C?y=-D:270===C?z=-D:(y=D*Math.cos(C*Math.PI/180),z=D*Math.sin(C*Math.PI/180));c.kc()&&l&&(c=e.oa(Kc,K.alloc()),g=K.allocAt(c.x+1E3*y,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,x),K.free(c),K.free(g))}c=n;if(m||!h||l)c=new K(n.x+q,n.y+u);g=x;if(m||!k||l)g=new K(x.x+y,x.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} -R.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.re()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.ne;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Xj(e,d,g,c,f);null!== +n,f-2,g)?this.bd(f-1,x):!p&&!m&&k&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +R.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.se()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.oe;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Xj(e,d,g,c,f);null!== a&&f.transform(a);return f};function Sp(a,b){var c=b.Tn;null===c&&(c=new Tp,c.port=b,c.node=b.part,b.Tn=c);return Up(c,a)} -R.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!Pp(c))return b.oa(c,h),h;if(c.$c()){var k=Sp(this,b);if(null!==k){h.assign(k.Po);if(e&&this.routing===Vp){var l=Sp(this,g);if(null!==l&&k.Hl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.If(Qc)||c.If(Tc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= +R.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!Pp(c))return b.oa(c,h),h;if(c.$c()){var k=Sp(this,b);if(null!==k){h.assign(k.Po);if(e&&this.routing===Vp){var l=Sp(this,g);if(null!==l&&k.Hl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Jf(Qc)||c.Jf(Tc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= b.oa(Qp(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=Rp(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.oa(Qp(k),f),e&&(g=Rp(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; -R.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Rp(k,h.copy()):c):(c=K.alloc(),h=h.oa(Kc,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +R.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Rp(k,h.copy()):c):(c=K.alloc(),h=h.oa(Kc,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}d.kc()&&g.Sd(a)&&(k+=180,360<=k&&(k-=360));if(Pp(d))return k;a=b.si();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};R.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.$c()&&(a=Sp(this,b),null!==a))return a.Iu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; R.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Kc:(b=this.fromSpot,b.Rb()&&(b=a.fromSpot),a=b===hd?Ec:b)):(a=b?b:this.toPort,null===a?a=Kc:(b=this.toSpot,b.Rb()&&(b=a.toSpot),a=b===hd?Ec:b));return a};function Pp(a){return a===Ec||.5===a.x&&.5===a.y}function Qp(a){return.5===a.x&&.5===a.y?a:Kc} R.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==mg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Jb.alloc();n.set(g); -if(m instanceof V)h=m.Ef(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Qf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.hh(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Qe(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var x=K.alloc(),y=K.alloc(),z=K.alloc(),B=Jb.alloc();B.set(q);B.bv(m.transform);B.gs();y.x=p;y.y=u;y.transform(B);x.x=h;x.y=u;x.transform(B);q=!1;Tn(m,x,y,z)?q=!0:(x.x=p,x.y=r,x.transform(B),Tn(m,x,y,z)?q=!0:(y.x= +R.prototype.Ff=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Jb.alloc(),g.reset());g.multiply(this.transform);if(this.hh(a,g))return un(this,b,c,e),void 0===f&&Jb.free(g),!0;if(this.Yc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.U.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Jb.alloc();n.set(g); +if(m instanceof V)h=m.Ff(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Qf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.hh(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Re(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var x=K.alloc(),y=K.alloc(),z=K.alloc(),B=Jb.alloc();B.set(q);B.bv(m.transform);B.gs();y.x=p;y.y=u;y.transform(B);x.x=h;x.y=u;x.transform(B);q=!1;Tn(m,x,y,z)?q=!0:(x.x=p,x.y=r,x.transform(B),Tn(m,x,y,z)?q=!0:(y.x= h,y.y=r,y.transform(B),Tn(m,x,y,z)?q=!0:(x.x=h,x.y=u,x.transform(B),Tn(m,x,y,z)&&(q=!0))));Jb.free(B);K.free(x);K.free(y);K.free(z);h=q}}else h=m.hh(h,n)}else h=wl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Jb.free(n)}}}void 0===f&&Jb.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Jb.free(g);return!1}; -R.prototype.computeCurve=function(){if(null===this.Xf){var a=this.fromPort,b=this.isOrthogonal;this.Xf=null!==a&&a===this.toPort&&!b}return this.Xf?pg:this.curve};R.prototype.computeCorner=function(){if(this.curve===pg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; +R.prototype.computeCurve=function(){if(null===this.Yf){var a=this.fromPort,b=this.isOrthogonal;this.Yf=null!==a&&a===this.toPort&&!b}return this.Yf?pg:this.curve};R.prototype.computeCorner=function(){if(this.curve===pg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; R.prototype.findMidLabel=function(){for(var a=this.path,b=this.U.s,c=b.length,d=0;dk?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);L.ha(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.bd(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.P(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.bd(c,d)}}return!0;case Gp:f=this.i(a);n=this.i(c);if(!f.fb(b)||!n.fb(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.bd(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.u()&&k.u()){h.Wc(Yp,Yp);k.Wc(Yp,Yp);h.Ye(a);k.Ye(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, -a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ea(a)||h.ea(c))? +R.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.u()&&k.u()){h.Bc(Yp,Yp);k.Bc(Yp,Yp);h.Ze(a);k.Ze(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ga(a)||h.ga(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left,m.x=l.x, -m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.ea(a)||h.ea(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x= +m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.ga(a)||h.ga(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x= c.x,m.y=l.y;if(l.y>h.top&&l.y=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l.h(Math.min((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l.h(a.x,c.y),m.h((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.x,a.y,c.x, -c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.ea(a)||h.ea(c))?l.x=this.computeMidOrthoPosition(a.x, +c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.ga(a)||h.ga(c))?l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1):c.xa.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ea(a)||h.ea(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(wk(r),h.Wc(r.xo*r.Cx,r.wo*r.Ex),Zp(r,a,b,n,d,h,!1),k=$p(r, +(l.x=a.xh.right)90===d&&(k.ga(a)||h.ga(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(wk(r),h.Bc(r.xo*r.Ex,r.wo*r.Fx),Zp(r,a,b,n,d,h,!1),k=$p(r, n.x,n.y));if(!r.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.P(2,h.x,h.y),this.l(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)L.C(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.P(2,h,a.y),this.P(3,h,g.y)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=r.wo/2&&(this.P(2,h.x,a.y),this.P(3,g.x,a.y)),this.l(2,h.x,a.y)):this.P(2,a.x,h.y);else if(90===b||270===b)L.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): -Math.min(h.y,a.y),this.P(2,a.x,h),this.P(3,g.x,h)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=r.xo/2&&(this.P(2,a.x,h.y),this.P(3,a.x,g.y)),this.l(2,a.x,h.y)):this.P(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.yf(f.x,q.y):this.yf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.me(l.copy()),this.me(m.copy()));K.free(l);K.free(m)}}; +Math.min(h.y,a.y),this.P(2,a.x,h),this.P(3,g.x,h)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=r.xo/2&&(this.P(2,a.x,h.y),this.P(3,a.x,g.y)),this.l(2,a.x,h.y)):this.P(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.zf(f.x,q.y):this.zf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ne(l.copy()),this.ne(m.copy()));K.free(l);K.free(m)}}; R.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function Zj(a){if(null===a.diagram||!a.isAvoiding||!rk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=sk(a.diagram,!0,a.containingGroup,null);for(var d=1;dcq&&$p(b,m,n)!==l-1&&($p(b,c-h,d)===l-1?(e=180,m=c-h,n=d):$p(b,c+h,d)===l-1?(e=0,m=c+h,n=d):$p(b,c,d-k)===l-1?(e=270,m=c,n=d-k):$p(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>cq&&$p(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>cq)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ -k)*k+k/2;l>cq&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),$p(b,g,m)===l-1?bq(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.yf(c,d)} +k)*k+k/2;l>cq&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),$p(b,g,m)===l-1?bq(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.zf(c,d)} R.prototype.fz=function(a){G&&w(a,K,R,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=Lb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=N.j,this.mm=!0,a;var c=!1,d=this.diagram;null!==d&&Ip(this)&&d.Eh.contains(this)&&(0!==this.ol.width||0!==this.ol.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Ob.s;var g=this.computeCurve();if(g===pg&&3<=b&&!L.ha(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kx?q>r?(f.x= y-B,f.y=r-B,e.x=y+u,e.y=r+u):(f.x=y-B,f.y=r+B,e.x=y+u,e.y=r-u):q>r?(f.x=y+B,f.y=r-B,e.x=y-u,e.y=r+u):(f.x=y+B,f.y=r+B,e.x=y-u,e.y=r-u));L.ha(x,y)&&L.ha(r,q)&&(r>p?(z>y?(f.x=y-B,f.y=r-B,e.x=y+u):(f.x=y+B,f.y=r-B,e.x=y-u),e.y=r+u):(z>y?(f.x=y-B,f.y=r+B,e.x=y+u):(f.x=y+B,f.y=r+B,e.x=y-u),e.y=r-u));if(L.ha(x,y)&&L.ha(y,z)||L.ha(p,r)&&L.ha(r,q))x=.5*(x+z),p=.5*(p+q),f.x=x,f.y=p,e.x=x,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&L.ha(g.x,this.i(0).x)&&L.ha(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x), c.y=.5*(g.y+l.y));Ld(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,zb));l=.5*(l+m.x);g=.5*(g+m.y);Ld(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);K.free(b);K.free(c);K.free(f);K.free(e)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=dq(this,g.copy(),!1,zb)),Ld(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0)); @@ -1699,44 +1701,44 @@ function eq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ha(b.x,f.x)&&L.ha(b.y,f.y);){ function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===lg?Kd(b,n,r,!1):Ld(b,p,m,n,m,n,r)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===lg?Kd(b,r,m,!1):Ld(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function hq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ra.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,x)n&&!L.C(g,x)){h.x=q;h.y=n;m=!0;break a}}else if(!L.C(n,r)&& L.C(g,x)&&Math.min(n,r)g&&Math.min(q,u)m&&!L.C(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}K.free(h)}function Ip(a){a=a.curve;return a===kg||a===lg}function Mp(a,b){if(b||Ip(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Eh.contains(a)||0===a.ol.width&&0===a.ol.height||b.Eh.add(a,a.ol.copy())} R.prototype.Mo=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ra.s;for(var g=e.length,h=0;ha&&Ba(a,">= 0",R,"fromEndSegmentLength"),this.Xc(),this.da.aj=a,this.g("fromEndSegmentLength",b,a),this.gb())}},fromShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.bj:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&A(a,"number",R,"fromShortLength"), -this.Xc(),this.da.bj=a,this.sc(!0),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.da?this.da.Gj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,R,"toSpot"),a=a.M(),this.Xc(),this.da.Gj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&&pp(this.toPort),this.gb())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.Ej:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&& -A(a,"number",R,"toEndSegmentLength"),0>a&&Ba(a,">= 0",R,"toEndSegmentLength"),this.Xc(),this.da.Ej=a,this.g("toEndSegmentLength",b,a),this.gb())}},toShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.Fj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",R,"toShortLength"),this.Xc(),this.da.Fj=a,this.sc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.xd?!1:0a&&Ba(a,">= 0",R,"fromEndSegmentLength"),this.Xc(),this.ea.aj=a,this.g("fromEndSegmentLength",b,a),this.gb())}},fromShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.bj:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&A(a,"number",R,"fromShortLength"), +this.Xc(),this.ea.bj=a,this.sc(!0),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,R,"toSpot"),a=a.M(),this.Xc(),this.ea.Gj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&&pp(this.toPort),this.gb())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Ej:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&& +A(a,"number",R,"toEndSegmentLength"),0>a&&Ba(a,">= 0",R,"toEndSegmentLength"),this.Xc(),this.ea.Ej=a,this.g("toEndSegmentLength",b,a),this.gb())}},toShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",R,"toShortLength"),this.Xc(),this.ea.Fj=a,this.sc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.xd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ye(f),e=2;ed&&(d=-d)):L.ha(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Cf(e)); +enumerable:!0,get:function(){var a=this.Ab();return a instanceof Qf?a:null}},routeBounds:{configurable:!0,get:function(){this.yg();var a=this.ol,b=Infinity,c=Infinity,d=this.pointsCount;if(0===d)a.h(NaN,NaN,0,0);else{if(1===d)d=this.i(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.h(d.x,d.y,0,0);else if(2===d){d=this.i(0);var e=this.i(1);b=Math.min(d.x,e.x);c=Math.min(d.y,e.y);a.h(d.x,d.y,0,0);a.Ze(e)}else if(this.computeCurve()===pg&&3<=d&&!this.isOrthogonal)if(e=this.i(0),b=e.x,c=e.y,a.h(b, +c,0,0),3===d){d=this.i(1);b=Math.min(d.x,b);c=Math.min(d.y,c);var f=this.i(2);b=Math.min(f.x,b);c=Math.min(f.y,c);L.Dl(e.x,e.y,d.x,d.y,d.x,d.y,f.x,f.y,.5,a)}else for(f=3;f=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ze(f),e=2;ed&&(d=-d)):L.ha(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Df(e)); a.push(d)}}return this.Tp}},flattenedTotalLength:{configurable:!0,get:function(){var a=this.kt;if(isNaN(a)){for(var b=this.flattenedLengths,c=b.length,d=a=0;d=this.pointsCount?0:this.isOrthogonal||!Pp(this.computeSpot(!0))?1:0}}, +a);c.freeze();this.Ob=c;this.sc(!0);Lp(this);a=this.diagram;null!==a&&(a.xi||a.undoManager.isUndoingRedoing||a.ns.add(this),a.animationManager.Eb&&(a=a.animationManager,this.sf=c,a.ql.add(this)));this.g("points",b,c)}}},pointsCount:{configurable:!0,get:function(){return this.Ob.count}},Dd:{configurable:!0,get:function(){return 0!==(this.Ta&16)},set:function(a){0!==(this.Ta&16)!==a&&(this.Ta^=16)}},suspendsRouting:{configurable:!0,get:function(){return 0!== +(this.Ta&32)},set:function(a){0!==(this.Ta&32)!==a&&(this.Ta^=32)}},computingPoints:{configurable:!0,get:function(){return 0!==(this.Ta&64)},set:function(a){0!==(this.Ta&64)!==a&&(this.Ta^=64)}},defaultFromPoint:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a.copy()}},defaultToPoint:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a.copy()}},isOrthogonal:{configurable:!0,get:function(){return 2=== +(this.xj.value&2)}},isAvoiding:{configurable:!0,get:function(){return 4===(this.xj.value&4)}},mm:{configurable:!0,get:function(){return 0!==(this.Ta&128)},set:function(a){0!==(this.Ta&128)!==a&&(this.Ta^=128)}},geometry:{configurable:!0,get:function(){this.mm||(this.yg(),this.ya=this.makeGeometry());return this.ya}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Pp(this.computeSpot(!0))?1:0}}, lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!Pp(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.rk},set:function(a){var b=this.rk;b!==a&&(G&&a!==mg&&a!==Ep&&a!==Fp&&a!==Gp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.rk=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.Jm}, set:function(a){var b=this.Jm;b!==a&&(G&&A(a,"number",R,"corner"),this.Jm=a,this.sc(!0),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.Lm},set:function(a){var b=this.Lm;b!==a&&(G&&a!==mg&&a!==pg&&a!==lg&&a!==kg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.Lm=a,this.gb(),this.sc(!0),Mp(this,b===lg||b===kg||a===lg||a===kg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.Mm}, -set:function(a){var b=this.Mm;b!==a&&(G&&A(a,"number",R,"curviness"),this.Mm=a,this.gb(),this.sc(!1),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.xj},set:function(a){var b=this.xj;b!==a&&(G&&a!==Dp&&a!==lq&&a!==mq&&a!==Vp&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.xj=a,this.Xf=null,this.gb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, -get:function(){return this.eo},set:function(a){var b=this.eo;b!==a&&(G&&A(a,"number",R,"smoothness"),this.eo=a,this.sc(!0),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.yi())return a.model.Ac(this.data)}}});R.prototype.invalidateOtherJumpOvers=R.prototype.Mo;R.prototype.findClosestSegment=R.prototype.fz;R.prototype.updateRoute=R.prototype.xg;R.prototype.invalidateRoute=R.prototype.gb;R.prototype.rollbackRoute=R.prototype.nv; -R.prototype.commitRoute=R.prototype.Af;R.prototype.startRoute=R.prototype.uh;R.prototype.clearPoints=R.prototype.Nj;R.prototype.removePoint=R.prototype.lv;R.prototype.addPointAt=R.prototype.yf;R.prototype.addPoint=R.prototype.me;R.prototype.insertPointAt=R.prototype.l;R.prototype.insertPoint=R.prototype.Mz;R.prototype.setPointAt=R.prototype.P;R.prototype.setPoint=R.prototype.bd;R.prototype.getPoint=R.prototype.i;R.prototype.getOtherPort=R.prototype.Dz;R.prototype.getOtherNode=R.prototype.Io; +set:function(a){var b=this.Mm;b!==a&&(G&&A(a,"number",R,"curviness"),this.Mm=a,this.gb(),this.sc(!1),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.xj},set:function(a){var b=this.xj;b!==a&&(G&&a!==Dp&&a!==lq&&a!==mq&&a!==Vp&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.xj=a,this.Yf=null,this.gb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, +get:function(){return this.eo},set:function(a){var b=this.eo;b!==a&&(G&&A(a,"number",R,"smoothness"),this.eo=a,this.sc(!0),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.yi())return a.model.Ac(this.data)}}});R.prototype.invalidateOtherJumpOvers=R.prototype.Mo;R.prototype.findClosestSegment=R.prototype.fz;R.prototype.updateRoute=R.prototype.yg;R.prototype.invalidateRoute=R.prototype.gb;R.prototype.rollbackRoute=R.prototype.nv; +R.prototype.commitRoute=R.prototype.Bf;R.prototype.startRoute=R.prototype.uh;R.prototype.clearPoints=R.prototype.Nj;R.prototype.removePoint=R.prototype.lv;R.prototype.addPointAt=R.prototype.zf;R.prototype.addPoint=R.prototype.ne;R.prototype.insertPointAt=R.prototype.l;R.prototype.insertPoint=R.prototype.Mz;R.prototype.setPointAt=R.prototype.P;R.prototype.setPoint=R.prototype.bd;R.prototype.getPoint=R.prototype.i;R.prototype.getOtherPort=R.prototype.Dz;R.prototype.getOtherNode=R.prototype.Io; var Np=null,Op=null,Dp=new F(R,"Normal",1),lq=new F(R,"Orthogonal",2),mq=new F(R,"AvoidsNodes",6),Vp=new F(R,"AvoidsNodesStraight",7),mg=new F(R,"None",0),pg=new F(R,"Bezier",9),lg=new F(R,"JumpGap",10),kg=new F(R,"JumpOver",11),Ep=new F(R,"End",17),Fp=new F(R,"Scale",18),Gp=new F(R,"Stretch",19),jn=new F(R,"OrientAlong",21),bn=new F(R,"OrientPlus90",22),dn=new F(R,"OrientMinus90",23),Hp=new F(R,"OrientOpposite",24),kn=new F(R,"OrientUpright",25),cn=new F(R,"OrientPlus90Upright",26),en=new F(R,"OrientMinus90Upright", 27),fn=new F(R,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;R.className="Link";R.Normal=Dp;R.Orthogonal=lq;R.AvoidsNodes=mq;R.AvoidsNodesStraight=Vp;R.None=mg;R.Bezier=pg;R.JumpGap=lg;R.JumpOver=kg;R.End=Ep;R.Scale=Fp;R.Stretch=Gp;R.OrientAlong=jn;R.OrientPlus90=bn;R.OrientMinus90=dn;R.OrientOpposite=Hp;R.OrientUpright=kn;R.OrientPlus90Upright=cn;R.OrientMinus90Upright=en;R.OrientUpright45=fn;R.EndSegmentStep=8;R.CurvinessStart=Xp;R.SpacingMin=Wp;R.OrthoShortCut=Yp; -function kq(a,b,c,d){Za(this);this.De=this.fq=!1;this.qs=a;this.Lx=b;this.cv=c;this.Mx=d;this.links=[]}kq.prototype.Ol=function(){if(!this.fq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Kd=Math.floor((a.x-this.tc)/this.tc)*this.tc;this.Ld=Math.floor((b-this.uc)/this.uc)*this.uc;this.xn=Math.ceil((c+2*this.tc)/this.tc)*this.tc;this.yn=Math.ceil((d+2*this.uc)/this.uc)*this.uc;a=1+(Math.ceil((this.xn-this.Kd)/this.tc)|0);b=1+(Math.ceil((this.yn-this.Ld)/this.uc)|0);if(null===this.bc||this.hi=cq&&(c[d]=nq)} tk.prototype.ak=function(a,b,c,d){if(a>this.xn||a+cthis.yn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.hi)|0;for(c=Math.min(b+e-1,this.ii)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===yk)return!1}return!0}; @@ -1748,72 +1750,72 @@ a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:be)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===sq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==sq){g.push(k);g.push(l);if(rq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=sq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} oa.Object.defineProperties(tk.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Kd,this.Ld,this.xn-this.Kd,this.yn-this.Ld)}},xo:{configurable:!0,get:function(){return this.tc},set:function(a){0=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> -a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Tp.prototype.Ol=function(){this.oe.length=0}; -function Up(a,b){var c=a.oe;if(0===c.length){a:if(!a.Qo){c=a.Qo;a.Qo=!0;var d=null,e=a.node,f=e instanceof wf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.jx();else{if(!f.actualBounds.u()){a.Qo=c;break a}d=f;g=d.Ku()}f=a.oe.length=0;var h=a.port.oa(Fc,K.alloc()),k=a.port.oa(Oc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.Ye(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.si();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& -l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Sd(d),n=l.computeSpot(m,a.port);if(n.$c()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.cb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=tq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.oe[f];void 0===r?(r=new uq(l,p,n),a.oe[f]=r):(r.link=l,r.angle=p,r.Lc= -n);r.ev.set(m);f++}}}}K.free(h);a.oe.sort(Tp.prototype.j);k=a.oe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(B)?(z=Math.abs(B)/r,r=Math.abs(B)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(B)?(z=Math.abs(B)/ -m,m=Math.abs(B)):z=1}y=0}var J=C.Po;if(d===Ap){C=C.link.computeThickness();C*=z;J.set(D);switch(q){case 8:J.x=D.x+u/2+p/2-y-C/2;break;case 2:J.y=D.y+B/2+r/2-y-C/2;break;case 1:J.x=D.x+u/2-n/2+y+C/2;break;default:case 4:J.y=D.y+B/2-m/2+y+C/2}y+=C}else{var U=.5;d===lp&&(U=(C.Jo+1)/(C.Hl+1));J.x=D.x+u*U;J.y=D.y+B*U}}}K.free(h);K.free(k);K.free(g);K.free(l);D=a.oe;for(f=0;fb.Lc?1:a.angleb.angle?1:0}; -Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Ec,b.fromPort===this.port),d=a.Jo;if(0>d)return c;var e=a.Hl;if(1>=e||!b.isOrthogonal)return c;b=a.ev;var f=a.Po;if(2===a.Lc||8===a.Lc)d=e-1-d;return((a=2===a.Lc||4===a.Lc)?b.y180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Tp.prototype.Ol=function(){this.pe.length=0}; +function Up(a,b){var c=a.pe;if(0===c.length){a:if(!a.Qo){c=a.Qo;a.Qo=!0;var d=null,e=a.node,f=e instanceof wf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.kx();else{if(!f.actualBounds.u()){a.Qo=c;break a}d=f;g=d.Ku()}f=a.pe.length=0;var h=a.port.oa(Fc,K.alloc()),k=a.port.oa(Oc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.Ze(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.si();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Sd(d),n=l.computeSpot(m,a.port);if(n.$c()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.cb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=tq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.pe[f];void 0===r?(r=new uq(l,p,n),a.pe[f]=r):(r.link=l,r.angle=p,r.Mc= +n);r.ev.set(m);f++}}}}K.free(h);a.pe.sort(Tp.prototype.j);k=a.pe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(B)?(z=Math.abs(B)/r,r=Math.abs(B)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(B)?(z=Math.abs(B)/ +m,m=Math.abs(B)):z=1}y=0}var J=C.Po;if(d===Ap){C=C.link.computeThickness();C*=z;J.set(D);switch(q){case 8:J.x=D.x+u/2+p/2-y-C/2;break;case 2:J.y=D.y+B/2+r/2-y-C/2;break;case 1:J.x=D.x+u/2-n/2+y+C/2;break;default:case 4:J.y=D.y+B/2-m/2+y+C/2}y+=C}else{var U=.5;d===lp&&(U=(C.Jo+1)/(C.Hl+1));J.x=D.x+u*U;J.y=D.y+B*U}}}K.free(h);K.free(k);K.free(g);K.free(l);D=a.pe;for(f=0;fb.Mc?1:a.angleb.angle?1:0}; +Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Ec,b.fromPort===this.port),d=a.Jo;if(0>d)return c;var e=a.Hl;if(1>=e||!b.isOrthogonal)return c;b=a.ev;var f=a.Po;if(2===a.Mc||8===a.Mc)d=e-1-d;return((a=2===a.Mc||4===a.Mc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; Di.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof R)&&(xq(h),this.rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof wf&&(h.rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= 0,c=b,d+=f+20,f=0):e++}}};Di.prototype.rh=function(a){return!a.location.u()||a instanceof wf&&a.rh?!0:!1};function wq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof T?k.isLinkLabel||(k instanceof wf?null===k.layout?wq(a,b,k.memberParts,!1,e,f,g,h):(xq(k),b.add(k)):(xq(k),b.add(k))):g&&k instanceof R?b.add(k):!h||!k.Zc()||k instanceof T||(xq(k),b.add(k)))}} function xq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.eb()}Di.prototype.ui=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Di.prototype.Vw=function(a){var b=new I;a instanceof Q?(wq(this,b,a.nodes,!0,null,!0,!0,!0),wq(this,b,a.links,!0,null,!0,!0,!0),wq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof wf?wq(this,b,a.memberParts,!1,null,!0,!0,!0):wq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Di.prototype.Ww=function(a){var b=new I;a instanceof P?(wq(this,b,a.nodes,!0,null,!0,!0,!0),wq(this,b,a.links,!0,null,!0,!0,!0),wq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof wf?wq(this,b,a.memberParts,!1,null,!0,!0,!0):wq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; Di.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.oa(Fc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Di.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Di.prototype.workerLayout=function(){return!1}; -function yq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.yj&&(c.running=zq(a.yj));null!==a.og&&(c.waiting=zq(a.og));a.workerStateChanged(c,a)}}function zq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Di.prototype.Ly=function(){var a=Aq(this.constructor);a&&(null!==a.Ze&&a.Ze.terminate(),a.Ze=null,a.Ql.iteratorValues.each(function(a){a.Mr=!1;a.yj=null;a.og=null;a.wr=!1;yq(a)}),a.Ql.clear())}; -function Bq(a,b){var c=Aq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function Aq(a){var b=null;if("function"===typeof a){if(b=Cq.get(a),!b){var c=Qa(a);b=Cq.get(c);b||(b=new Dq,b.Cu=a,b.name=c,b.j=a.name,b.wx=Eq,Cq.set(c,b),Cq.set(a,b),Cq.set(a.name,b))}}else"string"===typeof a&&(b=Cq.get(a));return b} -Di.prototype.Ev=function(){if("undefined"===typeof Worker||!Fq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Mr&&(this.wr=!0,this.og=this.yj=null,yq(this)),!1;var a=Aq(this.constructor);if(null===a)return!1;null===a.Ze&&(a.Ze=new Worker(Fq),a.Ze.onerror=function(a){a.preventDefault();Fa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Ze.j=function(a){Fa("Worker serialization error: "+a)},a.Ze.onmessage= -function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)Fa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Ql.get(c.id)){a.Ql.remove(c.id);b.Mr=!1;b.yj=null;if(b.wr)b.wr=!1,b.og=null;else{var d=Gq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}yq(b,c.time);c=b.og;if(null!==c)b.og=null;else for(d=a.Ql.iteratorValues;d.next();){var e=d.value;c=e.og;if(null!==c){e.og=null;break}}null!==c&&Hq(b,c)}},a.Ze.postMessage({_GoJS:"_GoJS", -url:a.wx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Ze.postMessage({_GoJS:"_GoJS",url:b})}),a.Ze.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.yj?this.og=this.network:Hq(this,this.network);yq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Hq(a,b){a.Mr=!0;var c=Aq(a.constructor),d=Iq(a,b,!0);d._GoJS="_GoJS";c.Ze.postMessage(d);c.Ql.set(lb(a),a);a.yj=b} +function yq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.yj&&(c.running=zq(a.yj));null!==a.pg&&(c.waiting=zq(a.pg));a.workerStateChanged(c,a)}}function zq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Di.prototype.Ly=function(){var a=Aq(this.constructor);a&&(null!==a.$e&&a.$e.terminate(),a.$e=null,a.Ql.iteratorValues.each(function(a){a.Mr=!1;a.yj=null;a.pg=null;a.wr=!1;yq(a)}),a.Ql.clear())}; +function Bq(a,b){var c=Aq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function Aq(a){var b=null;if("function"===typeof a){if(b=Cq.get(a),!b){var c=Qa(a);b=Cq.get(c);b||(b=new Dq,b.Cu=a,b.name=c,b.j=a.name,b.xx=Eq,Cq.set(c,b),Cq.set(a,b),Cq.set(a.name,b))}}else"string"===typeof a&&(b=Cq.get(a));return b} +Di.prototype.Ev=function(){if("undefined"===typeof Worker||!Fq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Mr&&(this.wr=!0,this.pg=this.yj=null,yq(this)),!1;var a=Aq(this.constructor);if(null===a)return!1;null===a.$e&&(a.$e=new Worker(Fq),a.$e.onerror=function(a){a.preventDefault();Fa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.$e.j=function(a){Fa("Worker serialization error: "+a)},a.$e.onmessage= +function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&P.version&&c.version!==P.version)Fa("Failure: GoJS v"+P.version+" Worker v"+c.version);else if(b=a.Ql.get(c.id)){a.Ql.remove(c.id);b.Mr=!1;b.yj=null;if(b.wr)b.wr=!1,b.pg=null;else{var d=Gq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}yq(b,c.time);c=b.pg;if(null!==c)b.pg=null;else for(d=a.Ql.iteratorValues;d.next();){var e=d.value;c=e.pg;if(null!==c){e.pg=null;break}}null!==c&&Hq(b,c)}},a.$e.postMessage({_GoJS:"_GoJS", +url:a.xx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.$e.postMessage({_GoJS:"_GoJS",url:b})}),a.$e.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.yj?this.pg=this.network:Hq(this,this.network);yq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Hq(a,b){a.Mr=!0;var c=Aq(a.constructor),d=Iq(a,b,!0);d._GoJS="_GoJS";c.$e.postMessage(d);c.Ql.set(lb(a),a);a.yj=b} function Iq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?lb(a):a.id,layout:Qa(a.constructor),p:d,AA:e,dz:f};a.onNetworkSerialization(2,c,b,d);return d} -function Gq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.AA,g=new yb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Qb(a.key));null!==b?b=e.Lj(b):(b=e.createVertex(),e.qg(b));c&&null!==a.key&&(b.data={Kh:a.key});g.set(a.id,b)});var h=b.dz,k=new yb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Bl(f);f.link=b;c&&null!==a.key&&(f.data={Kh:a.key});k.set(a.id, +function Gq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.AA,g=new yb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Qb(a.key));null!==b?b=e.Lj(b):(b=e.createVertex(),e.rg(b));c&&null!==a.key&&(b.data={Kh:a.key});g.set(a.id,b)});var h=b.dz,k=new yb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Bl(f);f.link=b;c&&null!==a.key&&(f.data={Kh:a.key});k.set(a.id, f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.deserializeVertexProperties(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Di.prototype.onNetworkSerialization=function(){}; -oa.Object.defineProperties(Di.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&w(a,Q,Di,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&w(a,wf,Di,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.ln},set:function(a){this.ln!==a&&(A(a,"boolean",Di,"isOngoing"),this.ln=a)}},isInitial:{configurable:!0, +oa.Object.defineProperties(Di.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&w(a,P,Di,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.m},set:function(a){this.m!==a&&(null!==a&&w(a,wf,Di,"group"),this.m=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.ln},set:function(a){this.ln!==a&&(A(a,"boolean",Di,"isOngoing"),this.ln=a)}},isInitial:{configurable:!0, enumerable:!0,get:function(){return this.Ih},set:function(a){A(a,"boolean",Di,"isInitial");this.Ih=a;a||(this.qn=!0)}},isViewportSized:{configurable:!0,get:function(){return this.rn},set:function(a){this.rn!==a&&(A(a,"boolean",Di,"isViewportSized"),(this.rn=a)&&this.F())}},isRouting:{configurable:!0,get:function(){return this.on},set:function(a){this.on!==a&&(A(a,"boolean",Di,"isRouting"),this.on=a)}},isRealtime:{configurable:!0,get:function(){return this.nn}, set:function(a){this.nn!==a&&(null!==a&&A(a,"boolean",Di,"isRealtime"),this.nn=a)}},isValidLayout:{configurable:!0,get:function(){return this.qn},set:function(a){this.qn!==a&&(A(a,"boolean",Di,"isValidLayout"),this.qn=a,a||(a=this.diagram,null!==a&&(a.xh=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&w(a,vq,Di,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.zm}, set:function(a){this.zm!==a&&(null!==a&&A(a,"function",Di,"boundsComputation"),this.zm=a,this.F())}},arrangementOrigin:{configurable:!0,get:function(){return this.vm},set:function(a){w(a,K,Di,"arrangementOrigin");this.vm.D(a)||(this.vm.assign(a),this.F())}},id:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.zn},set:function(a){this.zn!==a&&(null!==a&&A(a,"function", -Di,"mayUseWorkerFunction"),this.zn=a)}},workerStateChanged:{configurable:!0,get:function(){return this.oo},set:function(a){this.oo!==a&&(null!==a&&A(a,"function",Di,"workerStateChanged"),this.oo=a)}}});Di.prototype.useWorker=Di.prototype.Ev;Di.declareWorkerLayout=Bq;Di.prototype.cancelWorker=Di.prototype.Ly;Di.prototype.collectParts=Di.prototype.Vw;Di.prototype.getLayoutBounds=Di.prototype.ui;Di.prototype.invalidateLayout=Di.prototype.F; +Di,"mayUseWorkerFunction"),this.zn=a)}},workerStateChanged:{configurable:!0,get:function(){return this.oo},set:function(a){this.oo!==a&&(null!==a&&A(a,"function",Di,"workerStateChanged"),this.oo=a)}}});Di.prototype.useWorker=Di.prototype.Ev;Di.declareWorkerLayout=Bq;Di.prototype.cancelWorker=Di.prototype.Ly;Di.prototype.collectParts=Di.prototype.Ww;Di.prototype.getLayoutBounds=Di.prototype.ui;Di.prototype.invalidateLayout=Di.prototype.F; var Cq=new yb,Eq="object"===typeof sa.document&&sa.document.currentScript?sa.document.currentScript.src:"",Fq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Di.className="Layout";Di.GoJSScriptURL=Eq;Di.declareWorkerLayout=Bq; -"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:Q.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=Aq(a.layout));var d=null;c&&c.Cu&&(d=new c.Cu);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=Gq(d,a,!0); -d.workerLayout=function(){var a=Iq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new H)}});function Dq(){this.Cu=null;this.wx=this.j=this.name="";this.scripts=[];this.Ze=null;this.Ql=new yb}function vq(a){Za(this);G&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.Pc=a;this.wf=new I;this.ye=new I;this.rs=new yb;this.ms=new yb} -vq.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new I;this.ye=new I;this.rs=new yb;this.ms=new yb}; -vq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.wf.count+" edges: "+this.ye.count;if(1=a)return b;b+=" vertexes: "+this.xf.count+" edges: "+this.ze.count;if(1b?1:0):1:null!==b?-1:0} -oa.Object.defineProperties(Jq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Cd._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.Pd._dataArray}},data:{configurable:!0,get:function(){return this.vb},set:function(a){this.vb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.Xh}, -set:function(a){if(this.Xh!==a){G&&null!==a&&w(a,T,Jq,"node");this.Xh=a;a.eb();var b=this.network.layout,c=M.alloc(),d=b.ui(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof wf)&&(a=a.locationObject.oa(Kc),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&w(a,M,Jq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, -get:function(){return this.o},set:function(a){this.o.D(a)||(G&&w(a,K,Jq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&E(a,Jq,"centerX"),b.pa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&E(a,Jq,"centerY"),b.pa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, -get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},width:{configurable:!0, +oa.Object.defineProperties(Jq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Cd._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.Pd._dataArray}},data:{configurable:!0,get:function(){return this.vb},set:function(a){this.vb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.m.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.Xh}, +set:function(a){if(this.Xh!==a){G&&null!==a&&w(a,T,Jq,"node");this.Xh=a;a.eb();var b=this.network.layout,c=M.alloc(),d=b.ui(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof wf)&&(a=a.locationObject.oa(Kc),a.u())){this.m.h(a.x-b,a.y-e);return}this.m.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&w(a,M,Jq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, +get:function(){return this.m},set:function(a){this.m.D(a)||(G&&w(a,K,Jq,"focus"),this.m.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.m.x},set:function(a){var b=this.j;b.x+this.m.x!==a&&(G&&E(a,Jq,"centerX"),b.pa(),b.x=a-this.m.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.m.y},set:function(a){var b=this.j;b.y+this.m.y!==a&&(G&&E(a,Jq,"centerY"),b.pa(),b.y=a-this.m.y,b.freeze())}},focusX:{configurable:!0, +get:function(){return this.m.x},set:function(a){var b=this.m;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.m.y},set:function(a){var b=this.m;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},width:{configurable:!0, enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.pa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.pa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.tb},set:function(a){G&&w(a,vq,Jq,"network");this.tb=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); return a.iterator}},destinationVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{configurable:!0,get:function(){return this.Cd.iterator}},destinationEdges:{configurable:!0, enumerable:!0,get:function(){return this.Pd.iterator}},edges:{configurable:!0,get:function(){for(var a=new H,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{configurable:!0,get:function(){return this.Cd.count+this.Pd.count}}});Jq.prototype.deleteDestinationEdge=Jq.prototype.Du;Jq.prototype.addDestinationEdge=Jq.prototype.tu;Jq.prototype.deleteSourceEdge=Jq.prototype.Eu; @@ -1821,86 +1823,86 @@ Jq.prototype.addSourceEdge=Jq.prototype.vu;Jq.className="LayoutVertex";Jq.standa Jq.smartComparer=function(a,b){G&&w(a,Jq,Jq,"smartComparer:m");G&&w(b,Jq,Jq,"smartComparer:n");if(null!==a){if(null!==b){a=a.Xh;var c=b.Xh;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ja("Layout");d=[];switch(this.alignment){case Zq:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= m=0;nf-1|| 0g)d.push(new M(0,u,g+h,y)),x=0,q=r,u+=y,y=0;y=Math.max(y,J);switch(p){case Yq:C=-C.width;break;default:C=0}B.moveTo(q+C,u);switch(p){case Yq:q-=D;break;default:q+=D}x++}d.push(new M(0,u,g+h,y));M.free(l);break;case Rq:k=g;m=f;n=b;p=c;g=M.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(q=0;q=l&&(k-=l);l=B=0;D=Math.max(this.cellSize.height,1);C=f=0;J=!0;x=K.alloc();for(U=0;Um-1||0k){d.push(new M(0,J?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;h=l&&(k-=l);l=B=0;D=Math.max(this.cellSize.height,1);C=f=0;J=!0;x=K.alloc();for(U=0;Um-1||0k){d.push(new M(0,J?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -oa.Object.defineProperties(al.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.qo},set:function(a){this.qo!==a&&(A(a,"number",al,"wrappingWidth"),0n)){var u=n+sn(q);q.rc(u,!0);En(q,u,n)}}b.isModified=!0}}finally{b.ca=!0}}}}};zi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Pa(a);for(b=this.nodes.iterator;b.next();)b.value.Pa(a);for(b=this.links.iterator;b.next();)b.value.Pa(a)}; -zi.prototype.hp=function(){for(var a=this.H.model,b=new I,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new cb;e.add("[");c&&1=d)return"[]";var e=new bb;e.add("[");c&&1d)return;La(a.Fc,d)}Mr(a,"nodeDataArray",te,"nodeDataArray",a,b,null,d,null);a.gp(b)}t.mA=function(a){if(Ha(a))for(var b=a.length,c=0;cd)return;La(a.Gc,d)}Mr(a,"nodeDataArray",te,"nodeDataArray",a,b,null,d,null);a.gp(b)}t.mA=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Mr(this,"",se,"",a,null,c,null,b)}; -t.kv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),E(b,X,"removeArrayItem:idx"));a===this.Fc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",te,"",a,c,null,b,null)};t.Go=function(a){if(null===a)return"";var b=this.tj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; +Fn(a,b);d!==c&&(bk(a,b,c),this.ts(a,b,d,c))};t=X.prototype;t.set=function(a,b,c){this.setDataProperty(a,b,c)};t.to=function(a,b){if(b){var c=this.hb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.zy=function(a,b){this.ds(a,-1,b)}; +t.ds=function(a,b,c){G&&(Ia(a,X,"insertArrayItem:arr"),E(b,X,"insertArrayItem:idx"),a===this.Gc&&v("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray"));0>b&&(b=a.length);Ka(a,b,c);Mr(this,"",se,"",a,null,c,null,b)}; +t.kv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),E(b,X,"removeArrayItem:idx"));a===this.Gc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",te,"",a,c,null,b,null)};t.Go=function(a){if(null===a)return"";var b=this.tj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; t.em=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.tj;if(""!==c)if(this.hb(a)){var d=Fn(a,c);void 0===d&&(d="");d!==b&&(bk(a,c,b),Mr(this,"nodeCategory",qe,c,a,d,b))}else bk(a,c,b)}};t.gm=function(a,b){this.em(b,this.Go(a))};t.Pl=function(){return!1};t.$j=function(){return!1};t.yi=function(){return!1};t.ks=function(){return!1};t.wi=function(){return!1};function Bi(){return new X} function Gr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return Gr(a,b.constructor);return typeof b}function Jr(a){return Qr[a]?Qr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Fn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){G&&Fa("property get error: "+d.toString())}return c} function bk(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){G&&Fa("property set error: "+d.toString())}} oa.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){var b=this.Ca;b!==a&&(A(a,"string",X,"name"),this.Ca=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.Nm},set:function(a){var b=this.Nm;b!==a&&(A(a,"string",X,"dataFormat"),this.Nm=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.Jg},set:function(a){var b=this.Jg;b!==a&&(A(a,"boolean", -X,"isReadOnly"),this.Jg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(A(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Pa(a))}},undoManager:{configurable:!0,get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(w(a,ve,X,"undoManager"),null!==b&&b.Ox(this),this.o=a,null!==a&&a.Pw(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg}, +X,"isReadOnly"),this.Jg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(A(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Pa(a))}},undoManager:{configurable:!0,get:function(){return this.m},set:function(a){var b=this.m;b!==a&&(w(a,ve,X,"undoManager"),null!==b&&b.Px(this),this.m=a,null!==a&&a.Pw(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg}, set:function(a){A(a,"boolean",X,"skipsUndoManager");this.Xg=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.Yh},set:function(a){var b=this.Yh;b!==a&&(Nr(a,X,"nodeKeyProperty"),""===a&&v("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===te){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.bg.add(a),this.ld[c]!==a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)):(this.bg.remove(a),this.ld[c]=== -a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Gf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Rl=function(a){if(void 0!==a){var b=this.Yi;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),bk(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; -t.qx=function(a){return mr(this,a,!0)};t.qv=function(a,b){ur(this,a,b,!0)};t.ux=function(a){return mr(this,a,!1)};t.uv=function(a,b){ur(this,a,b,!1)};function mr(a,b,c){if(null!==b&&(a=c?a.kf:a.lf,""!==a&&(a=Fn(b,a),void 0!==a))){if(or(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function ur(a,b,c,d){null===c&&(c=void 0);void 0===c||or(c)||Aa(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.kf:a.lf;if(""!==e)if(c=a.Rl(c),a.Ic(b)){var f=Fn(b,e);f!==c&&(sr(a,f,b),bk(b,e,c),null===a.ic(c)&&tr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}}t.sx=function(a){return lr(this,a,!0)};t.rv=function(a,b){vr(this,a,b,!0)};t.vx=function(a){return lr(this,a,!1)}; -t.vv=function(a,b){vr(this,a,b,!1)};function lr(a,b,c){if(null===b)return"";a=c?a.mj:a.nj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function vr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.mj:a.nj;if(""!==e)if(a.Ic(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(bk(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}} -t.Gf=function(a){if(null===a)return Vr;var b=this.he;if(""===b)return Vr;a=Fn(a,b);return void 0===a?Vr:a};t.ys=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.he;if(""!==c)if(this.Ic(a)){var d=Fn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Ic(a)&&(sr(this,b,a),Mr(this,"linkLabelKeys",te,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.Ac=function(a){if(null!==a){var b=this.Nh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(or(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.xs=function(a,b){void 0!==b&&null!==b&&or(b)||Aa(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Nh;if(""!==c)if(this.Ic(a)){var d=Fn(a,c);d!==b&&null===this.kh(b)&&(bk(a,c,b),void 0!==d&&this.wb.remove(d),this.wb.add(b,a),Mr(this,"linkKey",qe,c,a,d,b),"string"===typeof c&&this.Pa(a,c))}else bk(a,c,b)}}; +Sr.prototype.changeState=function(a,b){if(null!==a&&a.model===this){if(a.change===qe){var c=a.object,d=a.propertyName;if(d===this.linkKeyProperty&&this.Jc(c)){var e=a.L(b);b=a.L(!b);void 0!==b&&this.wb.remove(b);void 0!==e&&this.wb.add(e,c);bk(c,d,e);return}}else if(a.change===se){c=a.newParam;if("linkDataArray"===a.modelChange){a=a.newValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.cg.remove(a),this.ld[c]===a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)):(this.cg.add(a),this.ld[c]!== +a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)));return}if("linkLabelKeys"===a.modelChange){d=this.Hf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)):0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===te){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.cg.add(a),this.ld[c]!==a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)):(this.cg.remove(a),this.ld[c]=== +a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Hf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Rl=function(a){if(void 0!==a){var b=this.Yi;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),bk(c,this.nodeKeyProperty,a),this.yf(c))}return a}}; +t.sx=function(a){return mr(this,a,!0)};t.qv=function(a,b){ur(this,a,b,!0)};t.vx=function(a){return mr(this,a,!1)};t.uv=function(a,b){ur(this,a,b,!1)};function mr(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=Fn(b,a),void 0!==a))){if(or(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function ur(a,b,c,d){null===c&&(c=void 0);void 0===c||or(c)||Aa(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Rl(c),a.Jc(b)){var f=Fn(b,e);f!==c&&(sr(a,f,b),bk(b,e,c),null===a.ic(c)&&tr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}}t.tx=function(a){return lr(this,a,!0)};t.rv=function(a,b){vr(this,a,b,!0)};t.wx=function(a){return lr(this,a,!1)}; +t.vv=function(a,b){vr(this,a,b,!1)};function lr(a,b,c){if(null===b)return"";a=c?a.mj:a.nj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function vr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.mj:a.nj;if(""!==e)if(a.Jc(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(bk(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}} +t.Hf=function(a){if(null===a)return Vr;var b=this.ie;if(""===b)return Vr;a=Fn(a,b);return void 0===a?Vr:a};t.ys=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.ie;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(sr(this,b,a),Mr(this,"linkLabelKeys",te,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +t.Ac=function(a){if(null!==a){var b=this.Nh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(or(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.xs=function(a,b){void 0!==b&&null!==b&&or(b)||Aa(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Nh;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);d!==b&&null===this.kh(b)&&(bk(a,c,b),void 0!==d&&this.wb.remove(d),this.wb.add(b,a),Mr(this,"linkKey",qe,c,a,d,b),"string"===typeof c&&this.Pa(a,c))}else bk(a,c,b)}}; t.kh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&or(a)?this.wb.L(a):null}; t.os=function(a){if(null!==a){var b=this.Nh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.wb.contains(c)){var d=this.el;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.wb.contains(c))){bk(a,b,c);return}if("string"===typeof c){for(d=2;this.wb.contains(c+d);)d++;bk(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.wb.count-1;this.wb.contains(c);)c--;bk(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; -t.Ic=function(a){return null===a?!1:this.bg.contains(a)};t.ji=function(a){null!==a&&(nb(a),this.Ic(a)||qr(this,a,!0))};function qr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.wb.L(d)===b)return;a.os(b);d=a.Ac(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.wb.add(d,b)}a.bg.add(b);d=null;c&&(d=a.ld.length,a.ld.splice(d,0,b));Mr(a,"linkDataArray",se,"linkDataArray",a,null,b,null,d);Wr(a,b)} -t.By=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ld.splice(d,1)}Mr(a,"linkDataArray",te,"linkDataArray",a,b,null,d,null);c=mr(a,b,!0);sr(a,c,b);c=mr(a,b,!1);sr(a,c,b);d=a.Gf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd)return;a.ld.splice(d,1)}Mr(a,"linkDataArray",te,"linkDataArray",a,b,null,d,null);c=mr(a,b,!0);sr(a,c,b);c=mr(a,b,!1);sr(a,c,b);d=a.Hf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new H;b.addAll(a.iterator);a=new H;var c=new H;var d=this.sort(b);var e,f,g=this.Ap;var h=this.arrangement;var k=this.nodeDiameterFormula; var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle;isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===ms&&k===ns?h=Zr:h===ms&&k!==ns&&(h=this.arrangement);if((this.direction===hs||this.direction===is)&&this.sorting!==bs){for(k=0;!(k>=d.length);k+=2){a.add(d.N(k));if(k+1>=d.length)break;c.add(d.N(k+1))}this.direction===hs?(this.arrangement===ms&&a.reverse(),d=new H,d.addAll(a), d.addAll(c)):(this.arrangement===ms&&c.reverse(),d=new H,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;rp&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ms){isNaN(b)&&(b=6);if(h!==Zr&&h!==ms){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=r/(360<=p?k:k-1)}this.cw=h;this.nc=l;this.Um=m;this.dw=n;this.Mp=p;this.$i=b;this.le=f;this.Ap=g;b=d;d=this.cw;h=this.nc;l=this.dw;m=this.Mp;n=this.$i;p=this.le;k=this.Ap;if(this.direction!==hs&&this.direction!==is||d!==ms)if(this.direction===hs||this.direction===is){g=0;switch(d){case ls:g=180*ss(this,h,p,l,k)/Math.PI;break;case Zr:k=b=0;g=a.first();null!==g&&(b=ps(g,Math.PI/2));g=c.first(); +(q.diameter+u.diameter)/2);g+=b;e=qs(this,g*(360<=p?k:k-1),m,n*Math.PI/180,p*Math.PI/180);e>l?(l=e,f=l*m):g=r/(360<=p?k:k-1)}this.cw=h;this.nc=l;this.Um=m;this.dw=n;this.Mp=p;this.$i=b;this.me=f;this.Ap=g;b=d;d=this.cw;h=this.nc;l=this.dw;m=this.Mp;n=this.$i;p=this.me;k=this.Ap;if(this.direction!==hs&&this.direction!==is||d!==ms)if(this.direction===hs||this.direction===is){g=0;switch(d){case ls:g=180*ss(this,h,p,l,k)/Math.PI;break;case Zr:k=b=0;g=a.first();null!==g&&(b=ps(g,Math.PI/2));g=c.first(); null!==g&&(k=ps(g,Math.PI/2));g=180*ss(this,h,p,l,n+(b+k)/2)/Math.PI;break;case ks:g=m/b.length}if(this.direction===hs){switch(d){case ls:ts(this,a,l,js);break;case Zr:us(this,a,l,js);break;case ks:vs(this,a,m/2,l,js)}switch(d){case ls:ts(this,c,l+g,as);break;case Zr:us(this,c,l+g,as);break;case ks:vs(this,c,m/2,l+g,as)}}else{switch(d){case ls:ts(this,c,l,js);break;case Zr:us(this,c,l,js);break;case ks:vs(this,c,m/2,l,js)}switch(d){case ls:ts(this,a,l+g,as);break;case Zr:us(this,a,l+g,as);break;case ks:vs(this, a,m/2,l+g,as)}}}else switch(d){case ls:ts(this,b,l,this.direction);break;case Zr:us(this,b,l,this.direction);break;case ks:vs(this,b,m,l,this.direction);break;case ms:ws(this,b,m,l,this.direction)}else ws(this,b,m,l-m/2,as)}this.updateParts();this.network=null;this.isValidLayout=!0}; -function vs(a,b,c,d,e){var f=a.Mp,g=a.nc;a=a.le;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===as?f:-f);0>f;)f+=360;f%=360;180c){for(f=d+(e===as?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;zs(a,k,l,m,n,e,f)||As(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.uj++;if(!(23Math.abs(r)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.uj?a.nc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;zs(a,k,l,n,p,e,m)||As(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.uj++;if(!(23a.uj?a.nc-f/(2*Math.PI):a.nc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function As(a,b,c,d,e,f,g){var h=a.nc,k=a.le,l=0;a=(d[e].height+d[e+1].height)/2+a.$i;d=!1;if(0<=b!==(f===as)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Yr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -Yr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.nc,c.y=this.arrangementOrigin.y+this.le);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.eb(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.qe(c.qe(a)),this.group.move(b),this.Rv=b.qe(a))}; -Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function rs(a,b,c,d,e){var f=a.qy;if(.001>Math.abs(a.Um-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.uj?a.nc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;zs(a,k,l,n,p,e,m)||As(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.uj++;if(!(23a.uj?a.nc-f/(2*Math.PI):a.nc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function As(a,b,c,d,e,f,g){var h=a.nc,k=a.me,l=0;a=(d[e].height+d[e+1].height)/2+a.$i;d=!1;if(0<=b!==(f===as)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Yr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +Yr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.nc,c.y=this.arrangementOrigin.y+this.me);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.eb(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.re(c.re(a)),this.group.move(b),this.Rv=b.re(a))}; +Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function rs(a,b,c,d,e){var f=a.sy;if(.001>Math.abs(a.Um-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} function qs(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?rs(a,1,c,d,e):rs(a,1,c))}function ss(a,b,c,d,e){if(.001>Math.abs(a.Um-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} Yr.prototype.sort=function(a){switch(this.sorting){case fs:break;case gs:a.reverse();break;case ds:a.sort(this.comparer);break;case es:a.sort(this.comparer);a.reverse();break;case bs:return this.gk(Bs(a));default:v("Invalid sorting type.")}return a}; function Bs(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.N(f));b[f]=-1;f=a.N(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} @@ -2081,39 +2083,39 @@ c.indexOf(b[l][z]),0<=D&&(D=Math.abs(u-(D>=u?D+1:D)),y+=Dr||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.wl=a:this.wl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Tb},set:function(a){this.Tb!==a&&(ab(a,Yr,Yr,"arrangement"),a===ms||a===Zr||a===ls||a===ks)&&(this.Tb=a,this.F())}},direction:{configurable:!0,get:function(){return this.O},set:function(a){this.O!==a&&(ab(a,Yr,Yr,"direction"), -a===as||a===js||a===hs||a===is)&&(this.O=a,this.F())}},sorting:{configurable:!0,get:function(){return this.md},set:function(a){this.md!==a&&(ab(a,Yr,Yr,"sorting"),a===fs||a===gs||a===ds||es||a===bs)&&(this.md=a,this.F())}},comparer:{configurable:!0,get:function(){return this.ed},set:function(a){this.ed!==a&&(A(a,"function",Yr,"comparer"),this.ed=a,this.F())}},spacing:{configurable:!0,get:function(){return this.tf},set:function(a){this.tf!==a&&(A(a,"number", -Yr,"spacing"),this.tf=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Gn},set:function(a){this.Gn!==a&&(ab(a,Yr,Yr,"nodeDiameterFormula"),a===cs||a===ns)&&(this.Gn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.nc}},actualYRadius:{configurable:!0,get:function(){return this.le}},actualSpacing:{configurable:!0,get:function(){return this.$i}},actualCenter:{configurable:!0,get:function(){return this.Rv}}}); +a===as||a===js||a===hs||a===is)&&(this.O=a,this.F())}},sorting:{configurable:!0,get:function(){return this.md},set:function(a){this.md!==a&&(ab(a,Yr,Yr,"sorting"),a===fs||a===gs||a===ds||es||a===bs)&&(this.md=a,this.F())}},comparer:{configurable:!0,get:function(){return this.ed},set:function(a){this.ed!==a&&(A(a,"function",Yr,"comparer"),this.ed=a,this.F())}},spacing:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf!==a&&(A(a,"number", +Yr,"spacing"),this.uf=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Gn},set:function(a){this.Gn!==a&&(ab(a,Yr,Yr,"nodeDiameterFormula"),a===cs||a===ns)&&(this.Gn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.nc}},actualYRadius:{configurable:!0,get:function(){return this.me}},actualSpacing:{configurable:!0,get:function(){return this.$i}},actualCenter:{configurable:!0,get:function(){return this.Rv}}}); var Zr=new F(Yr,"ConstantSpacing",0),ls=new F(Yr,"ConstantDistance",1),ks=new F(Yr,"ConstantAngle",2),ms=new F(Yr,"Packed",3),as=new F(Yr,"Clockwise",4),js=new F(Yr,"Counterclockwise",5),hs=new F(Yr,"BidirectionalLeft",6),is=new F(Yr,"BidirectionalRight",7),fs=new F(Yr,"Forwards",8),gs=new F(Yr,"Reverse",9),ds=new F(Yr,"Ascending",10),es=new F(Yr,"Descending",11),bs=new F(Yr,"Optimized",12),cs=new F(Yr,"Pythagorean",13),ns=new F(Yr,"Circular",14);Yr.className="CircularLayout";Yr.ConstantSpacing=Zr; Yr.ConstantDistance=ls;Yr.ConstantAngle=ks;Yr.Packed=ms;Yr.Clockwise=as;Yr.Counterclockwise=js;Yr.BidirectionalLeft=hs;Yr.BidirectionalRight=is;Yr.Forwards=fs;Yr.Reverse=gs;Yr.Ascending=ds;Yr.Descending=es;Yr.Optimized=bs;Yr.Pythagorean=cs;Yr.Circular=ns;function $r(){this.Ll=-Infinity;this.pm=this.pk=null} $r.prototype.compare=function(a,b){if(0this.Ll||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ -p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Hs(l,h,e,f,p.width,p.height,d),n=l[k],r=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.Yc(c)&&(a++,2a.network.vertexes.count)return!1;a.dh=a.network.vertexes.Ka();a=a.dh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.Td-a.Td});for(b=a.length-1;0<=b&&1>=a[b].Td;)b--;return 1=g))){for(var l=h=0,m=k.count-g;m=g))){for(var l=h=0,m=k.count-g;mr&&(r=1);h=L.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new K(p.x+g,p.y+h)}}a.network=d;return c} -function Ms(a,b,c){G&&(w(b,Fs,Es,"popNetwork:oldnet"),E(c,Es,"popNetwork:level"));for(c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.We){var e=d.We.N(d.ov);d.Td=e.Gs;var f=e.Kv,g=e.Lv;d.bounds=new M(d.centerX-f,d.centerY-g,e.Hs,e.Fs);d.focus=new K(f,g);d.ov--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function Ns(a,b,c){G&&(w(b,Ps,Es,"surroundNode:oldnet"),E(c,Es,"surroundNode:level"));var d=b.Oj;if(null!==d&&0!==d.count){c=b.centerX;var e=b.centerY,f=b.width,g=b.height;null!==b.We&&0=n.Td?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=n.Td?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=c+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} function Hs(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.$f;var l=d=h=0;for(f= +function Rs(a){null===a.dh&&(a.dh=a.network.vertexes.Ka());var b=a.dh;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.ag;var l=d=h=0;for(f= 0;fc||l-k>c){if(e)break}else if(m-r>c||r-m>c){if(!e)break}else{var q=Qs(g,p);1>q?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Ss),q=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*q):kr?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Ss),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;eu&&0u&&0a[this.Ec]&&(this.Ph=a[c]-1,this.Ec=c),a[c]u&&0u&&0a[this.Fc]&&(this.Ph=a[c]-1,this.Fc=c),a[c]g)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.zf===l.zf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lg)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.Af===l.Af||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lu||n===u&&r>q)&&h++;xn||u===n&&q>r)&&h++}}}if(0>=c)for(k=d[g].destinationEdgesArrayAccess,l=0;lu||n===u&&m>x)&&h++,qn||u===n&&x>m)&&h++);f[g*e+g]=h;for(k=g+1;k=c)for(h=d[g].destinationEdgesArrayAccess,B=d[k].destinationEdgesArrayAccess, l=0;lb.toVertex.index&&(a.bm(b),b.rev=!0);break;case Vs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.rg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Og=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -rt(this,b);for(d.reset();d.next();)b=d.value,-1===b.rg&&rt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.rgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cb.toVertex.index&&(a.bm(b),b.rev=!0);break;case Vs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.sg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Og=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +rt(this,b);for(d.reset();d.next();)b=d.value,-1===b.sg&&rt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.sgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cf+1&&(p+=4*(z-f),r+=4*(z-(f+1)))}C=d[f].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f+1&&(r+=1)}C=d[f+1].sourceEdges.iterator;for(C.reset();C.next();)if(z=C.value,B=z.fromVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;zf+1&&(p+=4*(z-(f+1)),r+=4*(z-f))}C=d[f+1].destinationEdges.iterator; for(C.reset();C.next();)if(z=C.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f&&(p+=1)}z=B=0;C=g[d[f].index];var D=h[d[f].index],J=g[d[f+1].index],U=h[d[f+1].index];-1!==C&&(B+=Math.abs(C-q),z+=Math.abs(C-y));-1!==D&&(B+=Math.abs(D-q),z+=Math.abs(D-y));-1!==J&&(B+=Math.abs(J-u),z+=Math.abs(J-x));-1!==U&&(B+=Math.abs(U-u),z+=Math.abs(U-x));if(r>1)+8*d;this.Oa*=8}if(0!==(this.dg&2))for(c=!0;c;){c=!1;for(b=this.Ec+1;b<=this.Da;b++)c=Ht(this,b,1)|| -c;for(b=this.Ec-1;0<=b;b--)c=Ht(this,b,-1)||c;c=Ht(this,this.Ec,0)||c}if(0!==(this.dg&4)){for(b=this.Ec+1;b<=this.Da;b++)It(this,b,1);for(b=this.Ec-1;0<=b;b--)It(this,b,-1);It(this,this.Ec,0)}a&&(Jt(this,-1),Jt(this,1));if(0!==(this.dg&2))for(c=!0;c;){c=!1;c=Ht(this,this.Ec,0)||c;for(b=this.Ec+1;b<=this.Da;b++)c=Ht(this,b,0)||c;for(b=this.Ec-1;0<=b;b--)c=Ht(this,b,0)||c}}; +Us.prototype.straightenAndPack=function(){var a=0!==(this.eg&1);var b=0!==(this.eg&Gt);1E3>1)+8*d;this.Oa*=8}if(0!==(this.eg&2))for(c=!0;c;){c=!1;for(b=this.Fc+1;b<=this.Da;b++)c=Ht(this,b,1)|| +c;for(b=this.Fc-1;0<=b;b--)c=Ht(this,b,-1)||c;c=Ht(this,this.Fc,0)||c}if(0!==(this.eg&4)){for(b=this.Fc+1;b<=this.Da;b++)It(this,b,1);for(b=this.Fc-1;0<=b;b--)It(this,b,-1);It(this,this.Fc,0)}a&&(Jt(this,-1),Jt(this,1));if(0!==(this.eg&2))for(c=!0;c;){c=!1;c=Ht(this,this.Fc,0)||c;for(b=this.Fc+1;b<=this.Da;b++)c=Ht(this,b,0)||c;for(b=this.Fc-1;0<=b;b--)c=Ht(this,b,0)||c}}; function Ht(a,b,c){G&&(E(b,Us,"bendStraighten:unfixedLayer"),E(c,Us,"bendStraighten:direction"));for(var d=!1;Kt(a,b,c);)d=!0;return d} function Kt(a,b,c){G&&(E(b,Us,"shiftbendStraighten:unfixedLayer"),E(c,Us,"shiftbendStraighten:direction"));var d,e=ct(a,b),f=a.Mb[b],g=jt(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?r=m-1:r=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var q=p=0,u= 0;if(0>=c)for(var x=e[d].sourceEdges.iterator;x.next();){var y=x.value;var z=y.fromVertex;if(y.valid&&z.layer!==b){var B=et(y);var C=y.portFromColOffset;y=y.portToColOffset;z=z.column;p+=(Math.abs(m+y-(z+C))+1)*B;q+=(Math.abs(r+y-(z+C))+1)*B;u+=(Math.abs(n+y-(z+C))+1)*B}}if(0<=c)for(x=e[d].destinationEdges.iterator;x.next();)y=x.value,z=y.toVertex,y.valid&&z.layer!==b&&(B=et(y),C=y.portFromColOffset,y=y.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+y))+1)*B,q+=(Math.abs(r+C-(z+y))+1)*B,u+=(Math.abs(n+ @@ -2199,60 +2201,60 @@ k=n+a.nodeMinColumnSpace(d[c-1],!1)+k+1,n=d[c+1].column,l=n-a.nodeMinColumnSpace d);a.normalize()}function Lt(a,b){G&&(E(b,Us,"packAux:column"),E(1,Us,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} function Mt(a,b){G&&(E(b,Us,"tightPackAux:column"),E(1,Us,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Da;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Da;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} function Jt(a,b){G&&E(b,Us,"componentPack:direction");for(var c=0;c<=a.Oa;c++)for(;Lt(a,c););a.normalize();for(c=0;cf?gt(a,e):gb)for(c=a.Oa;0<=c;c--)for(e=ft(a),f=it(a),d=f+1;ff?gt(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Qc);a.Qc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(mt(a,b,a.Qc,-1,!0,!0),a.Qc++);var f;b=[];for(f=0;fc)for(g=a.Oa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +function Nt(a,b,c){a.Rc=0;for(var d=a.network.vertexes.iterator;d.next();)d.value.component=-1;if(0c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Rc);a.Rc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(mt(a,b,a.Rc,-1,!0,!0),a.Rc++);var f;b=[];for(f=0;fc)for(g=a.Oa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} Us.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=at(this,!0),b=at(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Au();this.isRouting&&this.commitLinks()};function at(a,b){return 270===a.O?b?md:rd:90===a.O?b?rd:md:180===a.O?b?pd:qd:b?qd:pd} -Us.prototype.commitNodes=function(){this.fe=[];this.Jd=[];this.Hd=[];this.Va=[];for(var a=0;a<=this.Da;a++)this.fe[a]=0,this.Jd[a]=0,this.Hd[a]=0,this.Va[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.fe[c]=Math.max(this.fe[c],this.nodeMinLayerSpace(b,!0));this.Jd[c]=Math.max(this.Jd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ge;for(var d=0;d<=this.Da;d++){var e=c;0>=this.fe[d]+this.Jd[d]&&(e=0);0=this.ge[d]+this.Jd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.l(q++,C,n+J),b.l(q++,C,n),b.l(q++,C,n-B)):(b.l(q++,C,D+J),b.l(q++,C,D),b.l(q++,C,D-B)):270===this.O?D<=n.bounds.y?(n=n.bounds.y,b.l(q++,C,n-B),b.l(q++,C,n),b.l(q++,C,n+J)):(b.l(q++,C,D-B),b.l(q++,C,D),b.l(q++,C,D+J)):0===this.O&&(C>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.l(q++,n+J,D),b.l(q++,n,D),b.l(q++,n-B,D)):(b.l(q++,C+J,D),b.l(q++,C,D),b.l(q++,C-B,D)));else{b.l(q++,y,z);var U=0;if(180===this.O||0===this.O){if(180===this.O?C>=n.bounds.right: -C<=n.bounds.x)U=(0===this.O?-B:J)/2;b.l(q++,y+U,D)}else{if(270===this.O?D>=n.bounds.bottom:D<=n.bounds.y)U=(90===this.O?-B:J)/2;b.l(q++,C,z+U)}b.l(q++,C,D)}}else B=Math.max(10,this.fe[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):90===this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)): +C<=n.bounds.x)U=(0===this.O?-B:J)/2;b.l(q++,y+U,D)}else{if(270===this.O?D>=n.bounds.bottom:D<=n.bounds.y)U=(90===this.O?-B:J)/2;b.l(q++,C,z+U)}b.l(q++,C,D)}}else B=Math.max(10,this.ge[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):90===this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)): 270===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):b.l(q++,C,D)}n=x}if(null===h||l!==Ec||p)if(y=b.i(q-1).x,z=b.i(q-1).y,C=b.i(q).x,D=b.i(q).y,p)u=this.Jd[m.layer],180===this.O||0===this.O?(p=z,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.O?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180=== -this.O?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.O?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.O?-u:u),p=m.bounds.x?(n=m.bounds.x+ -m.bounds.width,b.P(q-2,n,z),b.P(q-1,n+J,z)):90===this.O&&D<=m.bounds.bottom?(n=m.bounds.y,b.P(q-2,y,n),b.P(q-1,y,n-B)):270===this.O&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.P(q-2,y,n),b.P(q-1,y,n+J)):0===this.O&&C<=m.bounds.right&&(n=m.bounds.x,b.P(q-2,n,z),b.P(q-1,n-B,z));else{B=Math.max(10,this.fe[m.layer]);J=Math.max(10,this.Jd[m.layer]);p=0;if(180===this.O||0===this.O){if(180===this.O?C<=m.bounds.x:C>=m.bounds.right)p=(0===this.O?J:-B)/2;b.l(q++,C+p,z)}else{if(270===this.O?D<=m.bounds.y: +this.O?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.O?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.O?-u:u),p=m.bounds.x?(n=m.bounds.x+ +m.bounds.width,b.P(q-2,n,z),b.P(q-1,n+J,z)):90===this.O&&D<=m.bounds.bottom?(n=m.bounds.y,b.P(q-2,y,n),b.P(q-1,y,n-B)):270===this.O&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.P(q-2,y,n),b.P(q-1,y,n+J)):0===this.O&&C<=m.bounds.right&&(n=m.bounds.x,b.P(q-2,n,z),b.P(q-1,n-B,z));else{B=Math.max(10,this.ge[m.layer]);J=Math.max(10,this.Jd[m.layer]);p=0;if(180===this.O||0===this.O){if(180===this.O?C<=m.bounds.x:C>=m.bounds.right)p=(0===this.O?J:-B)/2;b.l(q++,C+p,z)}else{if(270===this.O?D<=m.bounds.y: D>=m.bounds.bottom)p=(90===this.O?J:-B)/2;b.l(q++,y,D+p)}b.l(q++,C,D)}}else{for(;null!==m&&m!==n;){B=x=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(x=y.toVertex,B=y.fromVertex,null!==B.node&&(B=null),null!==x.node)););if(null===x)break;x!==n&&(y=b.i(q-1).x,z=b.i(q-1).y,C=x.centerX,D=x.centerY,p?180===this.O||0===this.O?(null!==B?B.centerY:z)!==D&&(B=this.Va[x.layer]+this.dd.x,q===b.firstPickIndex+1&&(B=0===this.O?Math.max(B,y):Math.min(B,y)),b.l(q++,B,z),b.l(q++,B, -D)):(null!==B?B.centerX:y)!==C&&(B=this.Va[x.layer]+this.dd.y,q===b.firstPickIndex+1&&(B=90===this.O?Math.max(B,z):Math.min(B,z)),b.l(q++,y,B),b.l(q++,C,B)):(B=Math.max(10,this.fe[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):90===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):270=== +D)):(null!==B?B.centerX:y)!==C&&(B=this.Va[x.layer]+this.dd.y,q===b.firstPickIndex+1&&(B=90===this.O?Math.max(B,z):Math.min(B,z)),b.l(q++,y,B),b.l(q++,C,B)):(B=Math.max(10,this.ge[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):90===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):270=== this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)):(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):180===this.O?(b.l(q++,C+J,D),b.l(q++,C-B,D)):90===this.O?(b.l(q++,C,D-B),b.l(q++,C,D+J)):270===this.O?(b.l(q++,C,D+J),b.l(q++,C,D-B)):(b.l(q++,C-B,D),b.l(q++,C+J,D))));m=x}p&&(y=b.i(q-1).x,z=b.i(q-1).y,C=b.i(q).x,D=b.i(q).y,180===this.O||0===this.O? z!==D&&(B=0===this.O?Math.min(Math.max((C+y)/2,this.Va[n.layer]+this.dd.x),C):Math.max(Math.min((C+y)/2,this.Va[n.layer]+this.dd.x),C),b.l(q++,B,z),b.l(q++,B,D)):y!==C&&(B=90===this.O?Math.min(Math.max((D+z)/2,this.Va[n.layer]+this.dd.y),D):Math.max(Math.min((D+z)/2,this.Va[n.layer]+this.dd.y),D),b.l(q++,y,B),b.l(q++,C,B)))}null!==d&&r&&(null!==g&&(l===Ec&&(l=b.i(0),d=b.i(2),l.D(d)||b.P(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Ec,!0,!1,f,h),l.u()||l.set(e.actualBounds.center),b.P(0,l.x,l.y)), -null!==h&&(k===Ec&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.D(l)||b.P(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Ec,!1,!1,e,g),e.u()||e.set(f.actualBounds.center),b.P(b.pointsCount-1,e.x,e.y)));b.Af();c.commit()}}}this.avoidOrthogonalOverlaps()}; +null!==h&&(k===Ec&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.D(l)||b.P(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Ec,!1,!1,e,g),e.u()||e.set(f.actualBounds.center),b.P(b.pointsCount-1,e.x,e.y)));b.Bf();c.commit()}}}this.avoidOrthogonalOverlaps()}; Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.rdb.rd?1:a.Hcb.Hc?1:0:0};t.Rx=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.jb.j||a.rdb.rd?1:a.Hcb.Hc?1:0:0}; -t.ws=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.lcb.lc||a.jb.j||a.rdb.rd?1:a.Hcb.Hc?1:0:0};t.C=function(a,b){G&&(E(a,Us,"isApprox:a"),E(b,Us,"isApprox:b"));a-=b;return-1a}; +k.x*k.x+k.y;h.lc=l.x*l.x+l.y;h.rd=Math.min(f.x,g.x);h.Ic=Math.max(f.x,g.x);h.index=e;h.link=d;if(e+2f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.rdb.rd?1:a.Icb.Ic?1:0:0};t.Sx=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.jb.j||a.rdb.rd?1:a.Icb.Ic?1:0:0}; +t.ws=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.lcb.lc||a.jb.j||a.rdb.rd?1:a.Icb.Ic?1:0:0};t.C=function(a,b){G&&(E(a,Us,"isApprox:a"),E(b,Us,"isApprox:b"));a-=b;return-1a}; t.Ei=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&v("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.Ge.length){var d=[];for(var e=0;e=a.He.length){var d=[];for(var e=0;ea&&(this.dg=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.sf},set:function(a){this.sf!==a&&(A(a,"boolean",Us,"setsPortSpots"),this.sf=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.vn},set:function(a){this.vn!==a&&(A(a,"number",Us,"linkSpacing"),0<=a&&(this.vn=a,this.F()))}},maxLayer:{configurable:!0, -get:function(){return this.Da}},maxIndex:{configurable:!0,get:function(){return this.Ph}},maxColumn:{configurable:!0,get:function(){return this.Oa}},minIndexLayer:{configurable:!0,get:function(){return this.Ng}},maxIndexLayer:{configurable:!0,get:function(){return this.Ec}}}); +enumerable:!0,get:function(){return this.eg},set:function(a){this.eg!==a&&(A(a,"number",Us,"packOption"),0<=a&&8>a&&(this.eg=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.tf},set:function(a){this.tf!==a&&(A(a,"boolean",Us,"setsPortSpots"),this.tf=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.vn},set:function(a){this.vn!==a&&(A(a,"number",Us,"linkSpacing"),0<=a&&(this.vn=a,this.F()))}},maxLayer:{configurable:!0, +get:function(){return this.Da}},maxIndex:{configurable:!0,get:function(){return this.Ph}},maxColumn:{configurable:!0,get:function(){return this.Oa}},minIndexLayer:{configurable:!0,get:function(){return this.Ng}},maxIndexLayer:{configurable:!0,get:function(){return this.Fc}}}); var Vs=new F(Us,"CycleDepthFirst",0),nt=new F(Us,"CycleGreedy",1),$s=new F(Us,"CycleFromLayers",2),Ws=new F(Us,"LayerOptimalLinkLength",0),st=new F(Us,"LayerLongestPathSink",1),ut=new F(Us,"LayerLongestPathSource",2),Xs=new F(Us,"InitDepthFirstOut",0),At=new F(Us,"InitDepthFirstIn",1),yt=new F(Us,"InitNaive",2),Et=new F(Us,"AggressiveNone",0),Ys=new F(Us,"AggressiveLess",1),Ft=new F(Us,"AggressiveMore",2),Gt=8;Us.className="LayeredDigraphLayout";Us.CycleDepthFirst=Vs;Us.CycleGreedy=nt; -Us.CycleFromLayers=$s;Us.LayerOptimalLinkLength=Ws;Us.LayerLongestPathSink=st;Us.LayerLongestPathSource=ut;Us.InitDepthFirstOut=Xs;Us.InitDepthFirstIn=At;Us.InitNaive=yt;Us.AggressiveNone=Et;Us.AggressiveLess=Ys;Us.AggressiveMore=Ft;Us.PackNone=0;Us.PackExpand=1;Us.PackStraighten=2;Us.PackMedian=4;Us.PackAll=15;function Ot(){this.index=this.Hc=this.rd=this.lc=this.first=this.layer=0;this.link=null;this.j=0}Ot.className="SegInfo";function Zs(a){vq.call(this,a)}na(Zs,vq);Zs.prototype.createVertex=function(){return new Pt(this)}; -Zs.prototype.createEdge=function(){return new Qt(this)};Zs.className="LayeredDigraphNetwork";function Pt(a){Jq.call(this,a);this.bb=this.Cg=this.Mh=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.rg=NaN;this.zf=0;this.ek=this.fk=null}na(Pt,Jq); -Pt.prototype.serializeVertexProperties=function(a,b){Jq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?lb(this.near):null;a.valid=this.valid;a.rg=this.rg;a.finish=this.finish;a.zf=this.zf;a.fk=this.fk;a.ek=this.ek}; -Pt.prototype.deserializeVertexProperties=function(a,b,c,d){Jq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.rg=a.rg;this.finish=a.finish;this.zf=a.zf;this.fk=a.fk;this.ek=a.ek}; -oa.Object.defineProperties(Pt.prototype,{layer:{configurable:!0,get:function(){return this.Mh},set:function(a){this.Mh!==a&&(A(a,"number",Pt,"layer"),this.Mh=a)}},column:{configurable:!0,get:function(){return this.Cg},set:function(a){this.Cg!==a&&(A(a,"number",Pt,"column"),this.Cg=a)}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb!==a&&(A(a,"number",Pt,"index"),this.bb=a)}},component:{configurable:!0,get:function(){return this.v}, -set:function(a){this.v!==a&&(A(a,"number",Pt,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&w(a,Pt,Pt,"near"),this.G=a)}}});Pt.className="LayeredDigraphVertex";function Qt(a){Kq.call(this,a);this.j=this.ma=this.Ma=!1;this.aa=this.v=NaN;this.G=this.o=0}na(Qt,Kq); +Us.CycleFromLayers=$s;Us.LayerOptimalLinkLength=Ws;Us.LayerLongestPathSink=st;Us.LayerLongestPathSource=ut;Us.InitDepthFirstOut=Xs;Us.InitDepthFirstIn=At;Us.InitNaive=yt;Us.AggressiveNone=Et;Us.AggressiveLess=Ys;Us.AggressiveMore=Ft;Us.PackNone=0;Us.PackExpand=1;Us.PackStraighten=2;Us.PackMedian=4;Us.PackAll=15;function Ot(){this.index=this.Ic=this.rd=this.lc=this.first=this.layer=0;this.link=null;this.j=0}Ot.className="SegInfo";function Zs(a){vq.call(this,a)}na(Zs,vq);Zs.prototype.createVertex=function(){return new Pt(this)}; +Zs.prototype.createEdge=function(){return new Qt(this)};Zs.className="LayeredDigraphNetwork";function Pt(a){Jq.call(this,a);this.bb=this.Dg=this.Mh=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.sg=NaN;this.Af=0;this.ek=this.fk=null}na(Pt,Jq); +Pt.prototype.serializeVertexProperties=function(a,b){Jq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?lb(this.near):null;a.valid=this.valid;a.sg=this.sg;a.finish=this.finish;a.Af=this.Af;a.fk=this.fk;a.ek=this.ek}; +Pt.prototype.deserializeVertexProperties=function(a,b,c,d){Jq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.sg=a.sg;this.finish=a.finish;this.Af=a.Af;this.fk=a.fk;this.ek=a.ek}; +oa.Object.defineProperties(Pt.prototype,{layer:{configurable:!0,get:function(){return this.Mh},set:function(a){this.Mh!==a&&(A(a,"number",Pt,"layer"),this.Mh=a)}},column:{configurable:!0,get:function(){return this.Dg},set:function(a){this.Dg!==a&&(A(a,"number",Pt,"column"),this.Dg=a)}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb!==a&&(A(a,"number",Pt,"index"),this.bb=a)}},component:{configurable:!0,get:function(){return this.v}, +set:function(a){this.v!==a&&(A(a,"number",Pt,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&w(a,Pt,Pt,"near"),this.G=a)}}});Pt.className="LayeredDigraphVertex";function Qt(a){Kq.call(this,a);this.j=this.ma=this.Ma=!1;this.$=this.v=NaN;this.G=this.m=0}na(Qt,Kq); Qt.prototype.serializeEdgeProperties=function(a,b){Kq.prototype.serializeEdgeProperties.call(this,a,b);a.valid=this.valid;a.rev=this.rev;a.forest=this.forest;a.portFromPos=this.portFromPos;a.portToPos=this.portToPos;a.portFromColOffset=this.portFromColOffset;a.portToColOffset=this.portToColOffset}; Qt.prototype.deserializeEdgeProperties=function(a,b,c,d){Kq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; oa.Object.defineProperties(Qt.prototype,{fromVertex:{configurable:!0,get:function(){return this.gd},set:function(a){this.gd!==a&&(G&&null!==a&&w(a,Pt,Qt,"fromVertex"),this.gd=a)}},toVertex:{configurable:!0,get:function(){return this.pd},set:function(a){this.pd!==a&&(G&&null!==a&&w(a,Pt,Qt,"toVertex"),this.pd=a)}},valid:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma!==a&&(A(a,"boolean",Qt,"valid"),this.Ma=a)}},rev:{configurable:!0, -enumerable:!0,get:function(){return this.ma},set:function(a){this.ma!==a&&(A(a,"boolean",Qt,"rev"),this.ma=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(A(a,"boolean",Qt,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(A(a,"number",Qt,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.aa},set:function(a){this.aa!==a&&(A(a,"number", -Qt,"portToPos"),this.aa=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(A(a,"number",Qt,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(A(a,"number",Qt,"portToColOffset"),this.G=a)}}});Qt.className="LayeredDigraphEdge"; -function Z(a){Di.call(this);this.Wb=new I;this.Qn=Rt;this.wd=St;this.lo=Tt;this.oq=Ut;this.Sv=[];this.ud=!0;this.Tb=Vt;this.Zd=(new Hb(10,10)).freeze();var b=new Wt(this);this.Z=new Xt(b);this.$=new Xt(b);this.ju=[];a&&Object.assign(this,a)}na(Z,Di);Z.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a);a.Qn=this.Qn;a.lo=this.lo;a.oq=this.oq;a.ud=this.ud;a.Tb=this.Tb;a.Zd.assign(this.Zd);a.Z.copyInheritedPropertiesFrom(this.Z);a.$.copyInheritedPropertiesFrom(this.$)}; +enumerable:!0,get:function(){return this.ma},set:function(a){this.ma!==a&&(A(a,"boolean",Qt,"rev"),this.ma=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(A(a,"boolean",Qt,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(A(a,"number",Qt,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.$},set:function(a){this.$!==a&&(A(a,"number", +Qt,"portToPos"),this.$=a)}},portFromColOffset:{configurable:!0,get:function(){return this.m},set:function(a){this.m!==a&&(A(a,"number",Qt,"portFromColOffset"),this.m=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(A(a,"number",Qt,"portToColOffset"),this.G=a)}}});Qt.className="LayeredDigraphEdge"; +function Z(a){Di.call(this);this.Wb=new I;this.Qn=Rt;this.wd=St;this.lo=Tt;this.oq=Ut;this.Sv=[];this.ud=!0;this.Tb=Vt;this.Zd=(new Hb(10,10)).freeze();var b=new Wt(this);this.Z=new Xt(b);this.aa=new Xt(b);this.ju=[];a&&Object.assign(this,a)}na(Z,Di);Z.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a);a.Qn=this.Qn;a.lo=this.lo;a.oq=this.oq;a.ud=this.ud;a.Tb=this.Tb;a.Zd.assign(this.Zd);a.Z.copyInheritedPropertiesFrom(this.Z);a.aa.copyInheritedPropertiesFrom(this.aa)}; Z.prototype.ub=function(a){a.classType===Z?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:v("Unknown enum value: "+a):Di.prototype.ub.call(this,a)};Z.prototype.createNetwork=function(){return new Wt(this)}; -Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof T)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof R){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.pg(a.nodes,!0,b),c.pg(a.links,!0,b)):a instanceof wf?c.pg(a.memberParts,!1,b):c.pg(a.iterator,!1,b);return c}; -Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Yt&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===Rt&&null!==b?this.wd=b.isTreePathToChildren?St:Zt:this.wd=this.path===Rt?St:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&w(a,Xt,Z,"removeChild:p");G&&w(b,Xt,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Hu(a,g,fa,y,z):Iu(a,g,fa,y,z);fa=z.x;y=z.width;z=z.height;break;case tu:for(C=0;Cn&&(aawb&&(Nu(a,-wb,0,la,za-1),Ou(C,-wb,0),Ou(D,-wb,0),wb=0)}Ma.V.h(wb,Y);y=Math.max(y,J);z=Math.max(z,B+(0===W?0:q)+sb.height);aa=J}else{0n&&(Ywb&&(Nu(a,0,-wb,la,za-1),Ou(C,0,-wb),Ou(D,0,-wb),wb=0);Ma.V.h(aa,wb);z=Math.max(z,U);y=Math.max(y,B+(0===W?0:q)+sb.width);Y=U}P++}0e?Hu(a,g,fa,y,z):Iu(a,g,fa,y,z);fa=z.x;y=z.width;z=z.height;break;case tu:for(C=0;Cn&&(aawb&&(Nu(a,-wb,0,la,za-1),Ou(C,-wb,0),Ou(D,-wb,0),wb=0)}Ma.V.h(wb,Y);y=Math.max(y,J);z=Math.max(z,B+(0===W?0:q)+sb.height);aa=J}else{0n&&(Ywb&&(Nu(a,0,-wb,la,za-1),Ou(C,0,-wb),Ou(D,0,-wb),wb=0);Ma.V.h(aa,wb);z=Math.max(z,U);y=Math.max(y,B+(0===W?0:q)+sb.width);Y=U}Q++}0l&&(l=0),135u&&(u=0),k===uu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>y&&(y=Tu(k,d-y,0),g=y.x,h=y.y,y=d,l=0):y=Ru(a,y,l),0>l&&(g-=l,l=0),135z&&(z=Tu(k,0,x-z),g=z.x,h=z.y,z=x,u=0):z=Su(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),W[0].h(0,u+x),W[1].h(d,W[0].y),W[2].xd?Hu(b,e,P,B,C):Iu(b,e,P,B,C);P=C.x;B=C.width;C=C.height;break;case tu:for(a=0;ad?Hu(b,e,Q,B,C):Iu(b,e,Q,B,C);Q=C.x;B=C.width;C=C.height;break;case tu:for(a=0;ap&&(Jp&&(Un&&(n=0),135y&&(y=0));b.qa.h(n,y);b.Ia.h(B,C)}} function Hu(a,b,c,d,e){G&&w(a,Xt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new M(c,0,d,e);if(1===f)return a=b[0],d=a.Ia.width,e=a.Ia.height,new M(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Au(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), @@ -2314,7 +2316,7 @@ function Uu(a,b){var c=b.length,d=a.ju[c];void 0===d&&(d=[],a.ju[c]=d);d.push(b) Z.prototype.arrangeTrees=function(){if(this.Tb===Yt)for(var a=this.Wb.iterator;a.next();){var b=a.value;if(b instanceof Xt){var c=b.node;if(null!==c){var d=c.position;c=d.x;d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);Yu(this,b,c,d)}}}else{a=[];for(b=this.Wb.iterator;b.next();)c=b.value,c instanceof Xt&&a.push(c);switch(this.sorting){case nu:break;case ou:a.reverse();break;case pu:a.sort(this.comparer);break;case qu:a.sort(this.comparer);a.reverse();break;default:v("Unhandled sorting value "+this.sorting.toString())}c= this.arrangementOrigin;b=c.x;c=c.y;for(d=0;d=a&&(this.Z.nodeIndentPastParent=a,this.F()))}},nodeSpacing:{configurable:!0,get:function(){return this.Z.nodeSpacing},set:function(a){this.Z.nodeSpacing!==a&&(A(a,"number",Z,"nodeSpacing"),this.Z.nodeSpacing=a,this.F())}},layerSpacing:{configurable:!0,get:function(){return this.Z.layerSpacing},set:function(a){this.Z.layerSpacing!==a&&(A(a,"number",Z,"layerSpacing"),this.Z.layerSpacing=a,this.F())}},layerSpacingParentOverlap:{configurable:!0, @@ -2333,47 +2335,47 @@ enumerable:!0,get:function(){return this.Z.layerSpacingParentOverlap},set:functi set:function(a){this.Z.breadthLimit!==a&&(A(a,"number",Z,"breadthLimit"),0<=a&&(this.Z.breadthLimit=a,this.F()))}},rowSpacing:{configurable:!0,get:function(){return this.Z.rowSpacing},set:function(a){this.Z.rowSpacing!==a&&(A(a,"number",Z,"rowSpacing"),this.Z.rowSpacing=a,this.F())}},rowIndent:{configurable:!0,get:function(){return this.Z.rowIndent},set:function(a){this.Z.rowIndent!==a&&(A(a,"number",Z,"rowIndent"),0<=a&&(this.Z.rowIndent=a,this.F()))}},commentSpacing:{configurable:!0, enumerable:!0,get:function(){return this.Z.commentSpacing},set:function(a){this.Z.commentSpacing!==a&&(A(a,"number",Z,"commentSpacing"),this.Z.commentSpacing=a,this.F())}},commentMargin:{configurable:!0,get:function(){return this.Z.commentMargin},set:function(a){this.Z.commentMargin!==a&&(A(a,"number",Z,"commentMargin"),this.Z.commentMargin=a,this.F())}},setsPortSpot:{configurable:!0,get:function(){return this.Z.setsPortSpot},set:function(a){this.Z.setsPortSpot!==a&&(A(a, "boolean",Z,"setsPortSpot"),this.Z.setsPortSpot=a,this.F())}},portSpot:{configurable:!0,get:function(){return this.Z.portSpot},set:function(a){w(a,Ib,Z,"portSpot");this.Z.portSpot.D(a)||(this.Z.portSpot=a,this.F())}},setsChildPortSpot:{configurable:!0,get:function(){return this.Z.setsChildPortSpot},set:function(a){this.Z.setsChildPortSpot!==a&&(A(a,"boolean",Z,"setsChildPortSpot"),this.Z.setsChildPortSpot=a,this.F())}},childPortSpot:{configurable:!0,get:function(){return this.Z.childPortSpot}, -set:function(a){w(a,Ib,Z,"childPortSpot");this.Z.childPortSpot.D(a)||(this.Z.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.$.sorting},set:function(a){this.$.sorting!==a&&(ab(a,Z,Z,"alternateSorting"),a===nu||a===ou||a===pu||qu)&&(this.$.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.$.comparer},set:function(a){this.$.comparer!==a&&(A(a,"function",Z,"alternateComparer"),this.$.comparer=a,this.F())}}, -alternateAngle:{configurable:!0,get:function(){return this.$.angle},set:function(a){this.$.angle!==a&&(A(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.$.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.$.alignment},set:function(a){this.$.alignment!==a&&(ab(a,Z,Z,"alternateAlignment"),this.$.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.$.nodeIndent},set:function(a){this.$.nodeIndent!== -a&&(A(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.$.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.$.nodeIndentPastParent},set:function(a){this.$.nodeIndentPastParent!==a&&(A(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.$.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.$.nodeSpacing},set:function(a){this.$.nodeSpacing!==a&&(A(a,"number",Z,"alternateNodeSpacing"), -this.$.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.$.layerSpacing},set:function(a){this.$.layerSpacing!==a&&(A(a,"number",Z,"alternateLayerSpacing"),this.$.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap= -a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&(ab(a,Z,Z,"alternateCompaction"),a===xu||a===zu)&&(this.$.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit},set:function(a){this.$.breadthLimit!==a&&(A(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.$.breadthLimit=a,this.F()))}},alternateRowSpacing:{configurable:!0,get:function(){return this.$.rowSpacing}, -set:function(a){this.$.rowSpacing!==a&&(A(a,"number",Z,"alternateRowSpacing"),this.$.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.$.rowIndent},set:function(a){this.$.rowIndent!==a&&(A(a,"number",Z,"alternateRowIndent"),0<=a&&(this.$.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.$.commentSpacing},set:function(a){this.$.commentSpacing!==a&&(A(a,"number",Z,"alternateCommentSpacing"), -this.$.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.$.commentMargin},set:function(a){this.$.commentMargin!==a&&(A(a,"number",Z,"alternateCommentMargin"),this.$.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.$.setsPortSpot},set:function(a){this.$.setsPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsPortSpot"),this.$.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0, -enumerable:!0,get:function(){return this.$.portSpot},set:function(a){w(a,Ib,Z,"alternatePortSpot");this.$.portSpot.D(a)||(this.$.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.$.setsChildPortSpot},set:function(a){this.$.setsChildPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsChildPortSpot"),this.$.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0,get:function(){return this.$.childPortSpot},set:function(a){w(a, -Ib,Z,"alternateChildPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}}}); +set:function(a){w(a,Ib,Z,"childPortSpot");this.Z.childPortSpot.D(a)||(this.Z.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&(ab(a,Z,Z,"alternateSorting"),a===nu||a===ou||a===pu||qu)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(A(a,"function",Z,"alternateComparer"),this.aa.comparer= +a,this.F())}},alternateAngle:{configurable:!0,get:function(){return this.aa.angle},set:function(a){this.aa.angle!==a&&(A(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.aa.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.aa.alignment},set:function(a){this.aa.alignment!==a&&(ab(a,Z,Z,"alternateAlignment"),this.aa.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.aa.nodeIndent}, +set:function(a){this.aa.nodeIndent!==a&&(A(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.aa.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.aa.nodeIndentPastParent},set:function(a){this.aa.nodeIndentPastParent!==a&&(A(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.aa.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.aa.nodeSpacing},set:function(a){this.aa.nodeSpacing!== +a&&(A(a,"number",Z,"alternateNodeSpacing"),this.aa.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.aa.layerSpacing},set:function(a){this.aa.layerSpacing!==a&&(A(a,"number",Z,"alternateLayerSpacing"),this.aa.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.aa.layerSpacingParentOverlap},set:function(a){this.aa.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"alternateLayerSpacingParentOverlap"), +0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&(ab(a,Z,Z,"alternateCompaction"),a===xu||a===zu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(A(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, +alternateRowSpacing:{configurable:!0,get:function(){return this.aa.rowSpacing},set:function(a){this.aa.rowSpacing!==a&&(A(a,"number",Z,"alternateRowSpacing"),this.aa.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.aa.rowIndent},set:function(a){this.aa.rowIndent!==a&&(A(a,"number",Z,"alternateRowIndent"),0<=a&&(this.aa.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.aa.commentSpacing}, +set:function(a){this.aa.commentSpacing!==a&&(A(a,"number",Z,"alternateCommentSpacing"),this.aa.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.aa.commentMargin},set:function(a){this.aa.commentMargin!==a&&(A(a,"number",Z,"alternateCommentMargin"),this.aa.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.aa.setsPortSpot},set:function(a){this.aa.setsPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsPortSpot"), +this.aa.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0,get:function(){return this.aa.portSpot},set:function(a){w(a,Ib,Z,"alternatePortSpot");this.aa.portSpot.D(a)||(this.aa.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.aa.setsChildPortSpot},set:function(a){this.aa.setsChildPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsChildPortSpot"),this.aa.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0, +enumerable:!0,get:function(){return this.aa.childPortSpot},set:function(a){w(a,Ib,Z,"alternateChildPortSpot");this.aa.childPortSpot.D(a)||(this.aa.childPortSpot=a,this.F())}}}); var Rt=new F(Z,"PathDefault",-1),St=new F(Z,"PathDestination",0),Zt=new F(Z,"PathSource",1),nu=new F(Z,"SortingForwards",10),ou=new F(Z,"SortingReverse",11),pu=new F(Z,"SortingAscending",12),qu=new F(Z,"SortingDescending",13),Pu=new F(Z,"AlignmentCenterSubtrees",20),Qu=new F(Z,"AlignmentCenterChildren",21),Bu=new F(Z,"AlignmentStart",22),Cu=new F(Z,"AlignmentEnd",23),su=new F(Z,"AlignmentBus",24),iu=new F(Z,"AlignmentBusBranching",25),tu=new F(Z,"AlignmentTopLeftBus",26),uu=new F(Z,"AlignmentBottomRightBus", 27),xu=new F(Z,"CompactionNone",30),zu=new F(Z,"CompactionBlock",31),Tt=new F(Z,"StyleLayered",40),mu=new F(Z,"StyleLastParents",41),lu=new F(Z,"StyleAlternating",42),ku=new F(Z,"StyleRootOnly",43),Vt=new F(Z,"ArrangementVertical",50),Zu=new F(Z,"ArrangementHorizontal",51),Yt=new F(Z,"ArrangementFixedRoots",52),Ut=new F(Z,"LayerIndividual",60),gu=new F(Z,"LayerSiblings",61),fu=new F(Z,"LayerUniform",62);Z.className="TreeLayout";Z.PathDefault=Rt;Z.PathDestination=St;Z.PathSource=Zt; Z.SortingForwards=nu;Z.SortingReverse=ou;Z.SortingAscending=pu;Z.SortingDescending=qu;Z.AlignmentCenterSubtrees=Pu;Z.AlignmentCenterChildren=Qu;Z.AlignmentStart=Bu;Z.AlignmentEnd=Cu;Z.AlignmentBus=su;Z.AlignmentBusBranching=iu;Z.AlignmentTopLeftBus=tu;Z.AlignmentBottomRightBus=uu;Z.CompactionNone=xu;Z.CompactionBlock=zu;Z.StyleLayered=Tt;Z.StyleLastParents=mu;Z.StyleAlternating=lu;Z.StyleRootOnly=ku;Z.ArrangementVertical=Vt;Z.ArrangementHorizontal=Zu;Z.ArrangementFixedRoots=Yt;Z.LayerIndividual=Ut; Z.LayerSiblings=gu;Z.LayerUniform=fu;function Wt(a){vq.call(this,a)}na(Wt,vq);Wt.prototype.createVertex=function(){return new Xt(this)};Wt.prototype.createEdge=function(){return new av(this)};Wt.className="TreeNetwork"; -function Xt(a){Jq.call(this,a);this.aa=!1;this.jb=null;this.v=[];this.ob=this.Ma=this.G=this.ma=0;this.ud=null;this.V=new K(0,0);this.Ia=new Hb(0,0);this.qa=new K(0,0);this.dm=this.cm=this.pA=!1;this.$o=this.Oo=null;this.md=nu;this.ed=Qq;this.Lb=0;this.Kb=Qu;this.Hq=this.Gq=0;this.Iq=20;this.ge=50;this.nq=0;this.yp=zu;this.qp=0;this.Zq=25;this.xp=this.Yq=10;this.wp=20;this.gr=!0;this.Pq=hd;this.fr=!0;this.tp=hd}na(Xt,Jq); -Xt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.md=a.sorting,this.ed=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Gq=a.nodeIndent,this.Hq=a.nodeIndentPastParent,this.Iq=a.nodeSpacing,this.ge=a.layerSpacing,this.nq=a.layerSpacingParentOverlap,this.yp=a.compaction,this.qp=a.breadthLimit,this.Zq=a.rowSpacing,this.Yq=a.rowIndent,this.xp=a.commentSpacing,this.wp=a.commentMargin,this.gr=a.setsPortSpot,this.Pq=a.portSpot,this.fr=a.setsChildPortSpot,this.tp=a.childPortSpot)}; -oa.Object.defineProperties(Xt.prototype,{initialized:{configurable:!0,get:function(){return this.aa},set:function(a){this.aa!==a&&(A(a,"boolean",Xt,"initialized"),this.aa=a)}},parent:{configurable:!0,get:function(){return this.jb},set:function(a){this.jb!==a&&(G&&null!==a&&w(a,Xt,Xt,"parent"),this.jb=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",Xt,"children:value");if(null!== +function Xt(a){Jq.call(this,a);this.$=!1;this.jb=null;this.v=[];this.ob=this.Ma=this.G=this.ma=0;this.ud=null;this.V=new K(0,0);this.Ia=new Hb(0,0);this.qa=new K(0,0);this.dm=this.cm=this.pA=!1;this.$o=this.Oo=null;this.md=nu;this.ed=Qq;this.Lb=0;this.Kb=Qu;this.Hq=this.Gq=0;this.Iq=20;this.he=50;this.nq=0;this.yp=zu;this.qp=0;this.Zq=25;this.xp=this.Yq=10;this.wp=20;this.gr=!0;this.Pq=hd;this.fr=!0;this.tp=hd}na(Xt,Jq); +Xt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.md=a.sorting,this.ed=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Gq=a.nodeIndent,this.Hq=a.nodeIndentPastParent,this.Iq=a.nodeSpacing,this.he=a.layerSpacing,this.nq=a.layerSpacingParentOverlap,this.yp=a.compaction,this.qp=a.breadthLimit,this.Zq=a.rowSpacing,this.Yq=a.rowIndent,this.xp=a.commentSpacing,this.wp=a.commentMargin,this.gr=a.setsPortSpot,this.Pq=a.portSpot,this.fr=a.setsChildPortSpot,this.tp=a.childPortSpot)}; +oa.Object.defineProperties(Xt.prototype,{initialized:{configurable:!0,get:function(){return this.$},set:function(a){this.$!==a&&(A(a,"boolean",Xt,"initialized"),this.$=a)}},parent:{configurable:!0,get:function(){return this.jb},set:function(a){this.jb!==a&&(G&&null!==a&&w(a,Xt,Xt,"parent"),this.jb=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",Xt,"children:value");if(null!== a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Gu(c))))):c.alignment===Bu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Gu(c))))):c.alignment===Bu?(e=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Gu(c))))):c.alignment===Bu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Gu(c))))):c.alignment===Bu?(e=d.left+b.x,0===b.x&&m.x * Definitions: https://github.com/NorthwoodsSoftware/GoJS @@ -1674,6 +1674,14 @@ export class Size { * are equal with a tolerance of 0.5, false otherwise. */ equalsApprox(s: Size): boolean; + /** + * Modify this Size so that its width and height are changed by the given distances. + * When the arguments are negative, this operation deflates this Size, but not beyond zero. + * @param {number} w The additional width, which must be a real number; may be negative. + * @param {number} h The additional height, which must be a real number; may be negative. + * @return {Rect} this. + */ + inflate(w: number, h: number): Size; /** * Gets or sets the width value of the Size. * The value must not be negative. @@ -5853,6 +5861,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is allowed and will result in a copy. * This defaults to 'copy'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get copyCursor(): string; @@ -5860,6 +5869,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is allowed and will result in a move. * This defaults to the empty string, which refers to the Diagram#defaultCursor. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get moveCursor(): string; @@ -5867,6 +5877,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is not allowed. * This defaults to 'no-drop'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get nodropCursor(): string; @@ -6190,6 +6201,7 @@ export abstract class LinkingBaseTool extends Tool { /** * Gets or sets the cursor used during the linking or relinking operation. * This defaults to 'pointer'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get linkingCursor(): string; @@ -11485,8 +11497,8 @@ export class Diagram { * To read more about cursor syntax, go to: * CSS cursors (mozilla.org). * - * If the specified cursor is not accepted by the platform, GoJS will append - * `-webkit-` or `-moz-` prefixes. + * If the specified cursor is not accepted by the platform, this property setter will try prepending + * `-webkit-` and `-moz-` prefixes when assigning the "cursor" CSS style property. * * Setting this property does not notify about any changed event. * Setting this value to the empty string ('') returns the Diagram's cursor to the #defaultCursor. @@ -13626,6 +13638,8 @@ export class CommandHandler { * If this command had been called before without any other zooming since then, * the original Diagram scale and position are restored. * This is normally invoked by the `Shift-Z` keyboard shortcut. + * If you do not want the behavior where this command might restore the original diagram scale and position on a subsequent call, + * set #isZoomToFitRestoreEnabled to false. * * As of 2.1, this animates zooming by default. Diagram#zoomToFit does not animate. * @@ -13633,6 +13647,7 @@ export class CommandHandler { * Please read the Introduction page on Extensions for how to override methods and how to call this base method. * @expose * @see #canZoomToFit + * @see #isZoomToFitRestoreEnabled * @since 1.1 */ zoomToFit(): void; @@ -15476,6 +15491,8 @@ export abstract class GraphObject { * Other strings should be valid CSS strings that specify a cursor. * This provides some more information about cursor syntax: * CSS cursors (mozilla.org). + * + * Read more about cursors at Diagram#currentCursor * @see Diagram#defaultCursor * @see Diagram#currentCursor */ @@ -28394,6 +28411,7 @@ export class TreeLayout extends Layout { * * These values are in degrees, where 0 is along the positive X axis, * and where 90 is along the positive Y axis. + * * This sets the #rootDefaults' property of the same name. */ get angle(): number; @@ -28419,6 +28437,7 @@ export class TreeLayout extends Layout { * at the start of the row of children for some reason. * For example, if you want to pretend the parent node is infinitely deep, * you can set this to be the breadth of the parent node. + * * This sets the #rootDefaults' property of the same name. */ get nodeIndent(): number; @@ -28432,6 +28451,7 @@ export class TreeLayout extends Layout { * * This property is only sensible when the #alignment * is TreeLayout.AlignmentStart|AlignmentStart or TreeLayout.AlignmentEnd|AlignmentEnd. + * * This sets the #rootDefaults' property of the same name. */ get nodeIndentPastParent(): number; @@ -28439,9 +28459,12 @@ export class TreeLayout extends Layout { /** * Gets or sets the distance between child nodes. * + * This is the distance between sibling nodes. + * A negative value causes sibling nodes to overlap. * The default value is 20. * - * A negative value causes sibling nodes to overlap. + * The #layerSpacing property determines the distance between a parent node and the layer of its children. + * * This sets the #rootDefaults' property of the same name. */ get nodeSpacing(): number; @@ -28449,13 +28472,14 @@ export class TreeLayout extends Layout { /** * Gets or sets the distance between a parent node and its children. * + * This is the distance between a parent node and the layer of its children. + * Negative values may cause children to overlap with the parent. * The default value is 50. * - * This is the distance between a parent node and its first row - * of children, in case there are multiple rows of its children. + * The #nodeSpacing property determines the distance between siblings. * The #rowSpacing property determines the distance - * between rows of children. - * Negative values may cause children to overlap with the parent. + * between multiple rows or columns of children. + * * This sets the #rootDefaults' property of the same name. */ get layerSpacing(): number; @@ -28470,6 +28494,7 @@ export class TreeLayout extends Layout { * unless the value of #layerSpacing is large enough. * A value of zero might still allow overlap between layers, * if #layerSpacing is negative. + * * This sets the #rootDefaults' property of the same name. */ get layerSpacingParentOverlap(): number; @@ -28505,19 +28530,22 @@ export class TreeLayout extends Layout { * later rows, when the alignment is not a "center" alignment, the * #rowIndent property specifies that space at the * start of each row. + * * This sets the #rootDefaults' property of the same name. */ get breadthLimit(): number; set breadthLimit(value: number); /** - * Gets or sets the distance between rows of children. + * Gets or sets the distance between rows or columns of a parent node's immediate children. * * The default value is 25. * * This property is only used when there is more than one * row of children for a given parent node. - * #layerSpacing determines the distance between - * the parent node and its first row of child nodes. + * The #nodeSpacing property determines the distance between siblings. + * The #layerSpacing property determines the distance between + * the parent node and its first row or column of child nodes. + * * This sets the #rootDefaults' property of the same name. */ get rowSpacing(): number; @@ -28530,6 +28558,7 @@ export class TreeLayout extends Layout { * * This is used to leave room for the links that connect a parent node * with the child nodes that are in additional rows. + * * This sets the #rootDefaults' property of the same name. */ get rowIndent(): number; @@ -28540,6 +28569,7 @@ export class TreeLayout extends Layout { * The default value is 10. * * This is used by #addComments and #layoutComments. + * * This sets the #rootDefaults' property of the same name. */ get commentSpacing(): number; @@ -28550,6 +28580,7 @@ export class TreeLayout extends Layout { * The default value is 20. * * This is used by #addComments and #layoutComments. + * * This sets the #rootDefaults' property of the same name. */ get commentMargin(): number; @@ -28562,6 +28593,7 @@ export class TreeLayout extends Layout { * if the node has only a single port. * * The spot used depends on the value of #portSpot. + * * This sets the #rootDefaults' property of the same name. */ get setsPortSpot(): boolean; @@ -28576,6 +28608,7 @@ export class TreeLayout extends Layout { * If the value is other than NoSpot, it is just assigned. * When #path is TreeLayout.PathSource|PathSource, * the port's ToSpot is set instead of the FromSpot. + * * This sets the #rootDefaults' property of the same name. */ get portSpot(): Spot; @@ -28588,6 +28621,7 @@ export class TreeLayout extends Layout { * if the node has only a single port. * * The spot used depends on the value of #childPortSpot. + * * This sets the #rootDefaults' property of the same name. */ get setsChildPortSpot(): boolean; @@ -28602,6 +28636,7 @@ export class TreeLayout extends Layout { * If the value is other than NoSpot, it is just assigned. * When #path is TreeLayout.PathSource|PathSource, * the port's FromSpot is set instead of the ToSpot. + * * This sets the #rootDefaults' property of the same name. */ get childPortSpot(): Spot; @@ -28665,10 +28700,10 @@ export class TreeLayout extends Layout { get alternateNodeIndent(): number; set alternateNodeIndent(value: number); /** - * Gets or sets the fraction of this node's breadth is added to #nodeIndent + * Gets or sets the fraction of this node's breadth is added to #alternateNodeIndent * to determine any spacing at the start of the children. * - * The default value is 0.0 -- the only indentation is specified by #nodeIndent. + * The default value is 0.0 -- the only indentation is specified by #alternateNodeIndent. * When the value is 1.0, the children will be indented past the breadth of the parent node. * * This property is only sensible when the #alignment @@ -28693,7 +28728,8 @@ export class TreeLayout extends Layout { * * This is the distance between a parent node and its first row * of children, in case there are multiple rows of its children. - * The #rowSpacing property determines the distance + * The #alternateNodeSpacing property determines the distance between siblings. + * The #alternateRowSpacing property determines the distance * between rows of children. * Negative values may cause children to overlap with the parent. * This sets the #alternateDefaults' property of the same name. @@ -28703,13 +28739,13 @@ export class TreeLayout extends Layout { /** * Gets or sets the alternate fraction of the node's depth for which the children's layer starts overlapped with the parent's layer. * - * The default value is 0.0 -- there is overlap between layers only if #layerSpacing is negative. - * A value of 1.0 and a zero #layerSpacing will cause child nodes to completely overlap the parent. + * The default value is 0.0 -- there is overlap between layers only if #alternateLayerSpacing is negative. + * A value of 1.0 and a zero #alternateLayerSpacing will cause child nodes to completely overlap the parent. * * A value greater than zero may still cause overlap between layers, - * unless the value of #layerSpacing is large enough. + * unless the value of #alternateLayerSpacing is large enough. * A value of zero might still allow overlap between layers, - * if #layerSpacing is negative. + * if #alternateLayerSpacing is negative. * This sets the #alternateDefaults' property of the same name. */ get alternateLayerSpacingParentOverlap(): number; @@ -28740,10 +28776,10 @@ export class TreeLayout extends Layout { * does not modify the size or shape of any node, the nodes will * just be laid out in a line, one per row, and the breadth is * determined by the broadest node. - * The distance between rows is specified by #rowSpacing. + * The distance between rows is specified by #alternateRowSpacing. * To make room for the links that go around earlier rows to get to * later rows, when the alignment is not a "center" alignment, the - * #rowIndent property specifies that space at the + * #alternateRowIndent property specifies that space at the * start of each row. * This sets the #alternateDefaults' property of the same name. */ @@ -28756,7 +28792,7 @@ export class TreeLayout extends Layout { * * This property is only used when there is more than one * row of children for a given parent node. - * #layerSpacing determines the distance between + * The #alternateLayerSpacing property determines the distance between * the parent node and its first row of child nodes. * This sets the #alternateDefaults' property of the same name. */ @@ -28801,7 +28837,7 @@ export class TreeLayout extends Layout { * The default value is true -- this may modify the spot of the port of this node, the parent, * if the node has only a single port. * - * The spot used depends on the value of #portSpot. + * The spot used depends on the value of #alternatePortSpot. * This sets the #alternateDefaults' property of the same name. */ get alternateSetsPortSpot(): boolean; @@ -28827,7 +28863,7 @@ export class TreeLayout extends Layout { * The default value is true -- this may modify the spot of the ports of the children nodes, * if the node has only a single port. * - * The spot used depends on the value of #childPortSpot. + * The spot used depends on the value of #alternateChildPortSpot. * This sets the #alternateDefaults' property of the same name. */ get alternateSetsChildPortSpot(): boolean; diff --git a/release/go-debug.js b/release/go-debug.js index 3549b7f8f..de0a0bb3e 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,8 +1,8 @@ /* - * GoJS v2.2.14 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.2.15 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2022 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.14/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.15/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function ba(a){var b=0;return function(){return bc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gthis.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.bb,d=this.pf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.bb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.ce();return!1};kb.prototype.Ad=function(){return this.next()}; -kb.prototype.first=function(){var a=this.Cb;this.ta=a.A;var b=a.s;this.bb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};kb.prototype.any=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};kb.prototype.all=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; -kb.prototype.each=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};kb.prototype.map=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new H;a.s=d;a.xb();return a.iterator}; -kb.prototype.filter=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};kb.prototype.ce=function(){this.key=-1;this.value=null;this.ta=-1;this.Cb.Kg=this};kb.prototype.toString=function(){return"ListIteratorBackwards("+this.bb+"/"+this.Cb.count+")"}; -oa.Object.defineProperties(kb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Cb.s.length}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.Ad;kb.prototype.next=kb.prototype.next;kb.prototype.reset=kb.prototype.reset;kb.className="ListIteratorBackwards"; +gb.prototype.reset=gb.prototype.reset;gb.className="SingletonIterator";function hb(a){this.Cb=a;this.qf=null;a.Ua=null;this.ta=a.A;this.bb=-1}hb.prototype.reset=function(){var a=this.Cb;a.Ua=null;this.ta=a.A;this.bb=-1};hb.prototype.next=function(){var a=this.Cb;if(a.A!==this.ta){if(0>this.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.bb,d=this.qf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.bb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.ce();return!1};ib.prototype.Ad=function(){return this.next()}; +ib.prototype.first=function(){var a=this.Cb;this.ta=a.A;var b=a.s;this.bb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};ib.prototype.any=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};ib.prototype.all=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; +ib.prototype.each=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};ib.prototype.map=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new H;a.s=d;a.xb();return a.iterator}; +ib.prototype.filter=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};ib.prototype.ce=function(){this.key=-1;this.value=null;this.ta=-1;this.Cb.Kg=this};ib.prototype.toString=function(){return"ListIteratorBackwards("+this.bb+"/"+this.Cb.count+")"}; +oa.Object.defineProperties(ib.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Cb.s.length}}});ib.prototype.first=ib.prototype.first;ib.prototype.hasNext=ib.prototype.Ad;ib.prototype.next=ib.prototype.next;ib.prototype.reset=ib.prototype.reset;ib.className="ListIteratorBackwards"; function H(a){Za(this);this._isFrozen=!1;this.s=[];this.A=0;this.Kg=this.Ua=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=H.prototype;t.xb=function(){var a=this.A;a++;999999999a||a>=b.length)&&Ba(a,"0 <= i < length",H,"elt:i");return b[a]};t.get=function(a){return this.N(a)};t.ad=function(a,b){G&&E(a,H,"setElt:i");var c=this.s;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",H,"setElt:i");this._isFrozen&&xa(this,a);c[a]=b};t.set=function(a,b){this.ad(a,b)};t.first=function(){var a=this.s;return 0===a.length?null:a[0]}; @@ -52,19 +52,19 @@ H.prototype.copy=function(){var a=new H,b=this.s;0=f)return this;(0>b||b>=e-1)&&Ba(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a=e)for(c=d.slice(b),c.sort(a),a=b;a=this.s.length)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new hb(this)}},iteratorBackwards:{configurable:!0, -enumerable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Kg;return null!==a?(a.reset(),a):new kb(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.Ei;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.zv;H.prototype.toArray=H.prototype.Ka;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.sb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Hb; +enumerable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Kg;return null!==a?(a.reset(),a):new ib(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.Ei;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.zv;H.prototype.toArray=H.prototype.Ka;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.sb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Hb; H.prototype.pop=H.prototype.pop;H.prototype.last=H.prototype.lc;H.prototype.first=H.prototype.first;H.prototype.set=H.prototype.set;H.prototype.setElt=H.prototype.ad;H.prototype.get=H.prototype.get;H.prototype.elt=H.prototype.N;H.prototype.indexOf=H.prototype.indexOf;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.clear=H.prototype.clear;H.prototype.addAll=H.prototype.addAll;H.prototype.push=H.prototype.push;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.pa; -H.prototype.freeze=H.prototype.freeze;H.className="List";function mb(a){this.hg=a;a.Ua=null;this.ta=a.A;this.xa=null}mb.prototype.reset=function(){var a=this.hg;a.Ua=null;this.ta=a.A;this.xa=null};mb.prototype.next=function(){var a=this.hg;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};mb.prototype.Ad=function(){return this.next()}; -mb.prototype.first=function(){var a=this.hg;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null};mb.prototype.any=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};mb.prototype.all=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0}; -mb.prototype.each=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this};mb.prototype.map=function(a){var b=this.hg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;)c.add(a(e.value)),b.A!==d&&Da(b),e=e.Aa;return c.iterator};mb.prototype.filter=function(a){var b=this.hg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;){var f=e.value;a(f)&&c.add(f);b.A!==d&&Da(b);e=e.Aa}return c.iterator}; -mb.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.hg.Ua=this};mb.prototype.toString=function(){return null!==this.xa?"SetIterator@"+this.xa.value:"SetIterator"};oa.Object.defineProperties(mb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.hg.Ub}}});mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset; -mb.className="SetIterator";function I(a){Za(this);this._isFrozen=!1;this.Vb={};this.Ub=0;this.Ua=null;this.A=0;this.jf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.xb=function(){var a=this.A;a++;999999999=this.Ub)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new mb(this)}}});I.prototype.toList=I.prototype.yv;I.prototype.toArray=I.prototype.Ka; I.prototype.clear=I.prototype.clear;I.prototype.retainAll=I.prototype.oA;I.prototype.removeAll=I.prototype.Xo;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.first=I.prototype.first;I.prototype.containsAny=I.prototype.Ry;I.prototype.containsAll=I.prototype.Qy;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.addAll=I.prototype.addAll;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.pa;I.prototype.freeze=I.prototype.freeze; var pb=1;I.className="Set";I.uniqueHash=Za;I.hashIdUnique=nb;I.hashId=lb;function qb(a){this.ra=a;this.ta=a.A;this.xa=null}qb.prototype.reset=function(){this.ta=this.ra.A;this.xa=null};qb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=this.key=a=b.key,!0;this.ce();return!1};qb.prototype.Ad=function(){return this.next()}; @@ -75,31 +75,31 @@ qb.className="MapKeySetIterator";function rb(a){I.call(this);Za(this);this._isFr t.clear=function(){v("This Set is read-only: "+this.toString())};t.first=function(){var a=this.ra.ja;return null!==a?a.key:null};rb.prototype.any=function(a){for(var b=this.ra.ja;null!==b;){if(a(b.key))return!0;b=b.Aa}return!1};rb.prototype.all=function(a){for(var b=this.ra.ja;null!==b;){if(!a(b.key))return!1;b=b.Aa}return!0};rb.prototype.each=function(a){for(var b=this.ra.ja;null!==b;)a(b.key),b=b.Aa;return this}; rb.prototype.map=function(a){for(var b=new I,c=this.ra.ja;null!==c;)b.add(a(c.key)),c=c.Aa;return b};rb.prototype.filter=function(a){for(var b=new I,c=this.ra.ja;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Aa}return b};rb.prototype.copy=function(){return new rb(this.ra)};rb.prototype.zv=function(){var a=new I,b=this.ra.Vb,c;for(c in b)a.add(b[c].key);return a};rb.prototype.Ka=function(){var a=this.ra.Vb,b=Array(this.ra.Ub),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; rb.prototype.yv=function(){var a=new H,b=this.ra.Vb,c;for(c in b)a.add(b[c].key);return a};oa.Object.defineProperties(rb.prototype,{count:{configurable:!0,get:function(){return this.ra.Ub}},size:{configurable:!0,get:function(){return this.ra.Ub}},iterator:{configurable:!0,get:function(){return 0>=this.ra.Ub?fb:new qb(this.ra)}}});rb.prototype.toList=rb.prototype.yv;rb.prototype.toArray=rb.prototype.Ka;rb.prototype.toSet=rb.prototype.zv; -rb.prototype.first=rb.prototype.first;rb.prototype.clear=rb.prototype.clear;rb.prototype["delete"]=rb.prototype.delete;rb.prototype.remove=rb.prototype.remove;rb.prototype.has=rb.prototype.has;rb.prototype.contains=rb.prototype.contains;rb.prototype.add=rb.prototype.add;rb.prototype.thaw=rb.prototype.pa;rb.prototype.freeze=rb.prototype.freeze;rb.className="MapKeySet";function ub(a){this.ra=a;a.hf=null;this.ta=a.A;this.xa=null} -ub.prototype.reset=function(){var a=this.ra;a.hf=null;this.ta=a.A;this.xa=null};ub.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};ub.prototype.Ad=function(){return this.next()};ub.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -ub.prototype.any=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};ub.prototype.all=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};ub.prototype.each=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this}; -ub.prototype.map=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.value)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};ub.prototype.filter=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.value;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};ub.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.hf=this}; +rb.prototype.first=rb.prototype.first;rb.prototype.clear=rb.prototype.clear;rb.prototype["delete"]=rb.prototype.delete;rb.prototype.remove=rb.prototype.remove;rb.prototype.has=rb.prototype.has;rb.prototype.contains=rb.prototype.contains;rb.prototype.add=rb.prototype.add;rb.prototype.thaw=rb.prototype.pa;rb.prototype.freeze=rb.prototype.freeze;rb.className="MapKeySet";function ub(a){this.ra=a;a.jf=null;this.ta=a.A;this.xa=null} +ub.prototype.reset=function(){var a=this.ra;a.jf=null;this.ta=a.A;this.xa=null};ub.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};ub.prototype.Ad=function(){return this.next()};ub.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +ub.prototype.any=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};ub.prototype.all=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};ub.prototype.each=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this}; +ub.prototype.map=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.value)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};ub.prototype.filter=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.value;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};ub.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.jf=this}; ub.prototype.toString=function(){return null!==this.xa?"MapValueSetIterator@"+this.xa.value:"MapValueSetIterator"};oa.Object.defineProperties(ub.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Ub}}});ub.prototype.first=ub.prototype.first;ub.prototype.hasNext=ub.prototype.Ad;ub.prototype.next=ub.prototype.next;ub.prototype.reset=ub.prototype.reset;ub.className="MapValueSetIterator"; function ob(a,b){this.key=a;this.value=b;this.nl=this.Aa=null}ob.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};ob.className="KeyValuePair";function vb(a){this.ra=a;a.Ua=null;this.ta=a.A;this.xa=null}vb.prototype.reset=function(){var a=this.ra;a.Ua=null;this.ta=a.A;this.xa=null}; vb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.key=b.key,this.value=b.value,!0;this.ce();return!1};vb.prototype.Ad=function(){return this.next()};vb.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;return null!==a?(this.xa=a,this.key=a.key,this.value=a.value,a):null}; vb.prototype.any=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};vb.prototype.all=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};vb.prototype.each=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d),b.A!==c&&Da(b),d=d.Aa;return this}; vb.prototype.map=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};vb.prototype.filter=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)a(e)&&d.add(e),b.A!==c&&Da(b),e=e.Aa;return d.iterator};vb.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.Ua=this};vb.prototype.toString=function(){return null!==this.xa?"MapIterator@"+this.xa:"MapIterator"}; oa.Object.defineProperties(vb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Ub}}});vb.prototype.first=vb.prototype.first;vb.prototype.hasNext=vb.prototype.Ad;vb.prototype.next=vb.prototype.next;vb.prototype.reset=vb.prototype.reset;vb.className="MapIterator"; -function yb(a){Za(this);this._isFrozen=!1;this.Vb={};this.Ub=0;this.hf=this.Ua=null;this.A=0;this.jf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=yb.prototype;t.xb=function(){var a=this.A;a++;999999999=this.count)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new vb(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?fb:new qb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return fb; -var a=this.hf;return null!==a?(a.reset(),a):new ub(this)}}});yb.prototype.toKeySet=yb.prototype.Nf;yb.prototype.toArray=yb.prototype.Ka;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete;yb.prototype.remove=yb.prototype.remove;yb.prototype.get=yb.prototype.get;yb.prototype.getValue=yb.prototype.L;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.first=yb.prototype.first;yb.prototype.addAll=yb.prototype.addAll; +var a=this.jf;return null!==a?(a.reset(),a):new ub(this)}}});yb.prototype.toKeySet=yb.prototype.Of;yb.prototype.toArray=yb.prototype.Ka;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete;yb.prototype.remove=yb.prototype.remove;yb.prototype.get=yb.prototype.get;yb.prototype.getValue=yb.prototype.L;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.first=yb.prototype.first;yb.prototype.addAll=yb.prototype.addAll; yb.prototype.set=yb.prototype.set;yb.prototype.add=yb.prototype.add;yb.prototype.thaw=yb.prototype.pa;yb.prototype.freeze=yb.prototype.freeze;yb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var zb,Ab,Bb,Cb,Db;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; -K.prototype.vg=function(a,b){G&&(A(a,"number",K,"setTo:x"),A(b,"number",K,"setTo:y"),this.la());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(w(a,K,K,"set:p"),this.la());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; +K.prototype.wg=function(a,b){G&&(A(a,"number",K,"setTo:x"),A(b,"number",K,"setTo:y"),this.la());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(w(a,K,K,"set:p"),this.la());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Eb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new K(c,e)}return new K} -function Fb(a){G&&w(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ni=function(a,b){return this.J===a&&this.K===b};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(w(a,K,K,"add:p"),this.la());this.J+=a.x;this.K+=a.y;return this};t.qe=function(a){G&&(w(a,K,K,"subtract:p"),this.la());this.J-=a.x;this.K-=a.y;return this}; +function Fb(a){G&&w(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ni=function(a,b){return this.J===a&&this.K===b};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(w(a,K,K,"add:p"),this.la());this.J+=a.x;this.K+=a.y;return this};t.re=function(a){G&&(w(a,K,K,"subtract:p"),this.la());this.J-=a.x;this.K-=a.y;return this}; t.offset=function(a,b){G&&(E(a,K,"offset:dx"),E(b,K,"offset:dy"),this.la());this.J+=a;this.K+=b;return this};K.prototype.rotate=function(a){G&&(E(a,K,"rotate:angle"),this.la());if(0===a)return this;var b=this.J,c=this.K;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.J=a*b-d*c;this.K=d*b+a*c;return this};t=K.prototype; -t.scale=function(a,b){G&&(E(a,K,"scale:sx"),E(b,K,"scale:sy"),this.la());this.J*=a;this.K*=b;return this};t.Cf=function(a){G&&w(a,K,K,"distanceSquaredPoint:p");var b=a.x-this.J;a=a.y-this.K;return b*b+a*a};t.zd=function(a,b){G&&(E(a,K,"distanceSquared:px"),E(b,K,"distanceSquared:py"));a-=this.J;b-=this.K;return a*a+b*b};t.normalize=function(){G&&this.la();var a=this.J,b=this.K,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c} t.Py=function(a,b){G&&(w(a,K,K,"compareWithLineSegmentPoint:p"),w(b,K,K,"compareWithLineSegmentPoint:q"));return L.Gl(a.x,a.y,b.x,b.y,this.x,this.y)};t.eA=function(a,b,c,d){G&&(E(a,K,"projectOntoLineSegment:px"),E(b,K,"projectOntoLineSegment:py"),E(c,K,"projectOntoLineSegment:qx"),E(d,K,"projectOntoLineSegment:qy"));L.qh(a,b,c,d,this.J,this.K,this);return this}; t.fA=function(a,b){G&&(w(a,K,K,"projectOntoLineSegmentPoint:p"),w(b,K,K,"projectOntoLineSegmentPoint:q"));L.qh(a.x,a.y,b.x,b.y,this.J,this.K,this);return this};t.tA=function(a,b,c,d){G&&(E(a,K,"snapToGrid:originx"),E(b,K,"snapToGrid:originy"),E(c,K,"snapToGrid:cellwidth"),E(d,K,"snapToGrid:cellheight"));L.Eo(this.J,this.K,a,b,c,d,this);return this};t.uA=function(a,b){G&&(w(a,K,K,"snapToGridPoint:p"),w(b,Hb,K,"snapToGridPoint:q"));L.Eo(this.J,this.K,a.x,a.y,b.width,b.height,this);return this}; @@ -111,61 +111,61 @@ t.u=function(){return isFinite(this.x)&&isFinite(this.y)};K.alloc=function(){var oa.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",K,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",K,"y"),this.la(a));this.K=a}}});K.prototype.isReal=K.prototype.u;K.prototype.setSpot=K.prototype.Di;K.prototype.setRectSpot=K.prototype.Ci;K.prototype.snapToGridPoint=K.prototype.uA;K.prototype.snapToGrid=K.prototype.tA; K.prototype.projectOntoLineSegmentPoint=K.prototype.fA;K.prototype.projectOntoLineSegment=K.prototype.eA;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(E(a,K,"intersectingLineSegments:a1x"),E(b,K,"intersectingLineSegments:a1y"),E(c,K,"intersectingLineSegments:a2x"),E(d,K,"intersectingLineSegments:a2y"),E(e,K,"intersectingLineSegments:b1x"),E(f,K,"intersectingLineSegments:b1y"),E(g,K,"intersectingLineSegments:b2x"),E(h,K,"intersectingLineSegments:b2y"));return L.Nl(a,b,c,d,e,f,g,h)}; K.prototype.compareWithLineSegmentPoint=K.prototype.Py;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(E(a,K,"compareWithLineSegment:a1x"),E(b,K,"compareWithLineSegment:a1y"),E(c,K,"compareWithLineSegment:a2x"),E(d,K,"compareWithLineSegment:a2y"),E(e,K,"compareWithLineSegment:b1x"),E(f,K,"compareWithLineSegment:b1y"));return L.Gl(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.cb;K.prototype.normalize=K.prototype.normalize; -K.prototype.distanceSquared=K.prototype.zd;K.prototype.distanceSquaredPoint=K.prototype.Cf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.qe;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.fb;K.prototype.equalTo=K.prototype.ni;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.vg;var Ob=[];K.className="Point";K.parse=Eb;K.stringify=Fb; +K.prototype.distanceSquared=K.prototype.zd;K.prototype.distanceSquaredPoint=K.prototype.Df;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.re;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.fb;K.prototype.equalTo=K.prototype.ni;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.wg;var Ob=[];K.className="Point";K.parse=Eb;K.stringify=Fb; K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb;K.Origin=zb=(new K(0,0)).na();K.InfiniteTopLeft=Ab=(new K(-Infinity,-Infinity)).na();K.InfiniteBottomRight=Bb=(new K(Infinity,Infinity)).na();K.SixPoint=Cb=(new K(6,6)).na();K.NoPoint=Db=(new K(NaN,NaN)).na();K.parse=Eb;K.stringify=Fb;K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb; -function Hb(a,b){void 0===a?this.fa=this.ga=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.ga=a,this.fa=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Pb,Qb,Rb,Sb,Tb,Ub,Yb;Hb.prototype.assign=function(a){this.ga=a.ga;this.fa=a.fa;return this};Hb.prototype.h=function(a,b){this.ga=a;this.fa=b;return this}; -Hb.prototype.vg=function(a,b){G&&(A(a,"number",Hb,"setTo:w"),A(b,"number",Hb,"setTo:h"),0>a&&Ba(a,">= 0",Hb,"setTo:w"),0>b&&Ba(b,">= 0",Hb,"setTo:h"),this.la());this.ga=a;this.fa=b;return this};Hb.prototype.set=function(a){G&&(w(a,Hb,Hb,"set:s"),this.la());this.ga=a.ga;this.fa=a.fa;return this};Hb.prototype.copy=function(){var a=new Hb;a.ga=this.ga;a.fa=this.fa;return a};t=Hb.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +function Hb(a,b){void 0===a?this.da=this.fa=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.fa=a,this.da=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Pb,Qb,Rb,Sb,Tb,Ub,Vb;Hb.prototype.assign=function(a){this.fa=a.fa;this.da=a.da;return this};Hb.prototype.h=function(a,b){this.fa=a;this.da=b;return this}; +Hb.prototype.wg=function(a,b){G&&(A(a,"number",Hb,"setTo:w"),A(b,"number",Hb,"setTo:h"),0>a&&Ba(a,">= 0",Hb,"setTo:w"),0>b&&Ba(b,">= 0",Hb,"setTo:h"),this.la());this.fa=a;this.da=b;return this};Hb.prototype.set=function(a){G&&(w(a,Hb,Hb,"set:s"),this.la());this.fa=a.fa;this.da=a.da;return this};Hb.prototype.copy=function(){var a=new Hb;a.fa=this.fa;a.da=this.da;return a};t=Hb.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; -function Zb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Hb(c,e)}return new Hb}function $b(a){G&&w(a,Hb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.D=function(a){return a instanceof Hb?this.ga===a.width&&this.fa===a.height:!1};t.ni=function(a,b){return this.ga===a&&this.fa===b}; -t.fb=function(a){return L.C(this.ga,a.width)&&L.C(this.fa,a.height)};t.u=function(){return isFinite(this.width)&&isFinite(this.height)};Hb.alloc=function(){var a=ac.pop();return void 0===a?new Hb:a};Hb.free=function(a){ac.push(a)}; -oa.Object.defineProperties(Hb.prototype,{width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(A(a,"number",Hb,"width"),this.la(a));0>a&&Ba(a,">= 0",Hb,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",Hb,"height"),this.la(a));0>a&&Ba(a,">= 0",Hb,"height");this.fa=a}}});Hb.prototype.isReal=Hb.prototype.u;Hb.prototype.equalsApprox=Hb.prototype.fb;Hb.prototype.equalTo=Hb.prototype.ni; -Hb.prototype.equals=Hb.prototype.D;Hb.prototype.set=Hb.prototype.set;Hb.prototype.setTo=Hb.prototype.vg;var ac=[];Hb.className="Size";Hb.parse=Zb;Hb.stringify=$b;Hb.ZeroSize=Pb=(new Hb(0,0)).na();Hb.OneSize=Qb=(new Hb(1,1)).na();Hb.SixSize=Rb=(new Hb(6,6)).na();Hb.EightSize=Sb=(new Hb(8,8)).na();Hb.TenSize=Tb=(new Hb(10,10)).na();Hb.InfiniteSize=Ub=(new Hb(Infinity,Infinity)).na();Hb.NoSize=Yb=(new Hb(NaN,NaN)).na();Hb.parse=Zb;Hb.stringify=$b; -function M(a,b,c,d){void 0===a?this.fa=this.ga=this.K=this.J=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.J=a,this.K=b,this.ga=c,this.fa=d):a instanceof K?(c=a.x,a=a.y,b instanceof K?(d=b.x,b=b.y,this.J=Math.min(c,d),this.K=Math.min(a,b),this.ga=Math.abs(c-d),this.fa=Math.abs(a-b)):b instanceof Hb?(this.J=c,this.K=a,this.ga=b.width,this.fa=b.height):v("Incorrect second argument supplied to Rect constructor "+b)):v("Invalid arguments to Rect constructor: "+ -a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.J=a.J;this.K=a.K;this.ga=a.ga;this.fa=a.fa;return this};t.h=function(a,b,c,d){this.J=a;this.K=b;this.ga=c;this.fa=d;return this};function bc(a,b,c){a.ga=b;a.fa=c}t.vg=function(a,b,c,d){G&&(A(a,"number",M,"setTo:x"),A(b,"number",M,"setTo:y"),A(c,"number",M,"setTo:w"),A(d,"number",M,"setTo:h"),0>c&&Ba(c,">= 0",M,"setTo:w"),0>d&&Ba(d,">= 0",M,"setTo:h"),this.la());this.J=a;this.K=b;this.ga=c;this.fa=d;return this}; -t.set=function(a){G&&(w(a,M,M,"set:r"),this.la());this.J=a.J;this.K=a.K;this.ga=a.ga;this.fa=a.fa;return this};t.bd=function(a){G&&(w(a,K,M,"setPoint:p"),this.la());this.J=a.x;this.K=a.y;return this};t.sA=function(a){G&&(w(a,Hb,M,"setSize:s"),this.la());this.ga=a.width;this.fa=a.height;return this};M.prototype.copy=function(){var a=new M;a.J=this.J;a.K=this.K;a.ga=this.ga;a.fa=this.fa;return a};t=M.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +function Zb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Hb(c,e)}return new Hb}function $b(a){G&&w(a,Hb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.D=function(a){return a instanceof Hb?this.fa===a.width&&this.da===a.height:!1};t.ni=function(a,b){return this.fa===a&&this.da===b}; +t.fb=function(a){return L.C(this.fa,a.width)&&L.C(this.da,a.height)};t.Bc=function(a,b){G&&(E(a,Hb,"inflate:w"),E(b,Hb,"inflate:h"));a=this.width+a;this.fa=0<=a?a:0;b=this.height+b;this.da=0<=b?b:0;return this};t.u=function(){return isFinite(this.width)&&isFinite(this.height)};Hb.alloc=function(){var a=ac.pop();return void 0===a?new Hb:a};Hb.free=function(a){ac.push(a)}; +oa.Object.defineProperties(Hb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",Hb,"width"),this.la(a));0>a&&Ba(a,">= 0",Hb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.da},set:function(a){G&&(A(a,"number",Hb,"height"),this.la(a));0>a&&Ba(a,">= 0",Hb,"height");this.da=a}}});Hb.prototype.isReal=Hb.prototype.u;Hb.prototype.inflate=Hb.prototype.Bc;Hb.prototype.equalsApprox=Hb.prototype.fb; +Hb.prototype.equalTo=Hb.prototype.ni;Hb.prototype.equals=Hb.prototype.D;Hb.prototype.set=Hb.prototype.set;Hb.prototype.setTo=Hb.prototype.wg;var ac=[];Hb.className="Size";Hb.parse=Zb;Hb.stringify=$b;Hb.ZeroSize=Pb=(new Hb(0,0)).na();Hb.OneSize=Qb=(new Hb(1,1)).na();Hb.SixSize=Rb=(new Hb(6,6)).na();Hb.EightSize=Sb=(new Hb(8,8)).na();Hb.TenSize=Tb=(new Hb(10,10)).na();Hb.InfiniteSize=Ub=(new Hb(Infinity,Infinity)).na();Hb.NoSize=Vb=(new Hb(NaN,NaN)).na();Hb.parse=Zb;Hb.stringify=$b; +function M(a,b,c,d){void 0===a?this.da=this.fa=this.K=this.J=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.J=a,this.K=b,this.fa=c,this.da=d):a instanceof K?(c=a.x,a=a.y,b instanceof K?(d=b.x,b=b.y,this.J=Math.min(c,d),this.K=Math.min(a,b),this.fa=Math.abs(c-d),this.da=Math.abs(a-b)):b instanceof Hb?(this.J=c,this.K=a,this.fa=b.width,this.da=b.height):v("Incorrect second argument supplied to Rect constructor "+b)):v("Invalid arguments to Rect constructor: "+ +a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.J=a.J;this.K=a.K;this.fa=a.fa;this.da=a.da;return this};t.h=function(a,b,c,d){this.J=a;this.K=b;this.fa=c;this.da=d;return this};function bc(a,b,c){a.fa=b;a.da=c}t.wg=function(a,b,c,d){G&&(A(a,"number",M,"setTo:x"),A(b,"number",M,"setTo:y"),A(c,"number",M,"setTo:w"),A(d,"number",M,"setTo:h"),0>c&&Ba(c,">= 0",M,"setTo:w"),0>d&&Ba(d,">= 0",M,"setTo:h"),this.la());this.J=a;this.K=b;this.fa=c;this.da=d;return this}; +t.set=function(a){G&&(w(a,M,M,"set:r"),this.la());this.J=a.J;this.K=a.K;this.fa=a.fa;this.da=a.da;return this};t.bd=function(a){G&&(w(a,K,M,"setPoint:p"),this.la());this.J=a.x;this.K=a.y;return this};t.sA=function(a){G&&(w(a,Hb,M,"setSize:s"),this.la());this.fa=a.width;this.da=a.height;return this};M.prototype.copy=function(){var a=new M;a.J=this.J;a.K=this.K;a.fa=this.fa;a.da=this.da;return a};t=M.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function cc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new M(c,e,f,g)}return new M}function dc(a){G&&w(a,M);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()} -t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.D=function(a){return a instanceof M?this.J===a.x&&this.K===a.y&&this.ga===a.width&&this.fa===a.height:!1};t.ni=function(a,b,c,d){return this.J===a&&this.K===b&&this.ga===c&&this.fa===d};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)&&L.C(this.ga,a.width)&&L.C(this.fa,a.height)};function ec(a,b){return L.ha(a.J,b.x)&&L.ha(a.K,b.y)&&L.ha(a.ga,b.width)&&L.ha(a.fa,b.height)} -t.ea=function(a){G&&w(a,K,M,"containsPoint:p");return this.J<=a.x&&this.J+this.ga>=a.x&&this.K<=a.y&&this.K+this.fa>=a.y};t.Qe=function(a){G&&w(a,M,M,"containsRect:r");return this.J<=a.x&&a.x+a.width<=this.J+this.ga&&this.K<=a.y&&a.y+a.height<=this.K+this.fa}; -t.contains=function(a,b,c,d){G?(E(a,M,"contains:x"),E(b,M,"contains:y"),void 0===c?c=0:E(c,M,"contains:w"),void 0===d?d=0:E(d,M,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.J<=a&&a+c<=this.J+this.ga&&this.K<=b&&b+d<=this.K+this.fa};t.offset=function(a,b){G&&(E(a,M,"offset:dx"),E(b,M,"offset:dy"),this.la());this.J+=a;this.K+=b;return this}; -t.Wc=function(a,b){G&&(E(a,M,"inflate:w"),E(b,M,"inflate:h"));return fc(this,b,a,b,a)};t.so=function(a){G&&w(a,gc,M,"addMargin:m");return fc(this,a.top,a.right,a.bottom,a.left)};t.xv=function(a){G&&w(a,gc,M,"subtractMargin:m");return fc(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){G&&(E(a,M,"grow:t"),E(b,M,"grow:r"),E(c,M,"grow:b"),E(d,M,"grow:l"));return fc(this,a,b,c,d)}; -function fc(a,b,c,d,e){G&&a.la();var f=a.ga;c+e<=-f?(a.J+=f/2,a.ga=0):(a.J-=e,a.ga+=c+e);c=a.fa;b+d<=-c?(a.K+=c/2,a.fa=0):(a.K-=b,a.fa+=b+d);return a}t.yx=function(a){G&&w(a,M,M,"intersectRect:r");return hc(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){G&&(E(a,M,"intersect:x"),E(b,M,"intersect:y"),E(c,M,"intersect:w"),E(d,M,"intersect:h"),(0>c||0>d)&&v("Rect.intersect:Width and height cannot be negative"));return hc(this,a,b,c,d)}; -function hc(a,b,c,d,e){G&&a.la();var f=Math.max(a.J,b),g=Math.max(a.K,c);b=Math.min(a.J+a.ga,b+d);c=Math.min(a.K+a.fa,c+e);a.J=f;a.K=g;a.ga=Math.max(0,b-f);a.fa=Math.max(0,c-g);return a}t.Yc=function(a){G&&w(a,M,M,"intersectsRect:r");return this.Wu(a.x,a.y,a.width,a.height)}; -t.Wu=function(a,b,c,d){G&&(E(a,M,"intersects:x"),E(b,M,"intersects:y"),E(a,M,"intersects:w"),E(b,M,"intersects:h"),(0>c||0>d)&&v("Rect.intersects:Width and height cannot be negative"));var e=this.ga,f=this.J;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.fa;c=this.K;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; -function kc(a,b){var c=a.ga,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.fa;a=a.K;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Ye=function(a){G&&w(a,K,M,"unionPoint:p");return lc(this,a.x,a.y,0,0)};t.cd=function(a){G&&w(a,M,M,"unionRect:r");return lc(this,a.J,a.K,a.ga,a.fa)}; -t.Bv=function(a,b,c,d){G?(E(a,M,"union:x"),E(b,M,"union:y"),void 0===c?c=0:E(c,M,"union:w"),void 0===d?d=0:E(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.la()):(void 0===c&&(c=0),void 0===d&&(d=0));return lc(this,a,b,c,d)};function lc(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.ga,b+d);c=Math.max(a.K+a.fa,c+e);a.J=f;a.K=g;a.ga=b-f;a.fa=c-g;return a} -t.Di=function(a,b,c){G&&(E(a,M,"setSpot:x"),E(b,M,"setSpot:y"),w(c,Ib,M,"setSpot:spot"),this.la());this.J=a-c.offsetX-c.x*this.ga;this.K=b-c.offsetY-c.y*this.fa;return this}; +t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.D=function(a){return a instanceof M?this.J===a.x&&this.K===a.y&&this.fa===a.width&&this.da===a.height:!1};t.ni=function(a,b,c,d){return this.J===a&&this.K===b&&this.fa===c&&this.da===d};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)&&L.C(this.fa,a.width)&&L.C(this.da,a.height)};function ec(a,b){return L.ha(a.J,b.x)&&L.ha(a.K,b.y)&&L.ha(a.fa,b.width)&&L.ha(a.da,b.height)} +t.ga=function(a){G&&w(a,K,M,"containsPoint:p");return this.J<=a.x&&this.J+this.fa>=a.x&&this.K<=a.y&&this.K+this.da>=a.y};t.Re=function(a){G&&w(a,M,M,"containsRect:r");return this.J<=a.x&&a.x+a.width<=this.J+this.fa&&this.K<=a.y&&a.y+a.height<=this.K+this.da}; +t.contains=function(a,b,c,d){G?(E(a,M,"contains:x"),E(b,M,"contains:y"),void 0===c?c=0:E(c,M,"contains:w"),void 0===d?d=0:E(d,M,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.J<=a&&a+c<=this.J+this.fa&&this.K<=b&&b+d<=this.K+this.da};t.offset=function(a,b){G&&(E(a,M,"offset:dx"),E(b,M,"offset:dy"),this.la());this.J+=a;this.K+=b;return this}; +t.Bc=function(a,b){G&&(E(a,M,"inflate:w"),E(b,M,"inflate:h"));return fc(this,b,a,b,a)};t.so=function(a){G&&w(a,gc,M,"addMargin:m");return fc(this,a.top,a.right,a.bottom,a.left)};t.xv=function(a){G&&w(a,gc,M,"subtractMargin:m");return fc(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){G&&(E(a,M,"grow:t"),E(b,M,"grow:r"),E(c,M,"grow:b"),E(d,M,"grow:l"));return fc(this,a,b,c,d)}; +function fc(a,b,c,d,e){G&&a.la();var f=a.fa;c+e<=-f?(a.J+=f/2,a.fa=0):(a.J-=e,a.fa+=c+e);c=a.da;b+d<=-c?(a.K+=c/2,a.da=0):(a.K-=b,a.da+=b+d);return a}t.zx=function(a){G&&w(a,M,M,"intersectRect:r");return hc(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){G&&(E(a,M,"intersect:x"),E(b,M,"intersect:y"),E(c,M,"intersect:w"),E(d,M,"intersect:h"),(0>c||0>d)&&v("Rect.intersect:Width and height cannot be negative"));return hc(this,a,b,c,d)}; +function hc(a,b,c,d,e){G&&a.la();var f=Math.max(a.J,b),g=Math.max(a.K,c);b=Math.min(a.J+a.fa,b+d);c=Math.min(a.K+a.da,c+e);a.J=f;a.K=g;a.fa=Math.max(0,b-f);a.da=Math.max(0,c-g);return a}t.Yc=function(a){G&&w(a,M,M,"intersectsRect:r");return this.Wu(a.x,a.y,a.width,a.height)}; +t.Wu=function(a,b,c,d){G&&(E(a,M,"intersects:x"),E(b,M,"intersects:y"),E(a,M,"intersects:w"),E(b,M,"intersects:h"),(0>c||0>d)&&v("Rect.intersects:Width and height cannot be negative"));var e=this.fa,f=this.J;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.da;c=this.K;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; +function ic(a,b){var c=a.fa,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.da;a=a.K;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Ze=function(a){G&&w(a,K,M,"unionPoint:p");return lc(this,a.x,a.y,0,0)};t.cd=function(a){G&&w(a,M,M,"unionRect:r");return lc(this,a.J,a.K,a.fa,a.da)}; +t.Bv=function(a,b,c,d){G?(E(a,M,"union:x"),E(b,M,"union:y"),void 0===c?c=0:E(c,M,"union:w"),void 0===d?d=0:E(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.la()):(void 0===c&&(c=0),void 0===d&&(d=0));return lc(this,a,b,c,d)};function lc(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.fa,b+d);c=Math.max(a.K+a.da,c+e);a.J=f;a.K=g;a.fa=b-f;a.da=c-g;return a} +t.Di=function(a,b,c){G&&(E(a,M,"setSpot:x"),E(b,M,"setSpot:y"),w(c,Ib,M,"setSpot:spot"),this.la());this.J=a-c.offsetX-c.x*this.fa;this.K=b-c.offsetY-c.y*this.da;return this}; function mc(a,b,c,d,e,f,g,h){G?(E(a,M,"contains:rx"),E(b,M,"contains:ry"),E(c,M,"contains:rw"),E(d,M,"contains:rh"),E(e,M,"contains:x"),E(f,M,"contains:y"),void 0===g?g=0:E(g,M,"contains:w"),void 0===h?h=0:E(h,M,"contains:h"),(0>c||0>d||0>g||0>h)&&v("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} function nc(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersects:rx"),E(b,M,"intersects:ry"),E(c,M,"intersects:rw"),E(d,M,"intersects:rh"),E(e,M,"intersects:x"),E(f,M,"intersects:y"),E(g,M,"intersects:w"),E(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Oz=function(){return 0===this.width&&0===this.height}; M.alloc=function(){var a=oc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=oc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){oc.push(a)}; -oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"y"),this.la(a));this.K=a}},width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(A(a,"number",M,"width"),this.la(a));0>a&&Ba(a,">= 0",M,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.fa}, -set:function(a){G&&(A(a,"number",M,"height"),this.la(a));0>a&&Ba(a,">= 0",M,"height");this.fa=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"left"),this.la(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"top"),this.la(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.ga},set:function(a){G&&(E(a,M,"right"),this.la(a));this.J+=a-(this.J+this.ga)}}, -bottom:{configurable:!0,get:function(){return this.K+this.fa},set:function(a){G&&(E(a,M,"top"),this.la(a));this.K+=a-(this.K+this.fa)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(w(a,K,M,"position"),this.la(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Hb(this.ga,this.fa)},set:function(a){G&&(w(a,Hb,M,"size"),this.la(a));this.ga=a.width;this.fa=a.height}},center:{configurable:!0, -enumerable:!0,get:function(){return new K(this.J+this.ga/2,this.K+this.fa/2)},set:function(a){G&&(w(a,K,M,"center"),this.la(a));this.J=a.x-this.ga/2;this.K=a.y-this.fa/2}},centerX:{configurable:!0,get:function(){return this.J+this.ga/2},set:function(a){G&&(E(a,M,"centerX"),this.la(a));this.J=a-this.ga/2}},centerY:{configurable:!0,get:function(){return this.K+this.fa/2},set:function(a){G&&(E(a,M,"centerY"),this.la(a));this.K=a-this.fa/2}}});M.prototype.isEmpty=M.prototype.Oz; -M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersectsLineSegment:x"),E(b,M,"intersectsLineSegment:y"),E(c,M,"intersectsLineSegment:w"),E(d,M,"intersectsLineSegment:h"),E(e,M,"intersectsLineSegment:p1x"),E(f,M,"intersectsLineSegment:p1y"),E(g,M,"intersectsLineSegment:p2x"),E(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.zx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Di; -M.prototype.union=M.prototype.Bv;M.prototype.unionRect=M.prototype.cd;M.prototype.unionPoint=M.prototype.Ye;M.prototype.intersects=M.prototype.Wu;M.prototype.intersectsRect=M.prototype.Yc;M.prototype.intersect=M.prototype.Vu;M.prototype.intersectRect=M.prototype.yx;M.prototype.grow=M.prototype.Iz;M.prototype.subtractMargin=M.prototype.xv;M.prototype.addMargin=M.prototype.so;M.prototype.inflate=M.prototype.Wc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; -M.prototype.containsRect=M.prototype.Qe;M.prototype.containsPoint=M.prototype.ea;M.prototype.equalsApprox=M.prototype.fb;M.prototype.equalTo=M.prototype.ni;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.sA;M.prototype.setPoint=M.prototype.bd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.vg;var pc=null,qc=null,oc=[];M.className="Rect";M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;M.ZeroRect=pc=(new M(0,0,0,0)).na();M.NoRect=qc=(new M(NaN,NaN,NaN,NaN)).na(); -M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;function gc(a,b,c,d){void 0===a?this.Ee=this.ve=this.Ne=this.Oe=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}gc.prototype.assign=function(a){this.Oe=a.Oe;this.Ne=a.Ne;this.ve=a.ve;this.Ee=a.Ee;return this}; -gc.prototype.vg=function(a,b,c,d){G&&(A(a,"number",gc,"setTo:t"),A(b,"number",gc,"setTo:r"),A(c,"number",gc,"setTo:b"),A(d,"number",gc,"setTo:l"),this.la());this.Oe=a;this.Ne=b;this.ve=c;this.Ee=d;return this};gc.prototype.set=function(a){G&&(w(a,gc,gc,"assign:m"),this.la());this.Oe=a.Oe;this.Ne=a.Ne;this.ve=a.ve;this.Ee=a.Ee;return this};gc.prototype.copy=function(){var a=new gc;a.Oe=this.Oe;a.Ne=this.Ne;a.ve=this.ve;a.Ee=this.Ee;return a};t=gc.prototype; +oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"y"),this.la(a));this.K=a}},width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",M,"width"),this.la(a));0>a&&Ba(a,">= 0",M,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.da}, +set:function(a){G&&(A(a,"number",M,"height"),this.la(a));0>a&&Ba(a,">= 0",M,"height");this.da=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"left"),this.la(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"top"),this.la(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.fa},set:function(a){G&&(E(a,M,"right"),this.la(a));this.J+=a-(this.J+this.fa)}}, +bottom:{configurable:!0,get:function(){return this.K+this.da},set:function(a){G&&(E(a,M,"top"),this.la(a));this.K+=a-(this.K+this.da)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(w(a,K,M,"position"),this.la(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Hb(this.fa,this.da)},set:function(a){G&&(w(a,Hb,M,"size"),this.la(a));this.fa=a.width;this.da=a.height}},center:{configurable:!0, +enumerable:!0,get:function(){return new K(this.J+this.fa/2,this.K+this.da/2)},set:function(a){G&&(w(a,K,M,"center"),this.la(a));this.J=a.x-this.fa/2;this.K=a.y-this.da/2}},centerX:{configurable:!0,get:function(){return this.J+this.fa/2},set:function(a){G&&(E(a,M,"centerX"),this.la(a));this.J=a-this.fa/2}},centerY:{configurable:!0,get:function(){return this.K+this.da/2},set:function(a){G&&(E(a,M,"centerY"),this.la(a));this.K=a-this.da/2}}});M.prototype.isEmpty=M.prototype.Oz; +M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersectsLineSegment:x"),E(b,M,"intersectsLineSegment:y"),E(c,M,"intersectsLineSegment:w"),E(d,M,"intersectsLineSegment:h"),E(e,M,"intersectsLineSegment:p1x"),E(f,M,"intersectsLineSegment:p1y"),E(g,M,"intersectsLineSegment:p2x"),E(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.Ax(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Di; +M.prototype.union=M.prototype.Bv;M.prototype.unionRect=M.prototype.cd;M.prototype.unionPoint=M.prototype.Ze;M.prototype.intersects=M.prototype.Wu;M.prototype.intersectsRect=M.prototype.Yc;M.prototype.intersect=M.prototype.Vu;M.prototype.intersectRect=M.prototype.zx;M.prototype.grow=M.prototype.Iz;M.prototype.subtractMargin=M.prototype.xv;M.prototype.addMargin=M.prototype.so;M.prototype.inflate=M.prototype.Bc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; +M.prototype.containsRect=M.prototype.Re;M.prototype.containsPoint=M.prototype.ga;M.prototype.equalsApprox=M.prototype.fb;M.prototype.equalTo=M.prototype.ni;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.sA;M.prototype.setPoint=M.prototype.bd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.wg;var pc=null,qc=null,oc=[];M.className="Rect";M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;M.ZeroRect=pc=(new M(0,0,0,0)).na();M.NoRect=qc=(new M(NaN,NaN,NaN,NaN)).na(); +M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;function gc(a,b,c,d){void 0===a?this.Fe=this.we=this.Oe=this.Pe=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}gc.prototype.assign=function(a){this.Pe=a.Pe;this.Oe=a.Oe;this.we=a.we;this.Fe=a.Fe;return this}; +gc.prototype.wg=function(a,b,c,d){G&&(A(a,"number",gc,"setTo:t"),A(b,"number",gc,"setTo:r"),A(c,"number",gc,"setTo:b"),A(d,"number",gc,"setTo:l"),this.la());this.Pe=a;this.Oe=b;this.we=c;this.Fe=d;return this};gc.prototype.set=function(a){G&&(w(a,gc,gc,"assign:m"),this.la());this.Pe=a.Pe;this.Oe=a.Oe;this.we=a.we;this.Fe=a.Fe;return this};gc.prototype.copy=function(){var a=new gc;a.Pe=this.Pe;a.Oe=this.Oe;a.we=this.we;a.Fe=this.Fe;return a};t=gc.prototype; t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function rc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new gc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new gc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new gc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new gc(c,e):new gc(c,e,f,g)}return new gc} -function wc(a){G&&w(a,gc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.D=function(a){return a instanceof gc?this.Oe===a.top&&this.Ne===a.right&&this.ve===a.bottom&&this.Ee===a.left:!1};t.ni=function(a,b,c,d){return this.Oe===a&&this.Ne===b&&this.ve===c&&this.Ee===d}; -t.fb=function(a){return L.C(this.Oe,a.top)&&L.C(this.Ne,a.right)&&L.C(this.ve,a.bottom)&&L.C(this.Ee,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};gc.alloc=function(){var a=xc.pop();return void 0===a?new gc:a};gc.free=function(a){xc.push(a)}; -oa.Object.defineProperties(gc.prototype,{top:{configurable:!0,get:function(){return this.Oe},set:function(a){G&&(E(a,gc,"top"),this.la(a));this.Oe=a}},right:{configurable:!0,get:function(){return this.Ne},set:function(a){G&&(E(a,gc,"right"),this.la(a));this.Ne=a}},bottom:{configurable:!0,get:function(){return this.ve},set:function(a){G&&(E(a,gc,"bottom"),this.la(a));this.ve=a}},left:{configurable:!0,get:function(){return this.Ee},set:function(a){G&& -(E(a,gc,"left"),this.la(a));this.Ee=a}}});gc.prototype.isReal=gc.prototype.u;gc.prototype.equalsApprox=gc.prototype.fb;gc.prototype.equalTo=gc.prototype.ni;gc.prototype.equals=gc.prototype.D;gc.prototype.set=gc.prototype.set;gc.prototype.setTo=gc.prototype.vg;var yc=null,zc=null,xc=[];gc.className="Margin";gc.parse=rc;gc.stringify=wc;gc.ZeroMargin=yc=(new gc(0,0,0,0)).na();gc.TwoMargin=zc=(new gc(2,2,2,2)).na();gc.parse=rc;gc.stringify=wc; -function Ib(a,b,c,d){void 0===a?this.ke=this.je=this.K=this.J=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1}var Ec,Fc,Gc,Hc,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,ed,fd,gd,hd,id,jd,kd,ld,md,pd,qd,rd,sd,td;Ib.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.je=a.je;this.ke=a.ke;return this}; -Ib.prototype.vg=function(a,b,c,d){G&&(ud(a,"setTo:x"),ud(b,"setTo:y"),vd(c,"setTo:offx"),vd(d,"setTo:offy"),this.la());this.J=a;this.K=b;this.je=c;this.ke=d;return this};Ib.prototype.set=function(a){G&&(w(a,Ib,Ib,"set:s"),this.la());this.J=a.J;this.K=a.K;this.je=a.je;this.ke=a.ke;return this};Ib.prototype.copy=function(){var a=new Ib;a.J=this.J;a.K=this.K;a.je=this.je;a.ke=this.ke;return a};t=Ib.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; -t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function wd(a,b){a.J=NaN;a.K=NaN;a.je=b;return a} +function sc(a){G&&w(a,gc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.D=function(a){return a instanceof gc?this.Pe===a.top&&this.Oe===a.right&&this.we===a.bottom&&this.Fe===a.left:!1};t.ni=function(a,b,c,d){return this.Pe===a&&this.Oe===b&&this.we===c&&this.Fe===d}; +t.fb=function(a){return L.C(this.Pe,a.top)&&L.C(this.Oe,a.right)&&L.C(this.we,a.bottom)&&L.C(this.Fe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};gc.alloc=function(){var a=xc.pop();return void 0===a?new gc:a};gc.free=function(a){xc.push(a)}; +oa.Object.defineProperties(gc.prototype,{top:{configurable:!0,get:function(){return this.Pe},set:function(a){G&&(E(a,gc,"top"),this.la(a));this.Pe=a}},right:{configurable:!0,get:function(){return this.Oe},set:function(a){G&&(E(a,gc,"right"),this.la(a));this.Oe=a}},bottom:{configurable:!0,get:function(){return this.we},set:function(a){G&&(E(a,gc,"bottom"),this.la(a));this.we=a}},left:{configurable:!0,get:function(){return this.Fe},set:function(a){G&& +(E(a,gc,"left"),this.la(a));this.Fe=a}}});gc.prototype.isReal=gc.prototype.u;gc.prototype.equalsApprox=gc.prototype.fb;gc.prototype.equalTo=gc.prototype.ni;gc.prototype.equals=gc.prototype.D;gc.prototype.set=gc.prototype.set;gc.prototype.setTo=gc.prototype.wg;var yc=null,zc=null,xc=[];gc.className="Margin";gc.parse=rc;gc.stringify=sc;gc.ZeroMargin=yc=(new gc(0,0,0,0)).na();gc.TwoMargin=zc=(new gc(2,2,2,2)).na();gc.parse=rc;gc.stringify=sc; +function Ib(a,b,c,d){void 0===a?this.le=this.ke=this.K=this.J=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1}var Ec,Fc,Gc,Hc,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,ed,fd,gd,hd,id,jd,kd,ld,md,pd,qd,rd,sd,td;Ib.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.ke=a.ke;this.le=a.le;return this}; +Ib.prototype.wg=function(a,b,c,d){G&&(ud(a,"setTo:x"),ud(b,"setTo:y"),vd(c,"setTo:offx"),vd(d,"setTo:offy"),this.la());this.J=a;this.K=b;this.ke=c;this.le=d;return this};Ib.prototype.set=function(a){G&&(w(a,Ib,Ib,"set:s"),this.la());this.J=a.J;this.K=a.K;this.ke=a.ke;this.le=a.le;return this};Ib.prototype.copy=function(){var a=new Ib;a.J=this.J;a.K=this.K;a.ke=this.ke;a.le=this.le;return a};t=Ib.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function wd(a,b){a.J=NaN;a.K=NaN;a.ke=b;return a} function ud(a,b){(isNaN(a)||1a)&&Ba(a,"0 <= "+b+" <= 1",Ib,b)}function vd(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&Ba(a,"real number, not NaN or Infinity",Ib,b)} function xd(a){if("string"===typeof a){a=a.trim();if("None"===a)return Ec;if("TopLeft"===a)return Fc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Gc;if("TopRight"===a)return Hc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Jc;if("Center"===a)return Kc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Lc;if("BottomLeft"===a)return Mc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Nc;if("BottomRight"===a)return Oc;if("TopSide"===a)return Qc;if("LeftSide"=== a)return Rc;if("RightSide"===a)return Sc;if("BottomSide"===a)return Tc;if("TopBottomSides"===a)return Uc;if("LeftRightSides"===a)return Vc;if("TopLeftSides"===a)return Wc;if("TopRightSides"===a)return Xc;if("BottomLeftSides"===a)return Yc;if("BottomRightSides"===a)return Zc;if("NotTopSide"===a)return $c;if("NotLeftSide"===a)return ad;if("NotRightSide"===a)return ed;if("NotBottomSide"===a)return fd;if("AllSides"===a)return gd;if("Default"===a)return hd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=L.Mv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);L.Mv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=L.Mv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);L.Mv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Or:function(a,b,c,d,e,f,g,h,k,l,m,n){if(L.Yb(a,b,g,h,n,c,d)&&L.Yb(a,b,g,h,n,e,f))return L.Yb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var x=(d+q)/2,y=(c+u)/2;return L.Or(a, -b,p,r,d,c,x,y,k,l,m,n)||L.Or(x,y,q,u,e,f,g,h,k,l,m,n)},Ky:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Jy:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Nb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))lc(l,a,b,0,0),lc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ -2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Dl(a,b,m,n,d,c,q,u,k,l);L.Dl(q,u,p,r,e,f,g,h,k,l)}return l},Pe:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Pe(a,b,m,n,d,c,q,u,k,l);L.Pe(q,u,p,r,e,f,g,h,k,l)}return l},gv:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,e,f,l,c,d))return L.Yb(a, +b,p,r,d,c,x,y,k,l,m,n)||L.Or(x,y,q,u,e,f,g,h,k,l,m,n)},Uw:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Ky:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Nb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))lc(l,a,b,0,0),lc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ +2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Dl(a,b,m,n,d,c,q,u,k,l);L.Dl(q,u,p,r,e,f,g,h,k,l)}return l},Qe:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Qe(a,b,m,n,d,c,q,u,k,l);L.Qe(q,u,p,r,e,f,g,h,k,l)}return l},gv:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,e,f,l,c,d))return L.Yb(a, b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2;return L.gv(a,b,m,n,p,r,g,h,k,l)||L.gv(p,r,c,d,e,f,g,h,k,l)},NA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},fv:function(a,b,c,d,e,f,g,h){if(L.Yb(a,b,e,f,g,c,d))lc(h,a,b,0,0),lc(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;L.fv(a,b,k,l,m,n,g,h);L.fv(m,n,c,d,e,f,g,h)}return h},To:function(a,b,c,d,e,f,g,h){if(L.Yb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;L.To(a,b,k,l,m,n,g,h);L.To(m,n,c,d,e,f,g,h)}return h},uo:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(L.Yb(a,b,g,h,p,c,d)&&L.Yb(a,b,g,h,p,e,f)){if(!L.Nl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,x=(c+e)/2,y=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+x)/2;c=(u+y)/2;x=(x+e)/ 2;y=(y+f)/2;var z=(d+x)/2,B=(c+y)/2,C=Infinity,D=!1,J=0,U=0;L.uo(a,b,q,u,d,c,z,B,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var x=(c+e)/2,y=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+x)/2;c=(u+y)/2;x=(x+e)/2;y=(y+f)/2;var z=(d+x)/2,B=(c+y)/2;r+=L.vo(a,b,q,u,d,c,z,B,k,l,m,n,p);r+=L.vo(z,B,x,y,e,f,g,h,k,l,m,n,p)}return r},qh:function(a,b,c,d,e,f,g){if(L.ha(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(L.ha(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, -b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(L.ha(h,g))return L.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(L.ha(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return L.qh(a,b,c,d,e,g*(e-a)+b,k)},LA:function(a,b,c,d,e){return L.Ve(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},KA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},Hf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(L.Ve(a,b,a, -d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},JA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, -h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},es:function(a,b,c){return L.zx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},zx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):mc(a,b,c,d,e,f)||mc(a,b,c,d,g,h)||L.Nl(a,b,k,b,e,f,g,h)||L.Nl(k,b,k,l,e,f,g,h)||L.Nl(k,l,a,l,e,f,g,h)||L.Nl(a,l,a,b,e,f,g,h)?!0:!1},Nl:function(a,b,c,d,e,f,g,h){return 0>=L.Gl(a,b,c,d,e,f)*L.Gl(a,b,c,d,g,h)&&0>=L.Gl(e,f,g,h,a,b)*L.Gl(e, -f,g,h,c,d)},Gl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Ro:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Zw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5a)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, +b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(L.ha(h,g))return L.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(L.ha(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return L.qh(a,b,c,d,e,g*(e-a)+b,k)},LA:function(a,b,c,d,e){return L.We(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},KA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},If:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(L.We(a,b,a, +d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},JA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, +h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},es:function(a,b,c){return L.Ax(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},Ax:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):mc(a,b,c,d,e,f)||mc(a,b,c,d,g,h)||L.Nl(a,b,k,b,e,f,g,h)||L.Nl(k,b,k,l,e,f,g,h)||L.Nl(k,l,a,l,e,f,g,h)||L.Nl(a,l,a,b,e,f,g,h)?!0:!1},Nl:function(a,b,c,d,e,f,g,h){return 0>=L.Gl(a,b,c,d,e,f)*L.Gl(a,b,c,d,g,h)&&0>=L.Gl(e,f,g,h,a,b)*L.Gl(e, +f,g,h,c,d)},Gl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Ro:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},$w:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fc,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case N.v:var b=new M(this.startX,this.startY,0,0);b.Bv(this.endX,this.endY,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 N.G:b=new M(this.startX,this.startY,0,0);b.Bv(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.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 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case N.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=C-1?!0:null!==l[u+1].match(D)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());x===x.toLowerCase()&&(b=B.x+b,c=B.y+c);a.h(b,c)}function f(){e(B);return B}function g(){e(z);return z}function h(){var a=y.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?B:new K(2*B.x-z.x,2*B.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2");a=a.replace(k,"$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(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;ag&&(g+=360),q.startAngle+=g);0>a&&(q.startAngle=180-q.startAngle,q.sweepAngle=-q.sweepAngle); 0>d&&(q.startAngle=-q.startAngle,q.sweepAngle=-q.sweepAngle);q.radiusX*=Math.sqrt(a*a+c*c);void 0!==q.radiusY&&(q.radiusY*=Math.sqrt(b*b+d*d));break;case $d:g=q.endX;h=q.endY;q.endX=g*a+h*c+e;q.endY=g*b+h*d+f;if(0===q.radiusX||0===q.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),q.xAxisRotation+=g);0>a&&(q.xAxisRotation=180-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);0>d&&(q.xAxisRotation=-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);q.radiusX*=Math.sqrt(a*a+c*c); q.radiusY*=Math.sqrt(b*b+d*d);break;default:v("Unknown Segment type: "+q.type)}}}}this._isInvalidBounds=!0;return this}; -t.ea=function(a,b){void 0===b&&(b=0);var c=this.nd,d=this.od,e=this.Cc,f=this.Dc;switch(this.type){case N.j:return L.Yb(c,d,e,f,b,a.x,a.y);case N.v:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ea(a);M.free(g);return a;case N.G:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return fe(this,a,b,!0,!1);default:return!1}}; -function fe(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.m:return fe(this,a,b,!0,!1);default:return!1}}; +function fe(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; -t.ox=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; +t.px=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Ru=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Math.abs(e-c)?0<=a-h?90:270:1>Math.abs(a-h)?0<=e-c?0:180:180*Math.atan2(a-h,e-c)/Math.PI,b;g+=m}}return b}; -t.px=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; +t.qx=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=K.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Le=a,this.$h=0,G&&E(d,ke,"x1"),this.ai=Math.max(d,0),G&&E(e,ke,"y1"),this.Rg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= -!0)):(G&&E(d,ke,"x1"),this.Le=d,G&&E(e,ke,"y1"),this.$h=e,G&&E(f,ke,"x2"),a===Zd&&(f=Math.max(f,0)),this.ai=f,"number"===typeof g?(a===Zd&&(g=Math.max(g,0)),this.Rg=g):this.Rg=0);this.$d=null}ke.prototype.copy=function(){var a=new ke;a.wa=this.wa;a.m=this.m&-2;a.Cc=this.Cc;a.Dc=this.Dc;a.Le=this.Le;a.$h=this.$h;a.ai=this.ai;a.Rg=this.Rg;return a};t=ke.prototype; +function ke(a,b,c,d,e,f,g,h){Za(this);void 0===a?a=Dd:G&&ab(a,ke,ke,"constructor:type");this.wa=a;this.o=2;void 0!==b?(G&&E(b,ke,"ex"),this.Dc=b):this.Dc=0;void 0!==c?(G&&E(c,ke,"ey"),this.Ec=c):this.Ec=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===$d?(a=f%360,0>a&&(a+=360),this.Me=a,this.$h=0,G&&E(d,ke,"x1"),this.ai=Math.max(d,0),G&&E(e,ke,"y1"),this.Rg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= +!0)):(G&&E(d,ke,"x1"),this.Me=d,G&&E(e,ke,"y1"),this.$h=e,G&&E(f,ke,"x2"),a===Zd&&(f=Math.max(f,0)),this.ai=f,"number"===typeof g?(a===Zd&&(g=Math.max(g,0)),this.Rg=g):this.Rg=0);this.$d=null}ke.prototype.copy=function(){var a=new ke;a.wa=this.wa;a.o=this.o&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Me=this.Me;a.$h=this.$h;a.ai=this.ai;a.Rg=this.Rg;return a};t=ke.prototype; t.fb=function(a){if(!(a instanceof ke)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Wd:case Dd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Xd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Yd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Zd:return L.C(this.startAngle, a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case $d:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.ub=function(a){a.classType===ke?this.type=a:Ea(this,a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Wd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Dd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Xd:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Yd:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Zd:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case $d:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function ae(a,b){if(null!==a.$d&&!1===b._isInvalidBounds)return a.$d;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$d=[],a.$d;b=a.Le;var e=a.$h,f=L.Zw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=L.Zw(0,0,b>f?b:f,m,m+g,!0);f=Jb.alloc();f.reset();f.translate(c,d);f.rotate(a.Le,0,0);f.scale(k,r);N.Ma(b,f); +function ae(a,b){if(null!==a.$d&&!1===b._isInvalidBounds)return a.$d;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$d=[],a.$d;b=a.Me;var e=a.$h,f=L.$w(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=L.$w(0,0,b>f?b:f,m,m+g,!0);f=Jb.alloc();f.reset();f.translate(c,d);f.rotate(a.Me,0,0);f.scale(k,r);N.Ma(b,f); Jb.free(f);a.$d=b;return a.$d} -oa.Object.defineProperties(ke.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.m&1)},set:function(a){this.m=a?this.m|1:this.m&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.m&2)},set:function(a){this.m=a?this.m|2:this.m&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.m&8)},set:function(a){this.isClosed!==a&&(this.m=a?this.m|8:this.m&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, -get:function(){return this.wa},set:function(a){G&&ab(a,ke,ke,"type");this._isFrozen&&xa(this,a);this.wa=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Cc},set:function(a){G&&E(a,ke,"endX");this._isFrozen&&xa(this,a);this.Cc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"endY");this._isFrozen&&xa(this,a);this.Dc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, -get:function(){return this.Le},set:function(a){G&&E(a,ke,"point1X");this._isFrozen&&xa(this,a);this.Le=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"point1Y");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.ai},set:function(a){G&&E(a,ke,"point2X");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, -get:function(){return this.Rg},set:function(a){G&&E(a,ke,"point2Y");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Le},set:function(a){G&&E(a,ke,"centerX");this._isFrozen&&xa(this,a);this.Le=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"centerY");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, -get:function(){return this.ai},set:function(a){G&&E(a,ke,"radiusX");0>a&&Ba(a,">= zero",ke,"radiusX");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.Rg},set:function(a){G&&E(a,ke,"radiusY");0>a&&Ba(a,">= zero",ke,"radiusY");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Cc},set:function(a){G&&E(a,ke,"startAngle");this._isFrozen&&xa(this, -a);a%=360;0>a&&(a+=360);this.Cc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Dc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.m&4)},set:function(a){this._isFrozen&&xa(this,a);this.m=a?this.m|4:this.m&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== -(this.m&16)},set:function(a){this._isFrozen&&xa(this,a);this.m=a?this.m|16:this.m&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Le},set:function(a){G&&E(a,ke,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Le=a;this._isInvalidBounds=!0}}});ke.prototype.equalsApprox=ke.prototype.fb; -var Wd=new F(ke,"Move",0),Dd=new F(ke,"Line",1),Xd=new F(ke,"Bezier",2),Yd=new F(ke,"QuadraticBezier",3),Zd=new F(ke,"Arc",4),$d=new F(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Wd;ke.Line=Dd;ke.Bezier=Xd;ke.QuadraticBezier=Yd;ke.Arc=Zd;ke.SvgArc=$d;function me(){this.H=null;this.pu=(new K(0,0)).freeze();this.at=(new K(0,0)).freeze();this.rp=this.Dq=0;this.sp=1;this.Kh="";this.Ir=this.Kp=!1;this.Ip=this.vp=0;this.zg=this.bq=this.iq=!1;this.Pp=null;this.Dr=0;this.yd=this.zr=null} -me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.H=this.H;a.pu.assign(this.viewPoint);a.at.assign(this.documentPoint);a.Dq=this.Dq;a.rp=this.rp;a.sp=this.sp;a.Kh=this.Kh;a.Kp=this.Kp;a.Ir=this.Ir;a.vp=this.vp;a.Ip=this.Ip;a.iq=this.iq;a.bq=this.bq;a.zg=this.zg;a.Pp=this.Pp;a.Dr=this.Dr;a.zr=this.zr;a.yd=this.yd;return a}; +oa.Object.defineProperties(ke.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.o&1)},set:function(a){this.o=a?this.o|1:this.o&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.o&2)},set:function(a){this.o=a?this.o|2:this.o&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.o&8)},set:function(a){this.isClosed!==a&&(this.o=a?this.o|8:this.o&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, +get:function(){return this.wa},set:function(a){G&&ab(a,ke,ke,"type");this._isFrozen&&xa(this,a);this.wa=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"endX");this._isFrozen&&xa(this,a);this.Dc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Ec},set:function(a){G&&E(a,ke,"endY");this._isFrozen&&xa(this,a);this.Ec=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, +get:function(){return this.Me},set:function(a){G&&E(a,ke,"point1X");this._isFrozen&&xa(this,a);this.Me=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"point1Y");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.ai},set:function(a){G&&E(a,ke,"point2X");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, +get:function(){return this.Rg},set:function(a){G&&E(a,ke,"point2Y");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Me},set:function(a){G&&E(a,ke,"centerX");this._isFrozen&&xa(this,a);this.Me=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"centerY");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, +get:function(){return this.ai},set:function(a){G&&E(a,ke,"radiusX");0>a&&Ba(a,">= zero",ke,"radiusX");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.Rg},set:function(a){G&&E(a,ke,"radiusY");0>a&&Ba(a,">= zero",ke,"radiusY");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"startAngle");this._isFrozen&&xa(this, +a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Ec},set:function(a){G&&E(a,ke,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.o&4)},set:function(a){this._isFrozen&&xa(this,a);this.o=a?this.o|4:this.o&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== +(this.o&16)},set:function(a){this._isFrozen&&xa(this,a);this.o=a?this.o|16:this.o&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Me},set:function(a){G&&E(a,ke,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Me=a;this._isInvalidBounds=!0}}});ke.prototype.equalsApprox=ke.prototype.fb; +var Wd=new F(ke,"Move",0),Dd=new F(ke,"Line",1),Xd=new F(ke,"Bezier",2),Yd=new F(ke,"QuadraticBezier",3),Zd=new F(ke,"Arc",4),$d=new F(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Wd;ke.Line=Dd;ke.Bezier=Xd;ke.QuadraticBezier=Yd;ke.Arc=Zd;ke.SvgArc=$d;function me(){this.H=null;this.pu=(new K(0,0)).freeze();this.at=(new K(0,0)).freeze();this.rp=this.Dq=0;this.sp=1;this.Kh="";this.Ir=this.Kp=!1;this.Ip=this.vp=0;this.Ag=this.bq=this.iq=!1;this.Pp=null;this.Dr=0;this.yd=this.zr=null} +me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.H=this.H;a.pu.assign(this.viewPoint);a.at.assign(this.documentPoint);a.Dq=this.Dq;a.rp=this.rp;a.sp=this.sp;a.Kh=this.Kh;a.Kp=this.Kp;a.Ir=this.Ir;a.vp=this.vp;a.Ip=this.Ip;a.iq=this.iq;a.bq=this.bq;a.Ag=this.Ag;a.Pp=this.Pp;a.Dr=this.Dr;a.zr=this.zr;a.yd=this.yd;return a}; me.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};me.prototype.Ho=function(a,b){var c=this.diagram;if(null===c)return b;ne(c,this.event,a,b);return b}; me.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;ne(c,this.event,a,b);b.assign(c.Es(b));return b}; oa.Object.defineProperties(me.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.pu},set:function(a){w(a,K,me,"viewPoint");this.pu.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.at},set:function(a){w(a,K,me,"documentPoint");this.at.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq= a}},button:{configurable:!0,get:function(){return this.rp},set:function(a){this.rp=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{configurable:!0,get:function(){return this.sp},set:function(a){this.sp=a}},key:{configurable:!0,get:function(){return this.Kh},set:function(a){this.Kh=a}},down:{configurable:!0,get:function(){return this.Kp},set:function(a){this.Kp=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.Ir},set:function(a){this.Ir=a}},clickCount:{configurable:!0,get:function(){return this.vp},set:function(a){this.vp=a}},delta:{configurable:!0,get:function(){return this.Ip},set:function(a){this.Ip=a}},isMultiTouch:{configurable:!0,get:function(){return this.iq},set:function(a){this.iq=a}},handled:{configurable:!0,get:function(){return this.bq},set:function(a){this.bq=a}},bubbles:{configurable:!0, -get:function(){return this.zg},set:function(a){this.zg=a}},event:{configurable:!0,get:function(){return this.Pp},set:function(a){this.Pp=a}},isTouchEvent:{configurable:!0,get:function(){var a=sa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=sa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.Dr},set:function(a){this.Dr=a}},targetDiagram:{configurable:!0, +get:function(){return this.Ag},set:function(a){this.Ag=a}},event:{configurable:!0,get:function(){return this.Pp},set:function(a){this.Pp=a}},isTouchEvent:{configurable:!0,get:function(){var a=sa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=sa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.Dr},set:function(a){this.Dr=a}},targetDiagram:{configurable:!0, get:function(){return this.zr},set:function(a){this.zr=a}},targetObject:{configurable:!0,get:function(){return this.yd},set:function(a){this.yd=a}},control:{configurable:!0,get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{configurable:!0,get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{configurable:!0, get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{configurable:!0,get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{configurable:!0,get: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},set:function(a){this.buttons= a?this.buttons|1:this.buttons&-2}},right:{configurable:!0,get: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},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{configurable:!0,get: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},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});me.prototype.getMultiTouchDocumentPoint=me.prototype.Cz;me.prototype.getMultiTouchViewPoint=me.prototype.Ho;me.className="InputEvent";function oe(){this.H=null;this.Ca="";this.Mq=this.vr=null}oe.prototype.copy=function(){var a=new oe;a.H=this.H;a.Ca=this.Ca;a.vr=this.vr;a.Mq=this.Mq;return a}; oe.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; oa.Object.defineProperties(oe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},subject:{configurable:!0,get:function(){return this.vr},set:function(a){this.vr=a}},parameter:{configurable:!0,get:function(){return this.Mq},set:function(a){this.Mq=a}}});oe.className="DiagramEvent"; -function pe(){this.Am=qe;this.qf=this.Cq="";this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}pe.prototype.clear=function(){this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}; -pe.prototype.copy=function(){var a=new pe;a.Am=this.Am;a.Cq=this.Cq;a.qf=this.qf;a.fc=this.fc;a.H=this.H;a.Jn=this.Jn;var b=this.Ln;a.Ln=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Kn;a.Kn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Fn;a.Fn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.En;a.En=Ga(b)&&"function"===typeof b.M?b.M():b;return a};pe.prototype.ub=function(a){a.classType===pe?this.change=a:Ea(this,a)}; +function pe(){this.Am=qe;this.rf=this.Cq="";this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}pe.prototype.clear=function(){this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}; +pe.prototype.copy=function(){var a=new pe;a.Am=this.Am;a.Cq=this.Cq;a.rf=this.rf;a.fc=this.fc;a.H=this.H;a.Jn=this.Jn;var b=this.Ln;a.Ln=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Kn;a.Kn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Fn;a.Fn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.En;a.En=Ga(b)&&"function"===typeof b.M?b.M():b;return a};pe.prototype.ub=function(a){a.classType===pe?this.change=a:Ea(this,a)}; pe.prototype.toString=function(){var a="";a=this.change===re?a+"* ":this.change===qe?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===re?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ra(this.object)),null!==this.oldValue&&(a+=" old: "+Ra(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ra(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};pe.prototype.L=function(a){return a?this.oldValue:this.newValue};pe.prototype.Ez=function(a){return a?this.oldParam:this.newParam};pe.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; pe.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};pe.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};pe.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; oa.Object.defineProperties(pe.prototype,{model:{configurable:!0,get:function(){return this.fc},set:function(a){this.fc=a}},diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},change:{configurable:!0,get:function(){return this.Am},set:function(a){G&&ab(a,pe,pe,"change");this.Am=a}},modelChange:{configurable:!0,get:function(){return this.Cq},set:function(a){G&&A(a,"string",pe,"modelChange");this.Cq=a}},propertyName:{configurable:!0, -enumerable:!0,get:function(){return this.qf},set:function(a){G&&"string"!==typeof a&&A(a,"function",pe,"propertyName");this.qf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Am===re&&("CommittedTransaction"===this.qf||"FinishedUndo"===this.qf||"FinishedRedo"===this.qf)}},object:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn=a}},oldValue:{configurable:!0,get:function(){return this.Ln},set:function(a){this.Ln= +enumerable:!0,get:function(){return this.rf},set:function(a){G&&"string"!==typeof a&&A(a,"function",pe,"propertyName");this.rf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Am===re&&("CommittedTransaction"===this.rf||"FinishedUndo"===this.rf||"FinishedRedo"===this.rf)}},object:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn=a}},oldValue:{configurable:!0,get:function(){return this.Ln},set:function(a){this.Ln= a}},oldParam:{configurable:!0,get:function(){return this.Kn},set:function(a){this.Kn=a}},newValue:{configurable:!0,get:function(){return this.Fn},set:function(a){this.Fn=a}},newParam:{configurable:!0,get:function(){return this.En},set:function(a){this.En=a}}});pe.prototype.redo=pe.prototype.redo;pe.prototype.canRedo=pe.prototype.canRedo;pe.prototype.undo=pe.prototype.undo;pe.prototype.canUndo=pe.prototype.canUndo;pe.prototype.getParam=pe.prototype.Ez; -pe.prototype.getValue=pe.prototype.L;pe.prototype.clear=pe.prototype.clear;var re=new F(pe,"Transaction",-1),qe=new F(pe,"Property",0),se=new F(pe,"Insert",1),te=new F(pe,"Remove",2);pe.className="ChangedEvent";pe.Transaction=re;pe.Property=qe;pe.Insert=se;pe.Remove=te;function ue(){this.o=(new H).freeze();this.Ca="";this.j=!1} +pe.prototype.getValue=pe.prototype.L;pe.prototype.clear=pe.prototype.clear;var re=new F(pe,"Transaction",-1),qe=new F(pe,"Property",0),se=new F(pe,"Insert",1),te=new F(pe,"Remove",2);pe.className="ChangedEvent";pe.Transaction=re;pe.Property=qe;pe.Insert=se;pe.Remove=te;function ue(){this.m=(new H).freeze();this.Ca="";this.j=!1} ue.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.ad(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -oa.Object.defineProperties(ue.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ue.prototype.optimize=ue.prototype.gk;ue.prototype.redo=ue.prototype.redo;ue.prototype.canRedo=ue.prototype.canRedo;ue.prototype.undo=ue.prototype.undo;ue.prototype.canUndo=ue.prototype.canUndo; -ue.prototype.clear=ue.prototype.clear;ue.className="Transaction";function ve(){this.Ht=new I;this.Gd=!1;this.v=(new H).freeze();this.Be=-1;this.o=999;this.De=!1;this.Ep=null;this.gi=0;this.j=!1;G&&(this.j=!0);this.He=(new H).freeze();this.il=new H;this.it=!0;this.st=this.gq=this.vt=this.ut=!1} +oa.Object.defineProperties(ue.prototype,{changes:{configurable:!0,get:function(){return this.m}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ue.prototype.optimize=ue.prototype.gk;ue.prototype.redo=ue.prototype.redo;ue.prototype.canRedo=ue.prototype.canRedo;ue.prototype.undo=ue.prototype.undo;ue.prototype.canUndo=ue.prototype.canUndo; +ue.prototype.clear=ue.prototype.clear;ue.className="Transaction";function ve(){this.Ht=new I;this.Gd=!1;this.v=(new H).freeze();this.Ce=-1;this.m=999;this.Ee=!1;this.Ep=null;this.gi=0;this.j=!1;G&&(this.j=!0);this.Ie=(new H).freeze();this.il=new H;this.it=!0;this.st=this.gq=this.vt=this.ut=!1} ve.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.N(d),null!==f&&f.clear(),b.sb(d),a.gq=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.N(0),null!==f&&f.clear(),b.sb(0),a.Be--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Be++);b.freeze()}a.isInternalTransaction||a.Pb("CommittedTransaction",c,e)}else{a.De=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| -a.Pb("RolledBackTransaction",c,e),a.De=!1}null!==e&&e.clear()}a.Ep=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.N(e),null!==b&&b.undo(),c.pa(),c.sb(e);c.freeze()}return!1}ve.prototype.canUndo=function(){if(!this.isEnabled||0a.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.N(d),null!==f&&f.clear(),b.sb(d),a.gq=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.N(0),null!==f&&f.clear(),b.sb(0),a.Ce--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Ce++);b.freeze()}a.isInternalTransaction||a.Pb("CommittedTransaction",c,e)}else{a.Ee=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| +a.Pb("RolledBackTransaction",c,e),a.Ee=!1}null!==e&&e.clear()}a.Ep=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.N(e),null!==b&&b.undo(),c.pa(),c.sb(e);c.freeze()}return!1}ve.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.it&&(a=a.diagram,null!==a&&!1===a.xi||Fa("Change not within a transaction: "+c.toString()))}}; ve.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; oa.Object.defineProperties(ve.prototype,{models:{configurable:!0,get:function(){return this.Ht.iterator}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){this.Gd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.N(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; -oa.Object.defineProperties(xe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",xe,"name");this.Ca=a}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",xe,"isEnabled");this.Gd=a}},isActive:{configurable:!0,get:function(){return this.ob},set:function(a){A(a,"boolean", -xe,"isActive");this.ob=a}},transactionResult:{configurable:!0,get:function(){return this.Ki},set:function(a){null!==a&&A(a,"string",xe,"transactionResult");this.Ki=a}}});xe.prototype.startTransaction=xe.prototype.Ja;xe.className="Tool";function Ua(){xe.call(this);this.name="ToolManager";this.jb=new H;this.tb=new H;this.Ib=new H;this.G=this.aa=850;this.o=(new Hb(2,2)).na();this.Ma=5E3;this.ma=Be;this.v=Ie;this.Dp=this.j=null;this.Hj=-1}na(Ua,xe);Ua.prototype.initializeStandardTools=function(){}; +oa.Object.defineProperties(xe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof P&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",xe,"name");this.Ca=a}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",xe,"isEnabled");this.Gd=a}},isActive:{configurable:!0,get:function(){return this.ob},set:function(a){A(a,"boolean", +xe,"isActive");this.ob=a}},transactionResult:{configurable:!0,get:function(){return this.Ki},set:function(a){null!==a&&A(a,"string",xe,"transactionResult");this.Ki=a}}});xe.prototype.startTransaction=xe.prototype.Ja;xe.className="Tool";function Ua(){xe.call(this);this.name="ToolManager";this.jb=new H;this.tb=new H;this.Ib=new H;this.G=this.$=850;this.m=(new Hb(2,2)).na();this.Ma=5E3;this.ma=Be;this.v=Ie;this.Dp=this.j=null;this.Hj=-1}na(Ua,xe);Ua.prototype.initializeStandardTools=function(){}; Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Ce&&this.Dp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Je&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Ke){b.bubbles=!0;return}if(this.gestureBehavior===Je)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; for(var d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Me;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Hf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Hf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.Jx&&d.T("LinkRelinked",c,d.Jx),c.toPort!==d.Kx&&d.T("LinkRelinked",c,d.Kx)):If(e,g,f,k,h):If(e,null,null,null,null)}}}}Oe.prototype.doDragOver=function(){}; +function nf(a,b,c){var d=!1,e=a.Fg.length,f=0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ne;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Hf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Hf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.Kx&&d.T("LinkRelinked",c,d.Kx),c.toPort!==d.Lx&&d.T("LinkRelinked",c,d.Lx)):If(e,g,f,k,h):If(e,null,null,null,null)}}}}Oe.prototype.doDragOver=function(){}; function Jf(a,b){var c=a.diagram;a.dragsLink&&vf(a,!0);hf(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;Kf(a,e,f);f=yf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Re){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof T&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Re){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof T&&Lf(c,d,a);M.free(a)}}}function Kf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof wf||(c=a.mouseDrop,null!==c&&c(b))}function Lf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Qe(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof R},!0,function(a){return a instanceof R},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Sd(b)&&c.isAvoiding&&c.gb()} +c.selection.iterator;b.next();)d=b.value,d instanceof T&&Lf(c,d,a);M.free(a)}}}function Kf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof wf||(c=a.mouseDrop,null!==c&&c(b))}function Lf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Re(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof R},!0,function(a){return a instanceof R},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Sd(b)&&c.isAvoiding&&c.gb()} Oe.prototype.doDropOnto=function(){};Oe.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(qf(this,!1),Ue(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts)):this.mayMove()?(lf(this),sf(this,this.draggedParts,!0)):this.mayDragOut()?(qf(this,!1),sf(this,this.copiedParts,!1)):lf(this),uf(this,a.lastInput.documentPoint))}}; Oe.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(lf(this),qf(this,!0),Ue(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts),null!==this.copiedParts&&(a.T("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,lf(this),this.mayMove()&&(sf(this,this.draggedParts, -!0),uf(this,a.lastInput.documentPoint)));this.Tm=!0;Jf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Nf():this.draggedParts.Nf();this.copiedParts=null;b&&Mf(this);a.ab();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.T(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.T("ChangedSelection",a.selection)}}}; -Oe.prototype.simulatedMouseMove=function(a,b,c){if(null===Re)return!1;var d=Re.diagram;c instanceof Q||(c=null);var e=Ve;c!==e&&(null!==e&&e!==d&&(e.wg(),Re.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ve=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Qe.contains(e)||Qe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +!0),uf(this,a.lastInput.documentPoint)));this.Tm=!0;Jf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Of():this.draggedParts.Of();this.copiedParts=null;b&&Mf(this);a.ab();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.T(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.T("ChangedSelection",a.selection)}}}; +Oe.prototype.simulatedMouseMove=function(a,b,c){if(null===Re)return!1;var d=Re.diagram;c instanceof P||(c=null);var e=Ve;c!==e&&(null!==e&&e!==d&&(e.xg(),Re.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ve=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Qe.contains(e)||Qe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;M.free(f); -f=a.pr;g=new yb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof R&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Md())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.eb(),g.add(k,a.Md(h))));K.free(h);a.copiedParts=g;Se(a,g.Nf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ +f=a.pr;g=new yb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof R&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Md())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.eb(),g.add(k,a.Md(h))));K.free(h);a.copiedParts=g;Se(a,g.Of());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ 2)));a.doUpdateCursor(null,!0)}}}Oe.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Bs=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.un=null};Oe.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; oa.Object.defineProperties(Oe.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.tb},set:function(a){A(a,"boolean",Oe,"isCopyEnabled");this.tb=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"boolean",Oe,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.ma},set:function(a){w(a,Pe,Oe,"dragOptions");this.ma=a}},isGridSnapEnabled:{configurable:!0, enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){A(a,"boolean",Oe,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.jb},set:function(a){A(a,"boolean",Oe,"isComplexRoutingRealtime");this.jb=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){A(a,"boolean",Oe,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){w(a,Hb,Oe,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){w(a,Ib,Oe,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){w(a,K,Oe,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){A(a,"boolean",Oe,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){A(a,"boolean",Oe,"dragsTree"); -this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Mc},set:function(a){this.Mc=a}},nodropCursor:{configurable:!0,get:function(){return this.Nc},set:function(a){this.Nc=a}},currentPart:{configurable:!0,get:function(){return this.aa},set:function(a){null!==a&&w(a,S,Oe,"currentPart");this.aa=a}},copiedParts:{configurable:!0, -get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Nf():null!==this.draggedParts?this.draggedParts.Nf():this.te}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&w(a,R,Oe,"draggedLink");this.diagram.draggedLink=a}}, +this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Nc},set:function(a){this.Nc=a}},nodropCursor:{configurable:!0,get:function(){return this.Oc},set:function(a){this.Oc=a}},currentPart:{configurable:!0,get:function(){return this.$},set:function(a){null!==a&&w(a,S,Oe,"currentPart");this.$=a}},copiedParts:{configurable:!0, +get:function(){return this.m},set:function(a){this.m=a}},draggedParts:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Of():null!==this.draggedParts?this.draggedParts.Of():this.ue}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&w(a,R,Oe,"draggedLink");this.diagram.draggedLink=a}}, isDragOutStarted:{configurable:!0,get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{configurable:!0,get:function(){return this.pr},set:function(a){w(a,K,Oe,"startPoint");this.pr.D(a)||this.pr.assign(a)}},delay:{configurable:!0,get:function(){return this.Jk},set:function(a){A(a,"number",Oe,"delay");this.Jk=a}}});Oe.prototype.getDraggingSource=Oe.prototype.Bz;var Re=null,Ve=null;Oe.className="DraggingTool";Qe=new H; Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Re&&Re.doCancel();xe.prototype.doCancel.call(this)}; -function Pf(){0=d&&(d=.1);var e=this,f=b.sg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof T){var k=g.oa(Kc,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;k=d&&(d=.1);var e=this,f=b.tg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof T){var k=g.oa(Kc,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Do(b).count>=c)return!1}return!0}; Pf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Qd(b).count>=c)return!1}return!0}; @@ -423,12 +423,12 @@ function Rf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLab Pf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Sf){if(d===Tf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Uf(this,a,b,c,!0)}if(d===Vf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== a)return!1;return!Uf(this,a,b,c,!0)}if(d===Wf)return a===b?a=!0:(d=new I,d.add(b),a=Xf(this,d,a,b,c)),!a;if(d===Yf)return!Uf(this,a,b,c,!1);if(d===Zf)return a===b?a=!0:(d=new I,d.add(b),a=$f(this,d,a,b,c)),!a}return!0};function Uf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Uf(a,g,c,d,e)))return!0}return!1} function Xf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Xf(a,b,g,d,e)))return!0}return!1}function $f(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&$f(a,b,h,d,e))return!0}}return!1} -oa.Object.defineProperties(Pf.prototype,{portGravity:{configurable:!0,get:function(){return this.te},set:function(a){A(a,"number",Pf,"portGravity");0<=a&&(this.te=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Ma},set:function(a){A(a,"boolean",Pf,"isUnconnectedLinkValid");this.Ma=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Ii}, +oa.Object.defineProperties(Pf.prototype,{portGravity:{configurable:!0,get:function(){return this.ue},set:function(a){A(a,"number",Pf,"portGravity");0<=a&&(this.ue=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Ma},set:function(a){A(a,"boolean",Pf,"isUnconnectedLinkValid");this.Ma=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Ii}, set:function(a){w(a,R,Pf,"temporaryLink");this.Ii=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Hi},set:function(a){w(a,T,Pf,"temporaryFromNode");if(this.Hi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){w(a,O,Pf,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.U.indexOf(this.j);b.sb(c);b.Hb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Ji}, -set:function(a){w(a,T,Pf,"temporaryToNode");if(this.Ji=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){w(a,O,Pf,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.U.indexOf(this.o);b.sb(c);b.Hb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Ib},set:function(a){null!==a&&w(a,R,Pf,"originalLink");this.Ib=a}},originalFromNode:{configurable:!0,get:function(){return this.jb}, -set:function(a){null!==a&&w(a,T,Pf,"originalFromNode");this.jb=a}},originalFromPort:{configurable:!0,get:function(){return this.tb},set:function(a){null!==a&&w(a,O,Pf,"originalFromPort");this.tb=a}},originalToNode:{configurable:!0,get:function(){return this.Mc},set:function(a){null!==a&&w(a,T,Pf,"originalToNode");this.Mc=a}},originalToPort:{configurable:!0,get:function(){return this.Nc},set:function(a){null!==a&&w(a,O,Pf,"originalToPort");this.Nc=a}},isForwards:{configurable:!0, -enumerable:!0,get:function(){return this.ma},set:function(a){A(a,"boolean",Pf,"isForwards");this.ma=a}},validPortsCache:{configurable:!0,get:function(){return this.jp}},targetPort:{configurable:!0,get:function(){return this.Rf},set:function(a){null!==a&&w(a,O,Pf,"targetPort");this.Rf=a}},linkValidation:{configurable:!0,get:function(){return this.oj},set:function(a){null!==a&&A(a,"function",Pf,"linkValidation");this.oj=a}},portTargeted:{configurable:!0, -get:function(){return this.Qf},set:function(a){null!==a&&A(a,"function",Pf,"portTargeted");this.Qf=a}}});Pf.className="LinkingBaseTool";function ag(){0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof V)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};ug.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -ug.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.Ja(this.name),this.Jq.set(this.adornedObject.oa(this.handle.alignment.dv())),this.Mn.set(this.adornedObject.part.location),this.vw.set(this.adornedObject.desiredSize),this.et=this.computeCellSize(),this.gt= -this.computeMinSize(),this.ft=this.computeMaxSize(),this.isActive=!0))};ug.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};ug.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b}; +ug.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ja(this.name),this.Jq.set(this.adornedObject.oa(this.handle.alignment.dv())),this.Mn.set(this.adornedObject.part.location),this.vw.set(this.adornedObject.desiredSize),this.et=this.computeCellSize(),this.gt= +this.computeMinSize(),this.ft=this.computeMaxSize(),this.isActive=!0))};ug.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ve=this.handle=null;this.isActive=a.isMouseCaptured=!1};ug.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b}; ug.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};ug.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.gt,c=this.ft,d=this.et,e=this.adornedObject.$r(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.td();K.free(e)}}; ug.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.gt,c=this.ft,d=this.et,e=this.adornedObject.$r(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);K.free(e);a.ab();this.transactionResult=this.name;a.T("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -ug.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.eb();c=c.oa(this.handle.alignment.dv());if(a instanceof wf){var d=new H;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Pe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().qe(c),!0,e)}else a.location=a.location.copy().qe(c).add(this.oppositePoint);b.td()}}; +ug.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.eb();c=c.oa(this.handle.alignment.dv());if(a instanceof wf){var d=new H;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Pe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.td()}}; ug.prototype.computeResize=function(a,b,c,d,e,f){b.kc()&&(b=Kc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=K.alloc();L.Eo(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), @@ -496,283 +496,283 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig ug.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};ug.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ -d,b.y=-d);return a.oa(b)};Bg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.Wq=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Bg.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b};Bg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.oa(b)};Bg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ve=this.handle=null;this.Wq=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Bg.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b};Bg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; Bg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};Bg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.ab();this.transactionResult=this.name;a.T("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; -Bg.prototype.rotate=function(a){G&&E(a,Bg,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.eb();var c=b.locationObject,d=b.rotateObject;if(c===d||c.ug(d))c=this.Mn.copy(),b.location=c.qe(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.td()}}; +Bg.prototype.rotate=function(a){G&&E(a,Bg,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.eb();var c=b.locationObject,d=b.rotateObject;if(c===d||c.vg(d))c=this.Mn.copy(),b.location=c.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.td()}}; Bg.prototype.computeRotate=function(a){a=this.rotationPoint.cb(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.si());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -oa.Object.defineProperties(Bg.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&w(a,O,Bg,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(w(a,O,Bg,"handle"),!(a.part instanceof Ce)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.ue},set:function(a){if(null!==a&&(w(a,O, -Bg,"handle"),a.part instanceof Ce))throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.ma},set:function(a){A(a,"number",Bg,"snapAngleMultiple");this.ma=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.aa},set:function(a){A(a,"number",Bg,"snapAngleEpsilon");this.aa=a}},originalAngle:{configurable:!0,get:function(){return this.uw}},rotationPoint:{configurable:!0, -enumerable:!0,get:function(){return this.Wq},set:function(a){this.Wq=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"number",Bg,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){A(a,"number",Bg,"handleDistance");this.G=a}}});Bg.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); +oa.Object.defineProperties(Bg.prototype,{handleArchetype:{configurable:!0,get:function(){return this.m},set:function(a){null!==a&&w(a,O,Bg,"handleArchetype");this.m=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(w(a,O,Bg,"handle"),!(a.part instanceof Ce)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.ve},set:function(a){if(null!==a&&(w(a,O, +Bg,"handle"),a.part instanceof Ce))throw Error("new handle must not be in an Adornment: "+a);this.ve=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.ma},set:function(a){A(a,"number",Bg,"snapAngleMultiple");this.ma=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.$},set:function(a){A(a,"number",Bg,"snapAngleEpsilon");this.$=a}},originalAngle:{configurable:!0,get:function(){return this.uw}},rotationPoint:{configurable:!0, +get:function(){return this.Wq},set:function(a){this.Wq=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"number",Bg,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){A(a,"number",Bg,"handleDistance");this.G=a}}});Bg.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); function Cg(){xe.call(this);0e.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};bh.prototype.doStart=function(){lh=this;null!==this.textBlock&&this.doActivate()}; -bh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof ch&&(this.textBlock=b,null!==b.part)){a.animationManager.Bc();this.isActive=!0;this.ta=ih;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.di=this.textBlock.copy();var d=new M(this.textBlock.oa(Fc),this.textBlock.oa(Oc));a.pv(d);c.show(b,a,this);this.currentTextEditor=c}}}};bh.prototype.doCancel=function(){this.stopTool()}; +bh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof ch&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.ta=ih;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.di=this.textBlock.copy();var d=new M(this.textBlock.oa(Fc),this.textBlock.oa(Oc));a.pv(d);c.show(b,a,this);this.currentTextEditor=c}}}};bh.prototype.doCancel=function(){this.stopTool()}; bh.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};bh.prototype.doMouseDown=function(){this.isActive&&this.acceptText(mh)};bh.prototype.acceptText=function(a){switch(a){case mh:if(this.ta===oh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.ta===ih||this.ta===kh||this.ta===jh)this.ta=ph,qh(this);break;case rh:case gh:case hh:if(gh!==a||!0!==this.textBlock.isMultiline)if(this.ta===ih||this.ta===kh||this.ta===jh)this.ta=ph,qh(this)}}; function qh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ja(a.name),a.ta=oh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.T("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.ta=kh,a.doError(e,f))}} bh.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};bh.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};bh.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.ta=eh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};bh.prototype.doStop=function(){lh=null}; -bh.prototype.isValidText=function(a,b,c){w(a,ch,bh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};bh.prototype.Hx=function(a){var b=this.di;b.text=a;b.measure(this.textBlock.Lh,Infinity);return b}; -oa.Object.defineProperties(bh.prototype,{textBlock:{configurable:!0,get:function(){return this.ma},set:function(a){null!==a&&w(a,ch,bh,"textBlock");this.ma=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Me||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, -get:function(){return this.aa},set:function(a){ab(a,bh,bh,"starting");this.aa=a}},textValidation:{configurable:!0,get:function(){return this.Dj},set:function(a){null!==a&&A(a,"function",bh,"textValidation");this.Dj=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&A(a,"number",bh,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&A(a, -"boolean",bh,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.ta},set:function(a){this.ta!==a&&(ab(a,bh,bh,"starting"),this.ta=a)}}});bh.prototype.measureTemporaryTextBlock=bh.prototype.Hx; +bh.prototype.isValidText=function(a,b,c){w(a,ch,bh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};bh.prototype.Ix=function(a){var b=this.di;b.text=a;b.measure(this.textBlock.Lh,Infinity);return b}; +oa.Object.defineProperties(bh.prototype,{textBlock:{configurable:!0,get:function(){return this.ma},set:function(a){null!==a&&w(a,ch,bh,"textBlock");this.ma=a}},currentTextEditor:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Me||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, +get:function(){return this.$},set:function(a){ab(a,bh,bh,"starting");this.$=a}},textValidation:{configurable:!0,get:function(){return this.Dj},set:function(a){null!==a&&A(a,"function",bh,"textValidation");this.Dj=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&A(a,"number",bh,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&A(a,"boolean", +bh,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.ta},set:function(a){this.ta!==a&&(ab(a,bh,bh,"starting"),this.ta=a)}}});bh.prototype.measureTemporaryTextBlock=bh.prototype.Ix; var rh=new F(bh,"LostFocus",0),mh=new F(bh,"MouseDown",1),hh=new F(bh,"Tab",2),gh=new F(bh,"Enter",3),sh=new F(bh,"SingleClick",0),dh=new F(bh,"SingleClickSelected",1),nh=new F(bh,"DoubleClick",2),eh=new F(bh,"StateNone",0),ih=new F(bh,"StateActive",1),jh=new F(bh,"StateEditing",2),ph=new F(bh,"StateValidating",3),kh=new F(bh,"StateInvalid",4),oh=new F(bh,"StateValidated",5),lh=null;bh.className="TextEditingTool";bh.LostFocus=rh;bh.MouseDown=mh;bh.Tab=hh;bh.Enter=gh;bh.SingleClick=sh; bh.SingleClickSelected=dh;bh.DoubleClick=nh;bh.StateNone=eh;bh.StateActive=ih;bh.StateEditing=jh;bh.StateValidating=ph;bh.StateInvalid=kh;bh.StateValidated=oh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); -function th(a){uh||(vh(),uh=!0);this.H=ye;this.Qk=this.Eb=this.kq=this.ec=!1;this.Iw=!0;this.Rk=wh;this.ym=!1;this.Ih=this.Gd=!0;this.Fg=600;this.Vv=this.Gw=!1;this.Yd=new I;this.be=new xh;this.be.Xd=this;this.Li=new I;this.hu=new I;this.Er=new I;this.ql=new I;a&&Object.assign(this,a)}th.prototype.Xe=function(a){this.H=a};th.prototype.canStart=function(){return!0};function yh(a,b){a.Gd&&a.canStart(b)&&(a.Yd.add(b),a.defaultAnimation.isAnimating&&a.Bc(),zh(a.H),a.Eb=!0)} -function Ah(a){if(a.Gd&&a.Eb){var b=a.be,c=a.H,d=a.Yd.contains("Model");d&&(a.Qk=!0,a.Rk===wh?(b.isViewportUnconstrained=!0,b.xc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Rk===Bh&&b.xc.clear(),a.Iw=a.Rk===Ch&&c.Wt.D(c.va)?!0:!1,c.T("InitialAnimationStarting",a));d&&!a.Ih||0===b.xc.count?(a.Yd.clear(),a.Eb=!1,b.xc.clear(),Dh(b,c),a.Qk=!1,c.R()):(a.Yd.clear(),c.ng=!1,d=b.xc.get(c),c.autoScale!==Eh&&null!==d&&(delete d.start.scale,delete d.end.scale), -sa.requestAnimationFrame(function(){!1===a.Eb||b.ec||(c.Se("temporaryPixelRatio")&&Te(c),Fh(c),a.Eb=!1,b.start(),b.ec&&(Gh(a),c.ab(),Hh(b,0),Nf(c,!0),Ih(a),c.T("AnimationStarting",a)))}))}}function Jh(a){return a.Yd.contains("Trigger")&&1===a.Yd.count}function Kh(a,b,c,d){a.isTicking||Jh(a)||b instanceof R&&(null!==b.fromNode||null!==b.toNode)||a.be.add(b,"position",c,d,!1)}t=th.prototype;t.ss=function(a){return this.be.ss(a)};t.Yu=function(a){return this.be.Yu(a)}; -function Lh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function Oh(a,b){for(b=b.findLinksConnected();b.next();){var c=b.value;c.sf=c.points.copy();a.ql.add(c)}}function Rh(a,b,c,d,e){null===a&&(a=[0,0,0,0]);null===b&&(b=[0,0,0,0]);var f=a[0],g=a[1],h=a[2];a=a[3];var k=b[0],l=b[1],m=b[2];b=b[3];if(0===h||100===h)f=k,g=l;else if(0===m||100===m)k=f,l=g;180f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function vh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new yb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&Ba(a,">= 1",th,"duration");this.Fg=a}},isAnimating:{configurable:!0, +oa.Object.defineProperties(th.prototype,{animationReasons:{configurable:!0,get:function(){return this.Yd}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",th,"isEnabled");(this.Gd=a)&&this.Li.each(function(a){a.isAnimating||Infinity!==a.runCount||a.start()})}},duration:{configurable:!0,get:function(){return this.Gg},set:function(a){A(a,"number",th,"duration");1>a&&Ba(a,">= 1",th,"duration");this.Gg=a}},isAnimating:{configurable:!0, enumerable:!0,get:function(){return this.ec}},isTicking:{configurable:!0,get:function(){return this.kq}},isInitial:{configurable:!0,get:function(){return this.Ih},set:function(a){A(a,"boolean",th,"isInitial");this.Ih=a}},defaultAnimation:{configurable:!0,get:function(){return this.be}},activeAnimations:{configurable:!0,get:function(){return this.Li}},initialAnimationStyle:{configurable:!0,get:function(){return this.Rk},set:function(a){G&& -ab(a,th,th,"initialAnimationStyle");this.Rk=a}}});th.prototype.stopAnimation=th.prototype.Bc;var bi=null,uh=!1,wh=new F(th,"Default",1),Ch=new F(th,"AnimateLocations",2),Bh=new F(th,"None",3);th.className="AnimationManager";th.defineAnimationEffect=function(a,b){uh||(vh(),uh=!0);bi.add(a,b)};th.Default=wh;th.AnimateLocations=Ch;th.None=Bh; -function xh(a){this.nu=this.Fw=this.Xd=this.H=null;this.Zk=this.ec=this.j=!1;this.Xm=this.Nd=0;this.Cp=this.dt=ci;this.Yk=this.Wn=!1;this.Vt=1;this.Tt=0;this.Ed=this.Fg=NaN;this.Zv=0;this.Ym=null;this.o=zb;this.xc=new yb;this.Lt=new yb;this.Al=new I;this.Mt=new I;this.Wv=di;a&&Object.assign(this,a)}xh.prototype.suspend=function(){this.Zk=!0};xh.prototype.advanceTo=function(a,b){b&&(this.Zk=!1);this.Wn&&a>=this.Ed&&(this.Yk=!0,a-=this.Ed);this.Zv=a;Mh(this,!0);Gh(this.Xd);Nf(this.H);Ih(this.Xd);this.H.redraw()}; -function Dh(a,b){a.Lt.clear();a.Yk=!1;a.Tt=0;a.Ed=NaN;0=this.Ed&&(this.Yk=!0,a-=this.Ed);this.Zv=a;Mh(this,!0);Gh(this.Xd);Nf(this.H);Ih(this.Xd);this.H.redraw()}; +function Dh(a,b){a.Lt.clear();a.Yk=!1;a.Tt=0;a.Ed=NaN;0a.Xm?a.Ed:d-a.Nd;b&&(e=a.Zv,ea.Xm&&(a.Wn&&!a.Yk?(a.Nd=+new Date,a.Xm=a.Nd+a.Ed,a.Yk=!0):a.Il(!1))}}} function Hh(a,b){for(var c=a.Ed,d=a.xc.iterator,e=a.Yk;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Cp,b,c,a)}}}t.stop=function(){if(!this.ec)return this;this.Il(!0);return this}; t.Il=function(a){null!==this.nu&&this.nu.Yn.remove(this.Fw);if(this.ec){var b=this.H,c=this.Xd;this.Zk=this.ec=c.Qk=!1;Gh(c);for(var d=this.xc,e=this.Al.iterator;e.next();)b.remove(e.value);for(e=this.Mt.iterator;e.next();)e.value.w();e=this.Wn;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Ju,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Bu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Bu?k[n]:l[n],this.Cp,this.Ed,this.Ed,this)}h.Bu&&void 0!==m.location&&g instanceof S&&(g.location=m.location);h.jv&&g instanceof S&&g.Zb(!1)}b.ns.clear();mf(b,!1);b.ab();b.R();Nf(b,!0);if(c.defaultAnimation===this){for(n=c.ql.iterator;n.next();)e=n.value,null!==e.rf&&(e.points=e.rf,e.rf=null);c.ql.clear()}Nf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Wv);Ih(c);this.Tt++;!a&&this.Vt>this.Tt?(this.Yk=!1,this.start()):(this.Ym&&this.Ym(this),Dh(this,null),c.Il(this),b.Sb())}}; +h.Bu?k[n]:l[n],this.Cp,this.Ed,this.Ed,this)}h.Bu&&void 0!==m.location&&g instanceof S&&(g.location=m.location);h.jv&&g instanceof S&&g.Zb(!1)}b.ns.clear();mf(b,!1);b.ab();b.R();Nf(b,!0);if(c.defaultAnimation===this){for(n=c.ql.iterator;n.next();)e=n.value,null!==e.sf&&(e.points=e.sf,e.sf=null);c.ql.clear()}Nf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Wv);Ih(c);this.Tt++;!a&&this.Vt>this.Tt?(this.Yk=!1,this.start()):(this.Ym&&this.Ym(this),Dh(this,null),c.Il(this),b.Sb())}}; t.Kj=function(a,b){var c=b.actualBounds,d=null;b instanceof wf&&(d=b.placeholder);null!==d?(c=d.oa(Fc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof wf)for(a=a.memberParts;a.next();)d=a.value,d instanceof T&&this.Kj(d,b)}; t.Ij=function(a,b){if(a.isVisible()){var c=null;b instanceof wf&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.xc;c.contains(a)&&(c.L(a).jv=!0);if(a instanceof wf)for(a=a.memberParts;a.next();)c=a.value,c instanceof T&&this.Ij(c,b)}};t.Fz=function(a){var b=this.Lt.get(a);null===b&&(b={},this.Lt.add(a,b));return b}; -oa.Object.defineProperties(xh.prototype,{duration:{configurable:!0,get:function(){return this.Fg},set:function(a){A(a,"number",xh,"duration");1>a&&Ba(a,">= 1",xh,"duration");this.Fg=a}},reversible:{configurable:!0,get:function(){return this.Wn},set:function(a){this.Wn=a}},runCount:{configurable:!0,get:function(){return this.Vt},set:function(a){0a&&Ba(a,">= 1",xh,"duration");this.Gg=a}},reversible:{configurable:!0,get:function(){return this.Wn},set:function(a){this.Wn=a}},runCount:{configurable:!0,get:function(){return this.Vt},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}xh.className="Animation";xh.EaseLinear=function(a,b,c,d){return c*a/d+b};xh.EaseInOutQuad=ci;xh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};xh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};xh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};xh.EaseOutExpo=ei; -function ki(a,b,c){this.start=a;this.end=b;this.Ju={};this.Bu=c;this.jv=!1}ki.className="AnimationState";function li(a,b,c){this.yd=null;this.qf=a;this.io=c||mi;this.vk=null;void 0!==b&&(this.vk=b,void 0===c&&(this.io=ni))}li.prototype.copy=function(){var a=new li(this.qf);a.io=this.io;var b=this.vk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.vk=c}return a}; +xh.prototype.addTemporaryPart=xh.prototype.Fy;function ci(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}xh.className="Animation";xh.EaseLinear=function(a,b,c,d){return c*a/d+b};xh.EaseInOutQuad=ci;xh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};xh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};xh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};xh.EaseOutExpo=ei; +function ki(a,b,c){this.start=a;this.end=b;this.Ju={};this.Bu=c;this.jv=!1}ki.className="AnimationState";function li(a,b,c){this.yd=null;this.rf=a;this.io=c||mi;this.vk=null;void 0!==b&&(this.vk=b,void 0===c&&(this.io=ni))}li.prototype.copy=function(){var a=new li(this.rf);a.io=this.io;var b=this.vk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.vk=c}return a}; function oi(a,b){a=a.vk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} -oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.qf},set:function(a){this.qf=a}},animationSettings:{configurable:!0,get:function(){return this.vk},set:function(a){this.vk=a}},startCondition:{configurable:!0,get:function(){return this.io},set:function(a){G&&ab(a,li,li,"startCondition");this.io=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; -li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Za(this);this.H=null;this.Ra=new H;this.Ca="";this.yb=1;this.o=!1;this.j=this.Zh=this.v=this.Vi=this.Ui=this.Ti=this.Si=this.Qi=this.Ri=this.Pi=this.Xi=this.Oi=this.Wi=this.Ni=this.Mi=!0;this.Nn=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){this.Ra.clear();this.Nn.length=0};t.Xe=function(a){this.H=a}; +oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{configurable:!0,get:function(){return this.vk},set:function(a){this.vk=a}},startCondition:{configurable:!0,get:function(){return this.io},set:function(a){G&&ab(a,li,li,"startCondition");this.io=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; +li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Za(this);this.H=null;this.Ra=new H;this.Ca="";this.yb=1;this.m=!1;this.j=this.Zh=this.v=this.Vi=this.Ui=this.Ti=this.Si=this.Qi=this.Ri=this.Pi=this.Xi=this.Oi=this.Wi=this.Ni=this.Mi=!0;this.Nn=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){this.Ra.clear();this.Nn.length=0};t.Ye=function(a){this.H=a}; t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ra.iterator;h.next();){var k=h.value;k instanceof wf?e++:k instanceof T?d++:k instanceof R?f++:k instanceof Ce?g++:c++}h="";0c.Aq||h.height*e>c.Aq?b.zc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| +t.li=function(a,b,c,d,e,f,g){if(!g||vg(b)){if(null!==d&&b instanceof R&&(b.isOrthogonal&&d.push(b),!1===b.Dd))return;g=!1;for(d=b.containingGroup;null!==d;)g?null!==d.pb&&f.zx(d.pb):null!==d.pb&&(g=!0,f.assign(d.pb)),d=d.containingGroup;var h=b.actualBounds;d=!1;if(g&&b.isVisible()){if(!f.Yc(h))return;d=!f.Re(h)}d&&(a.save(),a.beginPath(),a.rect(f.x,f.y,f.width,f.height),a.clip());h.width*e>c.Aq||h.height*e>c.Aq?b.zc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(ti(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ti(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),ti(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.js()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Tc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ib(qe,a,this,b,c,d,e)};t.vi=function(a,b,c){var d=this.Ra;b.Mh=this;if(a>=d.count)a=d.count;else if(d.N(a)===b)return-1;d.Hb(a,b);b.Ko(c);d=this.diagram;null!==d&&(c?d.R():d.vi(b));ui(this,a,b);return a}; +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ib(qe,a,this,b,c,d,e)};t.vi=function(a,b,c){var d=this.Ra;b.Mh=this;if(a>=d.count)a=d.count;else if(d.N(a)===b)return-1;d.Hb(a,b);b.Ko(c);d=this.diagram;null!==d&&(c?d.R():d.vi(b));ui(this,a,b);return a}; t.rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.rc(a,b,c);var d=this.Ra;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.N(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Lo(c);d.sb(a);d=this.diagram;null!==d&&(c?d.R():d.rc(b));b.Mh=null;return a}; function ui(a,b,c){b=vi(a,b,c);if(c instanceof wf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ra.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.N(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.sb(b);a.Hb(f,c);return f}for(g=NaN;0<=--f&&(g=a.N(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.sb(b);a.Hb(h,c);return h}for(k=NaN;++h< e&&(k=a.N(h).zOrder,isNaN(k)););}return b} oa.Object.defineProperties(qi.prototype,{parts:{configurable:!0,get:function(){return this.Ra.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ra.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.H}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",qi,"name");var b=this.Ca;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= -c.layers;c.next();)c.value.name===a&&v("Layer.name is already present in this diagram: "+a);this.Ca=a;this.g("name",b,a);for(a=this.Ra.iterator;a.next();)a.value.layerName=this.Ca}}},opacity:{configurable:!0,get:function(){return this.yb},set:function(a){var b=this.yb;b!==a&&(A(a,"number",qi,"opacity"),(0>a||1a||1=a)return b;for(var c=this.$a.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; -Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; +function P(a,b){wi||(xi(),wi=!0);Za(this);ye=this;this.Bb=!0;this.Qa=null;this.Ga=this.Ha=0;this.Na=null;if(ah){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.pl=null;yi.add("Model",zi);var e=this;this.Ib=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.ca){b.diagram.ca=!1;try{var c=a.change;""===a.modelChange&&c===qe&&b.updateDataBindings(a.object, +a.propertyName)}finally{b.diagram.ca=!0}}};this.Nc=function(a){e.partManager.doModelChanged(a)};this.$t=this.cu=null;Ai(this);this.model=Bi();this.Xg=!0;Ci(this);this.layout=new Di;this.Xg=!1;this.jk=this.kk=this.ik=this.hk=this.aA=this.dk=this.Gv=null;this.Wo=function(){};this.preventDefault=null;this.kn=!1;this.Hh=new Ei;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Fi(this,a):b=a);this.Bb=!1;b&&this.im(b);return this}var Gi,ye; +function Ai(a){a.Xd=new th;a.Xd.Ye(a);a.Fb=17;a.yw=!1;a.mn=!1;a.Ut="default";a.$a=new H;a.qy=new yb;a.Rx();a.Qx();a.yb=1;a.va=(new K(NaN,NaN)).freeze();a.Wt=new K(NaN,NaN);a.Ea=1;a.Gp=1;a.ot=(new K(NaN,NaN)).freeze();a.pt=NaN;a.Gt=1E-4;a.Ct=100;a.Gb=new Jb;a.ru=(new K(NaN,NaN)).freeze();a.jt=(new M(NaN,NaN,NaN,NaN)).freeze();a.zj=(new gc(0,0,0,0)).freeze();a.Aj=di;a.fu=!1;a.Rt=null;a.Yt=null;a.yh=Eh;a.Ak=hd;a.Ig=Eh;a.eq=hd;a.nt=Fc;a.qt=Fc;a.hd=!0;a.hn=!1;a.De=new I;a.Eh=new yb;a.Sm=!0;a.lp=250;a.wk= +-1;a.np=(new gc(16,16,16,16)).freeze();a.og=!1;a.Kk=!1;a.Zm=!0;a.Sp=new me;a.Sp.diagram=a;a.Sg=new me;a.Sg.diagram=a;a.kj=new me;a.kj.diagram=a;a.Cg=null;a.pf=null;a.iu=!1;Hi(a);a.fi=new I;a.xt=!0;a.mu=Ii;a.iw=!1;a.ou=Sf;a.Xs="auto";a.Fp="auto";a.zh=null;a.Fh=null;a.Bh=null;a.Vh=null;a.Th=null;a.Sh=null;a.It=null;a.Qh=null;a.mt=!1;a.Rh=null;a.Uh=null;a.ei=null;a.Ch=null;a.Jt=!1;a.Qt={};a.ml=[null,null];a.Xg=!1;a.Aw=!1;a.gu=!1;a.$s=!1;a.kw=!0;a.jd=!1;a.hj=!1;a.Lw=!0;a.Ce=-2;a.Qg=new yb;a.Rn=new H; +a.Jg=!1;a.Gd=!0;a.Js=!0;a.Mi=!0;a.Ni=!0;a.Ks=!1;a.Ls=!0;a.Wi=!0;a.Oi=!0;a.Xi=!0;a.Ns=!0;a.Pi=!0;a.Ri=!0;a.Qi=!0;a.Si=!0;a.Ti=!0;a.Ui=!0;a.Vi=!0;a.Os=!0;a.Qs=!0;a.jw=!1;a.Xk=!1;a.en=!0;a.fn=!0;a.Ms=!0;a.Ps=!0;a.au=16;a.eu=16;a.$q=!1;a.Zt=!1;a.du=0;a.bu=0;a.zb=(new gc(5)).freeze();a.zw=(new I).freeze();a.Dt=999999999;a.gw=(new I).freeze();a.ej=!0;a.fj=!0;a.gj=!0;a.hf=!1;a.$f=!1;a.xh=!0;a.bg=!1;a.py=new I;a.hw=new I;a.bi=null;a.Tv=new Hb(8,8);a.Uv=999;a.tw=1;a.Bw=0;a.qd={scale:1,position:new K,bounds:new M, +Vw:new Hb,Jx:new Hb,Cx:!1};a.Jw=(new M(NaN,NaN,NaN,NaN)).freeze();a.mo=(new Hb(NaN,NaN)).freeze();a.Jp=(new M(NaN,NaN,NaN,NaN)).freeze();a.yt=!1;a.Pg=new yb;var b=new T,c=new ch;c.bind(new Ji("text","",Ra));b.add(c);a.ly=b;a.Pg.add("",b);b=new T;c=new ch;c.stroke="brown";c.bind(new Ji("text","",Ra));b.add(c);a.Pg.add("Comment",b);b=new T;b.selectable=!1;b.avoidable=!1;c=new Qf;c.figure="Ellipse";c.fill="black";c.stroke=null;c.desiredSize=(new Hb(3,3)).na();b.add(c);a.Pg.add("LinkLabel",b);a.dj=new yb; +b=new wf;b.selectionObjectName="GROUPPANEL";b.type=V.Vertical;c=new ch;c.font="bold 12pt sans-serif";c.bind(new Ji("text","",Ra));b.add(c);c=new V(V.Auto);c.name="GROUPPANEL";var d=new Qf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new wg;d.padding=(new gc(5,5,5,5)).na();c.add(d);b.add(c);a.jy=b;a.dj.add("",b);a.Oh=new yb;b=new R;c=new Qf;c.isPanelMain=!0;b.add(c);c=new Qf;c.toArrow="Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.ky=b;a.Oh.add("", +b);b=new R;c=new Qf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Oh.add("Comment",b);b=new Ce;b.type=V.Auto;c=new Qf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new wg;c.margin=(new gc(1.5,1.5,1.5,1.5)).na();b.add(c);a.Kt=b;a.lt=b;b=new Ce;b.type=V.Link;c=new Qf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.At=b;a.ee=null;a.aq=!1;a.Dk=null;a.partManager=new zi;a.toolManager=new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager; +a.currentTool=a.defaultTool;a.bt=null;a.Rm=new Pe;a.Nt=null;a.Ot=null;a.xr=!1;a.commandHandler=Ki();a.yr=!1;a.Up=null;a.Vp=Db;a.Hw=!1;a.qc=1;a.ci=null;a.Aq=1;a.Eq=0;a.rw=[0,0,0,0,0];a.Fq=0;a.lq=1;a.mw=0;a.nw=new K;a.yy=500;a.mp=new K;a.wt=!1}P.prototype.clear=function(){this.animationManager.Cc();this.model.clear();Li=null;Mi="";Ni(this,!1);this.Rn.clear();Oi();this.Qg.clear();this.bi=null;this.ab();this.eb();this.R()}; +function Ni(a,b){a.animationManager.Cc(!0);a.zw=(new I).freeze();a.gw=(new I).freeze();var c=a.skipsUndoManager,d=null!==a.fc&&void 0!==a.fc;d&&(a.skipsUndoManager=!0);var e=null;null!==a.ee&&(e=a.ee.part,null!==e&&a.remove(e));var f=[],g=a.$a.length;if(b){for(b=0;b=a)return b;for(var c=this.$a.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};P.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; +P.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; function Ri(a){var b=a.Na.Xa;b instanceof HTMLCanvasElement&&(a.addEventListener(b,"pointerdown",a.hk,!1),a.addEventListener(b,"pointermove",a.ik,!1),a.addEventListener(b,"pointerup",a.kk,!1),a.addEventListener(b,"pointerout",a.jk,!1),a.addEventListener(b,"pointerenter",a.$y,!1),a.addEventListener(b,"pointerleave",a.az,!1),a.addEventListener(b,"wheel",a.dk,!1),a.addEventListener(b,"keydown",a.Rz,!1),a.addEventListener(b,"keyup",a.Sz,!1),a.addEventListener(b,"blur",a.My,!1),a.addEventListener(b,"focus", -a.Ny,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(sa,"resize",a.Gv,!1),Ya&&a.addEventListener(b,"touchstart",function(a){a.preventDefault()},!1))}function Te(a){30q&&(this.position=x.h(-(b.scrollWidth-this.Ha)+y-this.Ha/e+m,this.position.y))),a.ty&&this.allowVerticalScroll&&(hu&&(this.position= -x.h(this.position.x,-(b.scrollHeight-this.Ga)+a.scrollTop-this.Ga/e+f))),K.free(x),Wi(this),this.fj=this.$q=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);zh(this);return Xi(this,a)}; +"gray";c.strokeWidth=1;c.interval=10;b.add(c);c=new S;c.add(b);c.layerName="Grid";c.zOrder=0;c.isInDocumentBounds=!1;c.isAnimated=!1;c.pickable=!1;c.locationObjectName="GRID";a.add(c);a.partManager.parts.remove(c);b.visible=!1;return b}function Ti(){this.H.Zt?this.H.Zt=!1:this.H.isEnabled?this.H.ax(this):Ui(this.H)}function Vi(a){this.H.isEnabled?(this.H.du=a.target.scrollTop,this.H.bu=a.target.scrollLeft):Ui(this.H)} +P.prototype.ax=function(a){if(null!==this.Na){var b=this.cu,c=this.$t;this.$q=!0;var d=this.documentBounds,e=this.viewportBounds,f=this.zj,g=d.x-f.left,h=d.y-f.top,k=d.width+f.left+f.right,l=d.height+f.top+f.bottom,m=d.right+f.right;f=d.bottom+f.bottom;var n=e.x;d=e.y;var p=e.width,r=e.height,q=e.right,u=e.bottom;e=this.scale;var x=a.scrollLeft;if(this.mn)switch(this.Ut){case "negative":x=x+a.scrollWidth-a.clientWidth;break;case "reverse":x=a.scrollWidth-x-a.clientWidth}var y=x;pq&&(this.position=x.h(-(b.scrollWidth-this.Ha)+y-this.Ha/e+m,this.position.y))),a.uy&&this.allowVerticalScroll&&(hu&&(this.position= +x.h(this.position.x,-(b.scrollHeight-this.Ga)+a.scrollTop-this.Ga/e+f))),K.free(x),Wi(this),this.fj=this.$q=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};P.prototype.computeBounds=function(a){void 0===a&&(a=new M);zh(this);return Xi(this,a)}; function Xi(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.so(a.zb),b;for(var c=!0,d=a.$a.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===mj?(b=k>h?(g-a.Fb)/d:(f-a.Fb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.Aj;this.Aj=di;this.scale=hj(this,lj);a!==di&&(Yi(this,!1),ij(this,this.documentBounds,this.Ha/this.Ea,this.Ga/this.Ea,this.Ak,!1));this.Aj=a};t=Q.prototype; -t.DA=function(a,b){void 0===b&&(b=lj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===lj||b===mj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ha;var f=this.Ga;e=b===mj?f/d>e/c?(f-(this.gf?this.Fb:0))/d:(e-(this.Zf?this.Fb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; -t.Fy=function(a,b){this.eb();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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))};t.Az=function(a){if(a instanceof O){this.Up=a;var b=K.alloc();this.Vp=this.ep(a.oa(Fc,b));K.free(b)}else this.Up=null,this.Vp=Db}; +P.prototype.computePartsBounds=function(a,b){void 0===b&&(b=!1);var c=null;if(Ha(a))for(var d=0;dc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===mj?(b=k>h?(g-a.Fb)/d:(f-a.Fb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +P.prototype.zoomToFit=function(){var a=this.Aj;this.Aj=di;this.scale=hj(this,lj);a!==di&&(Yi(this,!1),ij(this,this.documentBounds,this.Ha/this.Ea,this.Ga/this.Ea,this.Ak,!1));this.Aj=a};t=P.prototype; +t.DA=function(a,b){void 0===b&&(b=lj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===lj||b===mj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ha;var f=this.Ga;e=b===mj?f/d>e/c?(f-(this.hf?this.Fb:0))/d:(e-(this.$f?this.Fb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; +t.Gy=function(a,b){this.eb();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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))};t.Az=function(a){if(a instanceof O){this.Up=a;var b=K.alloc();this.Vp=this.ep(a.oa(Fc,b));K.free(b)}else this.Up=null,this.Vp=Db}; function ij(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.Up){var l=K.alloc();l=a.Up.oa(Fc,l);h=l.x-a.Vp.x/a.scale;k=l.y-a.Vp.y/a.scale;e=Ec;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.zj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.ml[0])b=a.ml[c];else return;c=a.Na;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ha/c.width*c.left,b.clientY-a.Ga/c.height*c.top))}Q.prototype.ab=function(){this.ej||(this.ej=!0,this.Sb(!0))};function vj(a){a.jd||zh(a);a.eb()}Q.prototype.redraw=function(){this.Bb||this.jd||(this.R(),jj(this),this.td())};t=Q.prototype;t.Qz=function(){return this.ng}; -t.Vy=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Bc();b.isEnabled=!1;Nf(this);this.ag=!1;this.Wt=new K(NaN,NaN);b.isEnabled=c;this.jd=!0;var d=this;null!==a&&va(function(){d.jd=!1;yh(b,"Model");a(d)},1)};t.Sb=function(a){void 0===a&&(a=!1);if(!0!==this.ng&&!(this.Bb||!1===a&&this.jd)){this.ng=!0;var b=this;sa.requestAnimationFrame(function(){b.ng&&b.td()})}};t.td=function(){if(!this.Zm||this.ng)this.Zm&&(this.Zm=!1),Nf(this)}; +function ne(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.ml[0])b=a.ml[c];else return;c=a.Na;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ha/c.width*c.left,b.clientY-a.Ga/c.height*c.top))}P.prototype.ab=function(){this.ej||(this.ej=!0,this.Sb(!0))};function vj(a){a.jd||zh(a);a.eb()}P.prototype.redraw=function(){this.Bb||this.jd||(this.R(),jj(this),this.td())};t=P.prototype;t.Qz=function(){return this.og}; +t.Vy=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Cc();b.isEnabled=!1;Nf(this);this.bg=!1;this.Wt=new K(NaN,NaN);b.isEnabled=c;this.jd=!0;var d=this;null!==a&&va(function(){d.jd=!1;yh(b,"Model");a(d)},1)};t.Sb=function(a){void 0===a&&(a=!1);if(!0!==this.og&&!(this.Bb||!1===a&&this.jd)){this.og=!0;var b=this;sa.requestAnimationFrame(function(){b.og&&b.td()})}};t.td=function(){if(!this.Zm||this.og)this.Zm&&(this.Zm=!1),Nf(this)}; function kj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Bb||!a.fj||Ui(a)||(b&&zh(a),c&&Yi(a,!1))} -function Nf(a,b){if(!a.jd&&(a.ng=!1,null!==a.Qa||a.mo.u())){a.jd=!0;var c=a.animationManager,d=a.Rn;if(!c.isAnimating&&0!==d.length){for(var e=d.s,f=e.length,g=0;gb;b++){var c=a.Ce.iterator;if(null===c||0===a.Ce.count)break;a.Ce=new I;a.Fv(c,a.Ce);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof wf&&0!==(a.Y&65536)!==!1&&(a.Y=a.Y^65536)})}} +function zh(a){if(0!==a.De.count&&(a.jd||!a.animationManager.isTicking)){for(var b=0;23>b;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new I;a.Fv(c,a.De);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof wf&&0!==(a.Y&65536)!==!1&&(a.Y=a.Y^65536)})}} t.Fv=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof wf||(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof wf&&c.isVisible()&&Aj(this,c);for(a.reset();a.next();)c=a.value,c instanceof R&&c.isVisible()&&(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Ce&&c.isVisible()&&(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function Aj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof wf?(Bj(f)||Cj(f)||Dj(f))&&Aj(a,f):f instanceof R?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;en&&(z=U.left,B= -U.right),y.height>J&&(C=U.top,D=U.bottom)):(z=U.left,B=U.right,C=U.top,D=U.bottom);U=y.width+z+B;var aa=y.height+C+D;z=y.x-z;var Y=e.x;B=y.right+B;var W=e.right+r;C=y.y-C;var P=e.y;y=y.bottom+D;D=e.bottom+q;var la="1px",fa="1px";e=a.scale;u=U>u/e;x=aa>x/e;a.scrollMode===di&&(u||x)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1W+1&&(u=Math.max((B-W)*e+a.Ha,u)),n+r+1D+1&&(u=Math.max((y-D)*e+a.Ga,u)),J+q+1W+1&&(r=Math.max((B-W)*e+a.Ha,r)),n+1D+1&&(q=Math.max((y-D)*e+r,q)),J+1W+1&&(b=a.position.x*e));if(a.mn)switch(a.Ut){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(J+1D+1&&(l.scrollTop=a.position.y*e));u=a.Ha;x=a.Ga;l.style.width=u+(a.Zf?a.Fb:0)+"px";l.style.height=x+(a.gf?a.Fb:0)+"px";return c!==u||d!==x||a.animationManager.Eb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; -t.add=function(a){w(a,S,Q,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Vj(a.layerName),null===b&&(b=this.Vj("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.vi(99999999,a,a.diagram===this);0<=c&&this.ib(se,"parts",b,null,a,null,c);b.isTemporary||this.ab();a.F(1);c=a.layerChanged;null!==c&&c(a,null, -b)}};t.vi=function(a){this.partManager.vi(a);var b=this;Oj(a,function(a){Pj(b,a)});(a instanceof Ce||a instanceof wf&&null!==a.placeholder)&&a.w();null!==a.data&&Oj(a,function(a){Qj(b.partManager,a)});!0!==Cj(a)&&!0!==Dj(a)||this.Ce.add(a);Rj(a,!0,this);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()}; -t.rc=function(a){a.Mj();this.partManager.rc(a);var b=this;null!==a.data&&Oj(a,function(a){Tj(b.partManager,a,b)});this.Ce.remove(a);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()};t.remove=function(a){w(a,S,Q,"remove:part");Uj(this,a,!0)}; +Math.floor(k.y),Math.ceil(k.width),Math.ceil(k.height));f.clip();f.setTransform(h,0,0,h,0,0);f.transform(l.m11,l.m12,l.m21,l.m22,l.dx,l.dy);f.Vc();G&&G.El&&G.Gu&&G.Gu(this,f);h=this.$a.s;b=h.length;this.Vd(h,b,this,this.viewportBounds);Fj(this,f);f.globalAlpha=this.yb;for(g=0;gn&&(z=U.left,B= +U.right),y.height>J&&(C=U.top,D=U.bottom)):(z=U.left,B=U.right,C=U.top,D=U.bottom);U=y.width+z+B;var aa=y.height+C+D;z=y.x-z;var Y=e.x;B=y.right+B;var W=e.right+r;C=y.y-C;var Q=e.y;y=y.bottom+D;D=e.bottom+q;var la="1px",fa="1px";e=a.scale;u=U>u/e;x=aa>x/e;a.scrollMode===di&&(u||x)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1W+1&&(u=Math.max((B-W)*e+a.Ha,u)),n+r+1D+1&&(u=Math.max((y-D)*e+a.Ga,u)),J+q+1W+1&&(r=Math.max((B-W)*e+a.Ha,r)),n+1D+1&&(q=Math.max((y-D)*e+r,q)),J+1W+1&&(b=a.position.x*e));if(a.mn)switch(a.Ut){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(J+1D+1&&(l.scrollTop=a.position.y*e));u=a.Ha;x=a.Ga;l.style.width=u+(a.$f?a.Fb:0)+"px";l.style.height=x+(a.hf?a.Fb:0)+"px";return c!==u||d!==x||a.animationManager.Eb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=P.prototype; +t.add=function(a){w(a,S,P,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Vj(a.layerName),null===b&&(b=this.Vj("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.vi(99999999,a,a.diagram===this);0<=c&&this.ib(se,"parts",b,null,a,null,c);b.isTemporary||this.ab();a.F(1);c=a.layerChanged;null!==c&&c(a,null, +b)}};t.vi=function(a){this.partManager.vi(a);var b=this;Oj(a,function(a){Pj(b,a)});(a instanceof Ce||a instanceof wf&&null!==a.placeholder)&&a.w();null!==a.data&&Oj(a,function(a){Qj(b.partManager,a)});!0!==Cj(a)&&!0!==Dj(a)||this.De.add(a);Rj(a,!0,this);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()}; +t.rc=function(a){a.Mj();this.partManager.rc(a);var b=this;null!==a.data&&Oj(a,function(a){Tj(b.partManager,a,b)});this.De.remove(a);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()};t.remove=function(a){w(a,S,P,"remove:part");Uj(this,a,!0)}; function Uj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.F(2),c&&b.Sj(),c=d.rc(-1,b,!1),0<=c&&a.ib(te,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.vs=function(a,b){void 0===b&&(b=!1);if(Ha(a))for(var c=a.length,d=0;dd&&this.ab();return this}; -t.zy=function(a,b){ak(this,a,b);a.Xe(this);var c=this.$a,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.fc&&this.ib(te,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.ab();return this}; -t.jA=function(a){w(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.$a,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ra.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.fc&&this.ib(te,"layers",this,a,null,c,null);this.R();this.ab()}}};t.Vj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; -t.Qw=function(a){A(a,"function",Q,"addModelChangedListener:listener");null===this.nf&&(this.nf=new H);this.nf.add(a);this.model.fh(a);return this};t.lA=function(a){A(a,"function",Q,"removeModelChangedListener:listener");null!==this.nf&&(this.nf.remove(a),0===this.nf.count&&(this.nf=null));this.model.mk(a)};t.fh=function(a){A(a,"function",Q,"addChangedListener:listener");null===this.Bg&&(this.Bg=new H);this.Bg.add(a);return this}; -t.mk=function(a){A(a,"function",Q,"removeChangedListener:listener");null!==this.Bg&&(this.Bg.remove(a),0===this.Bg.count&&(this.Bg=null))};t.Pr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==re&&(this.isModified=!0);if(null!==this.Bg)for(var b=this.Bg,c=b.length,d=0;dd&&this.ab();return this}; +t.Ay=function(a,b){ak(this,a,b);a.Ye(this);var c=this.$a,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.fc&&this.ib(te,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.ab();return this}; +t.jA=function(a){w(a,qi,P,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.$a,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ra.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.fc&&this.ib(te,"layers",this,a,null,c,null);this.R();this.ab()}}};t.Vj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.Qw=function(a){A(a,"function",P,"addModelChangedListener:listener");null===this.pf&&(this.pf=new H);this.pf.add(a);this.model.fh(a);return this};t.lA=function(a){A(a,"function",P,"removeModelChangedListener:listener");null!==this.pf&&(this.pf.remove(a),0===this.pf.count&&(this.pf=null));this.model.mk(a)};t.fh=function(a){A(a,"function",P,"addChangedListener:listener");null===this.Cg&&(this.Cg=new H);this.Cg.add(a);return this}; +t.mk=function(a){A(a,"function",P,"removeChangedListener:listener");null!==this.Cg&&(this.Cg.remove(a),0===this.Cg.count&&(this.Cg=null))};t.Pr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==re&&(this.isModified=!0);if(null!==this.Cg)for(var b=this.Cg,c=b.length,d=0;dn.Ra.indexOf(r)&&n.vi(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Xb(),n.rc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof qi&&(b?(r.Xe(this),this.$a.Hb(p,r)):this.$a.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==re&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};Q.prototype.Ja=function(a){return this.undoManager.Ja(a)};Q.prototype.kb=function(a){return this.undoManager.kb(a)};Q.prototype.Mf=function(){return this.undoManager.Mf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ja(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Mf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; -Q.prototype.hp=function(){this.partManager.hp()}; -function fk(a,b,c){var d=a.animationManager;if(a.Bb||a.jd)a.Ea=c,Pi(a),a=a.Ea,d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,a));else if(null===a.Na)a.Ea=c,Pi(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ha,g=a.Ga;e.width=a.Ha/b;e.height=a.Ga/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.If(Rc)?h=0:l.If(Sc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.If(Qc)?k=0:l.If(Tc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| +P.prototype.changeState=function(a,b){if(null!==a&&a.diagram===this){var c=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var d=a.change;if(d===qe){var e=a.object;bk(e,a.propertyName,a.L(b));if(e instanceof O){var f=e.part;null!==f&&f.Xb()}this.isModified=!0}else if(d===se){var g=a.object,h=a.newParam,k=a.newValue;if(g instanceof V)if("number"===typeof h&&k instanceof O){b?g.rc(h):g.Hb(h,k);var l=g.part;null!==l&&l.Xb()}else"number"===typeof h&&k instanceof ck&&(k.isRow?dk(g,h, +b?void 0:k):ek(g,h,b?void 0:k));else if(g instanceof qi){var m=!0===a.oldParam;"number"===typeof h&&k instanceof S&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Xb(),g.rc(m?h:-1,k,m)):g.vi(h,k,m))}else g instanceof P?"number"===typeof h&&k instanceof qi&&(b?this.$a.sb(h):(k.Ye(this),this.$a.Hb(h,k))):v("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===te){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof V)"number"===typeof p&&r instanceof O?b?n.Hb(p,r):n.rc(p): +"number"===typeof p&&r instanceof ck&&(r.isRow?dk(n,p,b?r:void 0):ek(n,p,b?r:void 0));else if(n instanceof qi){var q=!0===a.newParam;"number"===typeof p&&r instanceof S&&(b?0>n.Ra.indexOf(r)&&n.vi(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Xb(),n.rc(q?p:-1,r,q)))}else n instanceof P?"number"===typeof p&&r instanceof qi&&(b?(r.Ye(this),this.$a.Hb(p,r)):this.$a.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==re&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};P.prototype.Ja=function(a){return this.undoManager.Ja(a)};P.prototype.kb=function(a){return this.undoManager.kb(a)};P.prototype.Nf=function(){return this.undoManager.Nf()};P.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ja(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Nf(),this.skipsUndoManager=c}};P.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +P.prototype.hp=function(){this.partManager.hp()}; +function fk(a,b,c){var d=a.animationManager;if(a.Bb||a.jd)a.Ea=c,Pi(a),a=a.Ea,d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,a));else if(null===a.Na)a.Ea=c,Pi(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ha,g=a.Ga;e.width=a.Ha/b;e.height=a.Ga/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Jf(Rc)?h=0:l.Jf(Sc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Jf(Qc)?k=0:l.Jf(Tc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| (c=a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ea=c;Pi(a);a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Bb=!1;Yi(a,!1);c=a.Ea;d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,c));a.R();jj(a)}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||jj(this);Wi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Eh||d||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.Xk&&e instanceof Ua&&(this.lastInput.documentPoint=this.Es(this.lastInput.viewPoint),Le(e,this));this.Bb||this.invalidateViewport(a,b);xj(this);this.qd.scale=c;this.qd.position.x=a.x;this.qd.position.y=a.y;this.qd.bounds.assign(a);this.qd.Uw.width= -Math.round(a.width*c);this.qd.Uw.height=Math.round(a.height*c);this.qd.Ix.width=this.Ha;this.qd.Ix.height=this.Ga;this.qd.Bx=d;this.T("ViewportBoundsChanged",this.qd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Yc(b)&&a.gb()})}}; -function xj(a,b){var c=a.de;if(null!==c&&c.visible){for(var d=Hb.alloc(),e=1,f=1,g=c.U.s,h=g.length,k=0;km||(gk(l.figure)?f=f*m/L.nx(f,m):e=e*m/L.nx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Eo(a,g,0,0,d.width, -d.height,b);b.offset(-d.width,-d.height);Hb.free(d);c.part.location=b;K.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.T("ChangingSelection",b);for(var c=b.Ka(),d=c.length,e=0;em||(gk(l.figure)?f=f*m/L.ox(f,m):e=e*m/L.ox(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Eo(a,g,0,0,d.width, +d.height,b);b.offset(-d.width,-d.height);Hb.free(d);c.part.location=b;K.free(b)}}P.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.T("ChangingSelection",b);for(var c=b.Ka(),d=c.length,e=0;e=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, +function zk(a,b){null===a.bi||a.bi.fs||void 0!==b&&(!b.avoidable||b.isLinkLabel)||(a.bi.fs=!0)}P.prototype.Sr=function(a){this.mp.assign(a);this.computeAutoScrollPosition(this.mp).fb(this.position)?this.xg():Ak(this)}; +function Ak(a){-1===a.wk&&(a.wk=va(function(){if(-1!==a.wk&&(a.xg(),null!==a.lastInput.event)){var b=a.computeAutoScrollPosition(a.mp);b.fb(a.position)||(a.position=b,a.lastInput.documentPoint=a.Es(a.mp),a.doMouseMove(),a.ej=!0,b=M.alloc(),a.computeBounds(b),b.cd(a.documentBounds),Kj(a,b),M.free(b),a.hd=!0,a.td(),Ak(a))}},a.lp))}P.prototype.xg=function(){-1!==this.wk&&(sa.clearTimeout(this.wk),this.wk=-1)}; +P.prototype.computeAutoScrollPosition=function(a){var b=this.position,c=this.np;if(0>=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.fb(zb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); -M.free(d);K.free(f);return b};t=Q.prototype;t.ps=function(){return null};t.av=function(){return null};t.Dy=function(a,b){this.py.add(a,b)};t.yu=function(a){(this.Hw=a)||this.nodes.each(function(a){a instanceof wf&&(a.Qp=null)})}; -function Bk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].cl){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Qg.iterator;g.next();)if(!g.value[0].cl){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.Wz=function(a){if(!ah)return null;void 0===a&&(a={});a.returnType="Image";return this.Fx(a)}; -t.Fx=function(a){void 0===a&&(a={});return Bk(this,this.Xz,a)}; +M.free(d);K.free(f);return b};t=P.prototype;t.ps=function(){return null};t.av=function(){return null};t.Ey=function(a,b){this.qy.add(a,b)};t.yu=function(a){(this.Hw=a)||this.nodes.each(function(a){a instanceof wf&&(a.Qp=null)})}; +function Bk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].cl){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Qg.iterator;g.next();)if(!g.value[0].cl){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.Wz=function(a){if(!ah)return null;void 0===a&&(a={});a.returnType="Image";return this.Gx(a)}; +t.Gx=function(a){void 0===a&&(a={});return Bk(this,this.Xz,a)}; t.Xz=function(a,b,c){var d=Ck(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Dk+"data":e=d.getImageData(0,0,c.width,c.height);break;case Dk:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";if("function"===typeof c.msToBlob)return b(c.msToBlob()),"msToBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Ck(a,b,c,d){a.animationManager.Bc();a.td();if(null===a.Na)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Hb(Infinity,Infinity):new Hb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var r=b.document||document,q=b.elementFinished|| -null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new gc(m):m instanceof gc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.dc.Tc(!0);p=new Ek(null,r);var x=p.context;if(!(f||g||l||k)){p.width=a.Ha+Math.ceil(m.left+m.right);p.height=a.Ga+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== +function Ck(a,b,c,d){a.animationManager.Cc();a.td();if(null===a.Na)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Hb(Infinity,Infinity):new Hb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var r=b.document||document,q=b.elementFinished|| +null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new gc(m):m instanceof gc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.dc.Uc(!0);p=new Ek(null,r);var x=p.context;if(!(f||g||l||k)){p.width=a.Ha+Math.ceil(m.left+m.right);p.height=a.Ga+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Bo=q;Hj(a,d.context,m,new Hb(p.width,p.height),a.Ea,a.va,l,n,u,b);return d.context}a.Sm=!1;Hj(a,x,m,new Hb(p.width,p.height),a.Ea,a.va,l,n,u,b);a.Sm=!0;return p.context}var y=a.Gp,z=a.documentBounds.copy();z.xv(a.zb);if(u)for(var B=a.$a.s,C=B.length,D=0;Dy?(g=y,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=y,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new gc(0);null!==h&&(y=h.width,h=h.height,"SVG"!==c&&e&&!Fk&&G&&(f>y|| z>h)&&(Fa("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(f)+"x"+Math.ceil(z)+" vs 2000x2000) Consider increasing the max size."),Fk=!0),isNaN(y)&&(y=2E3),isNaN(h)&&(h=2E3),isFinite(y)&&(f=Math.min(f,y)),isFinite(h)&&(z=Math.min(z,h)));p.width=Math.ceil(f);p.height=Math.ceil(z);if("SVG"===c){if(null===d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Bo=q;Hj(a,d.context,m,new Hb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b); return d.context}a.Sm=!1;Hj(a,x,m,new Hb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b);a.Sm=!0;return p.context} -oa.Object.defineProperties(Q.prototype,{div:{configurable:!0,get:function(){return this.Qa},set:function(a){null!==a&&w(a,HTMLDivElement,Q,"div");if(this.Qa!==a){var b=this.Qa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Na&&(b=this.Na.Xa,this.removeEventListener(b,"pointermove",this.ik,!1),this.removeEventListener(b,"pointerdown",this.hk,!1),this.removeEventListener(b,"pointerup",this.kk,!1),this.removeEventListener(b,"pointerout",this.jk,!1),this.Na.bx()), -this.pl&&(this.pl.disconnect(),this.pl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Na=null,this.removeEventListener(sa,"resize",this.Gv,!1),this.removeEventListener(sa,"wheel",this.dk,!0),ye===this&&(ye=null)):this.ag=!1;this.Qa=null;if(null!==a){if(b=a.H)b.div=null;Fi(this,a);this.redraw()}}}}, -Sw:{configurable:!0,get:function(){return this.Eq}},xi:{configurable:!0,get:function(){return this.ag}},draggedLink:{configurable:!0,get:function(){return this.bt},set:function(a){this.bt!==a&&(this.bt=a,null!==a&&(this.Nt=a.fromPort,this.Ot=a.toPort))}},Jx:{configurable:!0,get:function(){return this.Nt},set:function(a){this.Nt=a}},Kx:{configurable:!0,get:function(){return this.Ot},set:function(a){this.Ot=a}},animationManager:{configurable:!0, -enumerable:!0,get:function(){return this.Xd}},undoManager:{configurable:!0,get:function(){return this.fc.undoManager}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg},set:function(a){A(a,"boolean",Q,"skipsUndoManager");this.Xg=a;this.fc.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.$s},set:function(a){this.$s=a}},opacity:{configurable:!0,get:function(){return this.yb},set:function(a){var b=this.yb; -b!==a&&(A(a,"number",Q,"opacity"),(0>a||1a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.au=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(A(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"), -this.eu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.kj},set:function(a){G&&w(a,me,Q,"lastInput");this.kj=a}},previousInput:{configurable:!0,get:function(){return this.Sg},set:function(a){G&&w(a,me,Q,"previousInput");this.Sg=a}},firstInput:{configurable:!0,get:function(){return this.Sp},set:function(a){G&&w(a,me,Q,"firstInput");this.Sp=a}},currentCursor:{configurable:!0,get:function(){return this.Xs}, -set:function(a){""===a&&(a=this.Fp);if(this.Xs!==a){A(a,"string",Q,"currentCursor");var b=this.Na,c=this.Qa;if(null!==b&&null!==c){this.Xs=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.Fp},set:function(a){""=== -a&&(a="auto");var b=this.Fp;b!==a&&(A(a,"string",Q,"defaultCursor"),this.Fp=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(null!==a&&A(a,"function",Q,"click"),this.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(null!==a&&A(a,"function",Q,"doubleClick"),this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0, -enumerable:!0,get:function(){return this.Bh},set:function(a){var b=this.Bh;b!==a&&(null!==a&&A(a,"function",Q,"contextClick"),this.Bh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.Vh},set:function(a){var b=this.Vh;b!==a&&(null!==a&&A(a,"function",Q,"mouseOver"),this.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.Th},set:function(a){var b=this.Th;b!==a&&(null!==a&&A(a,"function",Q,"mouseHover"), -this.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Sh},set:function(a){var b=this.Sh;b!==a&&(null!==a&&A(a,"function",Q,"mouseHold"),this.Sh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0,get:function(){return this.It},set:function(a){var b=this.It;b!==a&&(null!==a&&A(a,"function",Q,"mouseDragOver"),this.It=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Qh},set:function(a){var b= -this.Qh;b!==a&&(G&&null!==a&&A(a,"function",Q,"mouseDrop"),this.Qh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"boolean",Q,"handlesDragDropForTopLevelParts"),this.mt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Rh},set:function(a){var b=this.Rh;b!==a&&(null!==a&&A(a,"function",Q,"mouseEnter"),this.Rh=a,this.g("mouseEnter", -b,a))}},mouseLeave:{configurable:!0,get:function(){return this.Uh},set:function(a){var b=this.Uh;b!==a&&(null!==a&&A(a,"function",Q,"mouseLeave"),this.Uh=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Ch}, -set:function(a){var b=this.Ch;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ch=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(this.ob=a,a.Xe(this))}},toolManager:{configurable:!0,get:function(){return this.te},set:function(a){this.te!==a&&(w(a,Ua,Q,"toolManager"),this.te=a,a.diagram=this)}},defaultTool:{configurable:!0, -get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&(w(a,xe,Q,"defaultTool"),this.tb=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.jb},set:function(a){var b=this.jb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(w(a,xe,Q,"currentTool"),this.jb=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.zw}}, -maxSelectionCount:{configurable:!0,get:function(){return this.Dt},set:function(a){var b=this.Dt;if(b!==a)if(A(a,"number",Q,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Dt=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0, -enumerable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(w(a,Ce,Q,"nodeSelectionAdornmentTemplate"),this.Kt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.lt},set:function(a){var b=this.lt;b!==a&&(w(a,Ce,Q,"groupSelectionAdornmentTemplate"),this.lt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.At}, -set:function(a){var b=this.At;b!==a&&(w(a,Ce,Q,"linkSelectionAdornmentTemplate"),this.At=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.gw}},isModified:{configurable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.kn&&this.Be!==a.historyIndex:this.kn},set:function(a){if(this.kn!==a){A(a,"boolean",Q,"isModified");this.kn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Be= -b.historyIndex);a||hk(this)}}},model:{configurable:!0,get:function(){return this.fc},set:function(a){var b=this.fc;if(b!==a){w(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Bc(!0);var c=Ni(this,!0);this.ag=!1;this.Zm=!0;this.Be=-2;this.ng=!1;var d=this.Bb;this.Bb=!0;yh(this.animationManager,"Model");b&&(null!==this.nf&&this.nf.each(function(a){b.mk(a)}), -b.mk(this.Mc));this.fc=a;this.partManager=ik(this.fc.type);for(var e=0;ea||1a&&Ba(a,">= 0",P,"scrollHorizontalLineChange"),this.au=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(A(a,"number",P,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",P,"scrollVerticalLineChange"), +this.eu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.kj},set:function(a){G&&w(a,me,P,"lastInput");this.kj=a}},previousInput:{configurable:!0,get:function(){return this.Sg},set:function(a){G&&w(a,me,P,"previousInput");this.Sg=a}},firstInput:{configurable:!0,get:function(){return this.Sp},set:function(a){G&&w(a,me,P,"firstInput");this.Sp=a}},currentCursor:{configurable:!0,get:function(){return this.Xs}, +set:function(a){""===a&&(a=this.Fp);if(this.Xs!==a){A(a,"string",P,"currentCursor");var b=this.Na,c=this.Qa;if(null!==b&&null!==c){this.Xs=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.Fp},set:function(a){""=== +a&&(a="auto");var b=this.Fp;b!==a&&(A(a,"string",P,"defaultCursor"),this.Fp=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(null!==a&&A(a,"function",P,"click"),this.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(null!==a&&A(a,"function",P,"doubleClick"),this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0, +enumerable:!0,get:function(){return this.Bh},set:function(a){var b=this.Bh;b!==a&&(null!==a&&A(a,"function",P,"contextClick"),this.Bh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.Vh},set:function(a){var b=this.Vh;b!==a&&(null!==a&&A(a,"function",P,"mouseOver"),this.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.Th},set:function(a){var b=this.Th;b!==a&&(null!==a&&A(a,"function",P,"mouseHover"), +this.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Sh},set:function(a){var b=this.Sh;b!==a&&(null!==a&&A(a,"function",P,"mouseHold"),this.Sh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0,get:function(){return this.It},set:function(a){var b=this.It;b!==a&&(null!==a&&A(a,"function",P,"mouseDragOver"),this.It=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Qh},set:function(a){var b= +this.Qh;b!==a&&(G&&null!==a&&A(a,"function",P,"mouseDrop"),this.Qh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"boolean",P,"handlesDragDropForTopLevelParts"),this.mt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Rh},set:function(a){var b=this.Rh;b!==a&&(null!==a&&A(a,"function",P,"mouseEnter"),this.Rh=a,this.g("mouseEnter", +b,a))}},mouseLeave:{configurable:!0,get:function(){return this.Uh},set:function(a){var b=this.Uh;b!==a&&(null!==a&&A(a,"function",P,"mouseLeave"),this.Uh=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Ch}, +set:function(a){var b=this.Ch;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ch=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(this.ob=a,a.Ye(this))}},toolManager:{configurable:!0,get:function(){return this.ue},set:function(a){this.ue!==a&&(w(a,Ua,P,"toolManager"),this.ue=a,a.diagram=this)}},defaultTool:{configurable:!0, +get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&(w(a,xe,P,"defaultTool"),this.tb=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.jb},set:function(a){var b=this.jb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(w(a,xe,P,"currentTool"),this.jb=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.zw}}, +maxSelectionCount:{configurable:!0,get:function(){return this.Dt},set:function(a){var b=this.Dt;if(b!==a)if(A(a,"number",P,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Dt=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",P,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0, +enumerable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(w(a,Ce,P,"nodeSelectionAdornmentTemplate"),this.Kt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.lt},set:function(a){var b=this.lt;b!==a&&(w(a,Ce,P,"groupSelectionAdornmentTemplate"),this.lt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.At}, +set:function(a){var b=this.At;b!==a&&(w(a,Ce,P,"linkSelectionAdornmentTemplate"),this.At=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.gw}},isModified:{configurable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.kn&&this.Ce!==a.historyIndex:this.kn},set:function(a){if(this.kn!==a){A(a,"boolean",P,"isModified");this.kn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Ce= +b.historyIndex);a||hk(this)}}},model:{configurable:!0,get:function(){return this.fc},set:function(a){var b=this.fc;if(b!==a){w(a,X,P,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Cc(!0);var c=Ni(this,!0);this.bg=!1;this.Zm=!0;this.Ce=-2;this.og=!1;var d=this.Bb;this.Bb=!0;yh(this.animationManager,"Model");b&&(null!==this.pf&&this.pf.each(function(a){b.mk(a)}), +b.mk(this.Nc));this.fc=a;this.partManager=ik(this.fc.type);for(var e=0;ethis.scale&&(this.scale=a)):Ba(a,"> 0",Q,"minScale"))}},maxScale:{configurable:!0, -enumerable:!0,get:function(){return this.Ct},set:function(a){E(a,Q,"maxScale");var b=this.Ct;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.ru},set:function(a){this.ru.D(a)||(w(a,K,Q,"zoomPoint"),this.ru=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Ak},set:function(a){var b=this.Ak;b.D(a)||(w(a,Ib,Q,"contentAlignment"),this.Ak=a=a.M(), -this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.eq},set:function(a){var b=this.eq;b.D(a)||(w(a,Ib,Q,"initialContentAlignment"),this.eq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,Q,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.ab(),this.g("padding",b,a))}},partManager:{configurable:!0, -enumerable:!0,get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(w(a,zi,Q,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Xe(null),this.Nc=a,a.Xe(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}}, -layout:{configurable:!0,get:function(){return this.Pc},set:function(a){var b=this.Pc;b!==a&&(w(a,Di,Q,"layout"),this.Pc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.Sb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.xt},set:function(a){var b=this.xt;if(b!==a&&(A(a,"boolean",Q,"isTreePathToChildren"),this.xt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Gk(a.value)}},treeCollapsePolicy:{configurable:!0, -enumerable:!0,get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(a!==Ii&&a!==Pk&&a!==Tk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.mu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{configurable:!0,get:function(){return this.iw},set:function(a){this.iw=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.Tv},set:function(a){this.bi=null;this.Tv=new Hb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0, -get:function(){return this.Uv},set:function(a){this.Uv=Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.lp},set:function(a){var b=this.lp;E(a,Q,"scale");b!==a&&(this.lp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.np},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,Q,"autoScrollRegion");var b=this.np;b.D(a)||(this.np=a=a.M(),this.ab(),this.g("autoScrollRegion",b,a))}}}); -oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return Uk.lc()},set:function(a){Uk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return Vk}}});Q.prototype.makeImageData=Q.prototype.Fx;Q.prototype.makeImage=Q.prototype.Wz;Q.prototype.cacheGroupExternalLinks=Q.prototype.yu;Q.prototype.addRenderer=Q.prototype.Dy;Q.prototype.makeSVG=Q.prototype.av;Q.prototype.makeSvg=Q.prototype.ps;Q.prototype.stopAutoScroll=Q.prototype.wg; -Q.prototype.doAutoScroll=Q.prototype.Sr;Q.prototype.isUnoccupied=Q.prototype.ak;Q.prototype.raiseDiagramEvent=Q.prototype.T;Q.prototype.removeDiagramListener=Q.prototype.Wl;Q.prototype.addDiagramListener=Q.prototype.Jj;Q.prototype.findTreeRoots=Q.prototype.zz;Q.prototype.layoutDiagram=Q.prototype.Uz;Q.prototype.findTopLevelGroups=Q.prototype.rz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.sz;Q.prototype.ensureBounds=Q.prototype.eb;Q.prototype.findLinksByExample=Q.prototype.Vr; -Q.prototype.findNodesByExample=Q.prototype.Wr;Q.prototype.findLinkForData=Q.prototype.Jc;Q.prototype.findNodeForData=Q.prototype.oi;Q.prototype.findPartForData=Q.prototype.Kc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Qb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Ud;Q.prototype.transformViewToDoc=Q.prototype.Es;Q.prototype.transformRectDocToView=Q.prototype.zA;Q.prototype.transformDocToView=Q.prototype.ep; -Q.prototype.centerRect=Q.prototype.Qr;Q.prototype.scrollToRect=Q.prototype.pv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.Lz;Q.prototype.highlight=Q.prototype.Kz;Q.prototype.selectCollection=Q.prototype.qA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.hp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Mf; -Q.prototype.commitTransaction=Q.prototype.kb;Q.prototype.startTransaction=Q.prototype.Ja;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.ib;Q.prototype.removeChangedListener=Q.prototype.mk;Q.prototype.addChangedListener=Q.prototype.fh;Q.prototype.removeModelChangedListener=Q.prototype.lA;Q.prototype.addModelChangedListener=Q.prototype.Qw;Q.prototype.findLayer=Q.prototype.Vj;Q.prototype.removeLayer=Q.prototype.jA;Q.prototype.addLayerAfter=Q.prototype.zy; -Q.prototype.addLayerBefore=Q.prototype.Ow;Q.prototype.addLayer=Q.prototype.Cl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Rj;Q.prototype.removeParts=Q.prototype.vs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.zu;Q.prototype.setProperties=Q.prototype.im;Q.prototype.attach=Q.prototype.xu;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.Px;Q.prototype.setInputOption=Q.prototype.rA; -Q.prototype.getInputOption=Q.prototype.Ml;Q.prototype.resetRenderingHints=Q.prototype.Qx;Q.prototype.setRenderingHint=Q.prototype.Ux;Q.prototype.getRenderingHint=Q.prototype.Se;Q.prototype.maybeUpdate=Q.prototype.td;Q.prototype.requestUpdate=Q.prototype.Sb;Q.prototype.delayInitialization=Q.prototype.Vy;Q.prototype.isUpdateRequested=Q.prototype.Qz;Q.prototype.invalidateDocumentBounds=Q.prototype.ab;Q.prototype.findObjectsNear=Q.prototype.sg;Q.prototype.findPartsNear=Q.prototype.nz; -Q.prototype.findObjectsIn=Q.prototype.Ef;Q.prototype.findPartsIn=Q.prototype.mx;Q.prototype.findObjectsAt=Q.prototype.pi;Q.prototype.findPartsAt=Q.prototype.mz;Q.prototype.findObjectAt=Q.prototype.jc;Q.prototype.findPartAt=Q.prototype.Kl;Q.prototype.focusObject=Q.prototype.Az;Q.prototype.alignDocument=Q.prototype.Fy;Q.prototype.zoomToRect=Q.prototype.DA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.$w;Q.prototype.focus=Q.prototype.focus; -var yi=new yb,Qi=null,ah=void 0!==sa.document,Li=null,Mi="",Eh=new F(Q,"None",0),lj=new F(Q,"Uniform",1),mj=new F(Q,"UniformToFill",2),Sf=new F(Q,"CycleAll",10),Wf=new F(Q,"CycleNotDirected",11),Yf=new F(Q,"CycleNotDirectedFast",12),Zf=new F(Q,"CycleNotUndirected",13),Tf=new F(Q,"CycleDestinationTree",14),Vf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Ii=new F(Q,"TreeParentCollapsed",21),Pk=new F(Q,"AllParentsCollapsed",22),Tk=new F(Q,"AnyParentsCollapsed", -23),Uk=new H,Vk="2.2.14",Dk="image",Fk=!1,Wk=null,wi=!1; +if(!b.D(a)){w(a,K,P,"position");var c=this.viewportBounds.copy();this.va.assign(a);Qh(this.animationManager,b,this.va);this.Bb||null===this.Na&&!this.mo.u()?Pi(this):(this.Bb=!0,a=this.scale,ij(this,this.Jp,this.Ha/a,this.Ga/a,this.Ak,!1),this.Bb=!1);if(!this.Bb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Ea,!1)}K.free(b)}},initialPosition:{configurable:!0,get:function(){return this.ot},set:function(a){this.ot.D(a)||(w(a,K,P,"initialPosition"),this.ot=a.M())}},initialScale:{configurable:!0, +enumerable:!0,get:function(){return this.pt},set:function(a){this.pt!==a&&(A(a,"number",P,"initialScale"),this.pt=a)}},grid:{configurable:!0,get:function(){null===this.ee&&(this.ee=Si(this));return this.ee},set:function(a){var b=this.ee;if(b!==a){null===b&&(b=this.ee=Si(this));w(a,V,P,"grid");a.type!==V.Grid&&v("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b);this.ee=a;a.name="GRID";null!==c&&c.add(a);xj(this);this.R();this.g("grid",b,a)}}},viewportBounds:{configurable:!0, +enumerable:!0,get:function(){return this.Jw}},viewSize:{configurable:!0,get:function(){return this.mo},set:function(a){var b=this.viewSize;b.D(a)||(w(a,Hb,P,"viewSize"),this.mo=a=a.M(),this.Ga=this.Ha=0,a.u()?(this.Ha=a.width,this.Ga=a.height):null!==this.Qa&&(this.Ha=this.Qa.clientWidth||1,this.Ga=this.Qa.clientHeight||1),Pi(this),this.ab(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{configurable:!0,get:function(){return this.jt},set:function(a){var b=this.jt; +b.D(a)||(w(a,M,P,"fixedBounds"),(G&&Infinity===a.width||-Infinity===a.width||Infinity===a.height||-Infinity===a.height)&&v("fixedBounds width/height must not be Infinity"),this.jt=a=a.M(),this.ab(),this.g("fixedBounds",b,a))}},scrollMargin:{configurable:!0,get:function(){return this.zj},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"scrollMargin");var b=this.zj;b.D(a)||(this.zj=a=a.M(),this.g("scrollMargin",b,a),this.Wo())}},scrollMode:{configurable:!0,get:function(){return this.Aj}, +set:function(a){var b=this.Aj;b!==a&&(ab(a,P,P,"scrollMode"),this.Aj=a,a===di&&Yi(this,!1),this.g("scrollMode",b,a),this.R())}},scrollsPageOnFocus:{configurable:!0,get:function(){return this.fu},set:function(a){var b=this.fu;b!==a&&(A(a,"boolean",P,"scrollsPageOnFocus"),this.fu=a,this.g("scrollsPageOnFocus",b,a))}},positionComputation:{configurable:!0,get:function(){return this.Rt},set:function(a){var b=this.Rt;b!==a&&(null!==a&&A(a,"function",P,"positionComputation"), +this.Rt=a,Yi(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{configurable:!0,get:function(){return this.Yt},set:function(a){var b=this.Yt;b!==a&&(null!==a&&A(a,"function",P,"scaleComputation"),this.Yt=a,fk(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{configurable:!0,get:function(){return this.Jp}},isVirtualized:{configurable:!0,get:function(){return this.yt},set:function(a){var b=this.yt;b!==a&&(A(a,"boolean", +P,"isVirtualized"),this.yt=a,this.g("isVirtualized",b,a))}},scale:{configurable:!0,get:function(){return this.Ea},set:function(a){var b=this.Ea;E(a,P,"scale");b!==a&&fk(this,b,a)}},defaultScale:{configurable:!0,get:function(){return this.Gp},set:function(a){G&&E(a,P,"defaultScale");!G||0this.scale&&(this.scale=a)):Ba(a,"> 0",P,"minScale"))}},maxScale:{configurable:!0, +enumerable:!0,get:function(){return this.Ct},set:function(a){E(a,P,"maxScale");var b=this.Ct;b!==a&&(0 0",P,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.ru},set:function(a){this.ru.D(a)||(w(a,K,P,"zoomPoint"),this.ru=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Ak},set:function(a){var b=this.Ak;b.D(a)||(w(a,Ib,P,"contentAlignment"),this.Ak=a=a.M(), +this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.eq},set:function(a){var b=this.eq;b.D(a)||(w(a,Ib,P,"initialContentAlignment"),this.eq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.ab(),this.g("padding",b,a))}},partManager:{configurable:!0, +enumerable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(w(a,zi,P,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Ye(null),this.Oc=a,a.Ye(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}}, +layout:{configurable:!0,get:function(){return this.Qc},set:function(a){var b=this.Qc;b!==a&&(w(a,Di,P,"layout"),this.Qc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.Sb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.xt},set:function(a){var b=this.xt;if(b!==a&&(A(a,"boolean",P,"isTreePathToChildren"),this.xt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Gk(a.value)}},treeCollapsePolicy:{configurable:!0, +enumerable:!0,get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(a!==Ii&&a!==Pk&&a!==Tk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.mu=a,this.g("treeCollapsePolicy",b,a))}},Ve:{configurable:!0,get:function(){return this.iw},set:function(a){this.iw=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.Tv},set:function(a){this.bi=null;this.Tv=new Hb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0, +get:function(){return this.Uv},set:function(a){this.Uv=Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.lp},set:function(a){var b=this.lp;E(a,P,"scale");b!==a&&(this.lp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.np},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"autoScrollRegion");var b=this.np;b.D(a)||(this.np=a=a.M(),this.ab(),this.g("autoScrollRegion",b,a))}}}); +oa.Object.defineProperties(P,{licenseKey:{configurable:!0,get:function(){return Uk.lc()},set:function(a){Uk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return Vk}}});P.prototype.makeImageData=P.prototype.Gx;P.prototype.makeImage=P.prototype.Wz;P.prototype.cacheGroupExternalLinks=P.prototype.yu;P.prototype.addRenderer=P.prototype.Ey;P.prototype.makeSVG=P.prototype.av;P.prototype.makeSvg=P.prototype.ps;P.prototype.stopAutoScroll=P.prototype.xg; +P.prototype.doAutoScroll=P.prototype.Sr;P.prototype.isUnoccupied=P.prototype.ak;P.prototype.raiseDiagramEvent=P.prototype.T;P.prototype.removeDiagramListener=P.prototype.Wl;P.prototype.addDiagramListener=P.prototype.Jj;P.prototype.findTreeRoots=P.prototype.zz;P.prototype.layoutDiagram=P.prototype.Uz;P.prototype.findTopLevelGroups=P.prototype.rz;P.prototype.findTopLevelNodesAndLinks=P.prototype.sz;P.prototype.ensureBounds=P.prototype.eb;P.prototype.findLinksByExample=P.prototype.Vr; +P.prototype.findNodesByExample=P.prototype.Wr;P.prototype.findLinkForData=P.prototype.Kc;P.prototype.findNodeForData=P.prototype.oi;P.prototype.findPartForData=P.prototype.Lc;P.prototype.findLinkForKey=P.prototype.findLinkForKey;P.prototype.findNodeForKey=P.prototype.Qb;P.prototype.findPartForKey=P.prototype.findPartForKey;P.prototype.rebuildParts=P.prototype.Ud;P.prototype.transformViewToDoc=P.prototype.Es;P.prototype.transformRectDocToView=P.prototype.zA;P.prototype.transformDocToView=P.prototype.ep; +P.prototype.centerRect=P.prototype.Qr;P.prototype.scrollToRect=P.prototype.pv;P.prototype.scroll=P.prototype.scroll;P.prototype.highlightCollection=P.prototype.Lz;P.prototype.highlight=P.prototype.Kz;P.prototype.selectCollection=P.prototype.qA;P.prototype.select=P.prototype.select;P.prototype.updateAllRelationshipsFromData=P.prototype.hp;P.prototype.updateAllTargetBindings=P.prototype.updateAllTargetBindings;P.prototype.commit=P.prototype.commit;P.prototype.rollbackTransaction=P.prototype.Nf; +P.prototype.commitTransaction=P.prototype.kb;P.prototype.startTransaction=P.prototype.Ja;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.ib;P.prototype.removeChangedListener=P.prototype.mk;P.prototype.addChangedListener=P.prototype.fh;P.prototype.removeModelChangedListener=P.prototype.lA;P.prototype.addModelChangedListener=P.prototype.Qw;P.prototype.findLayer=P.prototype.Vj;P.prototype.removeLayer=P.prototype.jA;P.prototype.addLayerAfter=P.prototype.Ay; +P.prototype.addLayerBefore=P.prototype.Ow;P.prototype.addLayer=P.prototype.Cl;P.prototype.moveParts=P.prototype.moveParts;P.prototype.copyParts=P.prototype.Rj;P.prototype.removeParts=P.prototype.vs;P.prototype.remove=P.prototype.remove;P.prototype.add=P.prototype.add;P.prototype.clearDelayedGeometries=P.prototype.zu;P.prototype.setProperties=P.prototype.im;P.prototype.attach=P.prototype.xu;P.prototype.set=P.prototype.set;P.prototype.resetInputOptions=P.prototype.Qx;P.prototype.setInputOption=P.prototype.rA; +P.prototype.getInputOption=P.prototype.Ml;P.prototype.resetRenderingHints=P.prototype.Rx;P.prototype.setRenderingHint=P.prototype.Vx;P.prototype.getRenderingHint=P.prototype.Te;P.prototype.maybeUpdate=P.prototype.td;P.prototype.requestUpdate=P.prototype.Sb;P.prototype.delayInitialization=P.prototype.Vy;P.prototype.isUpdateRequested=P.prototype.Qz;P.prototype.invalidateDocumentBounds=P.prototype.ab;P.prototype.findObjectsNear=P.prototype.tg;P.prototype.findPartsNear=P.prototype.nz; +P.prototype.findObjectsIn=P.prototype.Ff;P.prototype.findPartsIn=P.prototype.nx;P.prototype.findObjectsAt=P.prototype.pi;P.prototype.findPartsAt=P.prototype.mz;P.prototype.findObjectAt=P.prototype.jc;P.prototype.findPartAt=P.prototype.Kl;P.prototype.focusObject=P.prototype.Az;P.prototype.alignDocument=P.prototype.Gy;P.prototype.zoomToRect=P.prototype.DA;P.prototype.zoomToFit=P.prototype.zoomToFit;P.prototype.diagramScroll=P.prototype.ax;P.prototype.focus=P.prototype.focus; +var yi=new yb,Qi=null,ah=void 0!==sa.document,Li=null,Mi="",Eh=new F(P,"None",0),lj=new F(P,"Uniform",1),mj=new F(P,"UniformToFill",2),Sf=new F(P,"CycleAll",10),Wf=new F(P,"CycleNotDirected",11),Yf=new F(P,"CycleNotDirectedFast",12),Zf=new F(P,"CycleNotUndirected",13),Tf=new F(P,"CycleDestinationTree",14),Vf=new F(P,"CycleSourceTree",15),di=new F(P,"DocumentScroll",1),fi=new F(P,"InfiniteScroll",2),Ii=new F(P,"TreeParentCollapsed",21),Pk=new F(P,"AllParentsCollapsed",22),Tk=new F(P,"AnyParentsCollapsed", +23),Uk=new H,Vk="2.2.15",Dk="image",Fk=!1,Wk=null,wi=!1; function xi(){if(ah){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d6038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Jb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Jb.prototype.Rd=Jb.prototype.Tw; -Wk=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",Q,"inherit");A(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){ah=a?void 0!==sa.document:!1}; -Q.isUsingDOM=function(){return ah};Q.None=Eh;Q.Uniform=lj;Q.UniformToFill=mj;Q.CycleAll=Sf;Q.CycleNotDirected=Wf;Q.CycleNotDirectedFast=Yf;Q.CycleNotUndirected=Zf;Q.CycleDestinationTree=Tf;Q.CycleSourceTree=Vf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Ii;Q.AllParentsCollapsed=Pk;Q.AnyParentsCollapsed=Tk;function Ei(){this.uy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.vd=this.j=!0:this.vd=null} -function Gj(a,b){b.dc.setTransform(b.qc,0,0,b.qc,0,0);b.dc.Uc();if(null===a.vd)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.vd=!0;if(ah){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=Uk.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); +Wk=a}}P.className="Diagram";P.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof P?b.H:null};P.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",P,"inherit");A(b,"function",P,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};P.useDOM=function(a){ah=a?void 0!==sa.document:!1}; +P.isUsingDOM=function(){return ah};P.None=Eh;P.Uniform=lj;P.UniformToFill=mj;P.CycleAll=Sf;P.CycleNotDirected=Wf;P.CycleNotDirectedFast=Yf;P.CycleNotUndirected=Zf;P.CycleDestinationTree=Tf;P.CycleSourceTree=Vf;P.DocumentScroll=di;P.InfiniteScroll=fi;P.TreeParentCollapsed=Ii;P.AllParentsCollapsed=Pk;P.AnyParentsCollapsed=Tk;function Ei(){this.vy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.vd=this.j=!0:this.vd=null} +function Gj(a,b){b.dc.setTransform(b.qc,0,0,b.qc,0,0);b.dc.Vc();if(null===a.vd)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.vd=!0;if(ah){var d=P[Va("76a115b6ed251eaf4692")];if(d)for(var e=Uk.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); f=Va(d[2]);if(-1g&&f!==Va("7da71ca0ad381e90")&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.vd=!(0<=g&&gk.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(sa.document[Va("78a712aa")]){sa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g); k=sa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8"));var l=sa.getComputedStyle(g).getPropertyValue(Va("75b817b0ea2202"));sa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g);if(k)if(g=sa[Va("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.vd=!1;break}else if(g&&g(Va("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& +"none",e.style.touchAction="none");a.Na=e;a.dc=e.context;d=a.dc;a.qc=a.computePixelRatio();a.viewSize.u()||(a.Ha=a.Qa.clientWidth||1,a.Ga=a.Qa.clientHeight||1);Nj(a,a.Ha,a.Ga);a.Qa.insertBefore(e.Xa,a.Qa.firstChild);e=new Ek(null);e.width=1;e.height=1;a.bw=e;a.my=e.context;if(ah){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ha+"px";e.style.height=a.Ga+"px";e.style.zIndex="1";f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Qa.appendChild(e); +e.appendChild(f);e.onscroll=Ti;e.addEventListener("pointerdown",Vi);e.H=a;e.ty=!0;e.uy=!0;a.cu=e;a.$t=f}a.Wo=ua(function(){a.ci=null;a.R()},300);a.Gv=ua(function(){Fh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.dk=function(b){if(a.isEnabled){var c=qj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& (d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0c||Math.abs(e.y-b.screenY)>c)?a.lq++:a.lq=1;d.clickCount=a.lq;a.mw=b.timeStamp;a.nw.vg(b.screenX,b.screenY); +b;else if(null!==c[1]&&c[1].pointerId===b.pointerId)c[1]=b,d=!0;else if(null===c[0])c[0]=b;else if(null===c[1])c[1]=b,d=!0;else{b.preventDefault();return}if(c="touch"===b.pointerType||"pen"===b.pointerType)a.iu=!1,a.wt=!0;var e=d;d=tj(a,b,!0,!1,!0,e);rj(a,b,d);d.targetDiagram=sj(b,b.target);d.targetObject=null;e||d.clone(a.Sp);e=a.nw;c=c?25:10;b.timeStamp-a.mwc||Math.abs(e.y-b.screenY)>c)?a.lq++:a.lq=1;d.clickCount=a.lq;a.mw=b.timeStamp;a.nw.wg(b.screenX,b.screenY); a.doMouseDown();1===b.button?b.preventDefault():uj(a,d,b)}};a.ik=function(b){if(a.isEnabled){a.Xk=!0;var c=a.ml;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}if(c[0].pointerId===b.pointerId){c=tj(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX,b.clientY);null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f= b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;rj(a,f,c);c.targetObject=null;a.doMouseMove();uj(a,c,b)}}};a.kk=function(b){if(a.isEnabled){a.Xk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Qt;if(c&&a.iu)delete d[b.pointerId],b.preventDefault();else if(d=a.ml,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]=null;d=tj(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY)); -null!==e&&e.H instanceof Q&&e.H!==a&&rj(e.H,b,d);null===e&&(e=b.target);rj(a,b,d);d.clickCount=a.lq;d.targetDiagram=sj(b,e);d.targetObject=null;a.doMouseUp();uj(a,d,b);c&&(a.wt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.jk=function(b){if(a.isEnabled){a.Xk=!1;var c=a.Qt;c[b.pointerId]&&delete c[b.pointerId];c=a.ml;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.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.ct=d.ba["d"+Xk[1]+Xk[2]+"wI"+Dk.slice(1,5)]["b"+Yk.slice(1,b)](d.ba,Wk,b,b);d.Tc(!0);Ri(a)}}Ei.className="DiagramHelper";function Xe(a){this.j=void 0===a?new K:a;this.o=new K}oa.Object.defineProperties(Xe.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}}});var Xk="DraggingInfo"; +null!==e&&e.H instanceof P&&e.H!==a&&rj(e.H,b,d);null===e&&(e=b.target);rj(a,b,d);d.clickCount=a.lq;d.targetDiagram=sj(b,e);d.targetObject=null;a.doMouseUp();uj(a,d,b);c&&(a.wt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.jk=function(b){if(a.isEnabled){a.Xk=!1;var c=a.Qt;c[b.pointerId]&&delete c[b.pointerId];c=a.ml;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.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.ct=d.ba["d"+Xk[1]+Xk[2]+"wI"+Dk.slice(1,5)]["b"+Yk.slice(1,b)](d.ba,Wk,b,b);d.Uc(!0);Ri(a)}}Ei.className="DiagramHelper";function Xe(a){this.j=void 0===a?new K:a;this.m=new K}oa.Object.defineProperties(Xe.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a}}});var Xk="DraggingInfo"; Xe.className="DraggingInfo";function Yj(a,b,c){this.node=a;this.info=b;this.Tu=c}Yj.className="DraggingNodeInfoPair";function Pe(){this.reset()}Pe.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Hb(NaN,NaN)).freeze();this.gridSnapCellSpot=Fc;this.gridSnapOrigin=(new K(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Pe.className="DraggingOptions"; -function Zk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;$k(c);b&&c.im(b);return c}na(Zk,Q);function $k(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=Gc;a.layout=new al}Zk.prototype.reset=function(){Q.prototype.reset.call(this);$k(this)};Zk.className="Palette"; -function bl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.aa=null;c.en=!1;c.fn=!1;c.G=!0;c.v=!0;c.ma=0;c.o=!1;c.sl=null;c.Ux("drawShadows",!1);a=new S;var e=new Qf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= -"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new gc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new cl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.Rf=function(){d.ab();dl(d)};c.Wd=function(){null!==d.observed&&(d.ab(),d.R())};c.Ma=function(){1>d.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Qf=function(){null!==d.observed&&dl(d)};c.autoScale=lj;c.Bb=!1;b&&Object.assign(c,b);return c}na(bl,Q);bl.prototype.computePixelRatio=function(){return 1}; -bl.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Na,b=this.dc;if(null!==a&&null!==b){Ej(this);if(null===this.sl){var c=new Ek(null);c.width=a.width;c.height=a.height;this.sl=c}try{this.Na=this.sl,this.dc=this.Na.context,this.dc.Tc(!0),this.dc.setTransform(1,0,0,1,0,0),this.dc.clearRect(0,0,this.Na.width,this.Na.height),el(this)}finally{this.Na=a,this.dc=b}}}Q.prototype.redraw.call(this)}; -bl.prototype.zc=function(){null===this.Qa&&v("No div specified");null===this.Na&&v("No canvas specified");if(!(this.Na instanceof Lj)&&(ri(this.box),this.hd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.xi){Ej(this);var b=this.Na;a=this.dc;a.Tc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?el(this):null!==this.sl&&(a.drawImage(this.sl.Xa,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +function Zk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=P.call(this,a)||this;else c=P.call(this)||this,b=a;$k(c);b&&c.im(b);return c}na(Zk,P);function $k(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=Gc;a.layout=new al}Zk.prototype.reset=function(){P.prototype.reset.call(this);$k(this)};Zk.className="Palette"; +function bl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=P.call(this,a)||this;else c=P.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.$=null;c.en=!1;c.fn=!1;c.G=!0;c.v=!0;c.ma=0;c.m=!1;c.sl=null;c.Vx("drawShadows",!1);a=new S;var e=new Qf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new gc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new cl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.Sf=function(){d.ab();dl(d)};c.Wd=function(){null!==d.observed&&(d.ab(),d.R())};c.Ma=function(){1>d.updateDelay?d.R():d.m||(d.m=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Rf=function(){null!==d.observed&&dl(d)};c.autoScale=lj;c.Bb=!1;b&&Object.assign(c,b);return c}na(bl,P);bl.prototype.computePixelRatio=function(){return 1}; +bl.prototype.redraw=function(){if(this.m&&1<=this.updateDelay){this.m=!1;var a=this.Na,b=this.dc;if(null!==a&&null!==b){Ej(this);if(null===this.sl){var c=new Ek(null);c.width=a.width;c.height=a.height;this.sl=c}try{this.Na=this.sl,this.dc=this.Na.context,this.dc.Uc(!0),this.dc.setTransform(1,0,0,1,0,0),this.dc.clearRect(0,0,this.Na.width,this.Na.height),el(this)}finally{this.Na=a,this.dc=b}}}P.prototype.redraw.call(this)}; +bl.prototype.zc=function(){null===this.Qa&&v("No div specified");null===this.Na&&v("No canvas specified");if(!(this.Na instanceof Lj)&&(ri(this.box),this.hd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.xi){Ej(this);var b=this.Na;a=this.dc;a.Uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?el(this):null!==this.sl&&(a.drawImage(this.sl.Xa,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.qc,this.qc),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.$a.s;for(var c=b.length,d=0;da&&(a=0);this.ma!==a&&(this.ma=a)}}});bl.className="Overview";function cl(){Oe.call(this);this.j=null}na(cl,Oe); cl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale?!1:b.allowZoom};fl.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);E(a,fl,"increaseZoom:factor");var b=this.diagram;b.autoScale===Eh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; fl.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);E(a,fl,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Eh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};fl.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);E(a,fl,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; fl.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);E(a,fl,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -fl.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Bc();a.redraw();var c=a.position,d=a.scale;yh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.su&&!isNaN(this.zt)&&a.documentBounds.D(this.qu)?(a.scale=this.zt,a.position=this.lw,this.su=NaN,this.qu=pc):(this.zt=d,this.lw=c.copy(),a.zoomToFit(),this.su=a.scale,this.qu=a.documentBounds.copy());Ah(b)};fl.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -fl.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w(a,S,fl,"part");var b=this.diagram;b.eb();if(null===a){try{null!==this.fg&&(this.fg.next()?a=this.fg.value:this.fg=null)}catch(k){this.fg=null}null===a&&(0a&&(a+=360));return a}; -t.Ff=function(){if(0!==(this.m&4096)===!1)return this.Lk;var a=this.Ea;return null!==this.panel?a*this.panel.Ff():a};t.$r=function(a,b){void 0===b&&(b=new K);b.assign(a);this.ne.Rd(b);return b};t.bs=function(a,b,c){return this.Xj(a.x,a.y,b.x,b.y,c)}; -t.Xj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.Hf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.Hf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +t.g=function(a,b,c){this.ib(qe,a,this,b,c)};t.Ge=function(a,b,c,d){var e=this.wc;e.h(a,b,c,d);if(1!==this.Ea||0!==this.Lb){null===this.Nb&&(this.Nb=new Jb);var f=this.Nb;f.reset();this.bo(f,a,b,c,d);f.fp(e)}};function wl(a,b,c,d){if(!1===a.pickable)return!1;d.multiply(a.transform);return c?a.Yc(b,d):a.hh(b,d)} +t.mx=function(a,b,c){if(!1===this.pickable)return!1;var d=this.naturalBounds;b=a.Df(b);return c?Lb(a.x,a.y,0,0,0,d.height)<=b||Lb(a.x,a.y,0,d.height,d.width,d.height)<=b||Lb(a.x,a.y,d.width,d.height,d.width,0)<=b||Lb(a.x,a.y,d.width,0,0,0)<=b:a.zd(0,0)<=b&&a.zd(0,d.height)<=b&&a.zd(d.width,0)<=b&&a.zd(d.width,d.height)<=b};t.se=function(){return!0}; +t.ga=function(a){G&&w(a,K,O,"containsPoint:p");var b=K.alloc();b.assign(a);this.transform.La(b);var c=this.actualBounds;if(!c.u())return K.free(b),!1;var d=this.diagram;if(null!==d&&d.wt){var e=d.Ml("extraTouchThreshold"),f=d.Ml("extraTouchArea"),g=f/2,h=this.naturalBounds;d=this.Gf()*d.scale;var k=1/d;if(h.width*da&&(a+=360));return a}; +t.Gf=function(){if(0!==(this.o&4096)===!1)return this.Lk;var a=this.Ea;return null!==this.panel?a*this.panel.Gf():a};t.$r=function(a,b){void 0===b&&(b=new K);b.assign(a);this.oe.Rd(b);return b};t.bs=function(a,b,c){return this.Xj(a.x,a.y,b.x,b.y,c)}; +t.Xj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.If(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.If(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; O.prototype.measure=function(a,b,c,d){if(!1!==Bj(this)){var e=this.Mg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=0;this instanceof Qf&&(g=this.strokeWidth);90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof V;switch(xl(this,!0)){case yg:g=e=0;h&&(b=a=Infinity); break;case Bd:isFinite(a)&&a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case jl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case kl:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.Db>a.width)))c=!0;this.m=c?this.m|256:this.m&-257;this.Jb.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Tl(f,this.Jb);yl(this,!1);M.free(f)};t=O.prototype;t.gh=function(){}; +this.xq>a.height||this.Db>a.width)))c=!0;this.o=c?this.o|256:this.o&-257;this.Jb.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Tl(f,this.Jb);yl(this,!1);M.free(f)};t=O.prototype;t.gh=function(){}; function zl(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.wc;c=a.Mg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=xl(a,!0);c===d&&f===e&&(b=yg);switch(b){case yg:if(c>d||f>e)wj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Bd:wj(a,!0);a.measure(d,e,0,0);break;case jl:wj(a,!0);a.measure(d,f,0,0);break;case kl:wj(a,!0),a.measure(c,e,0,0)}}} t.Tl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||Al(c,!0),this.R(),ec(a,b)||(c.oh(),this.In(c)))};t.In=function(a){null!==this.portId&&(Al(a,!0),a instanceof T&&Bl(a,this))}; -t.zc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof V&&(this.type===V.TableRow||this.type===V.TableColumn),e=this.Jb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Jb;d=this.gc;var g=this.areaBackground,h=this.cc;null===g&&null===h||a.Uc();null!==g&&(ti(this,a,g,!0,!0,d,e),g instanceof Cl&&g.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(g)):a.fillRect(e.x,e.y,e.width,e.height)); -null!==h&&(ti(this,a,h,!0,!1,d,e),h instanceof Cl&&h.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(h)):a.fillRect(e.x,e.y,e.width,e.height));this.mi(a,b)}else if(!this.ex(a,b)){this instanceof R&&this.ck(!1);G&&G.El&&G.bz&&G.bz(a,this);d=this.transform;g=this.panel;0!==(this.m&4096)===!0&&El(this);var k=this.part;h=!1;var l=0;if(k&&b.Se("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.qc}m=this.zi();var n;if(!(n=b.hj||!m)){var p=this.naturalBounds; +t.zc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof V&&(this.type===V.TableRow||this.type===V.TableColumn),e=this.Jb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Jb;d=this.gc;var g=this.areaBackground,h=this.cc;null===g&&null===h||a.Vc();null!==g&&(ti(this,a,g,!0,!0,d,e),g instanceof Cl&&g.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(g)):a.fillRect(e.x,e.y,e.width,e.height)); +null!==h&&(ti(this,a,h,!0,!1,d,e),h instanceof Cl&&h.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(h)):a.fillRect(e.x,e.y,e.width,e.height));this.mi(a,b)}else if(!this.gx(a,b)){this instanceof R&&this.ck(!1);G&&G.El&&G.bz&&G.bz(a,this);d=this.transform;g=this.panel;0!==(this.o&4096)===!0&&El(this);var k=this.part;h=!1;var l=0;if(k&&b.Te("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.qc}m=this.zi();var n;if(!(n=b.hj||!m)){var p=this.naturalBounds; n=this.wh;var r=n.m11,q=n.m21,u=n.dx,x=n.m12,y=n.m22,z=n.dy,B,C=B=0;n=B*r+C*q+u;var D=B*x+C*y+z;B=p.width+l;C=0;var J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);var U=Math.min(D,B);var aa=Math.max(n+0,J)-C;var Y=Math.max(D+0,B)-U;n=C;D=U;B=p.width+l;C=p.height+l;J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);U=Math.min(D,B);aa=Math.max(n+aa,J)-C;Y=Math.max(D+Y,B)-U;n=C;D=U;B=0;C=p.height+l;J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);U=Math.min(D,B);aa=Math.max(n+aa,J)-C;Y=Math.max(D+Y,B)-U;n=C;D=U;l=b.viewportBounds; -p=l.x;r=l.y;n=!(n>l.width+p||p>aa+n||D>l.height+r||r>Y+D)}if(n){n=0!==(this.m&256);a.clipInsteadOfFill&&(n=!1);this instanceof ch&&(a.font=this.font);if(n){D=g.re()?g.naturalBounds:g.actualBounds;null!==this.pb?(p=this.pb,aa=p.x,Y=p.y,l=p.width,p=p.height):(aa=Math.max(e.x,D.x),Y=Math.max(e.y,D.y),l=Math.min(e.right,D.right)-aa,p=Math.min(e.bottom,D.bottom)-Y);if(aa>e.width+e.x||e.x>D.width+D.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(aa,Y,l,p);a.clip()}if(m){if(!k.isVisible()){1!== -c&&(a.globalAlpha=f);return}h&&(D=k.shadowOffset,a.wv(D.x*b.scale*b.qc,D.y*b.scale*b.qc,k.shadowBlur),Fl(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?Fl(a):h&&!1===this.shadowVisible&&Gl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Uc(),ti(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof Cl&&this.areaBackground.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12, -d.m21,d.m22,d.dx,d.dy);h&&(null!==g&&0!==(g.m&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)&&null===this.shadowVisible&&Gl(a);null!==this.cc&&(a.Uc(),Hl(this,a,k,e));G&&G.El&&G.cz&&G.cz(a,this);h&&(null!==this.cc||null!==this.areaBackground||null!==g&&0!==(g.m&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)?(Il(this,!0),null===this.shadowVisible&&Gl(a)):Il(this,!1);this.mi(a,b);h&&0!==(this.m&512)===!0&&Fl(a);m&&h&&Gl(a);n&&(a.restore(),a.Tc(this instanceof -V));d.js()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22*b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function Hl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.fw();a instanceof Qf&&(e=a.ya.bounds,f=e.x,g=e.y,h=e.width,e=e.height);ti(a,b,a.cc,!0,!1,c,d);a.cc instanceof Cl&&a.cc.type===Dl?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.Df(a.cc)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.ex=function(){return!1};t.mi=function(){}; -function ti(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Jl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Qf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Kl)&&c.xe&&(c.type===Ll||c.zk===h&&c.Us===k))var m=c.xe;else{var n=0,p=0,r=0,q=0,u=0,x=0;x=u=0;e?(u=g.x,x=g.y):d||(u-=l/2,x-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ -c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=x;q+=x;if(c.type===Ml)m=b.createLinearGradient(n,p,r,q);else if(c.type===Dl)x=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,x=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,x);else if(c.type===Ll)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else Aa(c.type,"Brush type");if(c.type!==Ll&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.xe=m,null!== -m&&(c.zk=h,c.Us=k),null===m&&c.type===Ll&&-1!==c.zk)){c.zk=-1;var y=a.diagram;null!==y&&-1===c.zk&&va(function(){y.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.ug=function(a){if(a instanceof V)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Kf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Kf():!0}; -t.Jf=function(){for(var a=this instanceof V?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function El(a){if(0!==(a.m&2048)===!0){var b=a.Gb;b.reset();if(!a.Jb.u()||!a.wc.u()){Nl(a,!1);return}b.translate(a.Jb.x-a.wc.x,a.Jb.y-a.wc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.bo(b,c.x,c.y,c.width,c.height)}Nl(a,!1);Ol(a,!0)}0!==(a.m&4096)===!0&&(b=a.panel,null===b?(a.wh.set(a.Gb),a.Lk=a.scale,Ol(a,!1)):null!==b.ne&&(c=a.wh,c.reset(),b.re()?c.multiply(b.wh):null!==b.panel&&c.multiply(b.panel.wh),c.multiply(a.Gb),a.Lk=a.scale*b.Lk,Ol(a,!1)))} -t.bo=function(a,b,c,d,e){1!==this.Ea&&a.scale(this.Ea);if(0!==this.Lb){var f=K.alloc();f.Di(b,c,d,e,Kc);a.rotate(this.Lb,f.x,f.y);K.free(f)}};t.w=function(a){if(!Bj(this)){void 0===a&&(a=!1);wj(this,!0);yl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Zj=function(){Bj(this)||(wj(this,!0),yl(this,!0))};function Pl(a){if(!Cj(a)){var b=a.panel;null!==b?b.w():a.zi()&&(b=a.diagram,null!==b&&(b.Ce.add(a),a instanceof T&&a.Bd(),b.Sb()));yl(a,!0)}} -t.Wk=function(){0!==(this.m&2048)===!1&&(Nl(this,!0),Ol(this,!0))};t.Xu=function(){Ol(this,!0)};t.R=function(){var a=this.part;null!==a&&a.R()}; +p=l.x;r=l.y;n=!(n>l.width+p||p>aa+n||D>l.height+r||r>Y+D)}if(n){n=0!==(this.o&256);a.clipInsteadOfFill&&(n=!1);this instanceof ch&&(a.font=this.font);if(n){D=g.se()?g.naturalBounds:g.actualBounds;null!==this.pb?(p=this.pb,aa=p.x,Y=p.y,l=p.width,p=p.height):(aa=Math.max(e.x,D.x),Y=Math.max(e.y,D.y),l=Math.min(e.right,D.right)-aa,p=Math.min(e.bottom,D.bottom)-Y);if(aa>e.width+e.x||e.x>D.width+D.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(aa,Y,l,p);a.clip()}if(m){if(!k.isVisible()){1!== +c&&(a.globalAlpha=f);return}h&&(D=k.shadowOffset,a.wv(D.x*b.scale*b.qc,D.y*b.scale*b.qc,k.shadowBlur),Fl(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?Fl(a):h&&!1===this.shadowVisible&&Gl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Vc(),ti(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof Cl&&this.areaBackground.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12, +d.m21,d.m22,d.dx,d.dy);h&&(null!==g&&0!==(g.o&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)&&null===this.shadowVisible&&Gl(a);null!==this.cc&&(a.Vc(),Hl(this,a,k,e));G&&G.El&&G.cz&&G.cz(a,this);h&&(null!==this.cc||null!==this.areaBackground||null!==g&&0!==(g.o&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)?(Il(this,!0),null===this.shadowVisible&&Gl(a)):Il(this,!1);this.mi(a,b);h&&0!==(this.o&512)===!0&&Fl(a);m&&h&&Gl(a);n&&(a.restore(),a.Uc(this instanceof +V));d.js()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22*b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function Hl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.fw();a instanceof Qf&&(e=a.ya.bounds,f=e.x,g=e.y,h=e.width,e=e.height);ti(a,b,a.cc,!0,!1,c,d);a.cc instanceof Cl&&a.cc.type===Dl?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.Ef(a.cc)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.gx=function(){return!1};t.mi=function(){}; +function ti(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Jl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Qf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Kl)&&c.ye&&(c.type===Ll||c.zk===h&&c.Us===k))var m=c.ye;else{var n=0,p=0,r=0,q=0,u=0,x=0;x=u=0;e?(u=g.x,x=g.y):d||(u-=l/2,x-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=x;q+=x;if(c.type===Ml)m=b.createLinearGradient(n,p,r,q);else if(c.type===Dl)x=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,x=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,x);else if(c.type===Ll)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else Aa(c.type,"Brush type");if(c.type!==Ll&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ye=m,null!== +m&&(c.zk=h,c.Us=k),null===m&&c.type===Ll&&-1!==c.zk)){c.zk=-1;var y=a.diagram;null!==y&&-1===c.zk&&va(function(){y.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.vg=function(a){if(a instanceof V)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Lf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Lf():!0}; +t.Kf=function(){for(var a=this instanceof V?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; +function El(a){if(0!==(a.o&2048)===!0){var b=a.Gb;b.reset();if(!a.Jb.u()||!a.wc.u()){Nl(a,!1);return}b.translate(a.Jb.x-a.wc.x,a.Jb.y-a.wc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.bo(b,c.x,c.y,c.width,c.height)}Nl(a,!1);Ol(a,!0)}0!==(a.o&4096)===!0&&(b=a.panel,null===b?(a.wh.set(a.Gb),a.Lk=a.scale,Ol(a,!1)):null!==b.oe&&(c=a.wh,c.reset(),b.se()?c.multiply(b.wh):null!==b.panel&&c.multiply(b.panel.wh),c.multiply(a.Gb),a.Lk=a.scale*b.Lk,Ol(a,!1)))} +t.bo=function(a,b,c,d,e){1!==this.Ea&&a.scale(this.Ea);if(0!==this.Lb){var f=K.alloc();f.Di(b,c,d,e,Kc);a.rotate(this.Lb,f.x,f.y);K.free(f)}};t.w=function(a){if(!Bj(this)){void 0===a&&(a=!1);wj(this,!0);yl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Zj=function(){Bj(this)||(wj(this,!0),yl(this,!0))};function Pl(a){if(!Cj(a)){var b=a.panel;null!==b?b.w():a.zi()&&(b=a.diagram,null!==b&&(b.De.add(a),a instanceof T&&a.Bd(),b.Sb()));yl(a,!0)}} +t.Wk=function(){0!==(this.o&2048)===!1&&(Nl(this,!0),Ol(this,!0))};t.Xu=function(){Ol(this,!0)};t.R=function(){var a=this.part;null!==a&&a.R()}; function xl(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===V.Table)return Ql(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===V.Auto&&d.Ab()===a)return Rl(a,Bd,b);if(c===ll){if(null!==d){if(d.type===V.Spot&&d.Ab()===a)return Rl(a,Bd,b);c=d.defaultStretch;return c===ll?Rl(a,yg,b):Rl(a,c,b)}return Rl(a,yg,b)}return Rl(a,c,b)} function Ql(a,b,c,d){var e=a.stretch;if(e!==ll)return Rl(a,e,d);var f=e=null;switch(b.stretch){case kl:f=!0;break;case Bd:f=!0}switch(c.stretch){case jl:e=!0;break;case Bd:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===jl||b===Bd);null===f&&(f=b===kl||b===Bd);return!0===e&&!0===f?Rl(a,Bd,d):!0===e?Rl(a,jl,d):!0===f?Rl(a,kl,d):Rl(a,yg,d)} -function Rl(a,b,c){if(c)return b;if(b===yg)return yg;c=a.desiredSize;if(c.u())return yg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===jl)return yg;if(b===Bd)return kl}else{if(b===kl)return yg;if(b===Bd)return jl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===kl)return yg;if(b===Bd)return jl}else{if(b===jl)return yg;if(b===Bd)return kl}return b}function Il(a,b){a.m=b?a.m|512:a.m&-513}function tl(a){return 0!==(a.m&1024)}function Sl(a,b){a.m=b?a.m|1024:a.m&-1025} -function Nl(a,b){a.m=b?a.m|2048:a.m&-2049}function Ol(a,b){a.m=b?a.m|4096:a.m&-4097}function Bj(a){return 0!==(a.m&8192)}function wj(a,b){a.m=b?a.m|8192:a.m&-8193}function Cj(a){return 0!==(a.m&16384)}function yl(a,b){a.m=b?a.m|16384:a.m&-16385}t.Bi=function(a){this.eg=a};t.As=function(){};t.tv=function(a){this.va=a;Pl(this);return!0};t.hm=function(a,b){if(this.va.x!==a||this.va.y!==b)this.va.h(a,b),this.Wk()};t.fw=function(){return 0}; +function Rl(a,b,c){if(c)return b;if(b===yg)return yg;c=a.desiredSize;if(c.u())return yg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===jl)return yg;if(b===Bd)return kl}else{if(b===kl)return yg;if(b===Bd)return jl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===kl)return yg;if(b===Bd)return jl}else{if(b===jl)return yg;if(b===Bd)return kl}return b}function Il(a,b){a.o=b?a.o|512:a.o&-513}function tl(a){return 0!==(a.o&1024)}function Sl(a,b){a.o=b?a.o|1024:a.o&-1025} +function Nl(a,b){a.o=b?a.o|2048:a.o&-2049}function Ol(a,b){a.o=b?a.o|4096:a.o&-4097}function Bj(a){return 0!==(a.o&8192)}function wj(a,b){a.o=b?a.o|8192:a.o&-8193}function Cj(a){return 0!==(a.o&16384)}function yl(a,b){a.o=b?a.o|16384:a.o&-16385}t.Bi=function(a){this.fg=a};t.As=function(){};t.tv=function(a){this.va=a;Pl(this);return!0};t.hm=function(a,b){if(this.va.x!==a||this.va.y!==b)this.va.h(a,b),this.Wk()};t.fw=function(){return 0}; function Tl(a){var b=a.part;if(b instanceof T&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||Bl(b,a)}}function Ul(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof V?a instanceof T?a.Bd():a.nk(a,function(a){Tl(a)}):Tl(a))} t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new Ji(a,b,c,d):e=a;e.yd=this;a=this.jh();null!==a&&Vl(a)&&v("Cannot add a Binding to a template that has already been copied: "+e);null===this.localBindings&&(this.localBindings=new H);this.localBindings.add(e);return this};t.set=function(a){if(G)for(var b in a)(b.startsWith("_")||-1!==b.indexOf("."))&&v("Property with underscore or period passed to GraphObject.set. Did you mean to use GraphObject.assign?");Object.assign(this,a);return this}; t.xu=function(a){Wl(this,a);return this};t.apply=function(a){a(this);return this};t.im=function(a){Ij(this,a);return this};t.qz=function(){return this.jh()};t.jh=function(){for(var a=this instanceof V?this:this.panel;null!==a;){if(null!==a.allBindings)return a;a=a.panel}return null};t.Av=function(a){a.yd=this;null===this.animationTriggers&&(this.animationTriggers=new yb);this.animationTriggers.add(a.propertyName,a);return this}; -function Xl(a,b){for(var c=1;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new db;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Ij(a,e)}else Ij(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+ +ck?(a=d,w(b,ck,ck,"copyFrom:pd"),b.isRow?a.height=b.height:a.width=b.width,a.minimum=b.minimum,a.maximum=b.maximum,a.alignment=b.alignment,a.stretch=b.stretch,a.sizing=b.sizing,a.hg=null===b.separatorPadding?null:b.separatorPadding.M(),a.separatorStroke=b.separatorStroke,a.separatorStrokeWidth=b.separatorStrokeWidth,a.Bj=null,b.separatorDashArray&&(a.Bj=Ja(b.separatorDashArray)),a.background=b.background,a.coversSeparators=b.coversSeparators,a.ae=b.ae):v("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+ +a)}else if(b instanceof F)"function"===typeof a.ub?a.ub(b):Ea(a,b);else if(b instanceof $l)a.type=b;else if(b instanceof Ji)a instanceof O?a.bind(b):a instanceof ck?a.bind(b):v("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(b instanceof li)a instanceof O?a.Av(b):v("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(b instanceof je)a instanceof N&&a.type===N.m?a.figures.add(b):v("A PathFigure can only be added to a Path Geometry, not to: "+ +a);else if(b instanceof ke)a instanceof je?a.segments.add(b):v("A PathSegment can only be added to a PathFigure, not to: "+a);else if(b instanceof Di)a instanceof P?a.layout=b:a instanceof wf?a.layout=b:v("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(b))for(c=0;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new db;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Ij(a,e)}else Ij(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+ a)}function am(a,b){A(a,"string",O,"defineBuilder:name");A(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);Yl.add(a,b)} function bm(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} -oa.Object.defineProperties(O.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.pp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new rl),this.B.pp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Qf:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new rl),this.B.Qf=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.jp:null},set:function(a){this.srcBindings!== -a&&(null===this.B&&(this.B=new rl),this.B.jp=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Ji:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&A(a,"boolean",O,"shadowVisible"),ql(this),this.B.Ji=a,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Mc:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&A(a,"function",O,"enabledChanged"),ql(this), -this.B.Mc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.ar:mg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&ab(a,R,O,"segmentOrientation"),null===this.Wa&&(this.Wa=new cm),this.Wa.ar=a,this.w(),this.g("segmentOrientation",b,a),a===mg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.v:-Infinity},set:function(a){G&&A(a,"number",O,"segmentIndex");a= -Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Wa&&(this.Wa=new cm),this.Wa.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.o:0},set:function(a){G&&A(a,"number",O,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&v("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ea=a,this.w(),this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Lb},set:function(a){var b=this.Lb;b!==a&&(G&&E(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Ul(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0, enumerable:!0,get:function(){return this.fd},set:function(a){G&&w(a,Hb,O,"desiredSize");var b=a.width,c=a.height,d=this.fd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.fd=a=a.M(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",d,a),tl(this)&&(a=this.part,null!==a&&(ul(this,a,"width"),ul(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.fd.width},set:function(a){var b=this.fd.width;b===a||isNaN(b)&&isNaN(a)||(G&& A(a,"number",O,"width"),b=this.fd,this.fd=a=(new Hb(a,this.fd.height)).freeze(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",b,a),tl(this)&&(a=this.part,null!==a&&ul(this,a,"width")))}},height:{configurable:!0,get:function(){return this.fd.height},set:function(a){var b=this.fd.height;b===a||isNaN(b)&&isNaN(a)||(G&&A(a,"number",O,"height"),b=this.fd,this.fd=a=(new Hb(this.fd.width,a)).freeze(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",b,a),tl(this)&&(a= -this.part,null!==a&&ul(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Pb},set:function(a){var b=this.minSize;b.D(a)||(G&&w(a,Hb,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),ql(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Ub},set:function(a){var b=this.maxSize;b.D(a)||(G&&w(a,Hb,O,"maxSize"),a=a.copy(),isNaN(a.width)&& -(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),ql(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.wc}},naturalBounds:{configurable:!0,get:function(){return this.gc}},margin:{configurable:!0,get:function(){return this.Mg},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,O,"margin");var b=this.Mg;b.D(a)||(this.Mg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0, -enumerable:!0,get:function(){0!==(this.m&2048)===!0&&El(this);return this.Gb}},ne:{configurable:!0,get:function(){0!==(this.m&4096)===!0&&El(this);return this.wh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B?this.B.jb:null},set:function(a){this.animationTriggers!==a&&(ql(this),this.B.jb=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.Hi:yg},set:function(a){this.reshapingBehavior!==a&&(ql(this), -this.B.Hi=a)}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,O,"alignment"),a.kc()&&!a.Rb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.M(),Pl(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Cg},set:function(a){G&&E(a,O,"column");a=Math.round(a);var b=this.Cg;b!==a&&(0>a&&Ba(a,">= 0",O,"column"),this.Cg=a,this.w(),this.g("column", +this.part,null!==a&&ul(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Pb},set:function(a){var b=this.minSize;b.D(a)||(G&&w(a,Hb,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),ql(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.m:Ub},set:function(a){var b=this.maxSize;b.D(a)||(G&&w(a,Hb,O,"maxSize"),a=a.copy(),isNaN(a.width)&& +(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),ql(this),this.B.m=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.wc}},naturalBounds:{configurable:!0,get:function(){return this.gc}},margin:{configurable:!0,get:function(){return this.Mg},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,O,"margin");var b=this.Mg;b.D(a)||(this.Mg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0, +enumerable:!0,get:function(){0!==(this.o&2048)===!0&&El(this);return this.Gb}},oe:{configurable:!0,get:function(){0!==(this.o&4096)===!0&&El(this);return this.wh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B?this.B.jb:null},set:function(a){this.animationTriggers!==a&&(ql(this),this.B.jb=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.Hi:yg},set:function(a){this.reshapingBehavior!==a&&(ql(this), +this.B.Hi=a)}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,O,"alignment"),a.kc()&&!a.Rb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.M(),Pl(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Dg},set:function(a){G&&E(a,O,"column");a=Math.round(a);var b=this.Dg;b!==a&&(0>a&&Ba(a,">= 0",O,"column"),this.Dg=a,this.w(),this.g("column", b,a))}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Ib:1},set:function(a){G&&A(a,"number",O,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",O,"columnSpan"),ql(this),this.B.Ib=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.Xn},set:function(a){G&&E(a,O,"row");a=Math.round(a);var b=this.Xn;b!==a&&(0>a&&Ba(a,">= 0",O,"row"),this.Xn=a,this.w(),this.g("row",b,a))}},rowSpan:{configurable:!0, enumerable:!0,get:function(){return null!==this.B?this.B.Ii:1},set:function(a){G&&A(a,"number",O,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",O,"rowSpan"),ql(this),this.B.Ii=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Ki:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&A(a,"function",O,"spanAllocation"),ql(this),this.B.Ki=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0, enumerable:!0,get:function(){return this.tk},set:function(a){var b=this.tk;b.D(a)||(G&&w(a,Ib,O,"alignmentFocus"),!G||!a.kc()||a.Rb()||a.No()&&this instanceof T||v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.tk=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.Sn},set:function(a){var b=this.Sn;if(b!==a){G&&null!==a&&A(a,"string",O,"portId");var c=this.part;null===c||c instanceof T||v("Cannot set portID on a Link: "+ -a);null!==b&&null!==c&&em(c,this);this.Sn=a;null!==a&&null!==c&&(c.Te=!0,fm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0,get:function(){return null!==this.da?this.da.Gj:Ec},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,O,"toSpot"),a=a.M(),this.Xc(),this.da.Gj=a,this.g("toSpot",b,a),Tl(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.Ej:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&A(a,"number",O, -"toEndSegmentLength"),0>a&&Ba(a,">= 0",O,"toEndSegmentLength"),this.Xc(),this.da.Ej=a,this.g("toEndSegmentLength",b,a),Tl(this))}},toShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.Fj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",O,"toShortLength"),this.Xc(),this.da.Fj=a,this.g("toShortLength",b,a),Tl(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.da?this.da.Fr:null},set:function(a){var b=this.toLinkable; -b!==a&&(G&&null!==a&&A(a,"boolean",O,"toLinkable"),this.Xc(),this.da.Fr=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!==this.da?this.da.Gr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&A(a,"number",O,"toMaxLinks"),0>a&&Ba(a,">= 0",O,"toMaxLinks"),this.Xc(),this.da.Gr=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.da?this.da.cj:Ec},set:function(a){var b=this.fromSpot;b.D(a)||(G&& -w(a,Ib,O,"fromSpot"),a=a.M(),this.Xc(),this.da.cj=a,this.g("fromSpot",b,a),Tl(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.aj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&A(a,"number",O,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",O,"fromEndSegmentLength"),this.Xc(),this.da.aj=a,this.g("fromEndSegmentLength",b,a),Tl(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.bj:0},set:function(a){var b= -this.fromShortLength;b!==a&&(G&&A(a,"number",O,"fromShortLength"),this.Xc(),this.da.bj=a,this.g("fromShortLength",b,a),Tl(this))}},fromLinkable:{configurable:!0,get:function(){return null!==this.da?this.da.Xp:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&A(a,"boolean",O,"fromLinkable"),this.Xc(),this.da.Xp=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.da?this.da.Yp:Infinity},set:function(a){var b=this.fromMaxLinks; -b!==a&&(G&&A(a,"number",O,"fromMaxLinks"),0>a&&Ba(a,">= 0",O,"fromMaxLinks"),this.Xc(),this.da.Yp=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(A(a,"string",O,"cursor"),ql(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.zh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&A(a,"function",O,"click"),ql(this), +a);null!==b&&null!==c&&em(c,this);this.Sn=a;null!==a&&null!==c&&(c.Ue=!0,fm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gj:Ec},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,O,"toSpot"),a=a.M(),this.Xc(),this.ea.Gj=a,this.g("toSpot",b,a),Tl(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Ej:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&A(a,"number",O, +"toEndSegmentLength"),0>a&&Ba(a,">= 0",O,"toEndSegmentLength"),this.Xc(),this.ea.Ej=a,this.g("toEndSegmentLength",b,a),Tl(this))}},toShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",O,"toShortLength"),this.Xc(),this.ea.Fj=a,this.g("toShortLength",b,a),Tl(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fr:null},set:function(a){var b=this.toLinkable; +b!==a&&(G&&null!==a&&A(a,"boolean",O,"toLinkable"),this.Xc(),this.ea.Fr=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&A(a,"number",O,"toMaxLinks"),0>a&&Ba(a,">= 0",O,"toMaxLinks"),this.Xc(),this.ea.Gr=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.cj:Ec},set:function(a){var b=this.fromSpot;b.D(a)||(G&& +w(a,Ib,O,"fromSpot"),a=a.M(),this.Xc(),this.ea.cj=a,this.g("fromSpot",b,a),Tl(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.aj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&A(a,"number",O,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",O,"fromEndSegmentLength"),this.Xc(),this.ea.aj=a,this.g("fromEndSegmentLength",b,a),Tl(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.bj:0},set:function(a){var b= +this.fromShortLength;b!==a&&(G&&A(a,"number",O,"fromShortLength"),this.Xc(),this.ea.bj=a,this.g("fromShortLength",b,a),Tl(this))}},fromLinkable:{configurable:!0,get:function(){return null!==this.ea?this.ea.Xp:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&A(a,"boolean",O,"fromLinkable"),this.Xc(),this.ea.Xp=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.ea?this.ea.Yp:Infinity},set:function(a){var b=this.fromMaxLinks; +b!==a&&(G&&A(a,"number",O,"fromMaxLinks"),0>a&&Ba(a,">= 0",O,"fromMaxLinks"),this.Xc(),this.ea.Yp=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(A(a,"string",O,"cursor"),ql(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.zh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&A(a,"function",O,"click"),ql(this), this.B.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(null!==a&&A(a,"function",O,"doubleClick"),ql(this),this.B.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&A(a,"function",O,"contextClick"),ql(this),this.B.Bh=a,this.g("contextClick",b, a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Rh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseEnter"),ql(this),this.B.Rh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Uh:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseLeave"),ql(this),this.B.Uh=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0, get:function(){return null!==this.B?this.B.Vh:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&A(a,"function",O,"mouseOver"),ql(this),this.B.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.Th:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&A(a,"function",O,"mouseHover"),ql(this),this.B.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Sh: -null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&A(a,"function",O,"mouseHold"),ql(this),this.B.Sh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Wd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseDragEnter"),ql(this),this.B.Wd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Rf:null},set:function(a){var b= -this.mouseDragLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseDragLeave"),ql(this),this.B.Rf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&A(a,"function",O,"mouseDrop"),ql(this),this.B.Qh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.aa:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&& -A(a,"function",O,"actionDown"),ql(this),this.B.aa=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.ma:null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&A(a,"function",O,"actionMove"),ql(this),this.B.ma=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Ma:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&A(a,"function",O,"actionUp"),ql(this),this.B.Ma= +null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&A(a,"function",O,"mouseHold"),ql(this),this.B.Sh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Wd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseDragEnter"),ql(this),this.B.Wd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Sf:null},set:function(a){var b= +this.mouseDragLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseDragLeave"),ql(this),this.B.Sf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&A(a,"function",O,"mouseDrop"),ql(this),this.B.Qh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.$:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&& +A(a,"function",O,"actionDown"),ql(this),this.B.$=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.ma:null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&A(a,"function",O,"actionMove"),ql(this),this.B.ma=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Ma:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&A(a,"function",O,"actionUp"),ql(this),this.B.Ma= a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!==a&&(null!==a&&A(a,"function",O,"actionCancel"),ql(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.ei:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("GraphObject.toolTip must be an Adornment or HTMLInfo."), ql(this),this.B.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),ql(this),this.B.Ch=a,this.g("contextMenu",b,a))}}});O.prototype.trigger=O.prototype.Av;O.prototype.findBindingPanel=O.prototype.jh;O.prototype.findTemplateBinder=O.prototype.qz;O.prototype.setProperties=O.prototype.im; -O.prototype.apply=O.prototype.apply;O.prototype.attach=O.prototype.xu;O.prototype.set=O.prototype.set;O.prototype.isEnabledObject=O.prototype.Jf;O.prototype.isVisibleObject=O.prototype.Kf;O.prototype.isContainedBy=O.prototype.ug;O.prototype.getNearestIntersectionPoint=O.prototype.bs;O.prototype.getLocalPoint=O.prototype.$r;O.prototype.getDocumentScale=O.prototype.Ff;O.prototype.getDocumentAngle=O.prototype.si;O.prototype.getDocumentBounds=O.prototype.ti;O.prototype.getDocumentPoint=O.prototype.oa; -O.prototype.intersectsRect=O.prototype.Yc;O.prototype.containedInRect=O.prototype.hh;O.prototype.containsRect=O.prototype.Qe;O.prototype.containsPoint=O.prototype.ea;O.prototype.raiseChanged=O.prototype.g;O.prototype.raiseChangedEvent=O.prototype.ib;O.prototype.addCopyProperty=O.prototype.Nw;var Yl=null;O.className="GraphObject";Yl=new yb; +O.prototype.apply=O.prototype.apply;O.prototype.attach=O.prototype.xu;O.prototype.set=O.prototype.set;O.prototype.isEnabledObject=O.prototype.Kf;O.prototype.isVisibleObject=O.prototype.Lf;O.prototype.isContainedBy=O.prototype.vg;O.prototype.getNearestIntersectionPoint=O.prototype.bs;O.prototype.getLocalPoint=O.prototype.$r;O.prototype.getDocumentScale=O.prototype.Gf;O.prototype.getDocumentAngle=O.prototype.si;O.prototype.getDocumentBounds=O.prototype.ti;O.prototype.getDocumentPoint=O.prototype.oa; +O.prototype.intersectsRect=O.prototype.Yc;O.prototype.containedInRect=O.prototype.hh;O.prototype.containsRect=O.prototype.Re;O.prototype.containsPoint=O.prototype.ga;O.prototype.raiseChanged=O.prototype.g;O.prototype.raiseChangedEvent=O.prototype.ib;O.prototype.addCopyProperty=O.prototype.Nw;var Yl=null;O.className="GraphObject";Yl=new yb; am("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Xl(V,V.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof V){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xl(Qf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ib(0,0,2.76142374915397,2.761423749153969),spot2:new Ib(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Jf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= -c}};b.mouseLeave=function(a,b){b.Jf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Jf()&&b instanceof V&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Qf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram, -g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Qf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xl(Qf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ib(0,0,2.76142374915397,2.761423749153969),spot2:new Ib(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Kf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= +c}};b.mouseLeave=function(a,b){b.Kf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Kf()&&b instanceof V&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Qf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram, +g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Qf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); am("TreeExpanderButton",function(){var a=Xl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Xl(Qf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Sb},(new Ji("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).So()),{visible:!1},(new Ji("visible","isTreeLeaf",function(a){return!a})).So());a.click=function(a,c){c=c.part;c instanceof Ce&&(c=c.adornedPart);if(c instanceof T){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); @@ -1055,87 +1055,87 @@ a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};r am("ContextMenu",function(){return Xl(Ce,V.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Ji("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});am("ContextMenuButton",function(){var a=Xl("Button");a.stretch=jl;var b=a.lb("ButtonBorder");b instanceof Qf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Ib(0,0,2,3),b.spot2=new Ib(1,1,-2,-2));return a}); am("PanelExpanderButton",function(a){var b=bm(a,"COLLAPSIBLE"),c=Xl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Xl(Qf,{name:"ButtonIcon",strokeWidth:2},(new Ji("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).So(b))); a=c.lb("ButtonBorder");a instanceof Qf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.jh();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ja("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); -am("CheckBoxButton",function(a){var b=bm(a);a=Xl("Button",{desiredSize:new Hb(14,14)},Xl(Qf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Ag,visible:!1},""!==b?(new Ji("visible",b)).Gx():[]));a.click=function(a,d){if(d instanceof V){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.lb("ButtonIcon");c.Ja("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +am("CheckBoxButton",function(a){var b=bm(a);a=Xl("Button",{desiredSize:new Hb(14,14)},Xl(Qf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Ag,visible:!1},""!==b?(new Ji("visible",b)).Hx():[]));a.click=function(a,d){if(d instanceof V){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.lb("ButtonIcon");c.Ja("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.kb("checkbox")}}};return a}); am("CheckBox",function(a){a=bm(a);a=Xl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new gc(0,1,0,0)});var b=Xl(V,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});O.None=yg=new F(O,"None",0);O.Default=ll=new F(O,"Default",0);O.Vertical=kl=new F(O,"Vertical",4);O.Horizontal=jl=new F(O,"Horizontal",5);O.Fill=Bd=new F(O,"Fill",3);O.Uniform=Ag=new F(O,"Uniform",1); O.UniformToFill=ml=new F(O,"UniformToFill",2);O.FlipVertical=nl=new F(O,"FlipVertical",1);O.FlipHorizontal=ol=new F(O,"FlipHorizontal",2);O.FlipBoth=pl=new F(O,"FlipBoth",3);O.make=Xl;O.getBuilders=function(){var a=new yb,b;for(b in Yl)if(b!==b.toLowerCase()){var c=Yl.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};O.defineBuilder=am; O.build=function(a,b){var c=Yl.L(a);if("function"===typeof c&&(c=c(null),c instanceof O))return b&&c.set(b),c;v('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')};O.takeBuilderArgument=bm; -function rl(){this.oc=!1;this.Ca="";this.pp=-1;this.ob=this.jp=this.Qf=null;this.j="";this.jb=this.Ki=this.Mc=this.Ch=this.ei=this.G=this.Ma=this.ma=this.aa=this.Qh=this.Rf=this.Wd=this.Sh=this.Th=this.Vh=this.Uh=this.Rh=this.Bh=this.Fh=this.zh=null;this.v=Pb;this.o=Ub;this.kg=ll;this.Ib=this.Ii=1;this.Hi=yg;this.te=this.Ji=this.tb=null;this.Nc="category"} -rl.prototype.copy=function(){var a=new rl;a.Ca=this.Ca;a.pp=this.pp;a.Qf=this.Qf;a.ob=this.ob;a.j=this.j;a.zh=this.zh;a.Fh=this.Fh;a.Bh=this.Bh;a.Rh=this.Rh;a.Uh=this.Uh;a.Vh=this.Vh;a.Th=this.Th;a.Sh=this.Sh;a.Wd=this.Wd;a.Rf=this.Rf;a.Qh=this.Qh;a.aa=this.aa;a.ma=this.ma;a.Ma=this.Ma;a.G=this.G;a.ei=this.ei;a.Ch=this.Ch;a.Mc=this.Mc;a.Ki=this.Ki;a.jb=this.jb;a.v=this.v.M();a.o=this.o.M();a.kg=this.kg;a.Ii=this.Ii;a.Ib=this.Ib;a.Hi=this.Hi;a.tb=this.tb;a.Ji=this.Ji;a.te=this.te;a.Nc=this.Nc;return a}; -function cm(){this.v=-Infinity;this.o=0;this.G=zb;this.ar=mg;this.j=this.aa="None"}cm.prototype.copy=function(){var a=new cm;a.v=this.v;a.o=this.o;a.G=this.G.M();a.ar=this.ar;a.aa=this.aa;a.j=this.j;return a};cm.className="LinkElementSettings";function sl(){this.Gj=this.cj=hd;this.Fj=this.bj=this.Ej=this.aj=NaN;this.Fr=this.Xp=null;this.Gr=this.Yp=Infinity} +function rl(){this.oc=!1;this.Ca="";this.pp=-1;this.ob=this.jp=this.Rf=null;this.j="";this.jb=this.Ki=this.Nc=this.Ch=this.ei=this.G=this.Ma=this.ma=this.$=this.Qh=this.Sf=this.Wd=this.Sh=this.Th=this.Vh=this.Uh=this.Rh=this.Bh=this.Fh=this.zh=null;this.v=Pb;this.m=Ub;this.lg=ll;this.Ib=this.Ii=1;this.Hi=yg;this.ue=this.Ji=this.tb=null;this.Oc="category"} +rl.prototype.copy=function(){var a=new rl;a.Ca=this.Ca;a.pp=this.pp;a.Rf=this.Rf;a.ob=this.ob;a.j=this.j;a.zh=this.zh;a.Fh=this.Fh;a.Bh=this.Bh;a.Rh=this.Rh;a.Uh=this.Uh;a.Vh=this.Vh;a.Th=this.Th;a.Sh=this.Sh;a.Wd=this.Wd;a.Sf=this.Sf;a.Qh=this.Qh;a.$=this.$;a.ma=this.ma;a.Ma=this.Ma;a.G=this.G;a.ei=this.ei;a.Ch=this.Ch;a.Nc=this.Nc;a.Ki=this.Ki;a.jb=this.jb;a.v=this.v.M();a.m=this.m.M();a.lg=this.lg;a.Ii=this.Ii;a.Ib=this.Ib;a.Hi=this.Hi;a.tb=this.tb;a.Ji=this.Ji;a.ue=this.ue;a.Oc=this.Oc;return a}; +function cm(){this.v=-Infinity;this.m=0;this.G=zb;this.ar=mg;this.j=this.$="None"}cm.prototype.copy=function(){var a=new cm;a.v=this.v;a.m=this.m;a.G=this.G.M();a.ar=this.ar;a.$=this.$;a.j=this.j;return a};cm.className="LinkElementSettings";function sl(){this.Gj=this.cj=hd;this.Fj=this.bj=this.Ej=this.aj=NaN;this.Fr=this.Xp=null;this.Gr=this.Yp=Infinity} sl.prototype.copy=function(){var a=new sl;a.cj=this.cj.M();a.Gj=this.Gj.M();a.aj=this.aj;a.Ej=this.Ej;a.bj=this.bj;a.Fj=this.Fj;a.Xp=this.Xp;a.Fr=this.Fr;a.Yp=this.Yp;a.Gr=this.Gr;return a};sl.className="LinkSettings";function gm(){this.Za=[1,0,0,1,0,0]}gm.prototype.copy=function(){var a=new gm;a.Za[0]=this.Za[0];a.Za[1]=this.Za[1];a.Za[2]=this.Za[2];a.Za[3]=this.Za[3];a.Za[4]=this.Za[4];a.Za[5]=this.Za[5];return a}; -gm.prototype.translate=function(a,b){this.Za[4]+=this.Za[0]*a+this.Za[2]*b;this.Za[5]+=this.Za[1]*a+this.Za[3]*b};gm.prototype.scale=function(a,b){this.Za[0]*=a;this.Za[1]*=a;this.Za[2]*=b;this.Za[3]*=b};gm.className="STransform";function hm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Ww=[];this.pattern=null}hm.prototype.addColorStop=function(a,b){this.Ww.push({offset:a,color:b})};hm.className="SGradient"; +gm.prototype.translate=function(a,b){this.Za[4]+=this.Za[0]*a+this.Za[2]*b;this.Za[5]+=this.Za[1]*a+this.Za[3]*b};gm.prototype.scale=function(a,b){this.Za[0]*=a;this.Za[1]*=a;this.Za[2]*=b;this.Za[3]*=b};gm.className="STransform";function hm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Xw=[];this.pattern=null}hm.prototype.addColorStop=function(a,b){this.Xw.push({offset:a,color:b})};hm.className="SGradient"; function Lj(a,b){this.ownerDocument=a=void 0===b?sa.document:b;this.bA="http://www.w3.org/2000/svg";void 0!==a&&(this.Xa=this.$b("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Xa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Xa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.Bo=null;this.context=new im(this)} Lj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.style.width=c+"px",this.style.height=d+"px",this.Xa.setAttributeNS(null,"width",c+"px"),this.Xa.setAttributeNS(null,"height",d+"px"),this.Xa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.pw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.pw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Lj.prototype.$b=function(a,b,c){a=this.ownerDocument.createElementNS(this.bA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Lj.prototype.getBoundingClientRect=function(){return this.Xa.getBoundingClientRect()};Lj.prototype.focus=function(){this.Xa.focus()};Lj.prototype.bx=function(){this.ownerDocument=null}; +Lj.prototype.$b=function(a,b,c){a=this.ownerDocument.createElementNS(this.bA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Lj.prototype.getBoundingClientRect=function(){return this.Xa.getBoundingClientRect()};Lj.prototype.focus=function(){this.Xa.focus()};Lj.prototype.ex=function(){this.ownerDocument=null}; oa.Object.defineProperties(Lj.prototype,{width:{configurable:!0,get:function(){return this.Xa.width.baseVal.value},set:function(a){this.Xa.width=a}},height:{configurable:!0,get:function(){return this.Xa.height.baseVal.value},set:function(a){this.Xa.height=a}},style:{configurable:!0,get:function(){return this.Xa.style}}});Lj.className="SVGSurface"; -function im(a){this.Ds=a;this.svg=a.Xa;this.stack=[];this.sd=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Wg=this.kr=this.jr=0;this.ls=null;this.path=[];this.rt=!1;this.Zg=null;this.Cj=0;this.Re=new gm; +function im(a){this.Ds=a;this.svg=a.Xa;this.stack=[];this.sd=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Wg=this.kr=this.jr=0;this.ls=null;this.path=[];this.rt=!1;this.Zg=null;this.Cj=0;this.Se=new gm; jm(this,1,0,0,1,0,0);var b=pb++,c=this.$b("clipPath",{id:"mainClip"+b});c.appendChild(this.$b("rect",{x:0,y:0,width:a.width,height:a.height}));this.pw=c;this.Ds.Xa.appendChild(c);this.sd[0].setAttributeNS(null,"clip-path","url(#mainClip"+b+")");this.dA={}}t=im.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,r=b+n,q=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,q,a-m,b-n]),this.path.push(["A",c,c,0,1,q,p,r])):1E-6=Math.PI),q,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[]};t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){}; -t.clip=function(){this.addPath("clipPath",this.path,this.Re)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new hm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.clip=function(){this.addPath("clipPath",this.path,this.Se)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new hm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.dA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+pb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$b("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$b(Dk,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; t.createRadialGradient=function(a,b,c,d,e,f){var g=new hm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g}; t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width,n=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=n);d=d||0;e=e||0;f=f||0;g=g||0;h=h||0;k=k||0;a={x:0,y:0,width:m||d,height:n||e,href:l};L.ha(d,h)&&L.ha(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(a.preserveAspectRatio= -"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+pb++,g=this.$b("clipPath",{id:f}),g.appendChild(this.$b("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";km(this,Dk,a,this.Re,l);this.addElement(Dk,a)};t.fill=function(){this.addPath("fill",this.path,this.Re)}; -t.Df=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.Re);this.addElement("rect",a)};t.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};km(this,"fill",b,this.Re);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; +"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+pb++,g=this.$b("clipPath",{id:f}),g.appendChild(this.$b("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";km(this,Dk,a,this.Se,l);this.addElement(Dk,a)};t.fill=function(){this.addPath("fill",this.path,this.Se)}; +t.Ef=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.Se);this.addElement("rect",a)};t.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};km(this,"fill",b,this.Se);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.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"])}; -t.restore=function(){this.Re=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.lineDashOffset=a.lineDashOffset;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}; -t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(e=0;eg.width+g.x||g.x> -k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;jm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.zi()&&!this.isVisible())return!0;a.Re.Za=[1,0,0,1,0,0];(this instanceof ch&&1g.width+g.x||g.x> +k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;jm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.zi()&&!this.isVisible())return!0;a.Se.Za=[1,0,0,1,0,0];(this instanceof ch&&1b?(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.Cm?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.Cm?this.clip():this.fill()};t.Fi=function(){this.Cm||this.stroke()};t.wv=function(a,b,c){this.jr=a;this.kr=b;this.Wg=c}; -t.Tr=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Rr=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Tc=function(a){a&&(this.Ss="");this.Rs=this.Ts=""}; +t.quadraticCurveTo=function(a,b,c,d){this.ba.quadraticCurveTo(a,b,c,d)};t.rect=function(a,b,c,d){this.ba.rect(a,b,c,d)};t.restore=function(){this.ba.restore()};t.save=function(){this.Vc();this.ba.save()};Kl.prototype.rotate=function(a){this.Fl.rotate(57.2958*a,0,0)};t=Kl.prototype;t.setTransform=function(a,b,c,d,e,f){this.Fl.setTransform(a,b,c,d,e,f)};t.scale=function(a,b){this.Fl.scale(a,b)};t.translate=function(a,b){this.Fl.translate(a,b)};t.stroke=function(){this.ba.stroke()}; +t.transform=function(a,b,c,d,e,f){if(1!==a||0!==b||0!==c||1!==d||0!==e||0!==f){var g=this.Fl,h=g.m11*a+g.m21*b;a=g.m12*a+g.m22*b;b=g.m11*c+g.m21*d;c=g.m12*c+g.m22*d;g.dx=g.m11*e+g.m21*f+g.dx;g.dy=g.m12*e+g.m22*f+g.dy;g.m11=h;g.m12=a;g.m21=b;g.m22=c}};t.Vc=function(){var a=this.Fl;this.ba.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)}; +t.Ef=function(a){if(a instanceof Cl&&a.type===Dl){var b=a.zk;a=a.Us;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.Cm?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.Cm?this.clip():this.fill()};t.Fi=function(){this.Cm||this.stroke()};t.wv=function(a,b,c){this.jr=a;this.kr=b;this.Wg=c}; +t.Tr=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Rr=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Uc=function(a){a&&(this.Ss="");this.Rs=this.Ts=""}; oa.Object.defineProperties(Kl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.Rs!==a&&(this.Rs=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.Ss!==a&&(this.Ss=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, set:function(a){this.ba.lineCap=a}},lineDashOffset:{configurable:!0,get:function(){return this.ba.lineDashOffset},set:function(a){this.ba.lineDashOffset=a}},lineJoin:{configurable:!0,get:function(){return this.ba.lineJoin},set:function(a){this.ba.lineJoin=a}},lineWidth:{configurable:!0,get:function(){return this.ba.lineWidth},set:function(a){this.ba.lineWidth=a}},miterLimit:{configurable:!0,get:function(){return this.ba.miterLimit},set:function(a){this.ba.miterLimit= a}},shadowBlur:{configurable:!0,get:function(){return this.ba.shadowBlur},set:function(a){this.ba.shadowBlur=a}},shadowColor:{configurable:!0,get:function(){return this.ba.shadowColor},set:function(a){this.ba.shadowColor=a}},shadowOffsetX:{configurable:!0,get:function(){return this.ba.shadowOffsetX},set:function(a){this.ba.shadowOffsetX=a}},shadowOffsetY:{configurable:!0,get:function(){return this.ba.shadowOffsetY},set:function(a){this.ba.shadowOffsetY= a}},strokeStyle:{configurable:!0,get:function(){return this.ba.strokeStyle},set:function(a){this.Ts!==a&&(this.Ts=this.ba.strokeStyle=a)}},textAlign:{configurable:!0,get:function(){return this.ba.textAlign},set:function(a){this.ba.textAlign=a}},imageSmoothingEnabled:{configurable:!0,get:function(){return this.ba.imageSmoothingEnabled},set:function(a){this.ba.imageSmoothingEnabled=a}},clipInsteadOfFill:{configurable:!0,get:function(){return this.Cm}, -set:function(a){this.Cm=a}}});var mm=Object.freeze([]);Kl.className="CanvasSurfaceContext";function nm(){this.G=this.o=this.v=this.j=0}nm.className="ColorNumbers"; -function Cl(a,b){om||(pm(),om=!0);Za(this);this._isFrozen=!1;void 0===a?(this.wa=Jl,this.yk="black"):"string"===typeof a?(this.wa=Jl,G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.yk=a):(G&&ab(a,Cl,Cl,"constructor:type"),this.wa=a,this.yk="black");a=this.wa;a===Ml?(this.Nd=Gc,this.Mk=Nc):this.Mk=a===Dl?this.Nd=Kc:this.Nd=Ec;this.qr=0;this.Np=NaN;this.xe=this.Oq=this.we=null;this.Us=this.zk=0;b&&Object.assign(this,b)} -Cl.prototype.copy=function(){var a=new Cl;a.wa=this.wa;a.yk=this.yk;a.Nd=this.Nd.M();a.Mk=this.Mk.M();a.qr=this.qr;a.Np=this.Np;null!==this.we&&(a.we=this.we.copy());a.Oq=this.Oq;return a};t=Cl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.we&&this.we.freeze();return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.we&&this.we.pa();return this};t.ub=function(a){a.classType===Cl?this.type=a:Ea(this,a)}; +set:function(a){this.Cm=a}}});var mm=Object.freeze([]);Kl.className="CanvasSurfaceContext";function nm(){this.G=this.m=this.v=this.j=0}nm.className="ColorNumbers"; +function Cl(a,b){om||(pm(),om=!0);Za(this);this._isFrozen=!1;void 0===a?(this.wa=Jl,this.yk="black"):"string"===typeof a?(this.wa=Jl,G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.yk=a):(G&&ab(a,Cl,Cl,"constructor:type"),this.wa=a,this.yk="black");a=this.wa;a===Ml?(this.Nd=Gc,this.Mk=Nc):this.Mk=a===Dl?this.Nd=Kc:this.Nd=Ec;this.qr=0;this.Np=NaN;this.ye=this.Oq=this.xe=null;this.Us=this.zk=0;b&&Object.assign(this,b)} +Cl.prototype.copy=function(){var a=new Cl;a.wa=this.wa;a.yk=this.yk;a.Nd=this.Nd.M();a.Mk=this.Mk.M();a.qr=this.qr;a.Np=this.Np;null!==this.xe&&(a.xe=this.xe.copy());a.Oq=this.Oq;return a};t=Cl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.xe&&this.xe.freeze();return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.xe&&this.xe.pa();return this};t.ub=function(a){a.classType===Cl?this.type=a:Ea(this,a)}; t.toString=function(){var a="Brush(";if(this.type===Jl)a+=this.color;else if(a=this.type===Ml?a+"Linear ":this.type===Dl?a+"Radial ":this.type===Ll?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Cl,"addColorStop:loc");A(b,"string",Cl,"addColorStop:color");G&&!qm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.we&&(this.we=new yb);this.we.add(a,b);this.wa===Jl&&(this.type=Ml);this.xe=null;return this}; +t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Cl,"addColorStop:loc");A(b,"string",Cl,"addColorStop:color");G&&!qm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.xe&&(this.xe=new yb);this.xe.add(a,b);this.wa===Jl&&(this.type=Ml);this.ye=null;return this}; function qm(a){if("black"===a)return!0;if(""===a)return!1;G&&A(a,"string",Cl,"isValidColor");om||(pm(),om=!0);var b=rm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c} t.Vz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?sm:b;if(this.type===Jl)gi(this.color),this.color=tm(a,b);else if((this.type===Ml||this.type===Dl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,tm(a,b));return this};function um(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?sm:c;gi(a);return tm(b,c)} t.Uy=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?sm:b;if(this.type===Jl)gi(this.color),this.color=tm(-a,b);else if((this.type===Ml||this.type===Dl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,tm(-a,b));return this};function vm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?sm:c;gi(a);return tm(-b,c)} -function wm(a,b,c){gi(a);a=xm.j;var d=xm.v,e=xm.o,f=xm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((xm.j-a)*c+a)+", "+Math.round((xm.v-d)*c+d)+", "+Math.round((xm.o-e)*c+e)+", "+Math.round((xm.G-f)*c+f)+")"} -t.Ax=function(){if(this.type===Jl)return ym(this.color);if((this.type===Ml||this.type===Dl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Dl)return ym(a.first().value);if(null!==a.get(.5))return ym(a.get(.5));if(2===a.count)return a=a.Ka(),ym(wm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return ym(wm(a.get(c),a.get(d),1-f/e))}return!1}; -function ym(a){if(!a)return!1;if(a instanceof Cl)return a.Ax();gi(a);return 128>(299*xm.j+587*xm.v+114*xm.o)/1E3} -function tm(a,b){switch(b){case sm:b=100*zm(xm.j);var c=100*zm(xm.v),d=100*zm(xm.o);Am.j=.4124564*b+.3575761*c+.1804375*d;Am.v=.2126729*b+.7151522*c+.072175*d;Am.o=.0193339*b+.119192*c+.9503041*d;Am.G=xm.G;b=Bm(Am.j/Cm[0]);c=Bm(Am.v/Cm[1]);d=Bm(Am.o/Cm[2]);Dm.j=116*c-16;Dm.v=500*(b-c);Dm.o=200*(c-d);Dm.G=Am.G;Dm.j=Math.min(100,Math.max(0,Dm.j+100*a));a=(Dm.j+16)/116;b=a-Dm.o/200;Am.j=Cm[0]*Em(Dm.v/500+a);Am.v=Cm[1]*(Dm.j>Fm*Gm?Math.pow(a,3):Dm.j/Fm);Am.o=Cm[2]*Em(b);Am.G=Dm.G;a=-.969266*Am.j+1.8760108* -Am.v+.041556*Am.o;b=.0556434*Am.j+-.2040259*Am.v+1.0572252*Am.o;xm.j=255*Hm((3.2404542*Am.j+-1.5371385*Am.v+-.4985314*Am.o)/100);xm.v=255*Hm(a/100);xm.o=255*Hm(b/100);xm.G=Am.G;xm.j=Math.round(xm.j);255xm.j&&(xm.j=0);xm.v=Math.round(xm.v);255xm.v&&(xm.v=0);xm.o=Math.round(xm.o);255xm.o&&(xm.o=0);return"rgba("+xm.j+", "+xm.v+", "+xm.o+", "+xm.G+")";case Im:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ -ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){om||(pm(),om=!0);var b=rm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,xm.j=a[0],xm.v=a[1],xm.o=a[2],xm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),xm.j=0,xm.v=0,xm.o=0,xm.G=1)}} -function hi(){var a=xm.j/255,b=xm.v/255,c=xm.o/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=xm.G}function zm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Hm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function wm(a,b,c){gi(a);a=xm.j;var d=xm.v,e=xm.m,f=xm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((xm.j-a)*c+a)+", "+Math.round((xm.v-d)*c+d)+", "+Math.round((xm.m-e)*c+e)+", "+Math.round((xm.G-f)*c+f)+")"} +t.Bx=function(){if(this.type===Jl)return ym(this.color);if((this.type===Ml||this.type===Dl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Dl)return ym(a.first().value);if(null!==a.get(.5))return ym(a.get(.5));if(2===a.count)return a=a.Ka(),ym(wm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return ym(wm(a.get(c),a.get(d),1-f/e))}return!1}; +function ym(a){if(!a)return!1;if(a instanceof Cl)return a.Bx();gi(a);return 128>(299*xm.j+587*xm.v+114*xm.m)/1E3} +function tm(a,b){switch(b){case sm:b=100*zm(xm.j);var c=100*zm(xm.v),d=100*zm(xm.m);Am.j=.4124564*b+.3575761*c+.1804375*d;Am.v=.2126729*b+.7151522*c+.072175*d;Am.m=.0193339*b+.119192*c+.9503041*d;Am.G=xm.G;b=Bm(Am.j/Cm[0]);c=Bm(Am.v/Cm[1]);d=Bm(Am.m/Cm[2]);Dm.j=116*c-16;Dm.v=500*(b-c);Dm.m=200*(c-d);Dm.G=Am.G;Dm.j=Math.min(100,Math.max(0,Dm.j+100*a));a=(Dm.j+16)/116;b=a-Dm.m/200;Am.j=Cm[0]*Em(Dm.v/500+a);Am.v=Cm[1]*(Dm.j>Fm*Gm?Math.pow(a,3):Dm.j/Fm);Am.m=Cm[2]*Em(b);Am.G=Dm.G;a=-.969266*Am.j+1.8760108* +Am.v+.041556*Am.m;b=.0556434*Am.j+-.2040259*Am.v+1.0572252*Am.m;xm.j=255*Hm((3.2404542*Am.j+-1.5371385*Am.v+-.4985314*Am.m)/100);xm.v=255*Hm(a/100);xm.m=255*Hm(b/100);xm.G=Am.G;xm.j=Math.round(xm.j);255xm.j&&(xm.j=0);xm.v=Math.round(xm.v);255xm.v&&(xm.v=0);xm.m=Math.round(xm.m);255xm.m&&(xm.m=0);return"rgba("+xm.j+", "+xm.v+", "+xm.m+", "+xm.G+")";case Im:return hi(),ii.m=Math.min(100,Math.max(0,ii.m+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.m+"%, "+ +ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){om||(pm(),om=!0);var b=rm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,xm.j=a[0],xm.v=a[1],xm.m=a[2],xm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),xm.j=0,xm.v=0,xm.m=0,xm.G=1)}} +function hi(){var a=xm.j/255,b=xm.v/255,c=xm.m/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.m=Math.round(100*e);ii.G=xm.G}function zm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Hm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function Bm(a){return a>Gm?Math.pow(a,1/3):(Fm*a+16)/116}function Em(a){var b=a*a*a;return b>Gm?b:(116*a-16)/Fm}function dm(a,b){"string"===typeof a?G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Cl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function pm(){rm=ah?(new Ek(null)).context:null} -oa.Object.defineProperties(Cl.prototype,{type:{configurable:!0,get:function(){return this.wa},set:function(a){this._isFrozen&&xa(this,a);ab(a,Cl,Cl,"type");this.wa=a;this.start.kc()&&(a===Ml?this.start=Gc:a===Dl&&(this.start=Kc));this.end.kc()&&(a===Ml?this.end=Nc:a===Dl&&(this.end=Kc));this.xe=null}},color:{configurable:!0,get:function(){return this.yk},set:function(a){this._isFrozen&&xa(this,a);G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); -this.yk=a;this.xe=null}},start:{configurable:!0,get:function(){return this.Nd},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"start");this.Nd=a.M();this.xe=null}},end:{configurable:!0,get:function(){return this.Mk},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"end");this.Mk=a.M();this.xe=null}},startRadius:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"startRadius");0>a&&Ba(a,">= zero",Cl, -"startRadius");this.qr=a;this.xe=null}},endRadius:{configurable:!0,get:function(){return this.Np},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"endRadius");0>a&&Ba(a,">= zero",Cl,"endRadius");this.Np=a;this.xe=null}},colorStops:{configurable:!0,get:function(){return this.we},set:function(a){this._isFrozen&&xa(this,a);G&&w(a,yb,Cl,"colorStops");this.we=a;this.xe=null}},pattern:{configurable:!0,get:function(){return this.Oq},set:function(a){this._isFrozen&& -xa(this,a);this.Oq=a;this.xe=null}}});Cl.prototype.isDark=Cl.prototype.Ax;Cl.prototype.darkenBy=Cl.prototype.Uy;Cl.prototype.lightenBy=Cl.prototype.Vz;Cl.prototype.addColorStop=Cl.prototype.addColorStop;var Gm=216/24389,Fm=24389/27,Cm=[95.047,100,108.883],rm=null,xm=new nm,ii=new nm,Am=new nm,Dm=new nm,om=!1;Cl.className="Brush";var Jl;Cl.Solid=Jl=new F(Cl,"Solid",0);var Ml;Cl.Linear=Ml=new F(Cl,"Linear",1);var Dl;Cl.Radial=Dl=new F(Cl,"Radial",2);var Ll;Cl.Pattern=Ll=new F(Cl,"Pattern",4);var sm; +oa.Object.defineProperties(Cl.prototype,{type:{configurable:!0,get:function(){return this.wa},set:function(a){this._isFrozen&&xa(this,a);ab(a,Cl,Cl,"type");this.wa=a;this.start.kc()&&(a===Ml?this.start=Gc:a===Dl&&(this.start=Kc));this.end.kc()&&(a===Ml?this.end=Nc:a===Dl&&(this.end=Kc));this.ye=null}},color:{configurable:!0,get:function(){return this.yk},set:function(a){this._isFrozen&&xa(this,a);G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); +this.yk=a;this.ye=null}},start:{configurable:!0,get:function(){return this.Nd},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"start");this.Nd=a.M();this.ye=null}},end:{configurable:!0,get:function(){return this.Mk},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"end");this.Mk=a.M();this.ye=null}},startRadius:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"startRadius");0>a&&Ba(a,">= zero",Cl, +"startRadius");this.qr=a;this.ye=null}},endRadius:{configurable:!0,get:function(){return this.Np},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"endRadius");0>a&&Ba(a,">= zero",Cl,"endRadius");this.Np=a;this.ye=null}},colorStops:{configurable:!0,get:function(){return this.xe},set:function(a){this._isFrozen&&xa(this,a);G&&w(a,yb,Cl,"colorStops");this.xe=a;this.ye=null}},pattern:{configurable:!0,get:function(){return this.Oq},set:function(a){this._isFrozen&& +xa(this,a);this.Oq=a;this.ye=null}}});Cl.prototype.isDark=Cl.prototype.Bx;Cl.prototype.darkenBy=Cl.prototype.Uy;Cl.prototype.lightenBy=Cl.prototype.Vz;Cl.prototype.addColorStop=Cl.prototype.addColorStop;var Gm=216/24389,Fm=24389/27,Cm=[95.047,100,108.883],rm=null,xm=new nm,ii=new nm,Am=new nm,Dm=new nm,om=!1;Cl.className="Brush";var Jl;Cl.Solid=Jl=new F(Cl,"Solid",0);var Ml;Cl.Linear=Ml=new F(Cl,"Linear",1);var Dl;Cl.Radial=Dl=new F(Cl,"Radial",2);var Ll;Cl.Pattern=Ll=new F(Cl,"Pattern",4);var sm; Cl.Lab=sm=new F(Cl,"Lab",5);var Im;Cl.HSL=Im=new F(Cl,"HSL",6); Cl.randomColor=function(a,b){void 0===a&&(a=128);G&&(E(a,Cl,"randomColor:min"),(0>a||255b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+ -a};Cl.isValidColor=qm;Cl.lighten=function(a){return um(a)};Cl.lightenBy=um;Cl.darken=function(a){return vm(a)};Cl.darkenBy=vm;Cl.mix=wm;Cl.isDark=ym;function $l(){this.Ca="Base"}$l.prototype.measure=function(){};$l.prototype.Yz=function(a,b,c,d,e){a.measure(b,c,d,e)};$l.prototype.arrange=function(){};$l.prototype.Hy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};$l.prototype.hA=function(a){a.Zj()};$l.prototype.zc=function(){}; -oa.Object.defineProperties($l.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},classType:{configurable:!0,get:function(){return V}}});$l.prototype.remeasureObject=$l.prototype.hA;$l.prototype.arrangeElement=$l.prototype.Hy;$l.prototype.measureElement=$l.prototype.Yz;$l.className="PanelLayout";function Jm(){this.Ca="Base"}na(Jm,$l); +a};Cl.isValidColor=qm;Cl.lighten=function(a){return um(a)};Cl.lightenBy=um;Cl.darken=function(a){return vm(a)};Cl.darkenBy=vm;Cl.mix=wm;Cl.isDark=ym;function $l(){this.Ca="Base"}$l.prototype.measure=function(){};$l.prototype.Yz=function(a,b,c,d,e){a.measure(b,c,d,e)};$l.prototype.arrange=function(){};$l.prototype.Iy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};$l.prototype.hA=function(a){a.Zj()};$l.prototype.zc=function(){}; +oa.Object.defineProperties($l.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},classType:{configurable:!0,get:function(){return V}}});$l.prototype.remeasureObject=$l.prototype.hA;$l.prototype.arrangeElement=$l.prototype.Iy;$l.prototype.measureElement=$l.prototype.Yz;$l.className="PanelLayout";function Jm(){this.Ca="Base"}na(Jm,$l); Jm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Km(a);for(var k=0;kaa&&(tb=Math.max(aa-Af,0));var Hk=0===P.sa;P.pc=P.pc+tb;P.actual=P.sa+tb;aa=Math.max(aa-(tb+(Hk?Af:0)),0)}if(1===sc.columnSpan&&(Xb===yg||Xb===kl)){P=a.getColumnDefinition(Wb);var $i=P.Vc();tb=Math.max(dg-P.actual,0);tb+$i>U&&(tb=Math.max(U-$i,0));var fo=0===P.sa;P.pc=P.pc+tb;P.actual=P.sa+tb;U=Math.max(U- -(tb+(fo?$i:0)),0)}zf&&sc.Zj()}}}}}Pa(z);var ce=0,De=0;f=a.columnCount;for(var Ng=0;Ng=a.rowCount);bf++)P=a.getRowDefinition(bb.row+bf),tb=0,tb=Xb===Bd||Xb===kl?Math.max(P.minimum,0===Hd[bb.row+bf]?P.maximum:Math.min(Hd[bb.row+bf],P.maximum)):Math.max(P.minimum,isNaN(P.Gc)?P.maximum:Math.min(P.Gc,P.maximum)),Ud.height+=tb,Dc+=P.minimum;for(var dd=1;dd=a.columnCount);dd++)P=a.getColumnDefinition(bb.column+dd),tb=0,tb=Xb===Bd||Xb===jl?Math.max(P.minimum,0===Pc[bb.column+dd]?P.maximum:Math.min(Pc[bb.column+dd], -P.maximum)):Math.max(P.minimum,isNaN(P.Gc)?P.maximum:Math.min(P.Gc,P.maximum)),Ud.width+=tb,Lk+=P.minimum;xb.width+=Ud.width;xb.height+=Ud.height;var Zh=bb.margin,Ff=Zh.right+Zh.left,bj=Zh.top+Zh.bottom;bb.measure(xb.width,xb.height,Lk,Dc);for(var $h=bb.measuredBounds,Vd=Math.max($h.width+Ff,0),hg=Math.max($h.height+bj,0),Gf=0,ai=0;ai=a.rowCount);ai++)P=a.getRowDefinition(bb.row+ai),Gf+=P.total||0;if(Gf=cf)&&!(bb.row+Ge>=a.rowCount);Ge++){P=a.getRowDefinition(bb.row+Ge);var ef=P.sa||0,ff=df(bb,P,ee);G&&"number"!==typeof ff&&v(bb+" spanAllocation does not return a number: "+ff);P.actual=Math.min(P.maximum,ef+ff);P.sa!==ef&&(cf-=P.sa-ef)}for(;0Id&&(P.actual=Math.min(P.maximum,Id+cf),P.sa!==Id&&(cf-=P.sa-Id));if(0===P.index)break;P=a.getRowDefinition(P.index-1)}}for(var Qg=0,gf=0;gf=a.columnCount);gf++)P= -a.getColumnDefinition(bb.column+gf),Qg+=P.total||0;if(Qg=Rg)&&!(bb.column+ig>=a.columnCount);ig++){P=a.getColumnDefinition(bb.column+ig);var cj=P.sa||0,dj=He(bb,P,ho);G&&"number"!==typeof dj&&v(bb+" spanAllocation does not return a number: "+dj);P.actual=Math.min(P.maximum,cj+dj);P.sa!==cj&&(Rg-=P.sa-cj)}for(;0Mk&&(P.actual=Math.min(P.maximum, -Mk+Rg),P.sa!==Mk&&(Rg-=P.sa-Mk));if(0===P.index)break;P=a.getColumnDefinition(P.index-1)}}}}Pa(B);Hb.free(Ud);Hb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Pc&&Pa(Pc);var Sg=0,Tg=0,Nk=a.desiredSize,Lr=a.maxSize;Xb=xl(a,!0);var ej=De=ce=0,fj=0;f=a.columnCount;for(var Ok=0;Okaa&&(tb=Math.max(aa-Af,0));var Hk=0===Q.sa;Q.pc=Q.pc+tb;Q.actual=Q.sa+tb;aa=Math.max(aa-(tb+(Hk?Af:0)),0)}if(1===tc.columnSpan&&(Yb===yg||Yb===kl)){Q=a.getColumnDefinition(Xb);var $i=Q.Wc();tb=Math.max(dg-Q.actual,0);tb+$i>U&&(tb=Math.max(U-$i,0));var fo=0===Q.sa;Q.pc=Q.pc+tb;Q.actual=Q.sa+tb;U=Math.max(U- +(tb+(fo?$i:0)),0)}zf&&tc.Zj()}}}}}Pa(z);var ce=0,De=0;f=a.columnCount;for(var Ng=0;Ng=a.rowCount);bf++)Q=a.getRowDefinition(cb.row+bf),tb=0,tb=Yb===Bd||Yb===kl?Math.max(Q.minimum,0===Hd[cb.row+bf]?Q.maximum:Math.min(Hd[cb.row+bf],Q.maximum)):Math.max(Q.minimum,isNaN(Q.Hc)?Q.maximum:Math.min(Q.Hc,Q.maximum)),Ud.height+=tb,Dc+=Q.minimum;for(var dd=1;dd=a.columnCount);dd++)Q=a.getColumnDefinition(cb.column+dd),tb=0,tb=Yb===Bd||Yb===jl?Math.max(Q.minimum,0===Pc[cb.column+dd]?Q.maximum:Math.min(Pc[cb.column+dd], +Q.maximum)):Math.max(Q.minimum,isNaN(Q.Hc)?Q.maximum:Math.min(Q.Hc,Q.maximum)),Ud.width+=tb,Lk+=Q.minimum;xb.width+=Ud.width;xb.height+=Ud.height;var Zh=cb.margin,Ff=Zh.right+Zh.left,bj=Zh.top+Zh.bottom;cb.measure(xb.width,xb.height,Lk,Dc);for(var $h=cb.measuredBounds,Vd=Math.max($h.width+Ff,0),hg=Math.max($h.height+bj,0),Gf=0,ai=0;ai=a.rowCount);ai++)Q=a.getRowDefinition(cb.row+ai),Gf+=Q.total||0;if(Gf=cf)&&!(cb.row+Ge>=a.rowCount);Ge++){Q=a.getRowDefinition(cb.row+Ge);var ef=Q.sa||0,ff=df(cb,Q,ee);G&&"number"!==typeof ff&&v(cb+" spanAllocation does not return a number: "+ff);Q.actual=Math.min(Q.maximum,ef+ff);Q.sa!==ef&&(cf-=Q.sa-ef)}for(;0Id&&(Q.actual=Math.min(Q.maximum,Id+cf),Q.sa!==Id&&(cf-=Q.sa-Id));if(0===Q.index)break;Q=a.getRowDefinition(Q.index-1)}}for(var Qg=0,gf=0;gf=a.columnCount);gf++)Q= +a.getColumnDefinition(cb.column+gf),Qg+=Q.total||0;if(Qg=Rg)&&!(cb.column+ig>=a.columnCount);ig++){Q=a.getColumnDefinition(cb.column+ig);var cj=Q.sa||0,dj=He(cb,Q,ho);G&&"number"!==typeof dj&&v(cb+" spanAllocation does not return a number: "+dj);Q.actual=Math.min(Q.maximum,cj+dj);Q.sa!==cj&&(Rg-=Q.sa-cj)}for(;0Mk&&(Q.actual=Math.min(Q.maximum, +Mk+Rg),Q.sa!==Mk&&(Rg-=Q.sa-Mk));if(0===Q.index)break;Q=a.getColumnDefinition(Q.index-1)}}}}Pa(B);Hb.free(Ud);Hb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Pc&&Pa(Pc);var Sg=0,Tg=0,Nk=a.desiredSize,Lr=a.maxSize;Yb=xl(a,!0);var ej=De=ce=0,fj=0;f=a.columnCount;for(var Ok=0;Ok=a.rowCount);P++){var la=a.getRowDefinition(z+P);0!==la.sa&&(y.height+=la.total)}for(P=1;P=a.columnCount);P++)la=a.getColumnDefinition(C+P),0!==la.sa&&(y.width+=la.total);var fa=D.sa+y.width,za=B.sa+y.height;P=h;la=k;var Ma=fa,sb=za,wb=h,Vb=k,tb=fa,Ye=za;h+fa>c.width&&(tb=Math.max(c.width-h,0));k+za>c.height&&(Ye=Math.max(c.height-k,0));var ib=Y.alignment;if(ib.Rb()){ib=a.defaultAlignment;ib.mb()||(ib=Kc);var Ed=ib.x; -var Wb=ib.y;var Ze=ib.offsetX;ib=ib.offsetY;var Ic=D.alignment,bd=B.alignment;Ic.mb()&&(Ed=Ic.x,Ze=Ic.offsetX);bd.mb()&&(Wb=bd.y,ib=bd.offsetY)}else Ed=ib.x,Wb=ib.y,Ze=ib.offsetX,ib=ib.offsetY;if(isNaN(Ed)||isNaN(Wb))Wb=Ed=.5,ib=Ze=0;Ic=W.width;bd=W.height;var Ac=Y.margin,sc=Ac.left+Ac.right,zf=Ac.top+Ac.bottom,Fd=Ql(Y,B,D,!1);!isNaN(Y.desiredSize.width)||Fd!==Bd&&Fd!==jl||(Ic=Math.max(fa-sc,0));!isNaN(Y.desiredSize.height)||Fd!==Bd&&Fd!==kl||(bd=Math.max(za-zf,0));fa=Y.maxSize;za=Y.minSize;Ic=Math.min(fa.width, -Ic);bd=Math.min(fa.height,bd);Ic=Math.max(za.width,Ic);bd=Math.max(za.height,bd);fa=bd+zf;P+=Ma*Ed-(Ic+sc)*Ed+Ze+Ac.left;la+=sb*Wb-fa*Wb+ib+Ac.top;Y.visible&&(mc(wb,Vb,tb,Ye,P,la,W.width,W.height)?Y.arrange(P,la,Ic,bd):Y.arrange(P,la,Ic,bd,new M(wb,Vb,tb,Ye)))}}Hb.free(y);for(a=0;a=a.rowCount);Q++){var la=a.getRowDefinition(z+Q);0!==la.sa&&(y.height+=la.total)}for(Q=1;Q=a.columnCount);Q++)la=a.getColumnDefinition(C+Q),0!==la.sa&&(y.width+=la.total);var fa=D.sa+y.width,za=B.sa+y.height;Q=h;la=k;var Ma=fa,sb=za,wb=h,Wb=k,tb=fa,Ye=za;h+fa>c.width&&(tb=Math.max(c.width-h,0));k+za>c.height&&(Ye=Math.max(c.height-k,0));var jb=Y.alignment;if(jb.Rb()){jb=a.defaultAlignment; +jb.mb()||(jb=Kc);var Ed=jb.x;var Xb=jb.y;var Ze=jb.offsetX;jb=jb.offsetY;var Ic=D.alignment,bd=B.alignment;Ic.mb()&&(Ed=Ic.x,Ze=Ic.offsetX);bd.mb()&&(Xb=bd.y,jb=bd.offsetY)}else Ed=jb.x,Xb=jb.y,Ze=jb.offsetX,jb=jb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,jb=Ze=0;Ic=W.width;bd=W.height;var Ac=Y.margin,tc=Ac.left+Ac.right,zf=Ac.top+Ac.bottom,Fd=Ql(Y,B,D,!1);!isNaN(Y.desiredSize.width)||Fd!==Bd&&Fd!==jl||(Ic=Math.max(fa-tc,0));!isNaN(Y.desiredSize.height)||Fd!==Bd&&Fd!==kl||(bd=Math.max(za-zf,0));fa= +Y.maxSize;za=Y.minSize;Ic=Math.min(fa.width,Ic);bd=Math.min(fa.height,bd);Ic=Math.max(za.width,Ic);bd=Math.max(za.height,bd);fa=bd+zf;Q+=Ma*Ed-(Ic+tc)*Ed+Ze+Ac.left;la+=sb*Xb-fa*Xb+jb+Ac.top;Y.visible&&(mc(wb,Wb,tb,Ye,Q,la,W.width,W.height)?Y.arrange(Q,la,Ic,bd):Y.arrange(Q,la,Ic,bd,new M(wb,Wb,tb,Ye)))}}Hb.free(y);for(a=0;a=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.U.s,u=q.length,x=0;xB)){y=gk(y.figure);for(var C=0;CB&&z.push(D))}}}}q= +Ym.prototype.zc=function(a,b,c){c=a.Gf()*c.scale;0>=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.U.s,u=q.length,x=0;xB)){y=gk(y.figure);for(var C=0;CB&&z.push(D))}}}}q= a.U.s;u=q.length;for(x=0;xe*y*c))){B=J.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=y-Math.min(-B,y));B=Math.round(B%y);y=J.opacity;C=1;if(1!==y){if(0===y)continue;C=b.globalAlpha;b.globalAlpha=C*y}D=r[x];var U=!1,aa=J.strokeDashArray;null!==aa&&(U=!0,b.Tr(aa,J.strokeDashOffset));if("LineV"===J.figure&&null!==J.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;eb)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),B=z.measuredBounds,c.cd(B),r.push(B);else{var C=z.segmentIndex,D=z.segmentFraction,J=z.alignmentFocus;J.kc()&&(J=Kc);var U=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.ya;B=Na();Y.Ru(D,B);var W=K.allocAt(B[0],B[1]);W.add(k.i(0));Y.type=== -N.j?W.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&W.offset(-Y.startX,-Y.startY));Y=B[2];if(U!==mg){var P=k.computeAngle(z,U,Y);z.Lb=P}P=W.x-b.x;var la=W.y-b.y;K.free(W);Pa(B)}else if(C<-n||C>=n)B=K.alloc(),k.xg(),k.computeMidPoint(B),Y=k.midAngle,U!==mg&&(P=k.computeAngle(z,U,Y),z.Lb=P),P=B.x-b.x,la=B.y-b.y,K.free(B);else{P=0;0<=C?(la=m.N(C),B=Cfa+10?0<=C?Y.cb(la):la.cb(Y):fa>W+10?0<=C?B.cb(P):P.cb(B):0<=C?Y.cb(P):P.cb(Y)}else Y=0<=C?la.cb(B):B.cb(la);U!==mg&&(P=k.computeAngle(z,U,Y),z.Lb=P);P=la.x+(B.x-la.x)*D-b.x;la=la.y+(B.y-la.y)*D-b.y}z.measure(Infinity,Infinity,0,0);B=z.measuredBounds;W=z.naturalBounds;var za=0;z instanceof Qf&&(za=z.strokeWidth);fa=W.width+za;var Ma=W.height+za;q.reset();q.translate(-B.x,-B.y);q.scale(z.scale,z.scale);q.rotate(U===mg?z.angle:Y,fa/2,Ma/2);U!==bn&&U!==cn||q.rotate(90, -fa/2,Ma/2);U!==dn&&U!==en||q.rotate(-90,fa/2,Ma/2);U===fn&&(45Y||225Y)&&q.rotate(-Y,fa/2,Ma/2);W=new M(0,0,fa,Ma);u.Ci(W,J);q.La(u);J=-u.x+za/2*z.scale;z=-u.y+za/2*z.scale;x.assign(aa);za=isNaN(aa.x);var sb=isNaN(aa.y);if(za||sb){fa=fa/2+3;Ma=Ma/2+3;var wb=45<=Y&&135>=Y,Vb=225<=Y&&315>=Y;U===mg&&(wb||Vb)?(x.x=sb?fa:aa.y,x.y=za?Ma:aa.x,wb?0<=C||isNaN(C)&&.5>D||!za||(x.y=-Ma):Vb&&((0<=C||isNaN(C)&&.5>D)&&za&&(x.y=-Ma),sb&&(x.x=-fa))):(za&&(x.x=0<=C||isNaN(C)&&.5>D?fa:-fa),sb&&(x.y=-Ma), -x.rotate(Y))}else x.rotate(Y);P+=x.x;la+=x.y;W.set(B);W.h(P+J,la+z,B.width,B.height);r.push(W);c.cd(W)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.mg=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);bc(e,c.width||0,c.height||0);Jb.free(q);K.free(u);K.free(x)}}}}; -$m.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Ce||a instanceof R){var d=a,e=null;a instanceof Ce&&(e=a,d=e.adornedPart);var f=a instanceof Ce?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=K.alloc(),r=n,x=q,r.xg(),r.computeMidPoint(x),r=n.midAngle,l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,x=q.y, -K.free(q);else{u=0;0<=h?(q=b.s[h],x=hz+10?0<=h?r.cb(q):q.cb(r):z>y+10?0<=h?x.cb(u):u.cb(x):0<=h?r.cb(u):u.cb(r)}else r=0<=h?q.cb(x):x.cb(q);l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(x.x-q.x)*k;x=q.y+(x.y-q.y)*k}if(p.No())g.location=new K(n,x);else{p.kc()&&(p=Kc);q=Jb.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, +N.j?W.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&W.offset(-Y.startX,-Y.startY));Y=B[2];if(U!==mg){var Q=k.computeAngle(z,U,Y);z.Lb=Q}Q=W.x-b.x;var la=W.y-b.y;K.free(W);Pa(B)}else if(C<-n||C>=n)B=K.alloc(),k.yg(),k.computeMidPoint(B),Y=k.midAngle,U!==mg&&(Q=k.computeAngle(z,U,Y),z.Lb=Q),Q=B.x-b.x,la=B.y-b.y,K.free(B);else{Q=0;0<=C?(la=m.N(C),B=Cfa+10?0<=C?Y.cb(la):la.cb(Y):fa>W+10?0<=C?B.cb(Q):Q.cb(B):0<=C?Y.cb(Q):Q.cb(Y)}else Y=0<=C?la.cb(B):B.cb(la);U!==mg&&(Q=k.computeAngle(z,U,Y),z.Lb=Q);Q=la.x+(B.x-la.x)*D-b.x;la=la.y+(B.y-la.y)*D-b.y}z.measure(Infinity,Infinity,0,0);B=z.measuredBounds;W=z.naturalBounds;var za=0;z instanceof Qf&&(za=z.strokeWidth);fa=W.width+za;var Ma=W.height+za;q.reset();q.translate(-B.x,-B.y);q.scale(z.scale,z.scale);q.rotate(U===mg?z.angle:Y,fa/2,Ma/2);U!==bn&&U!==cn||q.rotate(90, +fa/2,Ma/2);U!==dn&&U!==en||q.rotate(-90,fa/2,Ma/2);U===fn&&(45Y||225Y)&&q.rotate(-Y,fa/2,Ma/2);W=new M(0,0,fa,Ma);u.Ci(W,J);q.La(u);J=-u.x+za/2*z.scale;z=-u.y+za/2*z.scale;x.assign(aa);za=isNaN(aa.x);var sb=isNaN(aa.y);if(za||sb){fa=fa/2+3;Ma=Ma/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;U===mg&&(wb||Wb)?(x.x=sb?fa:aa.y,x.y=za?Ma:aa.x,wb?0<=C||isNaN(C)&&.5>D||!za||(x.y=-Ma):Wb&&((0<=C||isNaN(C)&&.5>D)&&za&&(x.y=-Ma),sb&&(x.x=-fa))):(za&&(x.x=0<=C||isNaN(C)&&.5>D?fa:-fa),sb&&(x.y=-Ma), +x.rotate(Y))}else x.rotate(Y);Q+=x.x;la+=x.y;W.set(B);W.h(Q+J,la+z,B.width,B.height);r.push(W);c.cd(W)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.ng=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);bc(e,c.width||0,c.height||0);Jb.free(q);K.free(u);K.free(x)}}}}; +$m.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Ce||a instanceof R){var d=a,e=null;a instanceof Ce&&(e=a,d=e.adornedPart);var f=a instanceof Ce?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=K.alloc(),r=n,x=q,r.yg(),r.computeMidPoint(x),r=n.midAngle,l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,x=q.y, +K.free(q);else{u=0;0<=h?(q=b.s[h],x=hz+10?0<=h?r.cb(q):q.cb(r):z>y+10?0<=h?x.cb(u):u.cb(x):0<=h?r.cb(u):u.cb(r)}else r=0<=h?q.cb(x):x.cb(q);l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(x.x-q.x)*k;x=q.y+(x.y-q.y)*k}if(p.No())g.location=new K(n,x);else{p.kc()&&(p=Kc);q=Jb.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, 0,0);var B=g.naturalBounds;u=M.allocAt(0,0,B.width,B.height);y=K.alloc();y.Ci(u,p);q.La(y);p=-y.x;z=-y.y;var C=B.width,D=B.height;B=K.alloc();B.assign(m);var J=isNaN(m.x),U=isNaN(m.y);if(J||U){C=C/2+3;D=D/2+3;var aa=45<=r&&135>=r,Y=225<=r&&315>=r;l===mg&&(aa||Y)?(B.x=U?C:m.y,B.y=J?D:m.x,aa?0<=h||isNaN(h)&&.5>k||!J||(B.y=-D):Y&&((0<=h||isNaN(h)&&.5>k)&&J&&(B.y=-D),U&&(B.x=-C))):(J&&(B.x=0<=h||isNaN(h)&&.5>k?C:-C),U&&(B.y=-D),B.rotate(r))}else B.rotate(r);n+=B.x;x+=B.y;q.fp(u);p+=u.x;z+=u.y;h=K.allocAt(n+ p,x+z);g.move(h);K.free(h);K.free(B);K.free(y);M.free(u);Jb.free(q)}}null!==e?e.ck(!1):d.ck(!1)}}; -function an(a,b,c,d){if(!1!==Bj(d)){var e=d.strokeWidth;0===e&&a instanceof Ce&&a.type===V.Link&&a.adornedObject instanceof Qf&&(e=a.adornedObject.strokeWidth);e*=d.Ea;a instanceof R&&null!==a.ya?(a=a.ya.bounds,d.Fe(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Ce&&null!==a.adornedPart.ya?(a=a.adornedPart.ya.bounds,d.Fe(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Fe(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.ya?d.gc.h(0,0,e.width,e.height):d.gc.assign(d.ya.bounds);wj(d,!1)}} +function an(a,b,c,d){if(!1!==Bj(d)){var e=d.strokeWidth;0===e&&a instanceof Ce&&a.type===V.Link&&a.adornedObject instanceof Qf&&(e=a.adornedObject.strokeWidth);e*=d.Ea;a instanceof R&&null!==a.ya?(a=a.ya.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Ce&&null!==a.adornedPart.ya?(a=a.adornedPart.ya.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Ge(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.ya?d.gc.h(0,0,e.width,e.height):d.gc.assign(d.ya.bounds);wj(d,!1)}} function gn(){this.Ca="Base"}na(gn,$l); -gn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Ab();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var r=h.geometry,q=h.strokeWidth,u=r.flattenedSegments,x=r.flattenedLengths,y=r.flattenedTotalLength,z=u.length,B=0,C=0,D=Na(),J=0;Jfa&&(fa+=360);aa.push(fa)}B=P;C=la}D.push(aa)}if(null===a.graduatedIntervals){for(var za=[],Ma=a.U.s,sb=Ma.length,wb=0;wbYe))for(var ib=0;ibYe&&tb.push(Wb)}}}}a.graduatedIntervals=za}var Ze=a.graduatedIntervals;var Ic=a.U.s,bd=Ic.length,Ac=0,sc=0,zf=y;a.graduatedMarks= -[];for(var Fd,Sh=0;ShZi*Xb*y/a.graduatedRange&&null===Bc.graduatedSkip)){var Mg=x[0][0],Rd=0,tc=0;sc=y*Bc.graduatedStart-1E-4;zf=y*Bc.graduatedEnd+1E-4;var dg=Zi*Xb,Cc=a.graduatedTickBase;if(Cca.graduatedMin+dg&&(Cc-=Math.floor((Cc-a.graduatedMin)/dg)*dg);for(var Hk=Ze[Sh],$i=Cc,fo=1E-6*a.graduatedMax, -ce=1;Cc<=a.graduatedMax+fo;ce++){a:{for(var De=Hk.length,Ng=0;Ng-Th){var Cf=!1;break a}}Cf=!0}if(Cf&&(Cc>a.graduatedMax&&(Cc=a.graduatedMax),null===Bc.graduatedSkip||Bc instanceof ch&&!Bc.graduatedSkip(Cc,Bc)||Bc instanceof Qf&&!Bc.graduatedSkip(Cc,Bc))&&(Ac=(Cc-a.graduatedMin)*y/a.graduatedRange,Ac>y&&(Ac=y),sc<=Ac&&Ac<=zf)){for(var de=D[Rd][tc],$e=x[Rd][tc];RdMg&&tc< -x[Rd].length-1;)tc++,de=D[Rd][tc],$e=x[Rd][tc],Mg+=$e;if(Ac<=Mg)break;Rd++;tc=0;de=D[Rd][tc];$e=x[Rd][tc];Mg+=$e}var uc=u[Rd],Sd=uc[2*tc],Ik=uc[2*tc+1],Ee=(Ac-(Mg-$e))/$e,Uh=new K(Sd+(uc[2*tc+2]-Sd)*Ee+q/2-r.bounds.x,Ik+(uc[2*tc+3]-Ik)*Ee+q/2-r.bounds.y);Uh.scale(h.scale,h.scale);a:{var Gd=de,eg=D[Rd];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Og){var Vh=1-Math.abs(.5-Ee);de=(Gd*Vh+Td*(1-Vh))%360;break a}}}de=Gd}if(Bc instanceof ch){var nd="";null!==Bc.graduatedFunction?(nd=Bc.graduatedFunction(Cc,Bc),nd=null!==nd&&void 0!==nd?nd.toString():""):nd=(+Cc.toFixed(2)).toString();""!==nd&&Fd.push({Vl:Uh,angle:de,text:nd})}else Fd.push({Vl:Uh,angle:de})}Cc=$i+ce*dg}}}a.graduatedMarks.push(Fd)}Pa(D); -var xb=a.graduatedMarks;if(null!==xb)for(var aj=d.length,ic=0;icod;od++){switch(od){case 0:vc.h(Ud,Hd);break;case 1:vc.h(Ud+Wh,Hd);break;case 2:vc.h(Ud,Hd+gg);break;case 3:vc.h(Ud+Wh,Hd+gg)}vc.rotate(bb+jb.angle);vc.offset(Kk,Yh);0===Xh&&0===od?Pc.h(vc.x,vc.y,0,0):Pc.Ye(vc);vc.offset(-Kk,-Yh);vc.rotate(-bb-jb.angle)}K.free(vc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Pc);lc(af,Pc.x,Pc.y,Pc.width,Pc.height)}else if(jb instanceof ch){var cd=a,Lk=e;null===cd.temporaryTextBlock&&(cd.temporaryTextBlock=new ch);var Dc=cd.temporaryTextBlock;hn(Dc,jb); -var bf=jb.alignmentFocus;bf.kc()&&(bf=Gc);for(var dd=jb.segmentOrientation,Zh=jb.segmentOffset,Ff=new M,bj=0,$h=0,Vd=0,hg=0,Gf=0,ai=jc.length,cf=0;cffa&&(fa+=360);aa.push(fa)}B=Q;C=la}D.push(aa)}if(null===a.graduatedIntervals){for(var za=[],Ma=a.U.s,sb=Ma.length,wb=0;wbYe))for(var jb=0;jbYe&&tb.push(Xb)}}}}a.graduatedIntervals=za}var Ze=a.graduatedIntervals;var Ic=a.U.s,bd=Ic.length,Ac=0,tc=0,zf=y;a.graduatedMarks= +[];for(var Fd,Sh=0;ShZi*Yb*y/a.graduatedRange&&null===Bc.graduatedSkip)){var Mg=x[0][0],Rd=0,uc=0;tc=y*Bc.graduatedStart-1E-4;zf=y*Bc.graduatedEnd+1E-4;var dg=Zi*Yb,Cc=a.graduatedTickBase;if(Cca.graduatedMin+dg&&(Cc-=Math.floor((Cc-a.graduatedMin)/dg)*dg);for(var Hk=Ze[Sh],$i=Cc,fo=1E-6*a.graduatedMax, +ce=1;Cc<=a.graduatedMax+fo;ce++){a:{for(var De=Hk.length,Ng=0;Ng-Th){var Cf=!1;break a}}Cf=!0}if(Cf&&(Cc>a.graduatedMax&&(Cc=a.graduatedMax),null===Bc.graduatedSkip||Bc instanceof ch&&!Bc.graduatedSkip(Cc,Bc)||Bc instanceof Qf&&!Bc.graduatedSkip(Cc,Bc))&&(Ac=(Cc-a.graduatedMin)*y/a.graduatedRange,Ac>y&&(Ac=y),tc<=Ac&&Ac<=zf)){for(var de=D[Rd][uc],$e=x[Rd][uc];RdMg&&uc< +x[Rd].length-1;)uc++,de=D[Rd][uc],$e=x[Rd][uc],Mg+=$e;if(Ac<=Mg)break;Rd++;uc=0;de=D[Rd][uc];$e=x[Rd][uc];Mg+=$e}var vc=u[Rd],Sd=vc[2*uc],Ik=vc[2*uc+1],Ee=(Ac-(Mg-$e))/$e,Uh=new K(Sd+(vc[2*uc+2]-Sd)*Ee+q/2-r.bounds.x,Ik+(vc[2*uc+3]-Ik)*Ee+q/2-r.bounds.y);Uh.scale(h.scale,h.scale);a:{var Gd=de,eg=D[Rd];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Og){var Vh=1-Math.abs(.5-Ee);de=(Gd*Vh+Td*(1-Vh))%360;break a}}}de=Gd}if(Bc instanceof ch){var nd="";null!==Bc.graduatedFunction?(nd=Bc.graduatedFunction(Cc,Bc),nd=null!==nd&&void 0!==nd?nd.toString():""):nd=(+Cc.toFixed(2)).toString();""!==nd&&Fd.push({Vl:Uh,angle:de,text:nd})}else Fd.push({Vl:Uh,angle:de})}Cc=$i+ce*dg}}}a.graduatedMarks.push(Fd)}Pa(D); +var xb=a.graduatedMarks;if(null!==xb)for(var aj=d.length,jc=0;jcod;od++){switch(od){case 0:wc.h(Ud,Hd);break;case 1:wc.h(Ud+Wh,Hd);break;case 2:wc.h(Ud,Hd+gg);break;case 3:wc.h(Ud+Wh,Hd+gg)}wc.rotate(cb+kb.angle);wc.offset(Kk,Yh);0===Xh&&0===od?Pc.h(wc.x,wc.y,0,0):Pc.Ze(wc);wc.offset(-Kk,-Yh);wc.rotate(-cb-kb.angle)}K.free(wc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Pc);lc(af,Pc.x,Pc.y,Pc.width,Pc.height)}else if(kb instanceof ch){var cd=a,Lk=e;null===cd.temporaryTextBlock&&(cd.temporaryTextBlock=new ch);var Dc=cd.temporaryTextBlock;hn(Dc,kb); +var bf=kb.alignmentFocus;bf.kc()&&(bf=Gc);for(var dd=kb.segmentOrientation,Zh=kb.segmentOffset,Ff=new M,bj=0,$h=0,Vd=0,hg=0,Gf=0,ai=kc.length,cf=0;cfVd||225Vd)&&Id.rotate(-Vd,ef/2,ff/2);var Qg=M.allocAt(0,0,ef,ff),gf=K.alloc();gf.Ci(Qg,bf);Id.La(gf);var Rg=-gf.x,ho=-gf.y,He=K.alloc();He.assign(Zh);isNaN(He.x)&&(He.x=ef/2+3);isNaN(He.y)&&(He.y=-(ff/2+3));He.rotate(Vd);bj+=He.x+Rg;$h+=He.y+ho;var ig=new M(bj,$h,df.width,df.height),cj=new M(df.x,df.y,df.width,df.height),dj=new M(Ge.x,Ge.y,Ge.width,Ge.height); -ee.Tz=hg;ee.lineCount=Dc.lineCount;ee.lines=[Dc.Db,Dc.Lh,Dc.df,Dc.Ke,Dc.Oc,Dc.ac,Dc.ze];ee.actualBounds=ig;ee.measuredBounds=cj;ee.naturalBounds=dj;0===cf?Ff.assign(ig):Ff.cd(ig);K.free(He);K.free(gf);M.free(Qg);Jb.free(Id)}null!==cd.graduatedBounds&&cd.graduatedBounds.push(Ff);lc(Lk,Ff.x,Ff.y,Ff.width,Ff.height)}wj(jb,!1)}}}; +ee.Tz=hg;ee.lineCount=Dc.lineCount;ee.lines=[Dc.Db,Dc.Lh,Dc.ef,Dc.Le,Dc.Pc,Dc.ac,Dc.Ae];ee.actualBounds=ig;ee.measuredBounds=cj;ee.naturalBounds=dj;0===cf?Ff.assign(ig):Ff.cd(ig);K.free(He);K.free(gf);M.free(Qg);Jb.free(Id)}null!==cd.graduatedBounds&&cd.graduatedBounds.push(Ff);lc(Lk,Ff.x,Ff.y,Ff.width,Ff.height)}wj(kb,!1)}}}; gn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Ab(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=e&&(e=1);for(var g=f.actualBounds,h=a.U.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* +gn.prototype.zc=function(a,b,c){var d=c.hj;c.hj=!0;var e=a.naturalBounds,f=e.width;e=e.height;b.save();b.beginPath();b.rect(-1,-1,f+1,e+1);b.clip();f=a.Ab();f.zc(b,c);e=a.Gf()*c.scale;0>=e&&(e=1);for(var g=f.actualBounds,h=a.U.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* n.scale,x=n.alignmentFocus;x.kc()&&(x=Gc);for(var y=0;yf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ti(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.Tr(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-=p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.zb;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Rr()}}}} -function ln(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=nn(a,!0),l=nn(a,!1),m=0;mp)){var r=n.Vc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= +function ln(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=nn(a,!0),l=nn(a,!1),m=0;mp)){var r=n.Wc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= q;q=n.position+q;r+=n.actual;q+r>p&&(r=p-q);0>=r||(p=a.zb,ti(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,q+p.top,g.width-(p.left+p.right),r):b.fillRect(q+p.left,p.top,r,g.height-(p.top+p.bottom)))}}}}function nn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(q),K.free(q));K.free(m);f&&e.transform(g);return l}; t.w=function(a){if(!Bj(this)){O.prototype.w.call(this,a);a=null;if(this.wa===V.Auto||this.wa===V.Link)a=this.Ab();for(var b=this.U.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Bd:this.w(!0);this.measure(c+h,d+g,0,0);break;case jl:this.w(!0);this.measure(c+h,f+g,0,0);break;case kl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.wa.arrange(this,e,this.mg)}}; -t.ih=function(a){var b=this.naturalBounds,c=Km(this);if(mc(0,0,b.width,b.height,a.x,a.y)){b=this.U.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Kb(e.set(a),f.transform),f.ea(e))return K.free(e),!0}K.free(e);return null===this.cc&&null===this.areaBackground?!1:!0}return!1};t.Ur=function(a){if(this.bindingId===a)return this;for(var b=this.U.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Bd:this.w(!0);this.measure(c+h,d+g,0,0);break;case jl:this.w(!0);this.measure(c+h,f+g,0,0);break;case kl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.wa.arrange(this,e,this.ng)}}; +t.ih=function(a){var b=this.naturalBounds,c=Km(this);if(mc(0,0,b.width,b.height,a.x,a.y)){b=this.U.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Kb(e.set(a),f.transform),f.ga(e))return K.free(e),!0}K.free(e);return null===this.cc&&null===this.areaBackground?!1:!0}return!1};t.Ur=function(a){if(this.bindingId===a)return this;for(var b=this.U.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof V?m:null;p=Jb.alloc();p.set(g); -if(null!==m?m.Ef(a,b,c,d,e,p):wl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Jb.free(p)}}}void 0===f&&Jb.free(g);return d}void 0===f&&Jb.free(g);return!1};function un(a,b,c,d){for(var e=a.U.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof V&&un(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} -t.sg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.re(),k=h?a:Kb(K.allocAt(a.x,a.y),this.transform),l=h?b:Kb(K.allocAt(b.x,b.y),this.transform),m=k.Cf(l),n=0x.width||u.y>x.height||0>u.x+u.width||0>u.y+u.height))if(q.re()?(u=q.transform,Kb(k.set(a),u),Kb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof V?q:null,null!==q?q.sg(k,l,c,d,e,f):u.lx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; +t.Ff=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Jb.alloc(),g.reset());g.multiply(this.transform);if(this.hh(a,g))return un(this,b,c,e),void 0===f&&Jb.free(g),!0;if(this.Yc(a,g)){if(!this.isAtomic)for(var h=Km(this),k=this.U.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof V?m:null;p=Jb.alloc();p.set(g); +if(null!==m?m.Ff(a,b,c,d,e,p):wl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Jb.free(p)}}}void 0===f&&Jb.free(g);return d}void 0===f&&Jb.free(g);return!1};function un(a,b,c,d){for(var e=a.U.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof V&&un(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.tg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.se(),k=h?a:Kb(K.allocAt(a.x,a.y),this.transform),l=h?b:Kb(K.allocAt(b.x,b.y),this.transform),m=k.Df(l),n=0x.width||u.y>x.height||0>u.x+u.width||0>u.y+u.height))if(q.se()?(u=q.transform,Kb(k.set(a),u),Kb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof V?q:null,null!==q?q.tg(k,l,c,d,e,f):u.mx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; function Qm(a){var b=null;a instanceof Qf&&(b=a.spot1,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=Fc);return b}function Rm(a){var b=null;a instanceof Qf&&(b=a.spot2,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Oc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.ah=null;Bj(this)||this.w();b.w(!1);null!==b.portId?this.Te=!0:b instanceof V&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.Jf()||vn(this,b,!1);c=this.part;null!==c&&(c.Wh=null,c.cg=NaN,this.Te&&c instanceof T&&(c.Te=!0),c.Te&&c instanceof T&&(c.yc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.ib(te,"elements",this,b,null,d,null),c.ib(se,"elements",this,null,b,null,a)))};function wn(a,b){a.m=b?a.m|16777216:a.m&-16777217}t.remove=function(a){w(a,O,V,"remove:element");for(var b=this.U.s,c=b.length,d=-1,e=0;e=e.count&&a>=e.count)return; +e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.ah=null;Bj(this)||this.w();b.w(!1);null!==b.portId?this.Ue=!0:b instanceof V&&!0===b.Ue&&(this.Ue=!0);this.graduatedIntervals=null;this.Kf()||vn(this,b,!1);c=this.part;null!==c&&(c.Wh=null,c.dg=NaN,this.Ue&&c instanceof T&&(c.Ue=!0),c.Ue&&c instanceof T&&(c.yc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.ib(te,"elements",this,b,null,d,null),c.ib(se,"elements",this,null,b,null,a)))};function wn(a,b){a.o=b?a.o|16777216:a.o&-16777217}t.remove=function(a){w(a,O,V,"remove:element");for(var b=this.U.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",V,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new ck;c.Bi(this);c.isRow=!0;c.index=a;b[a]=c;this.ib(se,"rowdefs",this,null,c,null,a)}return b[a]}; V.prototype.nA=function(a){G&&E(a,V,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",V,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ib(te,"rowdefs",this,c,null,a,null);this.w()}}};function dk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof ck?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} V.prototype.getColumnDefinition=function(a){G&&E(a,V,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",V,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new ck;c.Bi(this);c.isRow=!1;c.index=a;b[a]=c;this.ib(se,"coldefs",this,null,c,null,a)}return b[a]};t=V.prototype; t.iA=function(a){G&&E(a,V,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",V,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ib(te,"coldefs",this,c,null,a,null);this.w()}}};function ek(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof ck?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} t.oz=function(a){if(0>a||this.type!==V.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==V.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;e=c.elements.count&&!(c instanceof S)){var d=!1;if(1===c.elements.count&&(d=null!==c.itemArray,!d))for(h=b.iterator;h.next();)if("itemArray"===h.value.targetProperty){d=!0;break}d||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),yn=!0)}}))} t.Sy=function(a){void 0===a&&(a=!1);var b=this.copy();pn(b,function(a){a instanceof V&&(a.allBindings=null,a.vb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Av(b.value.copy())}))});a&&xg(b);return b}; t.Pa=function(a){var b=this.allBindings;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.lb(e),null===d){G&&Fa("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d= -d.model.modelData;else continue;var f=this,g=c.Gi;if(-1!==g){if(f=this.Ur(g),null===f)continue}else null!==c.yd&&(f=c.yd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.jo;if(0!==e){if(!(f instanceof V))continue;1===e?f=f.getColumnDefinition(c.yl):2===e&&(f=f.getRowDefinition(c.yl))}void 0!==f&&c.Dv(f,d)}}};t.kx=function(a){if(void 0===a||null===a||null===this.ee)return null;A(a,"object",V,"findItemPanelForData");return this.ee.L(a)}; +d.model.modelData;else continue;var f=this,g=c.Gi;if(-1!==g){if(f=this.Ur(g),null===f)continue}else null!==c.yd&&(f=c.yd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.jo;if(0!==e){if(!(f instanceof V))continue;1===e?f=f.getColumnDefinition(c.yl):2===e&&(f=f.getRowDefinition(c.yl))}void 0!==f&&c.Dv(f,d)}}};t.lx=function(a){if(void 0===a||null===a||null===this.fe)return null;A(a,"object",V,"findItemPanelForData");return this.fe.L(a)}; function zn(a,b){a=a.U.s;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.rc(this.U.length-1,!1);An(this,this.itemArray)}; -function An(a,b){var c=sn(a);if(null===b||0===b.length)for(;a.U.length>c;)a.rc(a.U.length-1,!1);else if(a.U.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){xg(e);e=e.copy();if(0!==(e.m&16777216)){var f=a.jh();null!==f&&wn(f,!0)}"object"===typeof b&&(null===a.ee&&(a.ee=new yb),a.ee.add(b,e));f=c+sn(a);a.Hb(f,e);d&&(e.vb=b,En(a,f,c),e.vb=null);e.data=b}}} +function An(a,b){var c=sn(a);if(null===b||0===b.length)for(;a.U.length>c;)a.rc(a.U.length-1,!1);else if(a.U.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){xg(e);e=e.copy();if(0!==(e.o&16777216)){var f=a.jh();null!==f&&wn(f,!0)}"object"===typeof b&&(null===a.fe&&(a.fe=new yb),a.fe.add(b,e));f=c+sn(a);a.Hb(f,e);d&&(e.vb=b,En(a,f,c),e.vb=null);e.data=b}}} function En(a,b,c){for(a=a.U;ba&&Ba(a,">= 0",V,"padding"), a=new gc(a)):(w(a,gc,V,"padding"),0>a.left&&Ba(a.left,">= 0",V,"padding:value.left"),0>a.right&&Ba(a.right,">= 0",V,"padding:value.right"),0>a.top&&Ba(a.top,">= 0",V,"padding:value.top"),0>a.bottom&&Ba(a.bottom,">= 0",V,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.w(),this.g("padding",b,a))}},defaultAlignment:{configurable:!0,get:function(){return this.Om},set:function(a){var b=this.Om;b.D(a)||(G&&w(a,Ib,V,"defaultAlignment"),this.Om=a=a.M(),this.w(),this.g("defaultAlignment", -b,a))}},defaultStretch:{configurable:!0,get:function(){return this.Vf},set:function(a){var b=this.Vf;b!==a&&(ab(a,O,V,"defaultStretch"),this.Vf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.W?this.W.Hp:yc},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,V,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.W&&(this.W=new Jn),this.W.Hp=a,this.w(),this.g("defaultSeparatorPadding", +b,a))}},defaultStretch:{configurable:!0,get:function(){return this.Wf},set:function(a){var b=this.Wf;b!==a&&(ab(a,O,V,"defaultStretch"),this.Wf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.W?this.W.Hp:yc},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,V,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.W&&(this.W=new Jn),this.W.Hp=a,this.w(),this.g("defaultSeparatorPadding", b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.W?this.W.ma:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Cl)&&(a instanceof Cl&&a.freeze(),null===this.W&&(this.W=new Jn),this.W.ma=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.W?this.W.Ma:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; -b!==a&&isFinite(a)&&0<=a&&(null===this.W&&(this.W=new Jn),this.W.Ma=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.W?this.W.aa:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",V,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.Ib=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.W?this.W.jb:0},set:function(a){var b= -this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.jb=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;if(b!==a){var c=this instanceof S&&!(this instanceof Ce);c&&A(a,"object",V,"data");xg(this);this.vb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof R?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a, -this)):this instanceof S&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ee&&(null!==b&&c.ee.remove(b),null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Pa()}}},itemIndex:{configurable:!0,get:function(){return this.sn},set:function(a){var b=this.sn;b!==a&&(this.sn=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.ob:null},set:function(a){this.localBindings!== +this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.jb=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;if(b!==a){var c=this instanceof S&&!(this instanceof Ce);c&&A(a,"object",V,"data");xg(this);this.vb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof R?(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a, +this)):this instanceof S&&(null!==b&&c.df.remove(b),null!==a&&c.df.add(a,this))):(c=this.panel,null!==c&&null!==c.fe&&(null!==b&&c.fe.remove(b),null!==a&&c.fe.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Pa()}}},itemIndex:{configurable:!0,get:function(){return this.sn},set:function(a){var b=this.sn;b!==a&&(this.sn=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.ob:null},set:function(a){this.localBindings!== a&&(null===this.B&&(this.B=new rl),this.B.ob=a)}},itemArray:{configurable:!0,get:function(){return this.Jh},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Jh;if(b!==a||null!==a&&zn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Tj(c.partManager,this,c),this.Jh=a,null!==c&&null!==a&&Qj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||An(this,a)}}},itemTemplate:{configurable:!0, enumerable:!0,get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.L("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new yb}var b=this.itemTemplateMap.L("");b!==a&&(w(a,V,V,"itemTemplate"),(a instanceof S||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.iv())}},itemTemplateMap:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.te:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){w(a,yb,V,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof S||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}ql(this);this.B.te=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.iv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== -this.B?this.B.Nc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",V,"itemCategoryProperty"),ql(this),this.B.Nc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(A(a,"boolean",V,"isAtomic"),this.m^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== -(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(G&&(A(a,"boolean",V,"isClipping"),!a||this.type===V.Spot||this instanceof wf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.m^=2097152,this instanceof wf&&(this.pb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.m&33554432)},set:function(a){var b=0!==(this.m&33554432);b!==a&&(A(a,"boolean",V,"isOpposite"),this.m^=33554432,this.w(), -this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);if(b!==a){A(a,"boolean",V,"isEnabled");var c=null===this.panel||this.panel.Jf();this.m^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&vn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(G&&A(a,"string",V,"alignmentFocusName"), -this.$e=a,this.w(),this.g("alignmentFocusName",b,a))}}}); +enumerable:!0,get:function(){return null!==this.B?this.B.ue:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){w(a,yb,V,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof S||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}ql(this);this.B.ue=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.iv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== +this.B?this.B.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",V,"itemCategoryProperty"),ql(this),this.B.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(A(a,"boolean",V,"isAtomic"),this.o^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== +(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(G&&(A(a,"boolean",V,"isClipping"),!a||this.type===V.Spot||this instanceof wf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.o^=2097152,this instanceof wf&&(this.pb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.o&33554432)},set:function(a){var b=0!==(this.o&33554432);b!==a&&(A(a,"boolean",V,"isOpposite"),this.o^=33554432,this.w(), +this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);if(b!==a){A(a,"boolean",V,"isEnabled");var c=null===this.panel||this.panel.Kf();this.o^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&vn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.af},set:function(a){var b=this.af;b!==a&&(G&&A(a,"string",V,"alignmentFocusName"), +this.af=a,this.w(),this.g("alignmentFocusName",b,a))}}}); oa.Object.defineProperties(V,{Position:{configurable:!0,get:function(){return Zl.L("Position")}},Horizontal:{configurable:!0,get:function(){return Zl.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return Zl.L("Vertical")}},Spot:{configurable:!0,get:function(){return Zl.L("Spot")}},Auto:{configurable:!0,get:function(){return Zl.L("Auto")}},Table:{configurable:!0,get:function(){return Zl.L("Table")}},Viewbox:{configurable:!0, enumerable:!0,get:function(){return Zl.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return Zl.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return Zl.L("TableColumn")}},Link:{configurable:!0,get:function(){return Zl.L("Link")}},Grid:{configurable:!0,get:function(){return Zl.L("Grid")}},Graduated:{configurable:!0,get:function(){return Zl.L("Graduated")}}});V.prototype.rebuildItemElements=V.prototype.iv; -V.prototype.findItemPanelForData=V.prototype.kx;V.prototype.updateTargetBindings=V.prototype.Pa;V.prototype.copyTemplate=V.prototype.Sy;V.prototype.graduatedValueForPoint=V.prototype.Hz;V.prototype.graduatedPointForValue=V.prototype.Gz;V.prototype.findColumnForLocalX=V.prototype.gz;V.prototype.findRowForLocalY=V.prototype.oz;V.prototype.removeColumnDefinition=V.prototype.iA;V.prototype.removeRowDefinition=V.prototype.nA;V.prototype.removeAt=V.prototype.sb;V.prototype.remove=V.prototype.remove; +V.prototype.findItemPanelForData=V.prototype.lx;V.prototype.updateTargetBindings=V.prototype.Pa;V.prototype.copyTemplate=V.prototype.Sy;V.prototype.graduatedValueForPoint=V.prototype.Hz;V.prototype.graduatedPointForValue=V.prototype.Gz;V.prototype.findColumnForLocalX=V.prototype.gz;V.prototype.findRowForLocalY=V.prototype.oz;V.prototype.removeColumnDefinition=V.prototype.iA;V.prototype.removeRowDefinition=V.prototype.nA;V.prototype.removeAt=V.prototype.sb;V.prototype.remove=V.prototype.remove; V.prototype.insertAt=V.prototype.Hb;V.prototype.elt=V.prototype.N;V.prototype.add=V.prototype.add;V.prototype.findObject=V.prototype.lb;V.prototype.findInVisualTree=V.prototype.Jl;V.prototype.walkVisualTreeFrom=V.prototype.nk;V.prototype.findMainElement=V.prototype.Ab;var yn=!1,Gn=!1,Hn=null,Zl=new yb;V.className="Panel";V.definePanelLayout=In;In("Position",new Jm);In("Vertical",new Mm);In("Auto",new Pm);In("Link",new $m); -function Kn(){this.$p=0;this.G=100;this.ma=10;this.aa=0;this.di=this.o=this.j=this.v=null}Kn.prototype.copy=function(){var a=new Kn;a.$p=this.$p;a.G=this.G;a.ma=this.ma;a.aa=this.aa;a.v=this.v;a.j=this.j;a.o=this.o;a.di=this.di;return a};Kn.className="GradPanelSettings";function Jn(){this.Nc=[];this.Mc=[];this.j=this.tb=Ln;this.jb=this.Ib=0;this.Hp=yc;this.Ma=1;this.aa=this.ma=null;this.G=1;this.ob=this.o=this.v=null} -Jn.prototype.copy=function(a){for(var b=new Jn,c=this.Nc,d=c.length,e=b.Nc,f=0;fa&&Ba(a,">= 0",ck,"height"),this.Gc=a,this.actual=this.sa,null!== -this.panel&&this.panel.w(),this.Pb("height",b,a))}},width:{configurable:!0,get:function(){return this.Gc},set:function(a){var b=this.Gc;b!==a&&(G&&A(a,"number",ck,"width"),0>a&&Ba(a,">= 0",ck,"width"),this.Gc=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("width",b,a))}},minimum:{configurable:!0,get:function(){return this.rj},set:function(a){var b=this.rj;b!==a&&(G&&A(a,"number",ck,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",ck,"minimum"),this.rj=a,this.actual= +oa.Object.defineProperties(ck.prototype,{panel:{configurable:!0,get:function(){return this.fg}},isRow:{configurable:!0,get:function(){return this.jq},set:function(a){this.jq=a}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb=a}},height:{configurable:!0,get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(G&&A(a,"number",ck,"height"),0>a&&Ba(a,">= 0",ck,"height"),this.Hc=a,this.actual=this.sa,null!== +this.panel&&this.panel.w(),this.Pb("height",b,a))}},width:{configurable:!0,get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(G&&A(a,"number",ck,"width"),0>a&&Ba(a,">= 0",ck,"width"),this.Hc=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("width",b,a))}},minimum:{configurable:!0,get:function(){return this.rj},set:function(a){var b=this.rj;b!==a&&(G&&A(a,"number",ck,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",ck,"minimum"),this.rj=a,this.actual= this.sa,null!==this.panel&&this.panel.w(),this.Pb("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.pj},set:function(a){var b=this.pj;b!==a&&(G&&A(a,"number",ck,"maximum"),0>a&&Ba(a,">= 0",ck,"maximum"),this.pj=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,ck,"alignment"),this.Kb=a.M(),null!==this.panel&&this.panel.w(), -this.Pb("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.kg},set:function(a){var b=this.kg;b!==a&&(G&&ab(a,O,ck,"stretch"),this.kg=a,null!==this.panel&&this.panel.w(),this.Pb("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.gg},set:function(a){"number"===typeof a?a=new gc(a):null!==a&&G&&w(a,gc,ck,"separatorPadding");var b=this.gg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.gg=a,null!==this.panel&&this.panel.w(), +this.Pb("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(G&&ab(a,O,ck,"stretch"),this.lg=a,null!==this.panel&&this.panel.w(),this.Pb("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.hg},set:function(a){"number"===typeof a?a=new gc(a):null!==a&&G&&w(a,gc,ck,"separatorPadding");var b=this.hg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.hg=a,null!==this.panel&&this.panel.w(), this.Pb("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.$n},set:function(a){var b=this.$n;b!==a&&(null!==a&&dm(a,"RowColumnDefinition.separatorStroke"),a instanceof Cl&&a.freeze(),this.$n=a,null!==this.panel&&this.panel.w(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.ao},set:function(a){var b=this.ao;b!==a&&(this.ao=a,null!==this.panel&&this.panel.w(),this.Pb("separatorStrokeWidth", b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Bj},set:function(a){var b=this.Bj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",ck,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,x=Na(),y=2;yn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;y=0;q=x[y];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Pa(x);return}e>q?(z=e-q,e=q):z=0;var B=Math.sqrt(e*e/(1+p*p));0>n&&(B=-B);h+=B;k+=p*B;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.mi(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){y++;if(y===x.length){Pa(x);return}q=x[y];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Pa(x)}} -t.mi=function(a,b){var c=this.Sc,d=this.Nk;if(null!==c||null!==d){var e=this.ya;if(null!==e){a.Uc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ti(this,a,d,!0,!1,g,f);var h=this.part,k=this.lg;null===c||0!==k||null===h||!this.isPanelMain&&h.Ab()!==this||(k=h.type===V.Link&&h instanceof Ce&&"Selection"===h.category&&h.adornedObject instanceof Qf&&h.adornedPart.Ab()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ti(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= -this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Se("drawShadows")&&(f=h.isShadowed);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.Tr(k,this.strokeDashOffset));if(e.type===N.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.Fi();else if(e.type===N.v){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n-k);a.beginPath();a.rect(e, -p,l,k);null!==d&&a.Df(d);if(null!==c){h&&f&&Gl(a);if(0===l||0===k)a.beginPath(),a.rect(e,p,Math.max(l,.1),Math.max(k,.1));a.Fi();h&&f&&Fl(a)}}else if(e.type===N.G)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+L.yg*e,k-p,l+e,k-L.yg*p,l+e,k),a.bezierCurveTo(l+e,k+L.yg*p,l+L.yg*e,k+p,l,k+p),a.bezierCurveTo(l-L.yg*e,k+p,l-e,k+L.yg*p,l-e,k),a.bezierCurveTo(l-e,k-L.yg*p,l-L.yg*e,k-p,l,k-p), -a.closePath(),null!==d&&a.Df(d),null!==c&&(h&&f?(Gl(a),a.Fi(),Fl(a)):a.Fi());else if(e.type===N.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==r?r.endX:l.startX,null!==r?r.endY:l.startY)}else if(r=ae(u,l),x=r.length,0===x)a.lineTo(u.centerX,u.centerY);else for(var y=0;y(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.Yb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== -N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Wc(-d,-d);if(f.ea(a))return M.free(f),!1;f.Wc(d,d)}null!==this.stroke&&f.Wc(e,e);a=f.ea(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?he(c,a.x,a.y,e):fe(c,a,e,1(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.Yb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== +N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Bc(-d,-d);if(f.ga(a))return M.free(f),!1;f.Bc(d,d)}null!==this.stroke&&f.Bc(e,e);a=f.ga(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), +!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.m)return M.free(f),null===this.fill?he(c,a.x,a.y,e):fe(c,a,e,1=this.strokeWidth)m=L.Ve(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), -d=m*b);b=Na();a=new K;L.Ve(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* -(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),y-=q,z-= -u;r.contains(y,z);)y-=q,z-=u;e.x=h;e.y=k;for(u=0;u=this.strokeWidth)m=L.We(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), +d=m*b);b=Na();a=new K;L.We(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* +(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),y-=q,z-= +u;r.contains(y,z);)y-=q,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ha(k.y,a))&&(k.yb||L.ha(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} -t.lx=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.ih(a,!0))return!0;var e=a.Cf(b),f=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.ih(a,!0))return!0;var e=a.Df(b),f=e;1.5=e||Mb(b,f,0,-n)>= -e||Mb(b,f,0,n)>=e||Mb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Lb(a.x,a.y,f,h,k,h)>e&&Lb(a.x,a.y,k,l,f,l)>e&&Lb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?he(b,a.x,a.y,f):fe(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Xd:var p=Na();L.Pe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Yd:p=Na();L.To(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Zd:case $d:p=n.type===Zd?ae(n,f):be(n,f,g,m);var r=p.length;if(0===r){g=n.type===Zd?n.centerX:n.endX;m=n.type===Zd?n.centerY:n.endY;if(a.zd(g,m)> -e)return!1;break}n=null;for(var q=Na(),u=0;u=e||Mb(b,f,m,0)>=e?!1:!0}else if(b.type===N.m){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Lb(a.x,a.y,f,h,k,h)>e&&Lb(a.x,a.y,k,l,f,l)>e&&Lb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?he(b,a.x,a.y,f):fe(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Xd:var p=Na();L.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Yd:p=Na();L.To(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Zd:case $d:p=n.type===Zd?ae(n,f):be(n,f,g,m);var r=p.length;if(0===r){g=n.type===Zd?n.centerX:n.endX;m=n.type===Zd?n.centerY:n.endY;if(a.zd(g,m)> +e)return!1;break}n=null;for(var q=Na(),u=0;ub+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); +Qf.makeGeometry=function(a,b,c){if("None"!==a.toArrow)var d=Vn[a.toArrow];else"None"!==a.fromArrow?d=Vn[a.fromArrow]:(d=L.te[a.figure],"string"===typeof d&&(d=L.te[d]),void 0===d&&v("Unknown Shape.figure: "+a.figure),d=d(a,b,c),d.Uk=b,d.Tk=c);if(null===d){var e=L.te.Rectangle;"function"===typeof e&&(d=e(a,b,c))}G&&(d.bounds.width>b+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); return d};function Wn(a){var b=Vn[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=Vn[c];if(void 0===b){var d=null,e;for(e in L.qm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.qm[d],!1),Vn[d]=a,c!==d&&(Vn[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} -oa.Object.defineProperties(Qf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.ya?this.ya:this.Od},set:function(a){var b=this.ya,c=this.Od;if(b!==a){null!==a?(G&&w(a,N,Qf,"geometry"),this.Od=this.ya=a.freeze()):this.Od=this.ya=null;var d=this.part;null!==d&&(d.cg=NaN);this.w();this.g("geometry",b||c,a);tl(this)&&(a=this.part,null!==a&&ul(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, -set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){G&&A(a,"boolean",Qf,"isGeometryPositioned");var b=0!==(this.m&1048576);b!==a&&(G&&A(a,"boolean",Qf,"isGeometryPositioned"),this.m^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.Nk},set:function(a){var b= -this.Nk;b!==a&&(null!==a&&dm(a,"Shape.fill"),a instanceof Cl&&a.freeze(),this.Nk=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(null!==a&&dm(a,"Shape.stroke"),a instanceof Cl&&a.freeze(),this.Sc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;if(b!==a)if(G&&E(a,Qf,"strokeWidth"),0<=a){this.lg=a;this.w();var c=this.part; -null!==c&&(c.cg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Qf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.rr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Qf,"strokeCap"):(Nn(this),this.Sa.rr=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.sr:"miter"}, -set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Qf,"strokeJoin"):(Nn(this),this.Sa.sr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.tr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&E(a,Qf,"strokeMiterLimit"),1<=a){Nn(this);this.Sa.tr=a;this.R();var c=this.part;null!==c&&(c.cg=NaN);this.g("strokeMiterLimit", +oa.Object.defineProperties(Qf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.ya?this.ya:this.Od},set:function(a){var b=this.ya,c=this.Od;if(b!==a){null!==a?(G&&w(a,N,Qf,"geometry"),this.Od=this.ya=a.freeze()):this.Od=this.ya=null;var d=this.part;null!==d&&(d.dg=NaN);this.w();this.g("geometry",b||c,a);tl(this)&&(a=this.part,null!==a&&ul(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, +set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){G&&A(a,"boolean",Qf,"isGeometryPositioned");var b=0!==(this.o&1048576);b!==a&&(G&&A(a,"boolean",Qf,"isGeometryPositioned"),this.o^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.Nk},set:function(a){var b= +this.Nk;b!==a&&(null!==a&&dm(a,"Shape.fill"),a instanceof Cl&&a.freeze(),this.Nk=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Tc},set:function(a){var b=this.Tc;b!==a&&(null!==a&&dm(a,"Shape.stroke"),a instanceof Cl&&a.freeze(),this.Tc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.mg},set:function(a){var b=this.mg;if(b!==a)if(G&&E(a,Qf,"strokeWidth"),0<=a){this.mg=a;this.w();var c=this.part; +null!==c&&(c.dg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Qf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.rr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Qf,"strokeCap"):(Nn(this),this.Sa.rr=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.sr:"miter"}, +set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Qf,"strokeJoin"):(Nn(this),this.Sa.sr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.tr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&E(a,Qf,"strokeMiterLimit"),1<=a){Nn(this);this.Sa.tr=a;this.R();var c=this.part;null!==c&&(c.dg=NaN);this.g("strokeMiterLimit", b,a)}else G&&Ba(a,"value >= 1",Qf,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.Zg},set:function(a){var b=this.Zg;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Qf,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.dc!==a&&(c=!1);!1===b.Se("textGreeking")&& -(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case ol:a.translate(e,0);a.scale(-1,1);break;case nl:a.translate(0,f);a.scale(1,-1);break;case pl:a.translate(e,f),a.scale(-1,-1)}a.Uc();m=this.kd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.li(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Oc&&null!==this.ac)for(p=0;pe&&(r=e);d+=b;this.li(this.ac[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case ol:a.scale(-1, +t.mi=function(a,b){if(null!==this.Tc&&0!==this.hc.length&&null!==this.Be){var c=this.naturalBounds,d=this.actualBounds,e=c.width,f=c.height,g=co(this),h=a.textAlign=this.textAlign,k=b.mn;"start"===h?h=k?"right":"left":"end"===h&&(h=k?"left":"right");k=this.isUnderline;var l=this.isStrikethrough;ti(this,a,this.Tc,!0,!1,c,d);(k||l)&&ti(this,a,this.Tc,!1,!1,c,d);d=0;c=!1;var m=this.oe,n=m.dx-(g*m.m21+m.dx);m=m.dy-(g*m.m22+m.dy);var p=b.scale;8>(n*n+m*m)*p*p&&(c=!0);b.dc!==a&&(c=!1);!1===b.Te("textGreeking")&& +(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case ol:a.translate(e,0);a.scale(-1,1);break;case nl:a.translate(0,f);a.scale(1,-1);break;case pl:a.translate(e,f),a.scale(-1,-1)}a.Vc();m=this.kd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Ae)n=this.Db,n>e&&(n=e),this.li(this.Ae,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Pc&&null!==this.ac)for(p=0;pe&&(r=e);d+=b;this.li(this.ac[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case ol:a.scale(-1, 1);a.translate(-e,0);break;case nl:a.scale(1,-1);a.translate(0,-f);break;case pl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.li=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==eo?eo(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==lo?lo(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ n+g,d),b.stroke()))}; -t.Sl=function(a,b,c,d){this.Lh=a;var e=this.Ae;null!==Zn&&mo!==e&&(mo=Zn.font=e);this.Db=this.Ke=0;this.ze=this.ac=this.Oc=this.df=null;var f;if(isNaN(this.desiredSize.width)){e=this.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===no&&(g=g.trim());f=Math.max(f,oo(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=oo(e);e=Math.min(e, -a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=po(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.Db&&null!==this.Oc&&null!==this.ac&&this.overflow===qo&&(b=this.Ae,b=this.overflow===qo?ro(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,co(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.ac.length))){k=this.ac[h];for(b=Math.max(1, -a-b);oo(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Ke=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 +t.Sl=function(a,b,c,d){this.Lh=a;var e=this.Be;null!==Zn&&mo!==e&&(mo=Zn.font=e);this.Db=this.Le=0;this.Ae=this.ac=this.Pc=this.ef=null;var f;if(isNaN(this.desiredSize.width)){e=this.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===no&&(g=g.trim());f=Math.max(f,oo(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=oo(e);e=Math.min(e, +a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=po(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.Db&&null!==this.Pc&&null!==this.ac&&this.overflow===qo&&(b=this.Be,b=this.overflow===qo?ro(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,co(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.ac.length))){k=this.ac[h];for(b=Math.max(1, +a-b);oo(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Le=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 c&&1c;){var n=1;l=oo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=oo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);uo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.kd+k>a.maxLines)break}m=xo(a,g);for(l=oo(b+m);0a.maxLines))break}a.Ke=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Ke)}} -function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===Zn?8*a.length:Zn.measureText(a).width}function co(a){if(null!==a.df)return a.df;var b=a.Ae;if(null===Zn){var c=16;return a.df=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*Zn.measureText("M").width,Bo[b]=c,Co++);return a.df=c} +l=oo(l);e&&(b=b.trim());if(""!==b&&("\u00ad"===b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=oo(b),f=Math.max(f,m)),uo(a,b,n),k++,a.kd+k>a.maxLines))break}a.Le=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Le)}} +function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===Zn?8*a.length:Zn.measureText(a).width}function co(a){if(null!==a.ef)return a.ef;var b=a.Be;if(null===Zn){var c=16;return a.ef=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*Zn.measureText("M").width,Bo[b]=c,Co++);return a.ef=c} function ro(a){if(null===Zn)return 6;if(void 0!==Do[a]&&5E3>Eo)var b=Do[a];else b=Zn.measureText(so).width,Do[a]=b,Eo++;return b} -function po(a,b){var c=a.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,co(a)+d);if(0===c.length)return a.Db=0,a.kd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.kd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==wo){a.Ke=0;var k=Hb.alloc();vo(a,f,b,k);e+=k.height;Hb.free(k);a.kd+=a.Ke}else vo(a,f,b,null),e+=d,a.kd++;a.kd===a.maxLines&&(h=!0)}f=g+1}return a.xq=e} -oa.Object.defineProperties(ch.prototype,{font:{configurable:!0,get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(G&&(A(a,"string",ch,"font"),bo(a)||v('Not a valid font: "'+a+'"')),this.Ae=a,this.df=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.hc},set:function(a){var b=this.hc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.hc=a,this.w(),this.g("text",b,a))}},textAlign:{configurable:!0,get:function(){return null!== -this.ia?this.ia.Ar:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&A(a,"string",ch,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?($n(this),this.ia.Ar=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',ch,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.Yf:yg},set:function(a){var b=this.flip;b!==a&&(ab(a,O,ch,"flip"),$n(this),this.ia.Yf=a,this.R(),this.g("flip",b,a))}},verticalAlignment:{configurable:!0, +function po(a,b){var c=a.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,co(a)+d);if(0===c.length)return a.Db=0,a.kd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.kd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==wo){a.Le=0;var k=Hb.alloc();vo(a,f,b,k);e+=k.height;Hb.free(k);a.kd+=a.Le}else vo(a,f,b,null),e+=d,a.kd++;a.kd===a.maxLines&&(h=!0)}f=g+1}return a.xq=e} +oa.Object.defineProperties(ch.prototype,{font:{configurable:!0,get:function(){return this.Be},set:function(a){var b=this.Be;b!==a&&(G&&(A(a,"string",ch,"font"),bo(a)||v('Not a valid font: "'+a+'"')),this.Be=a,this.ef=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.hc},set:function(a){var b=this.hc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.hc=a,this.w(),this.g("text",b,a))}},textAlign:{configurable:!0,get:function(){return null!== +this.ia?this.ia.Ar:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&A(a,"string",ch,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?($n(this),this.ia.Ar=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',ch,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.Zf:yg},set:function(a){var b=this.flip;b!==a&&(ab(a,O,ch,"flip"),$n(this),this.ia.Zf=a,this.R(),this.g("flip",b,a))}},verticalAlignment:{configurable:!0, enumerable:!0,get:function(){return null!==this.ia?this.ia.Kr:kd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(w(a,Ib,ch,"verticalAlignment"),a.kc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),$n(this),this.ia.Kr=a,Pl(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.gc.u()){var a=Hb.alloc();vo(this,this.hc,999999,a);var b=a.width;Hb.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)|| -(b=c.width);isNaN(c.height)||(a=c.height);bc(this.gc,b,a)}return this.gc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(G&&A(a,"boolean",ch,"isMultiline"),this.m^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);b!==a&&(G&&A(a,"boolean",ch,"isUnderline"),this.m^=4194304,this.R(),this.g("isUnderline", -b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.m&8388608)},set:function(a){var b=0!==(this.m&8388608);b!==a&&(G&&A(a,"boolean",ch,"isStrikethrough"),this.m^=8388608,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.Nr:Fo},set:function(a){var b=this.wrap;b!==a&&(G&&ab(a,ch,ch,"wrap"),$n(this),this.ia.Nr=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!== -this.ia?this.ia.Lq:Go},set:function(a){var b=this.overflow;b!==a&&(G&&ab(a,ch,ch,"overflow"),$n(this),this.ia.Lq=a,this.w(),this.g("overflow",b,a))}},stroke:{configurable:!0,get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(null!==a&&dm(a,"TextBlock.stroke"),a instanceof Cl&&a.freeze(),this.Sc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.kd}},lineHeight:{configurable:!0,get:function(){return co(this)}}, -editable:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(G&&A(a,"boolean",ch,"editable"),this.m^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia?this.ia.Cr:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Me||v("TextBlock.textEditor must be an HTMLInfo."),$n(this),this.ia.Cr=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0, +(b=c.width);isNaN(c.height)||(a=c.height);bc(this.gc,b,a)}return this.gc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(G&&A(a,"boolean",ch,"isMultiline"),this.o^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);b!==a&&(G&&A(a,"boolean",ch,"isUnderline"),this.o^=4194304,this.R(),this.g("isUnderline", +b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.o&8388608)},set:function(a){var b=0!==(this.o&8388608);b!==a&&(G&&A(a,"boolean",ch,"isStrikethrough"),this.o^=8388608,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.Nr:Fo},set:function(a){var b=this.wrap;b!==a&&(G&&ab(a,ch,ch,"wrap"),$n(this),this.ia.Nr=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!== +this.ia?this.ia.Lq:Go},set:function(a){var b=this.overflow;b!==a&&(G&&ab(a,ch,ch,"overflow"),$n(this),this.ia.Lq=a,this.w(),this.g("overflow",b,a))}},stroke:{configurable:!0,get:function(){return this.Tc},set:function(a){var b=this.Tc;b!==a&&(null!==a&&dm(a,"TextBlock.stroke"),a instanceof Cl&&a.freeze(),this.Tc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.kd}},lineHeight:{configurable:!0,get:function(){return co(this)}}, +editable:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(G&&A(a,"boolean",ch,"editable"),this.o^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia?this.ia.Cr:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Me||v("TextBlock.textEditor must be an HTMLInfo."),$n(this),this.ia.Cr=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0, get:function(){return null!==this.ia?this.ia.Fd:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&A(a,"function",ch,"errorFunction"),$n(this),this.ia.Fd=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka?this.ka.Vk:1},set:function(a){var b=this.interval;G&&E(a,ch,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new Xn);this.ka.Vk=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null); this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&E(a,ch,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",ch,"maxLines"),$n(this),this.ia.vq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Oc?this.Oc:[this.Db],arrText:null!==this.ac?this.ac:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{configurable:!0,get:function(){return this.Bm},set:function(a){var b=this.Bm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",ch,"choices:value"),this.Bm=a,this.g("choices",b,a))}}}); +0>=a&&Ba(a,"> 0",ch,"maxLines"),$n(this),this.ia.vq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Pc?this.Pc:[this.Db],arrText:null!==this.ac?this.ac:[this.Ae],maxLineWidth:this.Db,fontHeight:this.ef}}},choices:{configurable:!0,get:function(){return this.Bm},set:function(a){var b=this.Bm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",ch,"choices:value"),this.Bm=a,this.g("choices",b,a))}}}); var eo=null,lo=null,wo=new F(ch,"None",0),to=new F(ch,"WrapFit",1),Fo=new F(ch,"WrapDesiredSize",2),yo=new F(ch,"WrapBreakAll",3),Go=new F(ch,"OverflowClip",0),qo=new F(ch,"OverflowEllipsis",1),no=new F(ch,"FormatTrim",0),Ao=new F(ch,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new db,Co=0,Do=new db,Eo=0,so="...",mo="",Zn=null,Yn=!1;ch.className="TextBlock"; -function ao(){this.oc=!1;this.Fd=null;this.Yf=yg;this.Wp=no;this.vq=Infinity;this.Lq=Go;this.nr=this.mr=0;this.Ar="start";this.Dj=this.Cr=this.Br=null;this.Kr=kd;this.Nr=Fo}ao.prototype.copy=function(){var a=new ao;a.Fd=this.Fd;a.Yf=this.Yf;a.Wp=this.Wp;a.vq=this.vq;a.Lq=this.Lq;a.mr=this.mr;a.nr=this.nr;a.Ar=this.Ar;a.Br=this.Br;a.Cr=this.Cr;a.Dj=this.Dj;a.Kr=this.Kr;a.Nr=this.Nr;return a};ch.getEllipsis=function(){return so};ch.setEllipsis=function(a){so=a;Do=new db;Eo=0};ch.getBaseline=function(){return eo}; -ch.setBaseline=function(a){eo=a};ch.getUnderline=function(){return lo};ch.setUnderline=function(a){lo=a};ch.isValidFont=bo;ch.FormatNone=Ao;ch.FormatTrim=no;ch.None=wo;ch.OverflowClip=Go;ch.OverflowEllipsis=qo;ch.WrapBreakAll=yo;ch.WrapDesiredSize=Fo;ch.WrapFit=to;function Xn(){this.Vk=1;this.v=0;this.j=1;this.o=this.G=null}Xn.prototype.copy=function(){var a=new Xn;a.Vk=this.Vk;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};Xn.className="GradElementSettings"; -function kk(a,b){O.call(this);this.Gg=null;this.fo="";this.Yg=qc;this.Pk=Bd;this.$g=this.Fd=null;this.Ok=Kc;this.Yf=yg;this.xl=null;this.jn=!1;this.Gh=!0;this.cl=!1;this.tl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;na(kk,O);kk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.Gg;a.fo=this.fo;a.Yg=this.Yg.M();a.Pk=this.Pk;a.Yf=this.Yf;a.Fd=this.Fd;a.$g=this.$g;a.Ok=this.Ok.M();a.Gh=this.Gh;a.tl=this.tl}; +function ao(){this.oc=!1;this.Fd=null;this.Zf=yg;this.Wp=no;this.vq=Infinity;this.Lq=Go;this.nr=this.mr=0;this.Ar="start";this.Dj=this.Cr=this.Br=null;this.Kr=kd;this.Nr=Fo}ao.prototype.copy=function(){var a=new ao;a.Fd=this.Fd;a.Zf=this.Zf;a.Wp=this.Wp;a.vq=this.vq;a.Lq=this.Lq;a.mr=this.mr;a.nr=this.nr;a.Ar=this.Ar;a.Br=this.Br;a.Cr=this.Cr;a.Dj=this.Dj;a.Kr=this.Kr;a.Nr=this.Nr;return a};ch.getEllipsis=function(){return so};ch.setEllipsis=function(a){so=a;Do=new db;Eo=0};ch.getBaseline=function(){return eo}; +ch.setBaseline=function(a){eo=a};ch.getUnderline=function(){return lo};ch.setUnderline=function(a){lo=a};ch.isValidFont=bo;ch.FormatNone=Ao;ch.FormatTrim=no;ch.None=wo;ch.OverflowClip=Go;ch.OverflowEllipsis=qo;ch.WrapBreakAll=yo;ch.WrapDesiredSize=Fo;ch.WrapFit=to;function Xn(){this.Vk=1;this.v=0;this.j=1;this.m=this.G=null}Xn.prototype.copy=function(){var a=new Xn;a.Vk=this.Vk;a.v=this.v;a.j=this.j;a.G=this.G;a.m=this.m;return a};Xn.className="GradElementSettings"; +function kk(a,b){O.call(this);this.Hg=null;this.fo="";this.Yg=qc;this.Pk=Bd;this.$g=this.Fd=null;this.Ok=Kc;this.Zf=yg;this.xl=null;this.jn=!1;this.Gh=!0;this.cl=!1;this.tl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;na(kk,O);kk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.Hg;a.fo=this.fo;a.Yg=this.Yg.M();a.Pk=this.Pk;a.Zf=this.Zf;a.Fd=this.Fd;a.$g=this.$g;a.Ok=this.Ok.M();a.Gh=this.Gh;a.tl=this.tl}; kk.prototype.ub=function(a){a===yg||a===Ag||a===ml?this.imageStretch=a:O.prototype.ub.call(this,a)};kk.prototype.toString=function(){return"Picture("+this.source+")#"+lb(this)};function Oi(a){void 0===a&&(a="");A(a,"string",kk,"clearCache:url");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new db,Io=0)} -function Jo(a,b){b.ny||(b.sq=function(c){b.hq=!0;b.dn=!1;var d=b.Dg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src")||"";var g=e.Qg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case Bd:m=d.width;n=d.height;break;case Ag:case ml:p===Ag?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===ml&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ -d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Ff()*b.scale;var q=m*p*n*p,u=h*g/q,x=c.__goCache;p=null;var y=Ko;if(c.hq&&void 0!==x&&4y*y)for(null===x.ki&&(Lo(x,4,k,l,c),Lo(x,16,k,l,c)),k=x.ki,l=k.length,q=0;qy*y)for(null===x.ki&&(Lo(x,4,k,l,c),Lo(x,16,k,l,c)),k=x.ki,l=k.length,q=0;qa)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Of[d];if(void 0!==e)return e;var f=a*L.yg;e=(new N).add((new je(a,0,!0)).add(new ke(Dd,b-a,0)).add(new ke(Xd,b,a,b-f,0,b,f)).add(new ke(Dd,b,c-a)).add(new ke(Xd,b-a,c,b,c-f,b-f,c)).add(new ke(Dd,a,c)).add(new ke(Xd,0,c-a,f,c,0,c-f)).add(new ke(Dd,0,a)).add((new ke(Xd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Pf[d];if(void 0!==e)return e;var f=a*L.zg;e=(new N).add((new je(a,0,!0)).add(new ke(Dd,b-a,0)).add(new ke(Xd,b,a,b-f,0,b,f)).add(new ke(Dd,b,c-a)).add(new ke(Xd,b-a,c,b,c-f,b-f,c)).add(new ke(Dd,a,c)).add(new ke(Xd,0,c-a,f,c,0,c-f)).add(new ke(Dd,0,a)).add((new ke(Xd,a,0,0,f,f,0)).close()));1e.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new I;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ue=!1}}; +t.xz=function(a){void 0===a&&(a=Infinity);A(a,"number",T,"findTreeParts:level");var b=new I;gl(b,this,!1,a,!0);return b};T.prototype.collapseTree=function(a){void 0===a&&(a=1);E(a,T,"collapseTree:level");1>a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ve){b.Ve=!0;var c=new I;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ve=!1}}; function wp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new I;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ue=!1}}; +T.prototype.expandTree=function(a){void 0===a&&(a=2);E(a,T,"expandTree:level");2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ve){b.Ve=!0;var c=new I;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ve=!1}}; function yp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Do():a.Qd();k.next();){var l=k.value;l.isTreeLink&&(h||l.Dd||l.gb(),l=l.Io(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Zb(!0),l.oh(),g&&e.Kj(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, a.h(b.x,b.y,0,0));return a};oa.Object.defineProperties(wg.prototype,{padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,wg,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.g("padding",b,a),this.w())}}});wg.className="Placeholder"; -function R(a){S.call(this,V.Link);this.Ta=8;this.ef=null;this.ff="";this.uf=this.$m=null;this.vf="";this.ko=null;this.rk=mg;this.Jm=0;this.Lm=mg;this.Mm=NaN;this.xj=Dp;this.eo=.5;this.xd=null;this.Ob=(new H).freeze();this.rf=this.Rc=null;this.ol=new M;this.ya=new N;this.v=this.o=this.Tf=this.Xf=null;this.ku=new K;this.Tp=this.Ew=this.Dw=null;this.kt=NaN;this.da=null;this.j=[];a&&Object.assign(this,a)}na(R,S); -R.prototype.cloneProtected=function(a){S.prototype.cloneProtected.call(this,a);a.Ta=this.Ta&-113;a.ff=this.ff;a.$m=this.$m;a.vf=this.vf;a.ko=this.ko;a.rk=this.rk;a.Jm=this.Jm;a.Lm=this.Lm;a.Mm=this.Mm;a.xj=this.xj;a.eo=this.eo;null!==this.da&&(a.da=this.da.copy())};t=R.prototype;t.Bf=function(a){S.prototype.Bf.call(this,a);this.ff=a.ff;this.vf=a.vf;a.Rc=null;a.gb();a.Tf=this.Tf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; -t.ub=function(a){a.classType===R?2===(a.value&2)?this.routing=a:a===pg||a===lg||a===kg?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==mg&&v("Unknown Link enum value for a Link property: "+a):S.prototype.ub.call(this,a)};t.Xc=function(){null===this.da&&(this.da=new sl)};t.Ai=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Cj(a)||Dj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Cj(a)||Dj(a))?!1:!0};t.tv=function(){return!1}; +function R(a){S.call(this,V.Link);this.Ta=8;this.ff=null;this.gf="";this.vf=this.$m=null;this.wf="";this.ko=null;this.rk=mg;this.Jm=0;this.Lm=mg;this.Mm=NaN;this.xj=Dp;this.eo=.5;this.xd=null;this.Ob=(new H).freeze();this.sf=this.Sc=null;this.ol=new M;this.ya=new N;this.v=this.m=this.Uf=this.Yf=null;this.ku=new K;this.Tp=this.Ew=this.Dw=null;this.kt=NaN;this.ea=null;this.j=[];a&&Object.assign(this,a)}na(R,S); +R.prototype.cloneProtected=function(a){S.prototype.cloneProtected.call(this,a);a.Ta=this.Ta&-113;a.gf=this.gf;a.$m=this.$m;a.wf=this.wf;a.ko=this.ko;a.rk=this.rk;a.Jm=this.Jm;a.Lm=this.Lm;a.Mm=this.Mm;a.xj=this.xj;a.eo=this.eo;null!==this.ea&&(a.ea=this.ea.copy())};t=R.prototype;t.Cf=function(a){S.prototype.Cf.call(this,a);this.gf=a.gf;this.wf=a.wf;a.Sc=null;a.gb();a.Uf=this.Uf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; +t.ub=function(a){a.classType===R?2===(a.value&2)?this.routing=a:a===pg||a===lg||a===kg?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==mg&&v("Unknown Link enum value for a Link property: "+a):S.prototype.ub.call(this,a)};t.Xc=function(){null===this.ea&&(this.ea=new sl)};t.Ai=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Cj(a)||Dj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Cj(a)||Dj(a))?!1:!0};t.tv=function(){return!1}; t.As=function(){};t.Zc=function(){return!1};R.prototype.computeAngle=function(a,b,c){return R.computeAngle(b,c)};R.computeAngle=function(a,b){switch(a){default:case mg:a=0;break;case jn:a=b;break;case bn:a=b+90;break;case dn:a=b-90;break;case Hp:a=b+180;break;case kn:a=L.Ro(b);90a&&(a-=180);break;case cn:a=L.Ro(b+90);90a&&(a-=180);break;case en:a=L.Ro(b-90);90a&&(a-=180);break;case fn:a=L.Ro(b);if(45a||225a)return 0;90a&&(a-=180)}return L.Ro(a)}; -function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.ix(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.ca,g.ca=!0);e(a,c,b);null!==g&&(g.ca=f)}!a.Dd||a.Dw!==c&&a.Ew!==c||a.gb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=R.prototype; +function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.jx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.ca,g.ca=!0);e(a,c,b);null!==g&&(g.ca=f)}!a.Dd||a.Dw!==c&&a.Ew!==c||a.gb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=R.prototype; t.oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&S.prototype.oh.call(this)};t.Io=function(a){G&&w(a,T,R,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Dz=function(a){G&&w(a,O,R,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function tp(a,b){null===a.xd&&(a.xd=new I);a.xd.add(b);a.w()} -t.Ko=function(a){S.prototype.Ko.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Lo=function(a){S.prototype.Lo.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; +t.Ko=function(a){S.prototype.Ko.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ff;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.vf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Lo=function(a){S.prototype.Lo.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ff;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.vf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; t.Sj=function(){this.Dd=!0;if(null!==this.xd){var a=this.diagram;if(null!==a)for(var b=this.xd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};R.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; R.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?S.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),S.prototype.move.call(this,a,!1),K.free(a));rf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; R.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};R.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; -R.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(Db),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.Qu(.5,a),a.add(this.i(0)),c=this.ya.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===pg){if(3===b)return this.i(1);d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);var e=this.i(c+1), -f=this.i(c+2);c=this.i(c+3);L.Ky(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a}; -R.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).cb(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.ox(.5);if(this.computeCurve()===pg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.Jy(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0c/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- +b.y)));return a}; +R.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).cb(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.px(.5);if(this.computeCurve()===pg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.Ky(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.cb(d)};t=R.prototype;t.i=function(a){return this.Ob.s[a]}; -t.bd=function(a,b){G&&(w(b,K,R,"setPoint"),b.u()||v("Link.setPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.ad(a,b)};t.P=function(a,b,c){G&&(E(b,R,"setPointAt:x"),E(c,R,"setPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.ad(a,new K(b,c))}; -t.Mz=function(a,b){G&&(w(b,K,R,"insertPoint"),b.u()||v("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.Hb(a,b)};t.l=function(a,b,c){G&&(E(b,R,"insertPointAt:x"),E(c,R,"insertPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.Hb(a,new K(b,c))}; -t.me=function(a){G&&(w(a,K,R,"addPoint"),a.u()||v("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.add(a)};t.yf=function(a,b){G&&(E(a,R,"insertPointAt:x"),E(b,R,"insertPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.add(new K(a,b))}; -t.lv=function(a){G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.sb(a)};t.Nj=function(){G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.clear()}; -function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.Dd,e=new H,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Eb?a.w():(a.ie.h(a.ie.x+b,a.ie.y+c),a.va.h(a.va.x+b,a.va.y+c),Pl(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= -a.i(a.pointsCount-1)));null!==g&&g.animationManager.Eb&&(b=g.animationManager,a.rf=e,b.ql.add(a));a.g("points",f,e)}}t.uh=function(){null===this.Rc&&(this.Rc=this.Ob,this.Ob=this.Ob.copy())}; -t.Af=function(){if(null!==this.Rc){for(var a=this.Rc,b=this.Ob,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= -(0>k?-1:1)*n+r,x=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var y=r,z=q;L.C(k,0)?z=0k?-1:1)*n+r,z=m*(y-r)+q);this.Nj();this.me(f);this.yf(u,x);this.yf(y,z);this.me(p);this.bd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.bd(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.me(d),this.yf(f,h),this.me(e);else{this.me(d);this.me(e);h=M.alloc();b.ti(h);k=h.ea(e);p.ti(h);l=h.ea(d);if(k||l)g=b.oa(Qp(g),new K),this.bd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.oa(Qp(c),new K),this.bd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Nj();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)x=this.computeEndSegmentLength(a,b,g,!0),r= +(0>k?-1:1)*n+r,x=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var y=r,z=q;L.C(k,0)?z=0k?-1:1)*n+r,z=m*(y-r)+q);this.Nj();this.ne(f);this.zf(u,x);this.zf(y,z);this.ne(p);this.bd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.bd(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ne(d),this.zf(f,h),this.ne(e);else{this.ne(d);this.ne(e);h=M.alloc();b.ti(h);k=h.ga(e);p.ti(h);l=h.ga(d);if(k||l)g=b.oa(Qp(g),new K),this.bd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.oa(Qp(c),new K),this.bd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Nj();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)x=this.computeEndSegmentLength(a,b,g,!0),r= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(x+=Math.abs(B)*(m?1:2)),0===r?q=x:90===r?u=x:180===r?q=-x:270===r?u=-x:(q=x*Math.cos(r*Math.PI/180),u=x*Math.sin(r*Math.PI/180)),g.kc()&&l&&(x=b.oa(Kc,K.alloc()),y=K.allocAt(x.x+1E3*q,x.y+1E3*u),this.getLinkPointFromPoint(a,b,x,y,!0,n),K.free(x),K.free(y));x=this.getLinkPoint(d,e,c,!1,m,a,b);var C=z=y=0;if(m||!k||l){var D=this.computeEndSegmentLength(d,e, c,!1);C=this.getLinkDirection(d,e,x,c,!1,m,a,b);l&&(k||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(C+=m?0:30,0>B&&(C+=180));0>C?C+=360:360<=C&&(C-=360);l&&(D+=Math.abs(B)*(m?1:2));0===C?y=D:90===C?z=D:180===C?y=-D:270===C?z=-D:(y=D*Math.cos(C*Math.PI/180),z=D*Math.sin(C*Math.PI/180));c.kc()&&l&&(c=e.oa(Kc,K.alloc()),g=K.allocAt(c.x+1E3*y,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,x),K.free(c),K.free(g))}c=n;if(m||!h||l)c=new K(n.x+q,n.y+u);g=x;if(m||!k||l)g=new K(x.x+y,x.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} -R.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.re()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.ne;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Xj(e,d,g,c,f);null!== +n,f-2,g)?this.bd(f-1,x):!p&&!m&&k&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +R.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.se()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.oe;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Xj(e,d,g,c,f);null!== a&&f.transform(a);return f};function Sp(a,b){var c=b.Tn;null===c&&(c=new Tp,c.port=b,c.node=b.part,b.Tn=c);return Up(c,a)} -R.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!Pp(c))return b.oa(c,h),h;if(c.$c()){var k=Sp(this,b);if(null!==k){h.assign(k.Po);if(e&&this.routing===Vp){var l=Sp(this,g);if(null!==l&&k.Hl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.If(Qc)||c.If(Tc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= +R.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!Pp(c))return b.oa(c,h),h;if(c.$c()){var k=Sp(this,b);if(null!==k){h.assign(k.Po);if(e&&this.routing===Vp){var l=Sp(this,g);if(null!==l&&k.Hl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Jf(Qc)||c.Jf(Tc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= b.oa(Qp(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=Rp(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.oa(Qp(k),f),e&&(g=Rp(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; -R.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Rp(k,h.copy()):c):(c=K.alloc(),h=h.oa(Kc,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +R.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Rp(k,h.copy()):c):(c=K.alloc(),h=h.oa(Kc,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}d.kc()&&g.Sd(a)&&(k+=180,360<=k&&(k-=360));if(Pp(d))return k;a=b.si();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};R.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.$c()&&(a=Sp(this,b),null!==a))return a.Iu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; R.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Kc:(b=this.fromSpot,b.Rb()&&(b=a.fromSpot),a=b===hd?Ec:b)):(a=b?b:this.toPort,null===a?a=Kc:(b=this.toSpot,b.Rb()&&(b=a.toSpot),a=b===hd?Ec:b));return a};function Pp(a){return a===Ec||.5===a.x&&.5===a.y}function Qp(a){return.5===a.x&&.5===a.y?a:Kc} R.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==mg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Jb.alloc();n.set(g); -if(m instanceof V)h=m.Ef(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Qf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.hh(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Qe(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var x=K.alloc(),y=K.alloc(),z=K.alloc(),B=Jb.alloc();B.set(q);B.bv(m.transform);B.gs();y.x=p;y.y=u;y.transform(B);x.x=h;x.y=u;x.transform(B);q=!1;Tn(m,x,y,z)?q=!0:(x.x=p,x.y=r,x.transform(B),Tn(m,x,y,z)?q=!0:(y.x= +R.prototype.Ff=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Jb.alloc(),g.reset());g.multiply(this.transform);if(this.hh(a,g))return un(this,b,c,e),void 0===f&&Jb.free(g),!0;if(this.Yc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.U.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Jb.alloc();n.set(g); +if(m instanceof V)h=m.Ff(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Qf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.hh(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Re(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var x=K.alloc(),y=K.alloc(),z=K.alloc(),B=Jb.alloc();B.set(q);B.bv(m.transform);B.gs();y.x=p;y.y=u;y.transform(B);x.x=h;x.y=u;x.transform(B);q=!1;Tn(m,x,y,z)?q=!0:(x.x=p,x.y=r,x.transform(B),Tn(m,x,y,z)?q=!0:(y.x= h,y.y=r,y.transform(B),Tn(m,x,y,z)?q=!0:(x.x=h,x.y=u,x.transform(B),Tn(m,x,y,z)&&(q=!0))));Jb.free(B);K.free(x);K.free(y);K.free(z);h=q}}else h=m.hh(h,n)}else h=wl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Jb.free(n)}}}void 0===f&&Jb.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Jb.free(g);return!1}; -R.prototype.computeCurve=function(){if(null===this.Xf){var a=this.fromPort,b=this.isOrthogonal;this.Xf=null!==a&&a===this.toPort&&!b}return this.Xf?pg:this.curve};R.prototype.computeCorner=function(){if(this.curve===pg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; +R.prototype.computeCurve=function(){if(null===this.Yf){var a=this.fromPort,b=this.isOrthogonal;this.Yf=null!==a&&a===this.toPort&&!b}return this.Yf?pg:this.curve};R.prototype.computeCorner=function(){if(this.curve===pg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; R.prototype.findMidLabel=function(){for(var a=this.path,b=this.U.s,c=b.length,d=0;dk?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);L.ha(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.bd(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.P(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.bd(c,d)}}return!0;case Gp:f=this.i(a);n=this.i(c);if(!f.fb(b)||!n.fb(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.bd(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.u()&&k.u()){h.Wc(Yp,Yp);k.Wc(Yp,Yp);h.Ye(a);k.Ye(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, -a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ea(a)||h.ea(c))? +R.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.u()&&k.u()){h.Bc(Yp,Yp);k.Bc(Yp,Yp);h.Ze(a);k.Ze(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ga(a)||h.ga(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left,m.x=l.x, -m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.ea(a)||h.ea(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x= +m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.ga(a)||h.ga(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x= c.x,m.y=l.y;if(l.y>h.top&&l.y=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l.h(Math.min((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l.h(a.x,c.y),m.h((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.x,a.y,c.x, -c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.ea(a)||h.ea(c))?l.x=this.computeMidOrthoPosition(a.x, +c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.ga(a)||h.ga(c))?l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1):c.xa.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ea(a)||h.ea(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(wk(r),h.Wc(r.xo*r.Cx,r.wo*r.Ex),Zp(r,a,b,n,d,h,!1),k=$p(r, +(l.x=a.xh.right)90===d&&(k.ga(a)||h.ga(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(wk(r),h.Bc(r.xo*r.Ex,r.wo*r.Fx),Zp(r,a,b,n,d,h,!1),k=$p(r, n.x,n.y));if(!r.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.P(2,h.x,h.y),this.l(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)L.C(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.P(2,h,a.y),this.P(3,h,g.y)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=r.wo/2&&(this.P(2,h.x,a.y),this.P(3,g.x,a.y)),this.l(2,h.x,a.y)):this.P(2,a.x,h.y);else if(90===b||270===b)L.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): -Math.min(h.y,a.y),this.P(2,a.x,h),this.P(3,g.x,h)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=r.xo/2&&(this.P(2,a.x,h.y),this.P(3,a.x,g.y)),this.l(2,a.x,h.y)):this.P(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.yf(f.x,q.y):this.yf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.me(l.copy()),this.me(m.copy()));K.free(l);K.free(m)}}; +Math.min(h.y,a.y),this.P(2,a.x,h),this.P(3,g.x,h)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=r.xo/2&&(this.P(2,a.x,h.y),this.P(3,a.x,g.y)),this.l(2,a.x,h.y)):this.P(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.zf(f.x,q.y):this.zf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ne(l.copy()),this.ne(m.copy()));K.free(l);K.free(m)}}; R.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function Zj(a){if(null===a.diagram||!a.isAvoiding||!rk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=sk(a.diagram,!0,a.containingGroup,null);for(var d=1;dcq&&$p(b,m,n)!==l-1&&($p(b,c-h,d)===l-1?(e=180,m=c-h,n=d):$p(b,c+h,d)===l-1?(e=0,m=c+h,n=d):$p(b,c,d-k)===l-1?(e=270,m=c,n=d-k):$p(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>cq&&$p(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>cq)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ -k)*k+k/2;l>cq&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),$p(b,g,m)===l-1?bq(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.yf(c,d)} +k)*k+k/2;l>cq&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),$p(b,g,m)===l-1?bq(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.zf(c,d)} R.prototype.fz=function(a){G&&w(a,K,R,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=Lb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=N.j,this.mm=!0,a;var c=!1,d=this.diagram;null!==d&&Ip(this)&&d.Eh.contains(this)&&(0!==this.ol.width||0!==this.ol.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Ob.s;var g=this.computeCurve();if(g===pg&&3<=b&&!L.ha(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kx?q>r?(f.x= y-B,f.y=r-B,e.x=y+u,e.y=r+u):(f.x=y-B,f.y=r+B,e.x=y+u,e.y=r-u):q>r?(f.x=y+B,f.y=r-B,e.x=y-u,e.y=r+u):(f.x=y+B,f.y=r+B,e.x=y-u,e.y=r-u));L.ha(x,y)&&L.ha(r,q)&&(r>p?(z>y?(f.x=y-B,f.y=r-B,e.x=y+u):(f.x=y+B,f.y=r-B,e.x=y-u),e.y=r+u):(z>y?(f.x=y-B,f.y=r+B,e.x=y+u):(f.x=y+B,f.y=r+B,e.x=y-u),e.y=r-u));if(L.ha(x,y)&&L.ha(y,z)||L.ha(p,r)&&L.ha(r,q))x=.5*(x+z),p=.5*(p+q),f.x=x,f.y=p,e.x=x,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&L.ha(g.x,this.i(0).x)&&L.ha(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x), c.y=.5*(g.y+l.y));Ld(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,zb));l=.5*(l+m.x);g=.5*(g+m.y);Ld(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);K.free(b);K.free(c);K.free(f);K.free(e)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=dq(this,g.copy(),!1,zb)),Ld(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0)); @@ -1699,44 +1701,44 @@ function eq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ha(b.x,f.x)&&L.ha(b.y,f.y);){ function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===lg?Kd(b,n,r,!1):Ld(b,p,m,n,m,n,r)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===lg?Kd(b,r,m,!1):Ld(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function hq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ra.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,x)n&&!L.C(g,x)){h.x=q;h.y=n;m=!0;break a}}else if(!L.C(n,r)&& L.C(g,x)&&Math.min(n,r)g&&Math.min(q,u)m&&!L.C(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}K.free(h)}function Ip(a){a=a.curve;return a===kg||a===lg}function Mp(a,b){if(b||Ip(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Eh.contains(a)||0===a.ol.width&&0===a.ol.height||b.Eh.add(a,a.ol.copy())} R.prototype.Mo=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ra.s;for(var g=e.length,h=0;ha&&Ba(a,">= 0",R,"fromEndSegmentLength"),this.Xc(),this.da.aj=a,this.g("fromEndSegmentLength",b,a),this.gb())}},fromShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.bj:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&A(a,"number",R,"fromShortLength"), -this.Xc(),this.da.bj=a,this.sc(!0),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.da?this.da.Gj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,R,"toSpot"),a=a.M(),this.Xc(),this.da.Gj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&&pp(this.toPort),this.gb())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.Ej:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&& -A(a,"number",R,"toEndSegmentLength"),0>a&&Ba(a,">= 0",R,"toEndSegmentLength"),this.Xc(),this.da.Ej=a,this.g("toEndSegmentLength",b,a),this.gb())}},toShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.Fj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",R,"toShortLength"),this.Xc(),this.da.Fj=a,this.sc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.xd?!1:0a&&Ba(a,">= 0",R,"fromEndSegmentLength"),this.Xc(),this.ea.aj=a,this.g("fromEndSegmentLength",b,a),this.gb())}},fromShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.bj:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&A(a,"number",R,"fromShortLength"), +this.Xc(),this.ea.bj=a,this.sc(!0),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,R,"toSpot"),a=a.M(),this.Xc(),this.ea.Gj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&&pp(this.toPort),this.gb())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Ej:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&& +A(a,"number",R,"toEndSegmentLength"),0>a&&Ba(a,">= 0",R,"toEndSegmentLength"),this.Xc(),this.ea.Ej=a,this.g("toEndSegmentLength",b,a),this.gb())}},toShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",R,"toShortLength"),this.Xc(),this.ea.Fj=a,this.sc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.xd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ye(f),e=2;ed&&(d=-d)):L.ha(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Cf(e)); +enumerable:!0,get:function(){var a=this.Ab();return a instanceof Qf?a:null}},routeBounds:{configurable:!0,get:function(){this.yg();var a=this.ol,b=Infinity,c=Infinity,d=this.pointsCount;if(0===d)a.h(NaN,NaN,0,0);else{if(1===d)d=this.i(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.h(d.x,d.y,0,0);else if(2===d){d=this.i(0);var e=this.i(1);b=Math.min(d.x,e.x);c=Math.min(d.y,e.y);a.h(d.x,d.y,0,0);a.Ze(e)}else if(this.computeCurve()===pg&&3<=d&&!this.isOrthogonal)if(e=this.i(0),b=e.x,c=e.y,a.h(b, +c,0,0),3===d){d=this.i(1);b=Math.min(d.x,b);c=Math.min(d.y,c);var f=this.i(2);b=Math.min(f.x,b);c=Math.min(f.y,c);L.Dl(e.x,e.y,d.x,d.y,d.x,d.y,f.x,f.y,.5,a)}else for(f=3;f=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ze(f),e=2;ed&&(d=-d)):L.ha(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Df(e)); a.push(d)}}return this.Tp}},flattenedTotalLength:{configurable:!0,get:function(){var a=this.kt;if(isNaN(a)){for(var b=this.flattenedLengths,c=b.length,d=a=0;d=this.pointsCount?0:this.isOrthogonal||!Pp(this.computeSpot(!0))?1:0}}, +a);c.freeze();this.Ob=c;this.sc(!0);Lp(this);a=this.diagram;null!==a&&(a.xi||a.undoManager.isUndoingRedoing||a.ns.add(this),a.animationManager.Eb&&(a=a.animationManager,this.sf=c,a.ql.add(this)));this.g("points",b,c)}}},pointsCount:{configurable:!0,get:function(){return this.Ob.count}},Dd:{configurable:!0,get:function(){return 0!==(this.Ta&16)},set:function(a){0!==(this.Ta&16)!==a&&(this.Ta^=16)}},suspendsRouting:{configurable:!0,get:function(){return 0!== +(this.Ta&32)},set:function(a){0!==(this.Ta&32)!==a&&(this.Ta^=32)}},computingPoints:{configurable:!0,get:function(){return 0!==(this.Ta&64)},set:function(a){0!==(this.Ta&64)!==a&&(this.Ta^=64)}},defaultFromPoint:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a.copy()}},defaultToPoint:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a.copy()}},isOrthogonal:{configurable:!0,get:function(){return 2=== +(this.xj.value&2)}},isAvoiding:{configurable:!0,get:function(){return 4===(this.xj.value&4)}},mm:{configurable:!0,get:function(){return 0!==(this.Ta&128)},set:function(a){0!==(this.Ta&128)!==a&&(this.Ta^=128)}},geometry:{configurable:!0,get:function(){this.mm||(this.yg(),this.ya=this.makeGeometry());return this.ya}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Pp(this.computeSpot(!0))?1:0}}, lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!Pp(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.rk},set:function(a){var b=this.rk;b!==a&&(G&&a!==mg&&a!==Ep&&a!==Fp&&a!==Gp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.rk=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.Jm}, set:function(a){var b=this.Jm;b!==a&&(G&&A(a,"number",R,"corner"),this.Jm=a,this.sc(!0),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.Lm},set:function(a){var b=this.Lm;b!==a&&(G&&a!==mg&&a!==pg&&a!==lg&&a!==kg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.Lm=a,this.gb(),this.sc(!0),Mp(this,b===lg||b===kg||a===lg||a===kg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.Mm}, -set:function(a){var b=this.Mm;b!==a&&(G&&A(a,"number",R,"curviness"),this.Mm=a,this.gb(),this.sc(!1),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.xj},set:function(a){var b=this.xj;b!==a&&(G&&a!==Dp&&a!==lq&&a!==mq&&a!==Vp&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.xj=a,this.Xf=null,this.gb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, -get:function(){return this.eo},set:function(a){var b=this.eo;b!==a&&(G&&A(a,"number",R,"smoothness"),this.eo=a,this.sc(!0),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.yi())return a.model.Ac(this.data)}}});R.prototype.invalidateOtherJumpOvers=R.prototype.Mo;R.prototype.findClosestSegment=R.prototype.fz;R.prototype.updateRoute=R.prototype.xg;R.prototype.invalidateRoute=R.prototype.gb;R.prototype.rollbackRoute=R.prototype.nv; -R.prototype.commitRoute=R.prototype.Af;R.prototype.startRoute=R.prototype.uh;R.prototype.clearPoints=R.prototype.Nj;R.prototype.removePoint=R.prototype.lv;R.prototype.addPointAt=R.prototype.yf;R.prototype.addPoint=R.prototype.me;R.prototype.insertPointAt=R.prototype.l;R.prototype.insertPoint=R.prototype.Mz;R.prototype.setPointAt=R.prototype.P;R.prototype.setPoint=R.prototype.bd;R.prototype.getPoint=R.prototype.i;R.prototype.getOtherPort=R.prototype.Dz;R.prototype.getOtherNode=R.prototype.Io; +set:function(a){var b=this.Mm;b!==a&&(G&&A(a,"number",R,"curviness"),this.Mm=a,this.gb(),this.sc(!1),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.xj},set:function(a){var b=this.xj;b!==a&&(G&&a!==Dp&&a!==lq&&a!==mq&&a!==Vp&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.xj=a,this.Yf=null,this.gb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, +get:function(){return this.eo},set:function(a){var b=this.eo;b!==a&&(G&&A(a,"number",R,"smoothness"),this.eo=a,this.sc(!0),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.yi())return a.model.Ac(this.data)}}});R.prototype.invalidateOtherJumpOvers=R.prototype.Mo;R.prototype.findClosestSegment=R.prototype.fz;R.prototype.updateRoute=R.prototype.yg;R.prototype.invalidateRoute=R.prototype.gb;R.prototype.rollbackRoute=R.prototype.nv; +R.prototype.commitRoute=R.prototype.Bf;R.prototype.startRoute=R.prototype.uh;R.prototype.clearPoints=R.prototype.Nj;R.prototype.removePoint=R.prototype.lv;R.prototype.addPointAt=R.prototype.zf;R.prototype.addPoint=R.prototype.ne;R.prototype.insertPointAt=R.prototype.l;R.prototype.insertPoint=R.prototype.Mz;R.prototype.setPointAt=R.prototype.P;R.prototype.setPoint=R.prototype.bd;R.prototype.getPoint=R.prototype.i;R.prototype.getOtherPort=R.prototype.Dz;R.prototype.getOtherNode=R.prototype.Io; var Np=null,Op=null,Dp=new F(R,"Normal",1),lq=new F(R,"Orthogonal",2),mq=new F(R,"AvoidsNodes",6),Vp=new F(R,"AvoidsNodesStraight",7),mg=new F(R,"None",0),pg=new F(R,"Bezier",9),lg=new F(R,"JumpGap",10),kg=new F(R,"JumpOver",11),Ep=new F(R,"End",17),Fp=new F(R,"Scale",18),Gp=new F(R,"Stretch",19),jn=new F(R,"OrientAlong",21),bn=new F(R,"OrientPlus90",22),dn=new F(R,"OrientMinus90",23),Hp=new F(R,"OrientOpposite",24),kn=new F(R,"OrientUpright",25),cn=new F(R,"OrientPlus90Upright",26),en=new F(R,"OrientMinus90Upright", 27),fn=new F(R,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;R.className="Link";R.Normal=Dp;R.Orthogonal=lq;R.AvoidsNodes=mq;R.AvoidsNodesStraight=Vp;R.None=mg;R.Bezier=pg;R.JumpGap=lg;R.JumpOver=kg;R.End=Ep;R.Scale=Fp;R.Stretch=Gp;R.OrientAlong=jn;R.OrientPlus90=bn;R.OrientMinus90=dn;R.OrientOpposite=Hp;R.OrientUpright=kn;R.OrientPlus90Upright=cn;R.OrientMinus90Upright=en;R.OrientUpright45=fn;R.EndSegmentStep=8;R.CurvinessStart=Xp;R.SpacingMin=Wp;R.OrthoShortCut=Yp; -function kq(a,b,c,d){Za(this);this.De=this.fq=!1;this.qs=a;this.Lx=b;this.cv=c;this.Mx=d;this.links=[]}kq.prototype.Ol=function(){if(!this.fq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Kd=Math.floor((a.x-this.tc)/this.tc)*this.tc;this.Ld=Math.floor((b-this.uc)/this.uc)*this.uc;this.xn=Math.ceil((c+2*this.tc)/this.tc)*this.tc;this.yn=Math.ceil((d+2*this.uc)/this.uc)*this.uc;a=1+(Math.ceil((this.xn-this.Kd)/this.tc)|0);b=1+(Math.ceil((this.yn-this.Ld)/this.uc)|0);if(null===this.bc||this.hi=cq&&(c[d]=nq)} tk.prototype.ak=function(a,b,c,d){if(a>this.xn||a+cthis.yn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.hi)|0;for(c=Math.min(b+e-1,this.ii)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===yk)return!1}return!0}; @@ -1748,72 +1750,72 @@ a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:be)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===sq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==sq){g.push(k);g.push(l);if(rq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=sq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} oa.Object.defineProperties(tk.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Kd,this.Ld,this.xn-this.Kd,this.yn-this.Ld)}},xo:{configurable:!0,get:function(){return this.tc},set:function(a){0=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> -a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Tp.prototype.Ol=function(){this.oe.length=0}; -function Up(a,b){var c=a.oe;if(0===c.length){a:if(!a.Qo){c=a.Qo;a.Qo=!0;var d=null,e=a.node,f=e instanceof wf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.jx();else{if(!f.actualBounds.u()){a.Qo=c;break a}d=f;g=d.Ku()}f=a.oe.length=0;var h=a.port.oa(Fc,K.alloc()),k=a.port.oa(Oc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.Ye(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.si();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& -l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Sd(d),n=l.computeSpot(m,a.port);if(n.$c()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.cb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=tq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.oe[f];void 0===r?(r=new uq(l,p,n),a.oe[f]=r):(r.link=l,r.angle=p,r.Lc= -n);r.ev.set(m);f++}}}}K.free(h);a.oe.sort(Tp.prototype.j);k=a.oe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(B)?(z=Math.abs(B)/r,r=Math.abs(B)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(B)?(z=Math.abs(B)/ -m,m=Math.abs(B)):z=1}y=0}var J=C.Po;if(d===Ap){C=C.link.computeThickness();C*=z;J.set(D);switch(q){case 8:J.x=D.x+u/2+p/2-y-C/2;break;case 2:J.y=D.y+B/2+r/2-y-C/2;break;case 1:J.x=D.x+u/2-n/2+y+C/2;break;default:case 4:J.y=D.y+B/2-m/2+y+C/2}y+=C}else{var U=.5;d===lp&&(U=(C.Jo+1)/(C.Hl+1));J.x=D.x+u*U;J.y=D.y+B*U}}}K.free(h);K.free(k);K.free(g);K.free(l);D=a.oe;for(f=0;fb.Lc?1:a.angleb.angle?1:0}; -Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Ec,b.fromPort===this.port),d=a.Jo;if(0>d)return c;var e=a.Hl;if(1>=e||!b.isOrthogonal)return c;b=a.ev;var f=a.Po;if(2===a.Lc||8===a.Lc)d=e-1-d;return((a=2===a.Lc||4===a.Lc)?b.y180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Tp.prototype.Ol=function(){this.pe.length=0}; +function Up(a,b){var c=a.pe;if(0===c.length){a:if(!a.Qo){c=a.Qo;a.Qo=!0;var d=null,e=a.node,f=e instanceof wf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.kx();else{if(!f.actualBounds.u()){a.Qo=c;break a}d=f;g=d.Ku()}f=a.pe.length=0;var h=a.port.oa(Fc,K.alloc()),k=a.port.oa(Oc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.Ze(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.si();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Sd(d),n=l.computeSpot(m,a.port);if(n.$c()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.cb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=tq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.pe[f];void 0===r?(r=new uq(l,p,n),a.pe[f]=r):(r.link=l,r.angle=p,r.Mc= +n);r.ev.set(m);f++}}}}K.free(h);a.pe.sort(Tp.prototype.j);k=a.pe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(B)?(z=Math.abs(B)/r,r=Math.abs(B)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(B)?(z=Math.abs(B)/ +m,m=Math.abs(B)):z=1}y=0}var J=C.Po;if(d===Ap){C=C.link.computeThickness();C*=z;J.set(D);switch(q){case 8:J.x=D.x+u/2+p/2-y-C/2;break;case 2:J.y=D.y+B/2+r/2-y-C/2;break;case 1:J.x=D.x+u/2-n/2+y+C/2;break;default:case 4:J.y=D.y+B/2-m/2+y+C/2}y+=C}else{var U=.5;d===lp&&(U=(C.Jo+1)/(C.Hl+1));J.x=D.x+u*U;J.y=D.y+B*U}}}K.free(h);K.free(k);K.free(g);K.free(l);D=a.pe;for(f=0;fb.Mc?1:a.angleb.angle?1:0}; +Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Ec,b.fromPort===this.port),d=a.Jo;if(0>d)return c;var e=a.Hl;if(1>=e||!b.isOrthogonal)return c;b=a.ev;var f=a.Po;if(2===a.Mc||8===a.Mc)d=e-1-d;return((a=2===a.Mc||4===a.Mc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; Di.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof R)&&(xq(h),this.rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof wf&&(h.rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= 0,c=b,d+=f+20,f=0):e++}}};Di.prototype.rh=function(a){return!a.location.u()||a instanceof wf&&a.rh?!0:!1};function wq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof T?k.isLinkLabel||(k instanceof wf?null===k.layout?wq(a,b,k.memberParts,!1,e,f,g,h):(xq(k),b.add(k)):(xq(k),b.add(k))):g&&k instanceof R?b.add(k):!h||!k.Zc()||k instanceof T||(xq(k),b.add(k)))}} function xq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.eb()}Di.prototype.ui=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Di.prototype.Vw=function(a){var b=new I;a instanceof Q?(wq(this,b,a.nodes,!0,null,!0,!0,!0),wq(this,b,a.links,!0,null,!0,!0,!0),wq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof wf?wq(this,b,a.memberParts,!1,null,!0,!0,!0):wq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Di.prototype.Ww=function(a){var b=new I;a instanceof P?(wq(this,b,a.nodes,!0,null,!0,!0,!0),wq(this,b,a.links,!0,null,!0,!0,!0),wq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof wf?wq(this,b,a.memberParts,!1,null,!0,!0,!0):wq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; Di.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.oa(Fc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Di.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Di.prototype.workerLayout=function(){return!1}; -function yq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.yj&&(c.running=zq(a.yj));null!==a.og&&(c.waiting=zq(a.og));a.workerStateChanged(c,a)}}function zq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Di.prototype.Ly=function(){var a=Aq(this.constructor);a&&(null!==a.Ze&&a.Ze.terminate(),a.Ze=null,a.Ql.iteratorValues.each(function(a){a.Mr=!1;a.yj=null;a.og=null;a.wr=!1;yq(a)}),a.Ql.clear())}; -function Bq(a,b){var c=Aq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function Aq(a){var b=null;if("function"===typeof a){if(b=Cq.get(a),!b){var c=Qa(a);b=Cq.get(c);b||(b=new Dq,b.Cu=a,b.name=c,b.j=a.name,b.wx=Eq,Cq.set(c,b),Cq.set(a,b),Cq.set(a.name,b))}}else"string"===typeof a&&(b=Cq.get(a));return b} -Di.prototype.Ev=function(){if("undefined"===typeof Worker||!Fq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Mr&&(this.wr=!0,this.og=this.yj=null,yq(this)),!1;var a=Aq(this.constructor);if(null===a)return!1;null===a.Ze&&(a.Ze=new Worker(Fq),a.Ze.onerror=function(a){a.preventDefault();Fa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Ze.j=function(a){Fa("Worker serialization error: "+a)},a.Ze.onmessage= -function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)Fa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Ql.get(c.id)){a.Ql.remove(c.id);b.Mr=!1;b.yj=null;if(b.wr)b.wr=!1,b.og=null;else{var d=Gq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}yq(b,c.time);c=b.og;if(null!==c)b.og=null;else for(d=a.Ql.iteratorValues;d.next();){var e=d.value;c=e.og;if(null!==c){e.og=null;break}}null!==c&&Hq(b,c)}},a.Ze.postMessage({_GoJS:"_GoJS", -url:a.wx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Ze.postMessage({_GoJS:"_GoJS",url:b})}),a.Ze.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.yj?this.og=this.network:Hq(this,this.network);yq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Hq(a,b){a.Mr=!0;var c=Aq(a.constructor),d=Iq(a,b,!0);d._GoJS="_GoJS";c.Ze.postMessage(d);c.Ql.set(lb(a),a);a.yj=b} +function yq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.yj&&(c.running=zq(a.yj));null!==a.pg&&(c.waiting=zq(a.pg));a.workerStateChanged(c,a)}}function zq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Di.prototype.Ly=function(){var a=Aq(this.constructor);a&&(null!==a.$e&&a.$e.terminate(),a.$e=null,a.Ql.iteratorValues.each(function(a){a.Mr=!1;a.yj=null;a.pg=null;a.wr=!1;yq(a)}),a.Ql.clear())}; +function Bq(a,b){var c=Aq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function Aq(a){var b=null;if("function"===typeof a){if(b=Cq.get(a),!b){var c=Qa(a);b=Cq.get(c);b||(b=new Dq,b.Cu=a,b.name=c,b.j=a.name,b.xx=Eq,Cq.set(c,b),Cq.set(a,b),Cq.set(a.name,b))}}else"string"===typeof a&&(b=Cq.get(a));return b} +Di.prototype.Ev=function(){if("undefined"===typeof Worker||!Fq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Mr&&(this.wr=!0,this.pg=this.yj=null,yq(this)),!1;var a=Aq(this.constructor);if(null===a)return!1;null===a.$e&&(a.$e=new Worker(Fq),a.$e.onerror=function(a){a.preventDefault();Fa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.$e.j=function(a){Fa("Worker serialization error: "+a)},a.$e.onmessage= +function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&P.version&&c.version!==P.version)Fa("Failure: GoJS v"+P.version+" Worker v"+c.version);else if(b=a.Ql.get(c.id)){a.Ql.remove(c.id);b.Mr=!1;b.yj=null;if(b.wr)b.wr=!1,b.pg=null;else{var d=Gq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}yq(b,c.time);c=b.pg;if(null!==c)b.pg=null;else for(d=a.Ql.iteratorValues;d.next();){var e=d.value;c=e.pg;if(null!==c){e.pg=null;break}}null!==c&&Hq(b,c)}},a.$e.postMessage({_GoJS:"_GoJS", +url:a.xx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.$e.postMessage({_GoJS:"_GoJS",url:b})}),a.$e.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.yj?this.pg=this.network:Hq(this,this.network);yq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Hq(a,b){a.Mr=!0;var c=Aq(a.constructor),d=Iq(a,b,!0);d._GoJS="_GoJS";c.$e.postMessage(d);c.Ql.set(lb(a),a);a.yj=b} function Iq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?lb(a):a.id,layout:Qa(a.constructor),p:d,AA:e,dz:f};a.onNetworkSerialization(2,c,b,d);return d} -function Gq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.AA,g=new yb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Qb(a.key));null!==b?b=e.Lj(b):(b=e.createVertex(),e.qg(b));c&&null!==a.key&&(b.data={Kh:a.key});g.set(a.id,b)});var h=b.dz,k=new yb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Bl(f);f.link=b;c&&null!==a.key&&(f.data={Kh:a.key});k.set(a.id, +function Gq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.AA,g=new yb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Qb(a.key));null!==b?b=e.Lj(b):(b=e.createVertex(),e.rg(b));c&&null!==a.key&&(b.data={Kh:a.key});g.set(a.id,b)});var h=b.dz,k=new yb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Bl(f);f.link=b;c&&null!==a.key&&(f.data={Kh:a.key});k.set(a.id, f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.deserializeVertexProperties(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Di.prototype.onNetworkSerialization=function(){}; -oa.Object.defineProperties(Di.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&w(a,Q,Di,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&w(a,wf,Di,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.ln},set:function(a){this.ln!==a&&(A(a,"boolean",Di,"isOngoing"),this.ln=a)}},isInitial:{configurable:!0, +oa.Object.defineProperties(Di.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&w(a,P,Di,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.m},set:function(a){this.m!==a&&(null!==a&&w(a,wf,Di,"group"),this.m=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.ln},set:function(a){this.ln!==a&&(A(a,"boolean",Di,"isOngoing"),this.ln=a)}},isInitial:{configurable:!0, enumerable:!0,get:function(){return this.Ih},set:function(a){A(a,"boolean",Di,"isInitial");this.Ih=a;a||(this.qn=!0)}},isViewportSized:{configurable:!0,get:function(){return this.rn},set:function(a){this.rn!==a&&(A(a,"boolean",Di,"isViewportSized"),(this.rn=a)&&this.F())}},isRouting:{configurable:!0,get:function(){return this.on},set:function(a){this.on!==a&&(A(a,"boolean",Di,"isRouting"),this.on=a)}},isRealtime:{configurable:!0,get:function(){return this.nn}, set:function(a){this.nn!==a&&(null!==a&&A(a,"boolean",Di,"isRealtime"),this.nn=a)}},isValidLayout:{configurable:!0,get:function(){return this.qn},set:function(a){this.qn!==a&&(A(a,"boolean",Di,"isValidLayout"),this.qn=a,a||(a=this.diagram,null!==a&&(a.xh=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&w(a,vq,Di,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.zm}, set:function(a){this.zm!==a&&(null!==a&&A(a,"function",Di,"boundsComputation"),this.zm=a,this.F())}},arrangementOrigin:{configurable:!0,get:function(){return this.vm},set:function(a){w(a,K,Di,"arrangementOrigin");this.vm.D(a)||(this.vm.assign(a),this.F())}},id:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.zn},set:function(a){this.zn!==a&&(null!==a&&A(a,"function", -Di,"mayUseWorkerFunction"),this.zn=a)}},workerStateChanged:{configurable:!0,get:function(){return this.oo},set:function(a){this.oo!==a&&(null!==a&&A(a,"function",Di,"workerStateChanged"),this.oo=a)}}});Di.prototype.useWorker=Di.prototype.Ev;Di.declareWorkerLayout=Bq;Di.prototype.cancelWorker=Di.prototype.Ly;Di.prototype.collectParts=Di.prototype.Vw;Di.prototype.getLayoutBounds=Di.prototype.ui;Di.prototype.invalidateLayout=Di.prototype.F; +Di,"mayUseWorkerFunction"),this.zn=a)}},workerStateChanged:{configurable:!0,get:function(){return this.oo},set:function(a){this.oo!==a&&(null!==a&&A(a,"function",Di,"workerStateChanged"),this.oo=a)}}});Di.prototype.useWorker=Di.prototype.Ev;Di.declareWorkerLayout=Bq;Di.prototype.cancelWorker=Di.prototype.Ly;Di.prototype.collectParts=Di.prototype.Ww;Di.prototype.getLayoutBounds=Di.prototype.ui;Di.prototype.invalidateLayout=Di.prototype.F; var Cq=new yb,Eq="object"===typeof sa.document&&sa.document.currentScript?sa.document.currentScript.src:"",Fq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Di.className="Layout";Di.GoJSScriptURL=Eq;Di.declareWorkerLayout=Bq; -"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:Q.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=Aq(a.layout));var d=null;c&&c.Cu&&(d=new c.Cu);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=Gq(d,a,!0); -d.workerLayout=function(){var a=Iq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new H)}});function Dq(){this.Cu=null;this.wx=this.j=this.name="";this.scripts=[];this.Ze=null;this.Ql=new yb}function vq(a){Za(this);G&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.Pc=a;this.wf=new I;this.ye=new I;this.rs=new yb;this.ms=new yb} -vq.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new I;this.ye=new I;this.rs=new yb;this.ms=new yb}; -vq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.wf.count+" edges: "+this.ye.count;if(1=a)return b;b+=" vertexes: "+this.xf.count+" edges: "+this.ze.count;if(1b?1:0):1:null!==b?-1:0} -oa.Object.defineProperties(Jq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Cd._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.Pd._dataArray}},data:{configurable:!0,get:function(){return this.vb},set:function(a){this.vb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.Xh}, -set:function(a){if(this.Xh!==a){G&&null!==a&&w(a,T,Jq,"node");this.Xh=a;a.eb();var b=this.network.layout,c=M.alloc(),d=b.ui(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof wf)&&(a=a.locationObject.oa(Kc),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&w(a,M,Jq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, -get:function(){return this.o},set:function(a){this.o.D(a)||(G&&w(a,K,Jq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&E(a,Jq,"centerX"),b.pa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&E(a,Jq,"centerY"),b.pa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, -get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},width:{configurable:!0, +oa.Object.defineProperties(Jq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Cd._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.Pd._dataArray}},data:{configurable:!0,get:function(){return this.vb},set:function(a){this.vb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.m.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.Xh}, +set:function(a){if(this.Xh!==a){G&&null!==a&&w(a,T,Jq,"node");this.Xh=a;a.eb();var b=this.network.layout,c=M.alloc(),d=b.ui(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof wf)&&(a=a.locationObject.oa(Kc),a.u())){this.m.h(a.x-b,a.y-e);return}this.m.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&w(a,M,Jq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, +get:function(){return this.m},set:function(a){this.m.D(a)||(G&&w(a,K,Jq,"focus"),this.m.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.m.x},set:function(a){var b=this.j;b.x+this.m.x!==a&&(G&&E(a,Jq,"centerX"),b.pa(),b.x=a-this.m.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.m.y},set:function(a){var b=this.j;b.y+this.m.y!==a&&(G&&E(a,Jq,"centerY"),b.pa(),b.y=a-this.m.y,b.freeze())}},focusX:{configurable:!0, +get:function(){return this.m.x},set:function(a){var b=this.m;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.m.y},set:function(a){var b=this.m;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},width:{configurable:!0, enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.pa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.pa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.tb},set:function(a){G&&w(a,vq,Jq,"network");this.tb=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); return a.iterator}},destinationVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{configurable:!0,get:function(){return this.Cd.iterator}},destinationEdges:{configurable:!0, enumerable:!0,get:function(){return this.Pd.iterator}},edges:{configurable:!0,get:function(){for(var a=new H,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{configurable:!0,get:function(){return this.Cd.count+this.Pd.count}}});Jq.prototype.deleteDestinationEdge=Jq.prototype.Du;Jq.prototype.addDestinationEdge=Jq.prototype.tu;Jq.prototype.deleteSourceEdge=Jq.prototype.Eu; @@ -1821,86 +1823,86 @@ Jq.prototype.addSourceEdge=Jq.prototype.vu;Jq.className="LayoutVertex";Jq.standa Jq.smartComparer=function(a,b){G&&w(a,Jq,Jq,"smartComparer:m");G&&w(b,Jq,Jq,"smartComparer:n");if(null!==a){if(null!==b){a=a.Xh;var c=b.Xh;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ja("Layout");d=[];switch(this.alignment){case Zq:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= m=0;nf-1|| 0g)d.push(new M(0,u,g+h,y)),x=0,q=r,u+=y,y=0;y=Math.max(y,J);switch(p){case Yq:C=-C.width;break;default:C=0}B.moveTo(q+C,u);switch(p){case Yq:q-=D;break;default:q+=D}x++}d.push(new M(0,u,g+h,y));M.free(l);break;case Rq:k=g;m=f;n=b;p=c;g=M.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(q=0;q=l&&(k-=l);l=B=0;D=Math.max(this.cellSize.height,1);C=f=0;J=!0;x=K.alloc();for(U=0;Um-1||0k){d.push(new M(0,J?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;h=l&&(k-=l);l=B=0;D=Math.max(this.cellSize.height,1);C=f=0;J=!0;x=K.alloc();for(U=0;Um-1||0k){d.push(new M(0,J?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -oa.Object.defineProperties(al.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.qo},set:function(a){this.qo!==a&&(A(a,"number",al,"wrappingWidth"),0n)){var u=n+sn(q);q.rc(u,!0);En(q,u,n)}}b.isModified=!0}}finally{b.ca=!0}}}}};zi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Pa(a);for(b=this.nodes.iterator;b.next();)b.value.Pa(a);for(b=this.links.iterator;b.next();)b.value.Pa(a)}; -zi.prototype.hp=function(){for(var a=this.H.model,b=new I,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new cb;e.add("[");c&&1=d)return"[]";var e=new bb;e.add("[");c&&1d)return;La(a.Fc,d)}Mr(a,"nodeDataArray",te,"nodeDataArray",a,b,null,d,null);a.gp(b)}t.mA=function(a){if(Ha(a))for(var b=a.length,c=0;cd)return;La(a.Gc,d)}Mr(a,"nodeDataArray",te,"nodeDataArray",a,b,null,d,null);a.gp(b)}t.mA=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Mr(this,"",se,"",a,null,c,null,b)}; -t.kv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),E(b,X,"removeArrayItem:idx"));a===this.Fc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",te,"",a,c,null,b,null)};t.Go=function(a){if(null===a)return"";var b=this.tj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; +Fn(a,b);d!==c&&(bk(a,b,c),this.ts(a,b,d,c))};t=X.prototype;t.set=function(a,b,c){this.setDataProperty(a,b,c)};t.to=function(a,b){if(b){var c=this.hb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.zy=function(a,b){this.ds(a,-1,b)}; +t.ds=function(a,b,c){G&&(Ia(a,X,"insertArrayItem:arr"),E(b,X,"insertArrayItem:idx"),a===this.Gc&&v("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray"));0>b&&(b=a.length);Ka(a,b,c);Mr(this,"",se,"",a,null,c,null,b)}; +t.kv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),E(b,X,"removeArrayItem:idx"));a===this.Gc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",te,"",a,c,null,b,null)};t.Go=function(a){if(null===a)return"";var b=this.tj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; t.em=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.tj;if(""!==c)if(this.hb(a)){var d=Fn(a,c);void 0===d&&(d="");d!==b&&(bk(a,c,b),Mr(this,"nodeCategory",qe,c,a,d,b))}else bk(a,c,b)}};t.gm=function(a,b){this.em(b,this.Go(a))};t.Pl=function(){return!1};t.$j=function(){return!1};t.yi=function(){return!1};t.ks=function(){return!1};t.wi=function(){return!1};function Bi(){return new X} function Gr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return Gr(a,b.constructor);return typeof b}function Jr(a){return Qr[a]?Qr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Fn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){G&&Fa("property get error: "+d.toString())}return c} function bk(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){G&&Fa("property set error: "+d.toString())}} oa.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){var b=this.Ca;b!==a&&(A(a,"string",X,"name"),this.Ca=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.Nm},set:function(a){var b=this.Nm;b!==a&&(A(a,"string",X,"dataFormat"),this.Nm=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.Jg},set:function(a){var b=this.Jg;b!==a&&(A(a,"boolean", -X,"isReadOnly"),this.Jg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(A(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Pa(a))}},undoManager:{configurable:!0,get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(w(a,ve,X,"undoManager"),null!==b&&b.Ox(this),this.o=a,null!==a&&a.Pw(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg}, +X,"isReadOnly"),this.Jg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(A(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Pa(a))}},undoManager:{configurable:!0,get:function(){return this.m},set:function(a){var b=this.m;b!==a&&(w(a,ve,X,"undoManager"),null!==b&&b.Px(this),this.m=a,null!==a&&a.Pw(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg}, set:function(a){A(a,"boolean",X,"skipsUndoManager");this.Xg=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.Yh},set:function(a){var b=this.Yh;b!==a&&(Nr(a,X,"nodeKeyProperty"),""===a&&v("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===te){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.bg.add(a),this.ld[c]!==a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)):(this.bg.remove(a),this.ld[c]=== -a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Gf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Rl=function(a){if(void 0!==a){var b=this.Yi;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),bk(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; -t.qx=function(a){return mr(this,a,!0)};t.qv=function(a,b){ur(this,a,b,!0)};t.ux=function(a){return mr(this,a,!1)};t.uv=function(a,b){ur(this,a,b,!1)};function mr(a,b,c){if(null!==b&&(a=c?a.kf:a.lf,""!==a&&(a=Fn(b,a),void 0!==a))){if(or(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function ur(a,b,c,d){null===c&&(c=void 0);void 0===c||or(c)||Aa(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.kf:a.lf;if(""!==e)if(c=a.Rl(c),a.Ic(b)){var f=Fn(b,e);f!==c&&(sr(a,f,b),bk(b,e,c),null===a.ic(c)&&tr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}}t.sx=function(a){return lr(this,a,!0)};t.rv=function(a,b){vr(this,a,b,!0)};t.vx=function(a){return lr(this,a,!1)}; -t.vv=function(a,b){vr(this,a,b,!1)};function lr(a,b,c){if(null===b)return"";a=c?a.mj:a.nj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function vr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.mj:a.nj;if(""!==e)if(a.Ic(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(bk(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}} -t.Gf=function(a){if(null===a)return Vr;var b=this.he;if(""===b)return Vr;a=Fn(a,b);return void 0===a?Vr:a};t.ys=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.he;if(""!==c)if(this.Ic(a)){var d=Fn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Ic(a)&&(sr(this,b,a),Mr(this,"linkLabelKeys",te,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.Ac=function(a){if(null!==a){var b=this.Nh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(or(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.xs=function(a,b){void 0!==b&&null!==b&&or(b)||Aa(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Nh;if(""!==c)if(this.Ic(a)){var d=Fn(a,c);d!==b&&null===this.kh(b)&&(bk(a,c,b),void 0!==d&&this.wb.remove(d),this.wb.add(b,a),Mr(this,"linkKey",qe,c,a,d,b),"string"===typeof c&&this.Pa(a,c))}else bk(a,c,b)}}; +Sr.prototype.changeState=function(a,b){if(null!==a&&a.model===this){if(a.change===qe){var c=a.object,d=a.propertyName;if(d===this.linkKeyProperty&&this.Jc(c)){var e=a.L(b);b=a.L(!b);void 0!==b&&this.wb.remove(b);void 0!==e&&this.wb.add(e,c);bk(c,d,e);return}}else if(a.change===se){c=a.newParam;if("linkDataArray"===a.modelChange){a=a.newValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.cg.remove(a),this.ld[c]===a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)):(this.cg.add(a),this.ld[c]!== +a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)));return}if("linkLabelKeys"===a.modelChange){d=this.Hf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)):0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===te){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.cg.add(a),this.ld[c]!==a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)):(this.cg.remove(a),this.ld[c]=== +a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Hf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Rl=function(a){if(void 0!==a){var b=this.Yi;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),bk(c,this.nodeKeyProperty,a),this.yf(c))}return a}}; +t.sx=function(a){return mr(this,a,!0)};t.qv=function(a,b){ur(this,a,b,!0)};t.vx=function(a){return mr(this,a,!1)};t.uv=function(a,b){ur(this,a,b,!1)};function mr(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=Fn(b,a),void 0!==a))){if(or(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function ur(a,b,c,d){null===c&&(c=void 0);void 0===c||or(c)||Aa(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Rl(c),a.Jc(b)){var f=Fn(b,e);f!==c&&(sr(a,f,b),bk(b,e,c),null===a.ic(c)&&tr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}}t.tx=function(a){return lr(this,a,!0)};t.rv=function(a,b){vr(this,a,b,!0)};t.wx=function(a){return lr(this,a,!1)}; +t.vv=function(a,b){vr(this,a,b,!1)};function lr(a,b,c){if(null===b)return"";a=c?a.mj:a.nj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function vr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.mj:a.nj;if(""!==e)if(a.Jc(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(bk(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}} +t.Hf=function(a){if(null===a)return Vr;var b=this.ie;if(""===b)return Vr;a=Fn(a,b);return void 0===a?Vr:a};t.ys=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.ie;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(sr(this,b,a),Mr(this,"linkLabelKeys",te,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +t.Ac=function(a){if(null!==a){var b=this.Nh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(or(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.xs=function(a,b){void 0!==b&&null!==b&&or(b)||Aa(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Nh;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);d!==b&&null===this.kh(b)&&(bk(a,c,b),void 0!==d&&this.wb.remove(d),this.wb.add(b,a),Mr(this,"linkKey",qe,c,a,d,b),"string"===typeof c&&this.Pa(a,c))}else bk(a,c,b)}}; t.kh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&or(a)?this.wb.L(a):null}; t.os=function(a){if(null!==a){var b=this.Nh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.wb.contains(c)){var d=this.el;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.wb.contains(c))){bk(a,b,c);return}if("string"===typeof c){for(d=2;this.wb.contains(c+d);)d++;bk(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.wb.count-1;this.wb.contains(c);)c--;bk(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; -t.Ic=function(a){return null===a?!1:this.bg.contains(a)};t.ji=function(a){null!==a&&(nb(a),this.Ic(a)||qr(this,a,!0))};function qr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.wb.L(d)===b)return;a.os(b);d=a.Ac(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.wb.add(d,b)}a.bg.add(b);d=null;c&&(d=a.ld.length,a.ld.splice(d,0,b));Mr(a,"linkDataArray",se,"linkDataArray",a,null,b,null,d);Wr(a,b)} -t.By=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ld.splice(d,1)}Mr(a,"linkDataArray",te,"linkDataArray",a,b,null,d,null);c=mr(a,b,!0);sr(a,c,b);c=mr(a,b,!1);sr(a,c,b);d=a.Gf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd)return;a.ld.splice(d,1)}Mr(a,"linkDataArray",te,"linkDataArray",a,b,null,d,null);c=mr(a,b,!0);sr(a,c,b);c=mr(a,b,!1);sr(a,c,b);d=a.Hf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new H;b.addAll(a.iterator);a=new H;var c=new H;var d=this.sort(b);var e,f,g=this.Ap;var h=this.arrangement;var k=this.nodeDiameterFormula; var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle;isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===ms&&k===ns?h=Zr:h===ms&&k!==ns&&(h=this.arrangement);if((this.direction===hs||this.direction===is)&&this.sorting!==bs){for(k=0;!(k>=d.length);k+=2){a.add(d.N(k));if(k+1>=d.length)break;c.add(d.N(k+1))}this.direction===hs?(this.arrangement===ms&&a.reverse(),d=new H,d.addAll(a), d.addAll(c)):(this.arrangement===ms&&c.reverse(),d=new H,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;rp&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ms){isNaN(b)&&(b=6);if(h!==Zr&&h!==ms){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=r/(360<=p?k:k-1)}this.cw=h;this.nc=l;this.Um=m;this.dw=n;this.Mp=p;this.$i=b;this.le=f;this.Ap=g;b=d;d=this.cw;h=this.nc;l=this.dw;m=this.Mp;n=this.$i;p=this.le;k=this.Ap;if(this.direction!==hs&&this.direction!==is||d!==ms)if(this.direction===hs||this.direction===is){g=0;switch(d){case ls:g=180*ss(this,h,p,l,k)/Math.PI;break;case Zr:k=b=0;g=a.first();null!==g&&(b=ps(g,Math.PI/2));g=c.first(); +(q.diameter+u.diameter)/2);g+=b;e=qs(this,g*(360<=p?k:k-1),m,n*Math.PI/180,p*Math.PI/180);e>l?(l=e,f=l*m):g=r/(360<=p?k:k-1)}this.cw=h;this.nc=l;this.Um=m;this.dw=n;this.Mp=p;this.$i=b;this.me=f;this.Ap=g;b=d;d=this.cw;h=this.nc;l=this.dw;m=this.Mp;n=this.$i;p=this.me;k=this.Ap;if(this.direction!==hs&&this.direction!==is||d!==ms)if(this.direction===hs||this.direction===is){g=0;switch(d){case ls:g=180*ss(this,h,p,l,k)/Math.PI;break;case Zr:k=b=0;g=a.first();null!==g&&(b=ps(g,Math.PI/2));g=c.first(); null!==g&&(k=ps(g,Math.PI/2));g=180*ss(this,h,p,l,n+(b+k)/2)/Math.PI;break;case ks:g=m/b.length}if(this.direction===hs){switch(d){case ls:ts(this,a,l,js);break;case Zr:us(this,a,l,js);break;case ks:vs(this,a,m/2,l,js)}switch(d){case ls:ts(this,c,l+g,as);break;case Zr:us(this,c,l+g,as);break;case ks:vs(this,c,m/2,l+g,as)}}else{switch(d){case ls:ts(this,c,l,js);break;case Zr:us(this,c,l,js);break;case ks:vs(this,c,m/2,l,js)}switch(d){case ls:ts(this,a,l+g,as);break;case Zr:us(this,a,l+g,as);break;case ks:vs(this, a,m/2,l+g,as)}}}else switch(d){case ls:ts(this,b,l,this.direction);break;case Zr:us(this,b,l,this.direction);break;case ks:vs(this,b,m,l,this.direction);break;case ms:ws(this,b,m,l,this.direction)}else ws(this,b,m,l-m/2,as)}this.updateParts();this.network=null;this.isValidLayout=!0}; -function vs(a,b,c,d,e){var f=a.Mp,g=a.nc;a=a.le;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===as?f:-f);0>f;)f+=360;f%=360;180c){for(f=d+(e===as?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;zs(a,k,l,m,n,e,f)||As(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.uj++;if(!(23Math.abs(r)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.uj?a.nc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;zs(a,k,l,n,p,e,m)||As(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.uj++;if(!(23a.uj?a.nc-f/(2*Math.PI):a.nc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function As(a,b,c,d,e,f,g){var h=a.nc,k=a.le,l=0;a=(d[e].height+d[e+1].height)/2+a.$i;d=!1;if(0<=b!==(f===as)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Yr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -Yr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.nc,c.y=this.arrangementOrigin.y+this.le);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.eb(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.qe(c.qe(a)),this.group.move(b),this.Rv=b.qe(a))}; -Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function rs(a,b,c,d,e){var f=a.qy;if(.001>Math.abs(a.Um-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.uj?a.nc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;zs(a,k,l,n,p,e,m)||As(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.uj++;if(!(23a.uj?a.nc-f/(2*Math.PI):a.nc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function As(a,b,c,d,e,f,g){var h=a.nc,k=a.me,l=0;a=(d[e].height+d[e+1].height)/2+a.$i;d=!1;if(0<=b!==(f===as)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Yr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +Yr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.nc,c.y=this.arrangementOrigin.y+this.me);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.eb(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.re(c.re(a)),this.group.move(b),this.Rv=b.re(a))}; +Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function rs(a,b,c,d,e){var f=a.sy;if(.001>Math.abs(a.Um-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} function qs(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?rs(a,1,c,d,e):rs(a,1,c))}function ss(a,b,c,d,e){if(.001>Math.abs(a.Um-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} Yr.prototype.sort=function(a){switch(this.sorting){case fs:break;case gs:a.reverse();break;case ds:a.sort(this.comparer);break;case es:a.sort(this.comparer);a.reverse();break;case bs:return this.gk(Bs(a));default:v("Invalid sorting type.")}return a}; function Bs(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.N(f));b[f]=-1;f=a.N(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} @@ -2081,39 +2083,39 @@ c.indexOf(b[l][z]),0<=D&&(D=Math.abs(u-(D>=u?D+1:D)),y+=Dr||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.wl=a:this.wl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Tb},set:function(a){this.Tb!==a&&(ab(a,Yr,Yr,"arrangement"),a===ms||a===Zr||a===ls||a===ks)&&(this.Tb=a,this.F())}},direction:{configurable:!0,get:function(){return this.O},set:function(a){this.O!==a&&(ab(a,Yr,Yr,"direction"), -a===as||a===js||a===hs||a===is)&&(this.O=a,this.F())}},sorting:{configurable:!0,get:function(){return this.md},set:function(a){this.md!==a&&(ab(a,Yr,Yr,"sorting"),a===fs||a===gs||a===ds||es||a===bs)&&(this.md=a,this.F())}},comparer:{configurable:!0,get:function(){return this.ed},set:function(a){this.ed!==a&&(A(a,"function",Yr,"comparer"),this.ed=a,this.F())}},spacing:{configurable:!0,get:function(){return this.tf},set:function(a){this.tf!==a&&(A(a,"number", -Yr,"spacing"),this.tf=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Gn},set:function(a){this.Gn!==a&&(ab(a,Yr,Yr,"nodeDiameterFormula"),a===cs||a===ns)&&(this.Gn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.nc}},actualYRadius:{configurable:!0,get:function(){return this.le}},actualSpacing:{configurable:!0,get:function(){return this.$i}},actualCenter:{configurable:!0,get:function(){return this.Rv}}}); +a===as||a===js||a===hs||a===is)&&(this.O=a,this.F())}},sorting:{configurable:!0,get:function(){return this.md},set:function(a){this.md!==a&&(ab(a,Yr,Yr,"sorting"),a===fs||a===gs||a===ds||es||a===bs)&&(this.md=a,this.F())}},comparer:{configurable:!0,get:function(){return this.ed},set:function(a){this.ed!==a&&(A(a,"function",Yr,"comparer"),this.ed=a,this.F())}},spacing:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf!==a&&(A(a,"number", +Yr,"spacing"),this.uf=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Gn},set:function(a){this.Gn!==a&&(ab(a,Yr,Yr,"nodeDiameterFormula"),a===cs||a===ns)&&(this.Gn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.nc}},actualYRadius:{configurable:!0,get:function(){return this.me}},actualSpacing:{configurable:!0,get:function(){return this.$i}},actualCenter:{configurable:!0,get:function(){return this.Rv}}}); var Zr=new F(Yr,"ConstantSpacing",0),ls=new F(Yr,"ConstantDistance",1),ks=new F(Yr,"ConstantAngle",2),ms=new F(Yr,"Packed",3),as=new F(Yr,"Clockwise",4),js=new F(Yr,"Counterclockwise",5),hs=new F(Yr,"BidirectionalLeft",6),is=new F(Yr,"BidirectionalRight",7),fs=new F(Yr,"Forwards",8),gs=new F(Yr,"Reverse",9),ds=new F(Yr,"Ascending",10),es=new F(Yr,"Descending",11),bs=new F(Yr,"Optimized",12),cs=new F(Yr,"Pythagorean",13),ns=new F(Yr,"Circular",14);Yr.className="CircularLayout";Yr.ConstantSpacing=Zr; Yr.ConstantDistance=ls;Yr.ConstantAngle=ks;Yr.Packed=ms;Yr.Clockwise=as;Yr.Counterclockwise=js;Yr.BidirectionalLeft=hs;Yr.BidirectionalRight=is;Yr.Forwards=fs;Yr.Reverse=gs;Yr.Ascending=ds;Yr.Descending=es;Yr.Optimized=bs;Yr.Pythagorean=cs;Yr.Circular=ns;function $r(){this.Ll=-Infinity;this.pm=this.pk=null} $r.prototype.compare=function(a,b){if(0this.Ll||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ -p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Hs(l,h,e,f,p.width,p.height,d),n=l[k],r=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.Yc(c)&&(a++,2a.network.vertexes.count)return!1;a.dh=a.network.vertexes.Ka();a=a.dh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.Td-a.Td});for(b=a.length-1;0<=b&&1>=a[b].Td;)b--;return 1=g))){for(var l=h=0,m=k.count-g;m=g))){for(var l=h=0,m=k.count-g;mr&&(r=1);h=L.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new K(p.x+g,p.y+h)}}a.network=d;return c} -function Ms(a,b,c){G&&(w(b,Fs,Es,"popNetwork:oldnet"),E(c,Es,"popNetwork:level"));for(c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.We){var e=d.We.N(d.ov);d.Td=e.Gs;var f=e.Kv,g=e.Lv;d.bounds=new M(d.centerX-f,d.centerY-g,e.Hs,e.Fs);d.focus=new K(f,g);d.ov--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function Ns(a,b,c){G&&(w(b,Ps,Es,"surroundNode:oldnet"),E(c,Es,"surroundNode:level"));var d=b.Oj;if(null!==d&&0!==d.count){c=b.centerX;var e=b.centerY,f=b.width,g=b.height;null!==b.We&&0=n.Td?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=n.Td?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=c+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} function Hs(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.$f;var l=d=h=0;for(f= +function Rs(a){null===a.dh&&(a.dh=a.network.vertexes.Ka());var b=a.dh;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.ag;var l=d=h=0;for(f= 0;fc||l-k>c){if(e)break}else if(m-r>c||r-m>c){if(!e)break}else{var q=Qs(g,p);1>q?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Ss),q=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*q):kr?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Ss),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;eu&&0u&&0a[this.Ec]&&(this.Ph=a[c]-1,this.Ec=c),a[c]u&&0u&&0a[this.Fc]&&(this.Ph=a[c]-1,this.Fc=c),a[c]g)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.zf===l.zf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lg)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.Af===l.Af||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lu||n===u&&r>q)&&h++;xn||u===n&&q>r)&&h++}}}if(0>=c)for(k=d[g].destinationEdgesArrayAccess,l=0;lu||n===u&&m>x)&&h++,qn||u===n&&x>m)&&h++);f[g*e+g]=h;for(k=g+1;k=c)for(h=d[g].destinationEdgesArrayAccess,B=d[k].destinationEdgesArrayAccess, l=0;lb.toVertex.index&&(a.bm(b),b.rev=!0);break;case Vs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.rg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Og=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -rt(this,b);for(d.reset();d.next();)b=d.value,-1===b.rg&&rt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.rgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cb.toVertex.index&&(a.bm(b),b.rev=!0);break;case Vs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.sg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Og=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +rt(this,b);for(d.reset();d.next();)b=d.value,-1===b.sg&&rt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.sgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cf+1&&(p+=4*(z-f),r+=4*(z-(f+1)))}C=d[f].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f+1&&(r+=1)}C=d[f+1].sourceEdges.iterator;for(C.reset();C.next();)if(z=C.value,B=z.fromVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;zf+1&&(p+=4*(z-(f+1)),r+=4*(z-f))}C=d[f+1].destinationEdges.iterator; for(C.reset();C.next();)if(z=C.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f&&(p+=1)}z=B=0;C=g[d[f].index];var D=h[d[f].index],J=g[d[f+1].index],U=h[d[f+1].index];-1!==C&&(B+=Math.abs(C-q),z+=Math.abs(C-y));-1!==D&&(B+=Math.abs(D-q),z+=Math.abs(D-y));-1!==J&&(B+=Math.abs(J-u),z+=Math.abs(J-x));-1!==U&&(B+=Math.abs(U-u),z+=Math.abs(U-x));if(r>1)+8*d;this.Oa*=8}if(0!==(this.dg&2))for(c=!0;c;){c=!1;for(b=this.Ec+1;b<=this.Da;b++)c=Ht(this,b,1)|| -c;for(b=this.Ec-1;0<=b;b--)c=Ht(this,b,-1)||c;c=Ht(this,this.Ec,0)||c}if(0!==(this.dg&4)){for(b=this.Ec+1;b<=this.Da;b++)It(this,b,1);for(b=this.Ec-1;0<=b;b--)It(this,b,-1);It(this,this.Ec,0)}a&&(Jt(this,-1),Jt(this,1));if(0!==(this.dg&2))for(c=!0;c;){c=!1;c=Ht(this,this.Ec,0)||c;for(b=this.Ec+1;b<=this.Da;b++)c=Ht(this,b,0)||c;for(b=this.Ec-1;0<=b;b--)c=Ht(this,b,0)||c}}; +Us.prototype.straightenAndPack=function(){var a=0!==(this.eg&1);var b=0!==(this.eg&Gt);1E3>1)+8*d;this.Oa*=8}if(0!==(this.eg&2))for(c=!0;c;){c=!1;for(b=this.Fc+1;b<=this.Da;b++)c=Ht(this,b,1)|| +c;for(b=this.Fc-1;0<=b;b--)c=Ht(this,b,-1)||c;c=Ht(this,this.Fc,0)||c}if(0!==(this.eg&4)){for(b=this.Fc+1;b<=this.Da;b++)It(this,b,1);for(b=this.Fc-1;0<=b;b--)It(this,b,-1);It(this,this.Fc,0)}a&&(Jt(this,-1),Jt(this,1));if(0!==(this.eg&2))for(c=!0;c;){c=!1;c=Ht(this,this.Fc,0)||c;for(b=this.Fc+1;b<=this.Da;b++)c=Ht(this,b,0)||c;for(b=this.Fc-1;0<=b;b--)c=Ht(this,b,0)||c}}; function Ht(a,b,c){G&&(E(b,Us,"bendStraighten:unfixedLayer"),E(c,Us,"bendStraighten:direction"));for(var d=!1;Kt(a,b,c);)d=!0;return d} function Kt(a,b,c){G&&(E(b,Us,"shiftbendStraighten:unfixedLayer"),E(c,Us,"shiftbendStraighten:direction"));var d,e=ct(a,b),f=a.Mb[b],g=jt(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?r=m-1:r=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var q=p=0,u= 0;if(0>=c)for(var x=e[d].sourceEdges.iterator;x.next();){var y=x.value;var z=y.fromVertex;if(y.valid&&z.layer!==b){var B=et(y);var C=y.portFromColOffset;y=y.portToColOffset;z=z.column;p+=(Math.abs(m+y-(z+C))+1)*B;q+=(Math.abs(r+y-(z+C))+1)*B;u+=(Math.abs(n+y-(z+C))+1)*B}}if(0<=c)for(x=e[d].destinationEdges.iterator;x.next();)y=x.value,z=y.toVertex,y.valid&&z.layer!==b&&(B=et(y),C=y.portFromColOffset,y=y.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+y))+1)*B,q+=(Math.abs(r+C-(z+y))+1)*B,u+=(Math.abs(n+ @@ -2199,60 +2201,60 @@ k=n+a.nodeMinColumnSpace(d[c-1],!1)+k+1,n=d[c+1].column,l=n-a.nodeMinColumnSpace d);a.normalize()}function Lt(a,b){G&&(E(b,Us,"packAux:column"),E(1,Us,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} function Mt(a,b){G&&(E(b,Us,"tightPackAux:column"),E(1,Us,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Da;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Da;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} function Jt(a,b){G&&E(b,Us,"componentPack:direction");for(var c=0;c<=a.Oa;c++)for(;Lt(a,c););a.normalize();for(c=0;cf?gt(a,e):gb)for(c=a.Oa;0<=c;c--)for(e=ft(a),f=it(a),d=f+1;ff?gt(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Qc);a.Qc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(mt(a,b,a.Qc,-1,!0,!0),a.Qc++);var f;b=[];for(f=0;fc)for(g=a.Oa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +function Nt(a,b,c){a.Rc=0;for(var d=a.network.vertexes.iterator;d.next();)d.value.component=-1;if(0c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Rc);a.Rc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(mt(a,b,a.Rc,-1,!0,!0),a.Rc++);var f;b=[];for(f=0;fc)for(g=a.Oa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} Us.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=at(this,!0),b=at(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Au();this.isRouting&&this.commitLinks()};function at(a,b){return 270===a.O?b?md:rd:90===a.O?b?rd:md:180===a.O?b?pd:qd:b?qd:pd} -Us.prototype.commitNodes=function(){this.fe=[];this.Jd=[];this.Hd=[];this.Va=[];for(var a=0;a<=this.Da;a++)this.fe[a]=0,this.Jd[a]=0,this.Hd[a]=0,this.Va[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.fe[c]=Math.max(this.fe[c],this.nodeMinLayerSpace(b,!0));this.Jd[c]=Math.max(this.Jd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ge;for(var d=0;d<=this.Da;d++){var e=c;0>=this.fe[d]+this.Jd[d]&&(e=0);0=this.ge[d]+this.Jd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.l(q++,C,n+J),b.l(q++,C,n),b.l(q++,C,n-B)):(b.l(q++,C,D+J),b.l(q++,C,D),b.l(q++,C,D-B)):270===this.O?D<=n.bounds.y?(n=n.bounds.y,b.l(q++,C,n-B),b.l(q++,C,n),b.l(q++,C,n+J)):(b.l(q++,C,D-B),b.l(q++,C,D),b.l(q++,C,D+J)):0===this.O&&(C>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.l(q++,n+J,D),b.l(q++,n,D),b.l(q++,n-B,D)):(b.l(q++,C+J,D),b.l(q++,C,D),b.l(q++,C-B,D)));else{b.l(q++,y,z);var U=0;if(180===this.O||0===this.O){if(180===this.O?C>=n.bounds.right: -C<=n.bounds.x)U=(0===this.O?-B:J)/2;b.l(q++,y+U,D)}else{if(270===this.O?D>=n.bounds.bottom:D<=n.bounds.y)U=(90===this.O?-B:J)/2;b.l(q++,C,z+U)}b.l(q++,C,D)}}else B=Math.max(10,this.fe[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):90===this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)): +C<=n.bounds.x)U=(0===this.O?-B:J)/2;b.l(q++,y+U,D)}else{if(270===this.O?D>=n.bounds.bottom:D<=n.bounds.y)U=(90===this.O?-B:J)/2;b.l(q++,C,z+U)}b.l(q++,C,D)}}else B=Math.max(10,this.ge[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):90===this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)): 270===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):b.l(q++,C,D)}n=x}if(null===h||l!==Ec||p)if(y=b.i(q-1).x,z=b.i(q-1).y,C=b.i(q).x,D=b.i(q).y,p)u=this.Jd[m.layer],180===this.O||0===this.O?(p=z,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.O?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180=== -this.O?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.O?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.O?-u:u),p=m.bounds.x?(n=m.bounds.x+ -m.bounds.width,b.P(q-2,n,z),b.P(q-1,n+J,z)):90===this.O&&D<=m.bounds.bottom?(n=m.bounds.y,b.P(q-2,y,n),b.P(q-1,y,n-B)):270===this.O&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.P(q-2,y,n),b.P(q-1,y,n+J)):0===this.O&&C<=m.bounds.right&&(n=m.bounds.x,b.P(q-2,n,z),b.P(q-1,n-B,z));else{B=Math.max(10,this.fe[m.layer]);J=Math.max(10,this.Jd[m.layer]);p=0;if(180===this.O||0===this.O){if(180===this.O?C<=m.bounds.x:C>=m.bounds.right)p=(0===this.O?J:-B)/2;b.l(q++,C+p,z)}else{if(270===this.O?D<=m.bounds.y: +this.O?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.O?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.O?-u:u),p=m.bounds.x?(n=m.bounds.x+ +m.bounds.width,b.P(q-2,n,z),b.P(q-1,n+J,z)):90===this.O&&D<=m.bounds.bottom?(n=m.bounds.y,b.P(q-2,y,n),b.P(q-1,y,n-B)):270===this.O&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.P(q-2,y,n),b.P(q-1,y,n+J)):0===this.O&&C<=m.bounds.right&&(n=m.bounds.x,b.P(q-2,n,z),b.P(q-1,n-B,z));else{B=Math.max(10,this.ge[m.layer]);J=Math.max(10,this.Jd[m.layer]);p=0;if(180===this.O||0===this.O){if(180===this.O?C<=m.bounds.x:C>=m.bounds.right)p=(0===this.O?J:-B)/2;b.l(q++,C+p,z)}else{if(270===this.O?D<=m.bounds.y: D>=m.bounds.bottom)p=(90===this.O?J:-B)/2;b.l(q++,y,D+p)}b.l(q++,C,D)}}else{for(;null!==m&&m!==n;){B=x=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(x=y.toVertex,B=y.fromVertex,null!==B.node&&(B=null),null!==x.node)););if(null===x)break;x!==n&&(y=b.i(q-1).x,z=b.i(q-1).y,C=x.centerX,D=x.centerY,p?180===this.O||0===this.O?(null!==B?B.centerY:z)!==D&&(B=this.Va[x.layer]+this.dd.x,q===b.firstPickIndex+1&&(B=0===this.O?Math.max(B,y):Math.min(B,y)),b.l(q++,B,z),b.l(q++,B, -D)):(null!==B?B.centerX:y)!==C&&(B=this.Va[x.layer]+this.dd.y,q===b.firstPickIndex+1&&(B=90===this.O?Math.max(B,z):Math.min(B,z)),b.l(q++,y,B),b.l(q++,C,B)):(B=Math.max(10,this.fe[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):90===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):270=== +D)):(null!==B?B.centerX:y)!==C&&(B=this.Va[x.layer]+this.dd.y,q===b.firstPickIndex+1&&(B=90===this.O?Math.max(B,z):Math.min(B,z)),b.l(q++,y,B),b.l(q++,C,B)):(B=Math.max(10,this.ge[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):90===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):270=== this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)):(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):180===this.O?(b.l(q++,C+J,D),b.l(q++,C-B,D)):90===this.O?(b.l(q++,C,D-B),b.l(q++,C,D+J)):270===this.O?(b.l(q++,C,D+J),b.l(q++,C,D-B)):(b.l(q++,C-B,D),b.l(q++,C+J,D))));m=x}p&&(y=b.i(q-1).x,z=b.i(q-1).y,C=b.i(q).x,D=b.i(q).y,180===this.O||0===this.O? z!==D&&(B=0===this.O?Math.min(Math.max((C+y)/2,this.Va[n.layer]+this.dd.x),C):Math.max(Math.min((C+y)/2,this.Va[n.layer]+this.dd.x),C),b.l(q++,B,z),b.l(q++,B,D)):y!==C&&(B=90===this.O?Math.min(Math.max((D+z)/2,this.Va[n.layer]+this.dd.y),D):Math.max(Math.min((D+z)/2,this.Va[n.layer]+this.dd.y),D),b.l(q++,y,B),b.l(q++,C,B)))}null!==d&&r&&(null!==g&&(l===Ec&&(l=b.i(0),d=b.i(2),l.D(d)||b.P(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Ec,!0,!1,f,h),l.u()||l.set(e.actualBounds.center),b.P(0,l.x,l.y)), -null!==h&&(k===Ec&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.D(l)||b.P(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Ec,!1,!1,e,g),e.u()||e.set(f.actualBounds.center),b.P(b.pointsCount-1,e.x,e.y)));b.Af();c.commit()}}}this.avoidOrthogonalOverlaps()}; +null!==h&&(k===Ec&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.D(l)||b.P(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Ec,!1,!1,e,g),e.u()||e.set(f.actualBounds.center),b.P(b.pointsCount-1,e.x,e.y)));b.Bf();c.commit()}}}this.avoidOrthogonalOverlaps()}; Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.rdb.rd?1:a.Hcb.Hc?1:0:0};t.Rx=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.jb.j||a.rdb.rd?1:a.Hcb.Hc?1:0:0}; -t.ws=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.lcb.lc||a.jb.j||a.rdb.rd?1:a.Hcb.Hc?1:0:0};t.C=function(a,b){G&&(E(a,Us,"isApprox:a"),E(b,Us,"isApprox:b"));a-=b;return-1a}; +k.x*k.x+k.y;h.lc=l.x*l.x+l.y;h.rd=Math.min(f.x,g.x);h.Ic=Math.max(f.x,g.x);h.index=e;h.link=d;if(e+2f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.rdb.rd?1:a.Icb.Ic?1:0:0};t.Sx=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.jb.j||a.rdb.rd?1:a.Icb.Ic?1:0:0}; +t.ws=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.lcb.lc||a.jb.j||a.rdb.rd?1:a.Icb.Ic?1:0:0};t.C=function(a,b){G&&(E(a,Us,"isApprox:a"),E(b,Us,"isApprox:b"));a-=b;return-1a}; t.Ei=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&v("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.Ge.length){var d=[];for(var e=0;e=a.He.length){var d=[];for(var e=0;ea&&(this.dg=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.sf},set:function(a){this.sf!==a&&(A(a,"boolean",Us,"setsPortSpots"),this.sf=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.vn},set:function(a){this.vn!==a&&(A(a,"number",Us,"linkSpacing"),0<=a&&(this.vn=a,this.F()))}},maxLayer:{configurable:!0, -get:function(){return this.Da}},maxIndex:{configurable:!0,get:function(){return this.Ph}},maxColumn:{configurable:!0,get:function(){return this.Oa}},minIndexLayer:{configurable:!0,get:function(){return this.Ng}},maxIndexLayer:{configurable:!0,get:function(){return this.Ec}}}); +enumerable:!0,get:function(){return this.eg},set:function(a){this.eg!==a&&(A(a,"number",Us,"packOption"),0<=a&&8>a&&(this.eg=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.tf},set:function(a){this.tf!==a&&(A(a,"boolean",Us,"setsPortSpots"),this.tf=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.vn},set:function(a){this.vn!==a&&(A(a,"number",Us,"linkSpacing"),0<=a&&(this.vn=a,this.F()))}},maxLayer:{configurable:!0, +get:function(){return this.Da}},maxIndex:{configurable:!0,get:function(){return this.Ph}},maxColumn:{configurable:!0,get:function(){return this.Oa}},minIndexLayer:{configurable:!0,get:function(){return this.Ng}},maxIndexLayer:{configurable:!0,get:function(){return this.Fc}}}); var Vs=new F(Us,"CycleDepthFirst",0),nt=new F(Us,"CycleGreedy",1),$s=new F(Us,"CycleFromLayers",2),Ws=new F(Us,"LayerOptimalLinkLength",0),st=new F(Us,"LayerLongestPathSink",1),ut=new F(Us,"LayerLongestPathSource",2),Xs=new F(Us,"InitDepthFirstOut",0),At=new F(Us,"InitDepthFirstIn",1),yt=new F(Us,"InitNaive",2),Et=new F(Us,"AggressiveNone",0),Ys=new F(Us,"AggressiveLess",1),Ft=new F(Us,"AggressiveMore",2),Gt=8;Us.className="LayeredDigraphLayout";Us.CycleDepthFirst=Vs;Us.CycleGreedy=nt; -Us.CycleFromLayers=$s;Us.LayerOptimalLinkLength=Ws;Us.LayerLongestPathSink=st;Us.LayerLongestPathSource=ut;Us.InitDepthFirstOut=Xs;Us.InitDepthFirstIn=At;Us.InitNaive=yt;Us.AggressiveNone=Et;Us.AggressiveLess=Ys;Us.AggressiveMore=Ft;Us.PackNone=0;Us.PackExpand=1;Us.PackStraighten=2;Us.PackMedian=4;Us.PackAll=15;function Ot(){this.index=this.Hc=this.rd=this.lc=this.first=this.layer=0;this.link=null;this.j=0}Ot.className="SegInfo";function Zs(a){vq.call(this,a)}na(Zs,vq);Zs.prototype.createVertex=function(){return new Pt(this)}; -Zs.prototype.createEdge=function(){return new Qt(this)};Zs.className="LayeredDigraphNetwork";function Pt(a){Jq.call(this,a);this.bb=this.Cg=this.Mh=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.rg=NaN;this.zf=0;this.ek=this.fk=null}na(Pt,Jq); -Pt.prototype.serializeVertexProperties=function(a,b){Jq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?lb(this.near):null;a.valid=this.valid;a.rg=this.rg;a.finish=this.finish;a.zf=this.zf;a.fk=this.fk;a.ek=this.ek}; -Pt.prototype.deserializeVertexProperties=function(a,b,c,d){Jq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.rg=a.rg;this.finish=a.finish;this.zf=a.zf;this.fk=a.fk;this.ek=a.ek}; -oa.Object.defineProperties(Pt.prototype,{layer:{configurable:!0,get:function(){return this.Mh},set:function(a){this.Mh!==a&&(A(a,"number",Pt,"layer"),this.Mh=a)}},column:{configurable:!0,get:function(){return this.Cg},set:function(a){this.Cg!==a&&(A(a,"number",Pt,"column"),this.Cg=a)}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb!==a&&(A(a,"number",Pt,"index"),this.bb=a)}},component:{configurable:!0,get:function(){return this.v}, -set:function(a){this.v!==a&&(A(a,"number",Pt,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&w(a,Pt,Pt,"near"),this.G=a)}}});Pt.className="LayeredDigraphVertex";function Qt(a){Kq.call(this,a);this.j=this.ma=this.Ma=!1;this.aa=this.v=NaN;this.G=this.o=0}na(Qt,Kq); +Us.CycleFromLayers=$s;Us.LayerOptimalLinkLength=Ws;Us.LayerLongestPathSink=st;Us.LayerLongestPathSource=ut;Us.InitDepthFirstOut=Xs;Us.InitDepthFirstIn=At;Us.InitNaive=yt;Us.AggressiveNone=Et;Us.AggressiveLess=Ys;Us.AggressiveMore=Ft;Us.PackNone=0;Us.PackExpand=1;Us.PackStraighten=2;Us.PackMedian=4;Us.PackAll=15;function Ot(){this.index=this.Ic=this.rd=this.lc=this.first=this.layer=0;this.link=null;this.j=0}Ot.className="SegInfo";function Zs(a){vq.call(this,a)}na(Zs,vq);Zs.prototype.createVertex=function(){return new Pt(this)}; +Zs.prototype.createEdge=function(){return new Qt(this)};Zs.className="LayeredDigraphNetwork";function Pt(a){Jq.call(this,a);this.bb=this.Dg=this.Mh=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.sg=NaN;this.Af=0;this.ek=this.fk=null}na(Pt,Jq); +Pt.prototype.serializeVertexProperties=function(a,b){Jq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?lb(this.near):null;a.valid=this.valid;a.sg=this.sg;a.finish=this.finish;a.Af=this.Af;a.fk=this.fk;a.ek=this.ek}; +Pt.prototype.deserializeVertexProperties=function(a,b,c,d){Jq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.sg=a.sg;this.finish=a.finish;this.Af=a.Af;this.fk=a.fk;this.ek=a.ek}; +oa.Object.defineProperties(Pt.prototype,{layer:{configurable:!0,get:function(){return this.Mh},set:function(a){this.Mh!==a&&(A(a,"number",Pt,"layer"),this.Mh=a)}},column:{configurable:!0,get:function(){return this.Dg},set:function(a){this.Dg!==a&&(A(a,"number",Pt,"column"),this.Dg=a)}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb!==a&&(A(a,"number",Pt,"index"),this.bb=a)}},component:{configurable:!0,get:function(){return this.v}, +set:function(a){this.v!==a&&(A(a,"number",Pt,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&w(a,Pt,Pt,"near"),this.G=a)}}});Pt.className="LayeredDigraphVertex";function Qt(a){Kq.call(this,a);this.j=this.ma=this.Ma=!1;this.$=this.v=NaN;this.G=this.m=0}na(Qt,Kq); Qt.prototype.serializeEdgeProperties=function(a,b){Kq.prototype.serializeEdgeProperties.call(this,a,b);a.valid=this.valid;a.rev=this.rev;a.forest=this.forest;a.portFromPos=this.portFromPos;a.portToPos=this.portToPos;a.portFromColOffset=this.portFromColOffset;a.portToColOffset=this.portToColOffset}; Qt.prototype.deserializeEdgeProperties=function(a,b,c,d){Kq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; oa.Object.defineProperties(Qt.prototype,{fromVertex:{configurable:!0,get:function(){return this.gd},set:function(a){this.gd!==a&&(G&&null!==a&&w(a,Pt,Qt,"fromVertex"),this.gd=a)}},toVertex:{configurable:!0,get:function(){return this.pd},set:function(a){this.pd!==a&&(G&&null!==a&&w(a,Pt,Qt,"toVertex"),this.pd=a)}},valid:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma!==a&&(A(a,"boolean",Qt,"valid"),this.Ma=a)}},rev:{configurable:!0, -enumerable:!0,get:function(){return this.ma},set:function(a){this.ma!==a&&(A(a,"boolean",Qt,"rev"),this.ma=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(A(a,"boolean",Qt,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(A(a,"number",Qt,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.aa},set:function(a){this.aa!==a&&(A(a,"number", -Qt,"portToPos"),this.aa=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(A(a,"number",Qt,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(A(a,"number",Qt,"portToColOffset"),this.G=a)}}});Qt.className="LayeredDigraphEdge"; -function Z(a){Di.call(this);this.Wb=new I;this.Qn=Rt;this.wd=St;this.lo=Tt;this.oq=Ut;this.Sv=[];this.ud=!0;this.Tb=Vt;this.Zd=(new Hb(10,10)).freeze();var b=new Wt(this);this.Z=new Xt(b);this.$=new Xt(b);this.ju=[];a&&Object.assign(this,a)}na(Z,Di);Z.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a);a.Qn=this.Qn;a.lo=this.lo;a.oq=this.oq;a.ud=this.ud;a.Tb=this.Tb;a.Zd.assign(this.Zd);a.Z.copyInheritedPropertiesFrom(this.Z);a.$.copyInheritedPropertiesFrom(this.$)}; +enumerable:!0,get:function(){return this.ma},set:function(a){this.ma!==a&&(A(a,"boolean",Qt,"rev"),this.ma=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(A(a,"boolean",Qt,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(A(a,"number",Qt,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.$},set:function(a){this.$!==a&&(A(a,"number", +Qt,"portToPos"),this.$=a)}},portFromColOffset:{configurable:!0,get:function(){return this.m},set:function(a){this.m!==a&&(A(a,"number",Qt,"portFromColOffset"),this.m=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(A(a,"number",Qt,"portToColOffset"),this.G=a)}}});Qt.className="LayeredDigraphEdge"; +function Z(a){Di.call(this);this.Wb=new I;this.Qn=Rt;this.wd=St;this.lo=Tt;this.oq=Ut;this.Sv=[];this.ud=!0;this.Tb=Vt;this.Zd=(new Hb(10,10)).freeze();var b=new Wt(this);this.Z=new Xt(b);this.aa=new Xt(b);this.ju=[];a&&Object.assign(this,a)}na(Z,Di);Z.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a);a.Qn=this.Qn;a.lo=this.lo;a.oq=this.oq;a.ud=this.ud;a.Tb=this.Tb;a.Zd.assign(this.Zd);a.Z.copyInheritedPropertiesFrom(this.Z);a.aa.copyInheritedPropertiesFrom(this.aa)}; Z.prototype.ub=function(a){a.classType===Z?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:v("Unknown enum value: "+a):Di.prototype.ub.call(this,a)};Z.prototype.createNetwork=function(){return new Wt(this)}; -Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof T)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof R){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.pg(a.nodes,!0,b),c.pg(a.links,!0,b)):a instanceof wf?c.pg(a.memberParts,!1,b):c.pg(a.iterator,!1,b);return c}; -Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Yt&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===Rt&&null!==b?this.wd=b.isTreePathToChildren?St:Zt:this.wd=this.path===Rt?St:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&w(a,Xt,Z,"removeChild:p");G&&w(b,Xt,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Hu(a,g,fa,y,z):Iu(a,g,fa,y,z);fa=z.x;y=z.width;z=z.height;break;case tu:for(C=0;Cn&&(aawb&&(Nu(a,-wb,0,la,za-1),Ou(C,-wb,0),Ou(D,-wb,0),wb=0)}Ma.V.h(wb,Y);y=Math.max(y,J);z=Math.max(z,B+(0===W?0:q)+sb.height);aa=J}else{0n&&(Ywb&&(Nu(a,0,-wb,la,za-1),Ou(C,0,-wb),Ou(D,0,-wb),wb=0);Ma.V.h(aa,wb);z=Math.max(z,U);y=Math.max(y,B+(0===W?0:q)+sb.width);Y=U}P++}0e?Hu(a,g,fa,y,z):Iu(a,g,fa,y,z);fa=z.x;y=z.width;z=z.height;break;case tu:for(C=0;Cn&&(aawb&&(Nu(a,-wb,0,la,za-1),Ou(C,-wb,0),Ou(D,-wb,0),wb=0)}Ma.V.h(wb,Y);y=Math.max(y,J);z=Math.max(z,B+(0===W?0:q)+sb.height);aa=J}else{0n&&(Ywb&&(Nu(a,0,-wb,la,za-1),Ou(C,0,-wb),Ou(D,0,-wb),wb=0);Ma.V.h(aa,wb);z=Math.max(z,U);y=Math.max(y,B+(0===W?0:q)+sb.width);Y=U}Q++}0l&&(l=0),135u&&(u=0),k===uu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>y&&(y=Tu(k,d-y,0),g=y.x,h=y.y,y=d,l=0):y=Ru(a,y,l),0>l&&(g-=l,l=0),135z&&(z=Tu(k,0,x-z),g=z.x,h=z.y,z=x,u=0):z=Su(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),W[0].h(0,u+x),W[1].h(d,W[0].y),W[2].xd?Hu(b,e,P,B,C):Iu(b,e,P,B,C);P=C.x;B=C.width;C=C.height;break;case tu:for(a=0;ad?Hu(b,e,Q,B,C):Iu(b,e,Q,B,C);Q=C.x;B=C.width;C=C.height;break;case tu:for(a=0;ap&&(Jp&&(Un&&(n=0),135y&&(y=0));b.qa.h(n,y);b.Ia.h(B,C)}} function Hu(a,b,c,d,e){G&&w(a,Xt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new M(c,0,d,e);if(1===f)return a=b[0],d=a.Ia.width,e=a.Ia.height,new M(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Au(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), @@ -2314,7 +2316,7 @@ function Uu(a,b){var c=b.length,d=a.ju[c];void 0===d&&(d=[],a.ju[c]=d);d.push(b) Z.prototype.arrangeTrees=function(){if(this.Tb===Yt)for(var a=this.Wb.iterator;a.next();){var b=a.value;if(b instanceof Xt){var c=b.node;if(null!==c){var d=c.position;c=d.x;d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);Yu(this,b,c,d)}}}else{a=[];for(b=this.Wb.iterator;b.next();)c=b.value,c instanceof Xt&&a.push(c);switch(this.sorting){case nu:break;case ou:a.reverse();break;case pu:a.sort(this.comparer);break;case qu:a.sort(this.comparer);a.reverse();break;default:v("Unhandled sorting value "+this.sorting.toString())}c= this.arrangementOrigin;b=c.x;c=c.y;for(d=0;d=a&&(this.Z.nodeIndentPastParent=a,this.F()))}},nodeSpacing:{configurable:!0,get:function(){return this.Z.nodeSpacing},set:function(a){this.Z.nodeSpacing!==a&&(A(a,"number",Z,"nodeSpacing"),this.Z.nodeSpacing=a,this.F())}},layerSpacing:{configurable:!0,get:function(){return this.Z.layerSpacing},set:function(a){this.Z.layerSpacing!==a&&(A(a,"number",Z,"layerSpacing"),this.Z.layerSpacing=a,this.F())}},layerSpacingParentOverlap:{configurable:!0, @@ -2333,47 +2335,47 @@ enumerable:!0,get:function(){return this.Z.layerSpacingParentOverlap},set:functi set:function(a){this.Z.breadthLimit!==a&&(A(a,"number",Z,"breadthLimit"),0<=a&&(this.Z.breadthLimit=a,this.F()))}},rowSpacing:{configurable:!0,get:function(){return this.Z.rowSpacing},set:function(a){this.Z.rowSpacing!==a&&(A(a,"number",Z,"rowSpacing"),this.Z.rowSpacing=a,this.F())}},rowIndent:{configurable:!0,get:function(){return this.Z.rowIndent},set:function(a){this.Z.rowIndent!==a&&(A(a,"number",Z,"rowIndent"),0<=a&&(this.Z.rowIndent=a,this.F()))}},commentSpacing:{configurable:!0, enumerable:!0,get:function(){return this.Z.commentSpacing},set:function(a){this.Z.commentSpacing!==a&&(A(a,"number",Z,"commentSpacing"),this.Z.commentSpacing=a,this.F())}},commentMargin:{configurable:!0,get:function(){return this.Z.commentMargin},set:function(a){this.Z.commentMargin!==a&&(A(a,"number",Z,"commentMargin"),this.Z.commentMargin=a,this.F())}},setsPortSpot:{configurable:!0,get:function(){return this.Z.setsPortSpot},set:function(a){this.Z.setsPortSpot!==a&&(A(a, "boolean",Z,"setsPortSpot"),this.Z.setsPortSpot=a,this.F())}},portSpot:{configurable:!0,get:function(){return this.Z.portSpot},set:function(a){w(a,Ib,Z,"portSpot");this.Z.portSpot.D(a)||(this.Z.portSpot=a,this.F())}},setsChildPortSpot:{configurable:!0,get:function(){return this.Z.setsChildPortSpot},set:function(a){this.Z.setsChildPortSpot!==a&&(A(a,"boolean",Z,"setsChildPortSpot"),this.Z.setsChildPortSpot=a,this.F())}},childPortSpot:{configurable:!0,get:function(){return this.Z.childPortSpot}, -set:function(a){w(a,Ib,Z,"childPortSpot");this.Z.childPortSpot.D(a)||(this.Z.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.$.sorting},set:function(a){this.$.sorting!==a&&(ab(a,Z,Z,"alternateSorting"),a===nu||a===ou||a===pu||qu)&&(this.$.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.$.comparer},set:function(a){this.$.comparer!==a&&(A(a,"function",Z,"alternateComparer"),this.$.comparer=a,this.F())}}, -alternateAngle:{configurable:!0,get:function(){return this.$.angle},set:function(a){this.$.angle!==a&&(A(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.$.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.$.alignment},set:function(a){this.$.alignment!==a&&(ab(a,Z,Z,"alternateAlignment"),this.$.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.$.nodeIndent},set:function(a){this.$.nodeIndent!== -a&&(A(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.$.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.$.nodeIndentPastParent},set:function(a){this.$.nodeIndentPastParent!==a&&(A(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.$.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.$.nodeSpacing},set:function(a){this.$.nodeSpacing!==a&&(A(a,"number",Z,"alternateNodeSpacing"), -this.$.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.$.layerSpacing},set:function(a){this.$.layerSpacing!==a&&(A(a,"number",Z,"alternateLayerSpacing"),this.$.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap= -a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&(ab(a,Z,Z,"alternateCompaction"),a===xu||a===zu)&&(this.$.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit},set:function(a){this.$.breadthLimit!==a&&(A(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.$.breadthLimit=a,this.F()))}},alternateRowSpacing:{configurable:!0,get:function(){return this.$.rowSpacing}, -set:function(a){this.$.rowSpacing!==a&&(A(a,"number",Z,"alternateRowSpacing"),this.$.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.$.rowIndent},set:function(a){this.$.rowIndent!==a&&(A(a,"number",Z,"alternateRowIndent"),0<=a&&(this.$.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.$.commentSpacing},set:function(a){this.$.commentSpacing!==a&&(A(a,"number",Z,"alternateCommentSpacing"), -this.$.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.$.commentMargin},set:function(a){this.$.commentMargin!==a&&(A(a,"number",Z,"alternateCommentMargin"),this.$.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.$.setsPortSpot},set:function(a){this.$.setsPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsPortSpot"),this.$.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0, -enumerable:!0,get:function(){return this.$.portSpot},set:function(a){w(a,Ib,Z,"alternatePortSpot");this.$.portSpot.D(a)||(this.$.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.$.setsChildPortSpot},set:function(a){this.$.setsChildPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsChildPortSpot"),this.$.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0,get:function(){return this.$.childPortSpot},set:function(a){w(a, -Ib,Z,"alternateChildPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}}}); +set:function(a){w(a,Ib,Z,"childPortSpot");this.Z.childPortSpot.D(a)||(this.Z.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&(ab(a,Z,Z,"alternateSorting"),a===nu||a===ou||a===pu||qu)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(A(a,"function",Z,"alternateComparer"),this.aa.comparer= +a,this.F())}},alternateAngle:{configurable:!0,get:function(){return this.aa.angle},set:function(a){this.aa.angle!==a&&(A(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.aa.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.aa.alignment},set:function(a){this.aa.alignment!==a&&(ab(a,Z,Z,"alternateAlignment"),this.aa.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.aa.nodeIndent}, +set:function(a){this.aa.nodeIndent!==a&&(A(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.aa.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.aa.nodeIndentPastParent},set:function(a){this.aa.nodeIndentPastParent!==a&&(A(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.aa.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.aa.nodeSpacing},set:function(a){this.aa.nodeSpacing!== +a&&(A(a,"number",Z,"alternateNodeSpacing"),this.aa.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.aa.layerSpacing},set:function(a){this.aa.layerSpacing!==a&&(A(a,"number",Z,"alternateLayerSpacing"),this.aa.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.aa.layerSpacingParentOverlap},set:function(a){this.aa.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"alternateLayerSpacingParentOverlap"), +0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&(ab(a,Z,Z,"alternateCompaction"),a===xu||a===zu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(A(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, +alternateRowSpacing:{configurable:!0,get:function(){return this.aa.rowSpacing},set:function(a){this.aa.rowSpacing!==a&&(A(a,"number",Z,"alternateRowSpacing"),this.aa.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.aa.rowIndent},set:function(a){this.aa.rowIndent!==a&&(A(a,"number",Z,"alternateRowIndent"),0<=a&&(this.aa.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.aa.commentSpacing}, +set:function(a){this.aa.commentSpacing!==a&&(A(a,"number",Z,"alternateCommentSpacing"),this.aa.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.aa.commentMargin},set:function(a){this.aa.commentMargin!==a&&(A(a,"number",Z,"alternateCommentMargin"),this.aa.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.aa.setsPortSpot},set:function(a){this.aa.setsPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsPortSpot"), +this.aa.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0,get:function(){return this.aa.portSpot},set:function(a){w(a,Ib,Z,"alternatePortSpot");this.aa.portSpot.D(a)||(this.aa.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.aa.setsChildPortSpot},set:function(a){this.aa.setsChildPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsChildPortSpot"),this.aa.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0, +enumerable:!0,get:function(){return this.aa.childPortSpot},set:function(a){w(a,Ib,Z,"alternateChildPortSpot");this.aa.childPortSpot.D(a)||(this.aa.childPortSpot=a,this.F())}}}); var Rt=new F(Z,"PathDefault",-1),St=new F(Z,"PathDestination",0),Zt=new F(Z,"PathSource",1),nu=new F(Z,"SortingForwards",10),ou=new F(Z,"SortingReverse",11),pu=new F(Z,"SortingAscending",12),qu=new F(Z,"SortingDescending",13),Pu=new F(Z,"AlignmentCenterSubtrees",20),Qu=new F(Z,"AlignmentCenterChildren",21),Bu=new F(Z,"AlignmentStart",22),Cu=new F(Z,"AlignmentEnd",23),su=new F(Z,"AlignmentBus",24),iu=new F(Z,"AlignmentBusBranching",25),tu=new F(Z,"AlignmentTopLeftBus",26),uu=new F(Z,"AlignmentBottomRightBus", 27),xu=new F(Z,"CompactionNone",30),zu=new F(Z,"CompactionBlock",31),Tt=new F(Z,"StyleLayered",40),mu=new F(Z,"StyleLastParents",41),lu=new F(Z,"StyleAlternating",42),ku=new F(Z,"StyleRootOnly",43),Vt=new F(Z,"ArrangementVertical",50),Zu=new F(Z,"ArrangementHorizontal",51),Yt=new F(Z,"ArrangementFixedRoots",52),Ut=new F(Z,"LayerIndividual",60),gu=new F(Z,"LayerSiblings",61),fu=new F(Z,"LayerUniform",62);Z.className="TreeLayout";Z.PathDefault=Rt;Z.PathDestination=St;Z.PathSource=Zt; Z.SortingForwards=nu;Z.SortingReverse=ou;Z.SortingAscending=pu;Z.SortingDescending=qu;Z.AlignmentCenterSubtrees=Pu;Z.AlignmentCenterChildren=Qu;Z.AlignmentStart=Bu;Z.AlignmentEnd=Cu;Z.AlignmentBus=su;Z.AlignmentBusBranching=iu;Z.AlignmentTopLeftBus=tu;Z.AlignmentBottomRightBus=uu;Z.CompactionNone=xu;Z.CompactionBlock=zu;Z.StyleLayered=Tt;Z.StyleLastParents=mu;Z.StyleAlternating=lu;Z.StyleRootOnly=ku;Z.ArrangementVertical=Vt;Z.ArrangementHorizontal=Zu;Z.ArrangementFixedRoots=Yt;Z.LayerIndividual=Ut; Z.LayerSiblings=gu;Z.LayerUniform=fu;function Wt(a){vq.call(this,a)}na(Wt,vq);Wt.prototype.createVertex=function(){return new Xt(this)};Wt.prototype.createEdge=function(){return new av(this)};Wt.className="TreeNetwork"; -function Xt(a){Jq.call(this,a);this.aa=!1;this.jb=null;this.v=[];this.ob=this.Ma=this.G=this.ma=0;this.ud=null;this.V=new K(0,0);this.Ia=new Hb(0,0);this.qa=new K(0,0);this.dm=this.cm=this.pA=!1;this.$o=this.Oo=null;this.md=nu;this.ed=Qq;this.Lb=0;this.Kb=Qu;this.Hq=this.Gq=0;this.Iq=20;this.ge=50;this.nq=0;this.yp=zu;this.qp=0;this.Zq=25;this.xp=this.Yq=10;this.wp=20;this.gr=!0;this.Pq=hd;this.fr=!0;this.tp=hd}na(Xt,Jq); -Xt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.md=a.sorting,this.ed=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Gq=a.nodeIndent,this.Hq=a.nodeIndentPastParent,this.Iq=a.nodeSpacing,this.ge=a.layerSpacing,this.nq=a.layerSpacingParentOverlap,this.yp=a.compaction,this.qp=a.breadthLimit,this.Zq=a.rowSpacing,this.Yq=a.rowIndent,this.xp=a.commentSpacing,this.wp=a.commentMargin,this.gr=a.setsPortSpot,this.Pq=a.portSpot,this.fr=a.setsChildPortSpot,this.tp=a.childPortSpot)}; -oa.Object.defineProperties(Xt.prototype,{initialized:{configurable:!0,get:function(){return this.aa},set:function(a){this.aa!==a&&(A(a,"boolean",Xt,"initialized"),this.aa=a)}},parent:{configurable:!0,get:function(){return this.jb},set:function(a){this.jb!==a&&(G&&null!==a&&w(a,Xt,Xt,"parent"),this.jb=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",Xt,"children:value");if(null!== +function Xt(a){Jq.call(this,a);this.$=!1;this.jb=null;this.v=[];this.ob=this.Ma=this.G=this.ma=0;this.ud=null;this.V=new K(0,0);this.Ia=new Hb(0,0);this.qa=new K(0,0);this.dm=this.cm=this.pA=!1;this.$o=this.Oo=null;this.md=nu;this.ed=Qq;this.Lb=0;this.Kb=Qu;this.Hq=this.Gq=0;this.Iq=20;this.he=50;this.nq=0;this.yp=zu;this.qp=0;this.Zq=25;this.xp=this.Yq=10;this.wp=20;this.gr=!0;this.Pq=hd;this.fr=!0;this.tp=hd}na(Xt,Jq); +Xt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.md=a.sorting,this.ed=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Gq=a.nodeIndent,this.Hq=a.nodeIndentPastParent,this.Iq=a.nodeSpacing,this.he=a.layerSpacing,this.nq=a.layerSpacingParentOverlap,this.yp=a.compaction,this.qp=a.breadthLimit,this.Zq=a.rowSpacing,this.Yq=a.rowIndent,this.xp=a.commentSpacing,this.wp=a.commentMargin,this.gr=a.setsPortSpot,this.Pq=a.portSpot,this.fr=a.setsChildPortSpot,this.tp=a.childPortSpot)}; +oa.Object.defineProperties(Xt.prototype,{initialized:{configurable:!0,get:function(){return this.$},set:function(a){this.$!==a&&(A(a,"boolean",Xt,"initialized"),this.$=a)}},parent:{configurable:!0,get:function(){return this.jb},set:function(a){this.jb!==a&&(G&&null!==a&&w(a,Xt,Xt,"parent"),this.jb=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",Xt,"children:value");if(null!== a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Gu(c))))):c.alignment===Bu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Gu(c))))):c.alignment===Bu?(e=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Gu(c))))):c.alignment===Bu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Gu(c))))):c.alignment===Bu?(e=d.left+b.x,0===b.x&&m.xc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gthis.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.bb,d=this.pf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.bb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.ce();return!1};kb.prototype.Ad=function(){return this.next()}; -kb.prototype.first=function(){var a=this.Cb;this.ta=a.A;var b=a.s;this.bb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};kb.prototype.any=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};kb.prototype.all=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; -kb.prototype.each=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};kb.prototype.map=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new H;a.s=d;a.xb();return a.iterator}; -kb.prototype.filter=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};kb.prototype.ce=function(){this.key=-1;this.value=null;this.ta=-1;this.Cb.Kg=this};kb.prototype.toString=function(){return"ListIteratorBackwards("+this.bb+"/"+this.Cb.count+")"}; -oa.Object.defineProperties(kb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Cb.s.length}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.Ad;kb.prototype.next=kb.prototype.next;kb.prototype.reset=kb.prototype.reset;kb.className="ListIteratorBackwards"; +gb.prototype.reset=gb.prototype.reset;gb.className="SingletonIterator";function hb(a){this.Cb=a;this.qf=null;a.Ua=null;this.ta=a.A;this.bb=-1}hb.prototype.reset=function(){var a=this.Cb;a.Ua=null;this.ta=a.A;this.bb=-1};hb.prototype.next=function(){var a=this.Cb;if(a.A!==this.ta){if(0>this.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.bb,d=this.qf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.bb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.ce();return!1};ib.prototype.Ad=function(){return this.next()}; +ib.prototype.first=function(){var a=this.Cb;this.ta=a.A;var b=a.s;this.bb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};ib.prototype.any=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};ib.prototype.all=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; +ib.prototype.each=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=b.s,e=d.length;this.bb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};ib.prototype.map=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new H;a.s=d;a.xb();return a.iterator}; +ib.prototype.filter=function(a){var b=this.Cb;b.Kg=null;var c=b.A,d=[],e=b.s,f=e.length;this.bb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};ib.prototype.ce=function(){this.key=-1;this.value=null;this.ta=-1;this.Cb.Kg=this};ib.prototype.toString=function(){return"ListIteratorBackwards("+this.bb+"/"+this.Cb.count+")"}; +oa.Object.defineProperties(ib.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Cb.s.length}}});ib.prototype.first=ib.prototype.first;ib.prototype.hasNext=ib.prototype.Ad;ib.prototype.next=ib.prototype.next;ib.prototype.reset=ib.prototype.reset;ib.className="ListIteratorBackwards"; function H(a){Za(this);this._isFrozen=!1;this.s=[];this.A=0;this.Kg=this.Ua=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=H.prototype;t.xb=function(){var a=this.A;a++;999999999a||a>=b.length)&&Ba(a,"0 <= i < length",H,"elt:i");return b[a]};t.get=function(a){return this.N(a)};t.ad=function(a,b){G&&E(a,H,"setElt:i");var c=this.s;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",H,"setElt:i");this._isFrozen&&xa(this,a);c[a]=b};t.set=function(a,b){this.ad(a,b)};t.first=function(){var a=this.s;return 0===a.length?null:a[0]}; @@ -52,19 +52,19 @@ H.prototype.copy=function(){var a=new H,b=this.s;0=f)return this;(0>b||b>=e-1)&&Ba(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a=e)for(c=d.slice(b),c.sort(a),a=b;a=this.s.length)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new hb(this)}},iteratorBackwards:{configurable:!0, -enumerable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Kg;return null!==a?(a.reset(),a):new kb(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.Ei;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.zv;H.prototype.toArray=H.prototype.Ka;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.sb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Hb; +enumerable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Kg;return null!==a?(a.reset(),a):new ib(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.Ei;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.zv;H.prototype.toArray=H.prototype.Ka;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.sb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Hb; H.prototype.pop=H.prototype.pop;H.prototype.last=H.prototype.lc;H.prototype.first=H.prototype.first;H.prototype.set=H.prototype.set;H.prototype.setElt=H.prototype.ad;H.prototype.get=H.prototype.get;H.prototype.elt=H.prototype.N;H.prototype.indexOf=H.prototype.indexOf;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.clear=H.prototype.clear;H.prototype.addAll=H.prototype.addAll;H.prototype.push=H.prototype.push;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.pa; -H.prototype.freeze=H.prototype.freeze;H.className="List";function mb(a){this.hg=a;a.Ua=null;this.ta=a.A;this.xa=null}mb.prototype.reset=function(){var a=this.hg;a.Ua=null;this.ta=a.A;this.xa=null};mb.prototype.next=function(){var a=this.hg;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};mb.prototype.Ad=function(){return this.next()}; -mb.prototype.first=function(){var a=this.hg;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null};mb.prototype.any=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};mb.prototype.all=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0}; -mb.prototype.each=function(a){var b=this.hg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this};mb.prototype.map=function(a){var b=this.hg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;)c.add(a(e.value)),b.A!==d&&Da(b),e=e.Aa;return c.iterator};mb.prototype.filter=function(a){var b=this.hg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;){var f=e.value;a(f)&&c.add(f);b.A!==d&&Da(b);e=e.Aa}return c.iterator}; -mb.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.hg.Ua=this};mb.prototype.toString=function(){return null!==this.xa?"SetIterator@"+this.xa.value:"SetIterator"};oa.Object.defineProperties(mb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.hg.Ub}}});mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset; -mb.className="SetIterator";function I(a){Za(this);this._isFrozen=!1;this.Vb={};this.Ub=0;this.Ua=null;this.A=0;this.jf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.xb=function(){var a=this.A;a++;999999999=this.Ub)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new mb(this)}}});I.prototype.toList=I.prototype.yv;I.prototype.toArray=I.prototype.Ka; I.prototype.clear=I.prototype.clear;I.prototype.retainAll=I.prototype.oA;I.prototype.removeAll=I.prototype.Xo;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.first=I.prototype.first;I.prototype.containsAny=I.prototype.Ry;I.prototype.containsAll=I.prototype.Qy;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.addAll=I.prototype.addAll;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.pa;I.prototype.freeze=I.prototype.freeze; var pb=1;I.className="Set";I.uniqueHash=Za;I.hashIdUnique=nb;I.hashId=lb;function qb(a){this.ra=a;this.ta=a.A;this.xa=null}qb.prototype.reset=function(){this.ta=this.ra.A;this.xa=null};qb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=this.key=a=b.key,!0;this.ce();return!1};qb.prototype.Ad=function(){return this.next()}; @@ -75,31 +75,31 @@ qb.className="MapKeySetIterator";function rb(a){I.call(this);Za(this);this._isFr t.clear=function(){v("This Set is read-only: "+this.toString())};t.first=function(){var a=this.ra.ja;return null!==a?a.key:null};rb.prototype.any=function(a){for(var b=this.ra.ja;null!==b;){if(a(b.key))return!0;b=b.Aa}return!1};rb.prototype.all=function(a){for(var b=this.ra.ja;null!==b;){if(!a(b.key))return!1;b=b.Aa}return!0};rb.prototype.each=function(a){for(var b=this.ra.ja;null!==b;)a(b.key),b=b.Aa;return this}; rb.prototype.map=function(a){for(var b=new I,c=this.ra.ja;null!==c;)b.add(a(c.key)),c=c.Aa;return b};rb.prototype.filter=function(a){for(var b=new I,c=this.ra.ja;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Aa}return b};rb.prototype.copy=function(){return new rb(this.ra)};rb.prototype.zv=function(){var a=new I,b=this.ra.Vb,c;for(c in b)a.add(b[c].key);return a};rb.prototype.Ka=function(){var a=this.ra.Vb,b=Array(this.ra.Ub),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; rb.prototype.yv=function(){var a=new H,b=this.ra.Vb,c;for(c in b)a.add(b[c].key);return a};oa.Object.defineProperties(rb.prototype,{count:{configurable:!0,get:function(){return this.ra.Ub}},size:{configurable:!0,get:function(){return this.ra.Ub}},iterator:{configurable:!0,get:function(){return 0>=this.ra.Ub?fb:new qb(this.ra)}}});rb.prototype.toList=rb.prototype.yv;rb.prototype.toArray=rb.prototype.Ka;rb.prototype.toSet=rb.prototype.zv; -rb.prototype.first=rb.prototype.first;rb.prototype.clear=rb.prototype.clear;rb.prototype["delete"]=rb.prototype.delete;rb.prototype.remove=rb.prototype.remove;rb.prototype.has=rb.prototype.has;rb.prototype.contains=rb.prototype.contains;rb.prototype.add=rb.prototype.add;rb.prototype.thaw=rb.prototype.pa;rb.prototype.freeze=rb.prototype.freeze;rb.className="MapKeySet";function ub(a){this.ra=a;a.hf=null;this.ta=a.A;this.xa=null} -ub.prototype.reset=function(){var a=this.ra;a.hf=null;this.ta=a.A;this.xa=null};ub.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};ub.prototype.Ad=function(){return this.next()};ub.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -ub.prototype.any=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};ub.prototype.all=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};ub.prototype.each=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this}; -ub.prototype.map=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.value)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};ub.prototype.filter=function(a){var b=this.ra;b.hf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.value;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};ub.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.hf=this}; +rb.prototype.first=rb.prototype.first;rb.prototype.clear=rb.prototype.clear;rb.prototype["delete"]=rb.prototype.delete;rb.prototype.remove=rb.prototype.remove;rb.prototype.has=rb.prototype.has;rb.prototype.contains=rb.prototype.contains;rb.prototype.add=rb.prototype.add;rb.prototype.thaw=rb.prototype.pa;rb.prototype.freeze=rb.prototype.freeze;rb.className="MapKeySet";function ub(a){this.ra=a;a.jf=null;this.ta=a.A;this.xa=null} +ub.prototype.reset=function(){var a=this.ra;a.jf=null;this.ta=a.A;this.xa=null};ub.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.ce();return!1};ub.prototype.Ad=function(){return this.next()};ub.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +ub.prototype.any=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};ub.prototype.all=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};ub.prototype.each=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this}; +ub.prototype.map=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.value)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};ub.prototype.filter=function(a){var b=this.ra;b.jf=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.value;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};ub.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.jf=this}; ub.prototype.toString=function(){return null!==this.xa?"MapValueSetIterator@"+this.xa.value:"MapValueSetIterator"};oa.Object.defineProperties(ub.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Ub}}});ub.prototype.first=ub.prototype.first;ub.prototype.hasNext=ub.prototype.Ad;ub.prototype.next=ub.prototype.next;ub.prototype.reset=ub.prototype.reset;ub.className="MapValueSetIterator"; function ob(a,b){this.key=a;this.value=b;this.nl=this.Aa=null}ob.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};ob.className="KeyValuePair";function vb(a){this.ra=a;a.Ua=null;this.ta=a.A;this.xa=null}vb.prototype.reset=function(){var a=this.ra;a.Ua=null;this.ta=a.A;this.xa=null}; vb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.key=b.key,this.value=b.value,!0;this.ce();return!1};vb.prototype.Ad=function(){return this.next()};vb.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;return null!==a?(this.xa=a,this.key=a.key,this.value=a.value,a):null}; vb.prototype.any=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};vb.prototype.all=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};vb.prototype.each=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d),b.A!==c&&Da(b),d=d.Aa;return this}; vb.prototype.map=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};vb.prototype.filter=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)a(e)&&d.add(e),b.A!==c&&Da(b),e=e.Aa;return d.iterator};vb.prototype.ce=function(){this.value=this.key=null;this.ta=-1;this.ra.Ua=this};vb.prototype.toString=function(){return null!==this.xa?"MapIterator@"+this.xa:"MapIterator"}; oa.Object.defineProperties(vb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Ub}}});vb.prototype.first=vb.prototype.first;vb.prototype.hasNext=vb.prototype.Ad;vb.prototype.next=vb.prototype.next;vb.prototype.reset=vb.prototype.reset;vb.className="MapIterator"; -function yb(a){Za(this);this._isFrozen=!1;this.Vb={};this.Ub=0;this.hf=this.Ua=null;this.A=0;this.jf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=yb.prototype;t.xb=function(){var a=this.A;a++;999999999=this.count)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new vb(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?fb:new qb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return fb; -var a=this.hf;return null!==a?(a.reset(),a):new ub(this)}}});yb.prototype.toKeySet=yb.prototype.Nf;yb.prototype.toArray=yb.prototype.Ka;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete;yb.prototype.remove=yb.prototype.remove;yb.prototype.get=yb.prototype.get;yb.prototype.getValue=yb.prototype.L;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.first=yb.prototype.first;yb.prototype.addAll=yb.prototype.addAll; +var a=this.jf;return null!==a?(a.reset(),a):new ub(this)}}});yb.prototype.toKeySet=yb.prototype.Of;yb.prototype.toArray=yb.prototype.Ka;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete;yb.prototype.remove=yb.prototype.remove;yb.prototype.get=yb.prototype.get;yb.prototype.getValue=yb.prototype.L;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.first=yb.prototype.first;yb.prototype.addAll=yb.prototype.addAll; yb.prototype.set=yb.prototype.set;yb.prototype.add=yb.prototype.add;yb.prototype.thaw=yb.prototype.pa;yb.prototype.freeze=yb.prototype.freeze;yb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var zb,Ab,Bb,Cb,Db;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; -K.prototype.vg=function(a,b){G&&(A(a,"number",K,"setTo:x"),A(b,"number",K,"setTo:y"),this.la());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(w(a,K,K,"set:p"),this.la());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; +K.prototype.wg=function(a,b){G&&(A(a,"number",K,"setTo:x"),A(b,"number",K,"setTo:y"),this.la());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(w(a,K,K,"set:p"),this.la());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Eb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new K(c,e)}return new K} -function Fb(a){G&&w(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ni=function(a,b){return this.J===a&&this.K===b};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(w(a,K,K,"add:p"),this.la());this.J+=a.x;this.K+=a.y;return this};t.qe=function(a){G&&(w(a,K,K,"subtract:p"),this.la());this.J-=a.x;this.K-=a.y;return this}; +function Fb(a){G&&w(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ni=function(a,b){return this.J===a&&this.K===b};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(w(a,K,K,"add:p"),this.la());this.J+=a.x;this.K+=a.y;return this};t.re=function(a){G&&(w(a,K,K,"subtract:p"),this.la());this.J-=a.x;this.K-=a.y;return this}; t.offset=function(a,b){G&&(E(a,K,"offset:dx"),E(b,K,"offset:dy"),this.la());this.J+=a;this.K+=b;return this};K.prototype.rotate=function(a){G&&(E(a,K,"rotate:angle"),this.la());if(0===a)return this;var b=this.J,c=this.K;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.J=a*b-d*c;this.K=d*b+a*c;return this};t=K.prototype; -t.scale=function(a,b){G&&(E(a,K,"scale:sx"),E(b,K,"scale:sy"),this.la());this.J*=a;this.K*=b;return this};t.Cf=function(a){G&&w(a,K,K,"distanceSquaredPoint:p");var b=a.x-this.J;a=a.y-this.K;return b*b+a*a};t.zd=function(a,b){G&&(E(a,K,"distanceSquared:px"),E(b,K,"distanceSquared:py"));a-=this.J;b-=this.K;return a*a+b*b};t.normalize=function(){G&&this.la();var a=this.J,b=this.K,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c} t.Py=function(a,b){G&&(w(a,K,K,"compareWithLineSegmentPoint:p"),w(b,K,K,"compareWithLineSegmentPoint:q"));return L.Gl(a.x,a.y,b.x,b.y,this.x,this.y)};t.eA=function(a,b,c,d){G&&(E(a,K,"projectOntoLineSegment:px"),E(b,K,"projectOntoLineSegment:py"),E(c,K,"projectOntoLineSegment:qx"),E(d,K,"projectOntoLineSegment:qy"));L.qh(a,b,c,d,this.J,this.K,this);return this}; t.fA=function(a,b){G&&(w(a,K,K,"projectOntoLineSegmentPoint:p"),w(b,K,K,"projectOntoLineSegmentPoint:q"));L.qh(a.x,a.y,b.x,b.y,this.J,this.K,this);return this};t.tA=function(a,b,c,d){G&&(E(a,K,"snapToGrid:originx"),E(b,K,"snapToGrid:originy"),E(c,K,"snapToGrid:cellwidth"),E(d,K,"snapToGrid:cellheight"));L.Eo(this.J,this.K,a,b,c,d,this);return this};t.uA=function(a,b){G&&(w(a,K,K,"snapToGridPoint:p"),w(b,Hb,K,"snapToGridPoint:q"));L.Eo(this.J,this.K,a.x,a.y,b.width,b.height,this);return this}; @@ -111,61 +111,61 @@ t.u=function(){return isFinite(this.x)&&isFinite(this.y)};K.alloc=function(){var oa.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",K,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",K,"y"),this.la(a));this.K=a}}});K.prototype.isReal=K.prototype.u;K.prototype.setSpot=K.prototype.Di;K.prototype.setRectSpot=K.prototype.Ci;K.prototype.snapToGridPoint=K.prototype.uA;K.prototype.snapToGrid=K.prototype.tA; K.prototype.projectOntoLineSegmentPoint=K.prototype.fA;K.prototype.projectOntoLineSegment=K.prototype.eA;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(E(a,K,"intersectingLineSegments:a1x"),E(b,K,"intersectingLineSegments:a1y"),E(c,K,"intersectingLineSegments:a2x"),E(d,K,"intersectingLineSegments:a2y"),E(e,K,"intersectingLineSegments:b1x"),E(f,K,"intersectingLineSegments:b1y"),E(g,K,"intersectingLineSegments:b2x"),E(h,K,"intersectingLineSegments:b2y"));return L.Nl(a,b,c,d,e,f,g,h)}; K.prototype.compareWithLineSegmentPoint=K.prototype.Py;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(E(a,K,"compareWithLineSegment:a1x"),E(b,K,"compareWithLineSegment:a1y"),E(c,K,"compareWithLineSegment:a2x"),E(d,K,"compareWithLineSegment:a2y"),E(e,K,"compareWithLineSegment:b1x"),E(f,K,"compareWithLineSegment:b1y"));return L.Gl(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.cb;K.prototype.normalize=K.prototype.normalize; -K.prototype.distanceSquared=K.prototype.zd;K.prototype.distanceSquaredPoint=K.prototype.Cf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.qe;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.fb;K.prototype.equalTo=K.prototype.ni;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.vg;var Ob=[];K.className="Point";K.parse=Eb;K.stringify=Fb; +K.prototype.distanceSquared=K.prototype.zd;K.prototype.distanceSquaredPoint=K.prototype.Df;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.re;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.fb;K.prototype.equalTo=K.prototype.ni;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.wg;var Ob=[];K.className="Point";K.parse=Eb;K.stringify=Fb; K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb;K.Origin=zb=(new K(0,0)).na();K.InfiniteTopLeft=Ab=(new K(-Infinity,-Infinity)).na();K.InfiniteBottomRight=Bb=(new K(Infinity,Infinity)).na();K.SixPoint=Cb=(new K(6,6)).na();K.NoPoint=Db=(new K(NaN,NaN)).na();K.parse=Eb;K.stringify=Fb;K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb; -function Hb(a,b){void 0===a?this.fa=this.ga=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.ga=a,this.fa=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Pb,Qb,Rb,Sb,Tb,Ub,Yb;Hb.prototype.assign=function(a){this.ga=a.ga;this.fa=a.fa;return this};Hb.prototype.h=function(a,b){this.ga=a;this.fa=b;return this}; -Hb.prototype.vg=function(a,b){G&&(A(a,"number",Hb,"setTo:w"),A(b,"number",Hb,"setTo:h"),0>a&&Ba(a,">= 0",Hb,"setTo:w"),0>b&&Ba(b,">= 0",Hb,"setTo:h"),this.la());this.ga=a;this.fa=b;return this};Hb.prototype.set=function(a){G&&(w(a,Hb,Hb,"set:s"),this.la());this.ga=a.ga;this.fa=a.fa;return this};Hb.prototype.copy=function(){var a=new Hb;a.ga=this.ga;a.fa=this.fa;return a};t=Hb.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +function Hb(a,b){void 0===a?this.da=this.fa=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.fa=a,this.da=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Pb,Qb,Rb,Sb,Tb,Ub,Vb;Hb.prototype.assign=function(a){this.fa=a.fa;this.da=a.da;return this};Hb.prototype.h=function(a,b){this.fa=a;this.da=b;return this}; +Hb.prototype.wg=function(a,b){G&&(A(a,"number",Hb,"setTo:w"),A(b,"number",Hb,"setTo:h"),0>a&&Ba(a,">= 0",Hb,"setTo:w"),0>b&&Ba(b,">= 0",Hb,"setTo:h"),this.la());this.fa=a;this.da=b;return this};Hb.prototype.set=function(a){G&&(w(a,Hb,Hb,"set:s"),this.la());this.fa=a.fa;this.da=a.da;return this};Hb.prototype.copy=function(){var a=new Hb;a.fa=this.fa;a.da=this.da;return a};t=Hb.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; -function Zb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Hb(c,e)}return new Hb}function $b(a){G&&w(a,Hb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.D=function(a){return a instanceof Hb?this.ga===a.width&&this.fa===a.height:!1};t.ni=function(a,b){return this.ga===a&&this.fa===b}; -t.fb=function(a){return L.C(this.ga,a.width)&&L.C(this.fa,a.height)};t.u=function(){return isFinite(this.width)&&isFinite(this.height)};Hb.alloc=function(){var a=ac.pop();return void 0===a?new Hb:a};Hb.free=function(a){ac.push(a)}; -oa.Object.defineProperties(Hb.prototype,{width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(A(a,"number",Hb,"width"),this.la(a));0>a&&Ba(a,">= 0",Hb,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",Hb,"height"),this.la(a));0>a&&Ba(a,">= 0",Hb,"height");this.fa=a}}});Hb.prototype.isReal=Hb.prototype.u;Hb.prototype.equalsApprox=Hb.prototype.fb;Hb.prototype.equalTo=Hb.prototype.ni; -Hb.prototype.equals=Hb.prototype.D;Hb.prototype.set=Hb.prototype.set;Hb.prototype.setTo=Hb.prototype.vg;var ac=[];Hb.className="Size";Hb.parse=Zb;Hb.stringify=$b;Hb.ZeroSize=Pb=(new Hb(0,0)).na();Hb.OneSize=Qb=(new Hb(1,1)).na();Hb.SixSize=Rb=(new Hb(6,6)).na();Hb.EightSize=Sb=(new Hb(8,8)).na();Hb.TenSize=Tb=(new Hb(10,10)).na();Hb.InfiniteSize=Ub=(new Hb(Infinity,Infinity)).na();Hb.NoSize=Yb=(new Hb(NaN,NaN)).na();Hb.parse=Zb;Hb.stringify=$b; -function M(a,b,c,d){void 0===a?this.fa=this.ga=this.K=this.J=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.J=a,this.K=b,this.ga=c,this.fa=d):a instanceof K?(c=a.x,a=a.y,b instanceof K?(d=b.x,b=b.y,this.J=Math.min(c,d),this.K=Math.min(a,b),this.ga=Math.abs(c-d),this.fa=Math.abs(a-b)):b instanceof Hb?(this.J=c,this.K=a,this.ga=b.width,this.fa=b.height):v("Incorrect second argument supplied to Rect constructor "+b)):v("Invalid arguments to Rect constructor: "+ -a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.J=a.J;this.K=a.K;this.ga=a.ga;this.fa=a.fa;return this};t.h=function(a,b,c,d){this.J=a;this.K=b;this.ga=c;this.fa=d;return this};function bc(a,b,c){a.ga=b;a.fa=c}t.vg=function(a,b,c,d){G&&(A(a,"number",M,"setTo:x"),A(b,"number",M,"setTo:y"),A(c,"number",M,"setTo:w"),A(d,"number",M,"setTo:h"),0>c&&Ba(c,">= 0",M,"setTo:w"),0>d&&Ba(d,">= 0",M,"setTo:h"),this.la());this.J=a;this.K=b;this.ga=c;this.fa=d;return this}; -t.set=function(a){G&&(w(a,M,M,"set:r"),this.la());this.J=a.J;this.K=a.K;this.ga=a.ga;this.fa=a.fa;return this};t.bd=function(a){G&&(w(a,K,M,"setPoint:p"),this.la());this.J=a.x;this.K=a.y;return this};t.sA=function(a){G&&(w(a,Hb,M,"setSize:s"),this.la());this.ga=a.width;this.fa=a.height;return this};M.prototype.copy=function(){var a=new M;a.J=this.J;a.K=this.K;a.ga=this.ga;a.fa=this.fa;return a};t=M.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +function Zb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Hb(c,e)}return new Hb}function $b(a){G&&w(a,Hb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.D=function(a){return a instanceof Hb?this.fa===a.width&&this.da===a.height:!1};t.ni=function(a,b){return this.fa===a&&this.da===b}; +t.fb=function(a){return L.C(this.fa,a.width)&&L.C(this.da,a.height)};t.Bc=function(a,b){G&&(E(a,Hb,"inflate:w"),E(b,Hb,"inflate:h"));a=this.width+a;this.fa=0<=a?a:0;b=this.height+b;this.da=0<=b?b:0;return this};t.u=function(){return isFinite(this.width)&&isFinite(this.height)};Hb.alloc=function(){var a=ac.pop();return void 0===a?new Hb:a};Hb.free=function(a){ac.push(a)}; +oa.Object.defineProperties(Hb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",Hb,"width"),this.la(a));0>a&&Ba(a,">= 0",Hb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.da},set:function(a){G&&(A(a,"number",Hb,"height"),this.la(a));0>a&&Ba(a,">= 0",Hb,"height");this.da=a}}});Hb.prototype.isReal=Hb.prototype.u;Hb.prototype.inflate=Hb.prototype.Bc;Hb.prototype.equalsApprox=Hb.prototype.fb; +Hb.prototype.equalTo=Hb.prototype.ni;Hb.prototype.equals=Hb.prototype.D;Hb.prototype.set=Hb.prototype.set;Hb.prototype.setTo=Hb.prototype.wg;var ac=[];Hb.className="Size";Hb.parse=Zb;Hb.stringify=$b;Hb.ZeroSize=Pb=(new Hb(0,0)).na();Hb.OneSize=Qb=(new Hb(1,1)).na();Hb.SixSize=Rb=(new Hb(6,6)).na();Hb.EightSize=Sb=(new Hb(8,8)).na();Hb.TenSize=Tb=(new Hb(10,10)).na();Hb.InfiniteSize=Ub=(new Hb(Infinity,Infinity)).na();Hb.NoSize=Vb=(new Hb(NaN,NaN)).na();Hb.parse=Zb;Hb.stringify=$b; +function M(a,b,c,d){void 0===a?this.da=this.fa=this.K=this.J=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.J=a,this.K=b,this.fa=c,this.da=d):a instanceof K?(c=a.x,a=a.y,b instanceof K?(d=b.x,b=b.y,this.J=Math.min(c,d),this.K=Math.min(a,b),this.fa=Math.abs(c-d),this.da=Math.abs(a-b)):b instanceof Hb?(this.J=c,this.K=a,this.fa=b.width,this.da=b.height):v("Incorrect second argument supplied to Rect constructor "+b)):v("Invalid arguments to Rect constructor: "+ +a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.J=a.J;this.K=a.K;this.fa=a.fa;this.da=a.da;return this};t.h=function(a,b,c,d){this.J=a;this.K=b;this.fa=c;this.da=d;return this};function bc(a,b,c){a.fa=b;a.da=c}t.wg=function(a,b,c,d){G&&(A(a,"number",M,"setTo:x"),A(b,"number",M,"setTo:y"),A(c,"number",M,"setTo:w"),A(d,"number",M,"setTo:h"),0>c&&Ba(c,">= 0",M,"setTo:w"),0>d&&Ba(d,">= 0",M,"setTo:h"),this.la());this.J=a;this.K=b;this.fa=c;this.da=d;return this}; +t.set=function(a){G&&(w(a,M,M,"set:r"),this.la());this.J=a.J;this.K=a.K;this.fa=a.fa;this.da=a.da;return this};t.bd=function(a){G&&(w(a,K,M,"setPoint:p"),this.la());this.J=a.x;this.K=a.y;return this};t.sA=function(a){G&&(w(a,Hb,M,"setSize:s"),this.la());this.fa=a.width;this.da=a.height;return this};M.prototype.copy=function(){var a=new M;a.J=this.J;a.K=this.K;a.fa=this.fa;a.da=this.da;return a};t=M.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function cc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new M(c,e,f,g)}return new M}function dc(a){G&&w(a,M);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()} -t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.D=function(a){return a instanceof M?this.J===a.x&&this.K===a.y&&this.ga===a.width&&this.fa===a.height:!1};t.ni=function(a,b,c,d){return this.J===a&&this.K===b&&this.ga===c&&this.fa===d};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)&&L.C(this.ga,a.width)&&L.C(this.fa,a.height)};function ec(a,b){return L.ha(a.J,b.x)&&L.ha(a.K,b.y)&&L.ha(a.ga,b.width)&&L.ha(a.fa,b.height)} -t.ea=function(a){G&&w(a,K,M,"containsPoint:p");return this.J<=a.x&&this.J+this.ga>=a.x&&this.K<=a.y&&this.K+this.fa>=a.y};t.Qe=function(a){G&&w(a,M,M,"containsRect:r");return this.J<=a.x&&a.x+a.width<=this.J+this.ga&&this.K<=a.y&&a.y+a.height<=this.K+this.fa}; -t.contains=function(a,b,c,d){G?(E(a,M,"contains:x"),E(b,M,"contains:y"),void 0===c?c=0:E(c,M,"contains:w"),void 0===d?d=0:E(d,M,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.J<=a&&a+c<=this.J+this.ga&&this.K<=b&&b+d<=this.K+this.fa};t.offset=function(a,b){G&&(E(a,M,"offset:dx"),E(b,M,"offset:dy"),this.la());this.J+=a;this.K+=b;return this}; -t.Wc=function(a,b){G&&(E(a,M,"inflate:w"),E(b,M,"inflate:h"));return fc(this,b,a,b,a)};t.so=function(a){G&&w(a,gc,M,"addMargin:m");return fc(this,a.top,a.right,a.bottom,a.left)};t.xv=function(a){G&&w(a,gc,M,"subtractMargin:m");return fc(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){G&&(E(a,M,"grow:t"),E(b,M,"grow:r"),E(c,M,"grow:b"),E(d,M,"grow:l"));return fc(this,a,b,c,d)}; -function fc(a,b,c,d,e){G&&a.la();var f=a.ga;c+e<=-f?(a.J+=f/2,a.ga=0):(a.J-=e,a.ga+=c+e);c=a.fa;b+d<=-c?(a.K+=c/2,a.fa=0):(a.K-=b,a.fa+=b+d);return a}t.yx=function(a){G&&w(a,M,M,"intersectRect:r");return hc(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){G&&(E(a,M,"intersect:x"),E(b,M,"intersect:y"),E(c,M,"intersect:w"),E(d,M,"intersect:h"),(0>c||0>d)&&v("Rect.intersect:Width and height cannot be negative"));return hc(this,a,b,c,d)}; -function hc(a,b,c,d,e){G&&a.la();var f=Math.max(a.J,b),g=Math.max(a.K,c);b=Math.min(a.J+a.ga,b+d);c=Math.min(a.K+a.fa,c+e);a.J=f;a.K=g;a.ga=Math.max(0,b-f);a.fa=Math.max(0,c-g);return a}t.Yc=function(a){G&&w(a,M,M,"intersectsRect:r");return this.Wu(a.x,a.y,a.width,a.height)}; -t.Wu=function(a,b,c,d){G&&(E(a,M,"intersects:x"),E(b,M,"intersects:y"),E(a,M,"intersects:w"),E(b,M,"intersects:h"),(0>c||0>d)&&v("Rect.intersects:Width and height cannot be negative"));var e=this.ga,f=this.J;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.fa;c=this.K;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; -function kc(a,b){var c=a.ga,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.fa;a=a.K;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Ye=function(a){G&&w(a,K,M,"unionPoint:p");return lc(this,a.x,a.y,0,0)};t.cd=function(a){G&&w(a,M,M,"unionRect:r");return lc(this,a.J,a.K,a.ga,a.fa)}; -t.Bv=function(a,b,c,d){G?(E(a,M,"union:x"),E(b,M,"union:y"),void 0===c?c=0:E(c,M,"union:w"),void 0===d?d=0:E(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.la()):(void 0===c&&(c=0),void 0===d&&(d=0));return lc(this,a,b,c,d)};function lc(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.ga,b+d);c=Math.max(a.K+a.fa,c+e);a.J=f;a.K=g;a.ga=b-f;a.fa=c-g;return a} -t.Di=function(a,b,c){G&&(E(a,M,"setSpot:x"),E(b,M,"setSpot:y"),w(c,Ib,M,"setSpot:spot"),this.la());this.J=a-c.offsetX-c.x*this.ga;this.K=b-c.offsetY-c.y*this.fa;return this}; +t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.D=function(a){return a instanceof M?this.J===a.x&&this.K===a.y&&this.fa===a.width&&this.da===a.height:!1};t.ni=function(a,b,c,d){return this.J===a&&this.K===b&&this.fa===c&&this.da===d};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)&&L.C(this.fa,a.width)&&L.C(this.da,a.height)};function ec(a,b){return L.ha(a.J,b.x)&&L.ha(a.K,b.y)&&L.ha(a.fa,b.width)&&L.ha(a.da,b.height)} +t.ga=function(a){G&&w(a,K,M,"containsPoint:p");return this.J<=a.x&&this.J+this.fa>=a.x&&this.K<=a.y&&this.K+this.da>=a.y};t.Re=function(a){G&&w(a,M,M,"containsRect:r");return this.J<=a.x&&a.x+a.width<=this.J+this.fa&&this.K<=a.y&&a.y+a.height<=this.K+this.da}; +t.contains=function(a,b,c,d){G?(E(a,M,"contains:x"),E(b,M,"contains:y"),void 0===c?c=0:E(c,M,"contains:w"),void 0===d?d=0:E(d,M,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.J<=a&&a+c<=this.J+this.fa&&this.K<=b&&b+d<=this.K+this.da};t.offset=function(a,b){G&&(E(a,M,"offset:dx"),E(b,M,"offset:dy"),this.la());this.J+=a;this.K+=b;return this}; +t.Bc=function(a,b){G&&(E(a,M,"inflate:w"),E(b,M,"inflate:h"));return fc(this,b,a,b,a)};t.so=function(a){G&&w(a,gc,M,"addMargin:m");return fc(this,a.top,a.right,a.bottom,a.left)};t.xv=function(a){G&&w(a,gc,M,"subtractMargin:m");return fc(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){G&&(E(a,M,"grow:t"),E(b,M,"grow:r"),E(c,M,"grow:b"),E(d,M,"grow:l"));return fc(this,a,b,c,d)}; +function fc(a,b,c,d,e){G&&a.la();var f=a.fa;c+e<=-f?(a.J+=f/2,a.fa=0):(a.J-=e,a.fa+=c+e);c=a.da;b+d<=-c?(a.K+=c/2,a.da=0):(a.K-=b,a.da+=b+d);return a}t.zx=function(a){G&&w(a,M,M,"intersectRect:r");return hc(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){G&&(E(a,M,"intersect:x"),E(b,M,"intersect:y"),E(c,M,"intersect:w"),E(d,M,"intersect:h"),(0>c||0>d)&&v("Rect.intersect:Width and height cannot be negative"));return hc(this,a,b,c,d)}; +function hc(a,b,c,d,e){G&&a.la();var f=Math.max(a.J,b),g=Math.max(a.K,c);b=Math.min(a.J+a.fa,b+d);c=Math.min(a.K+a.da,c+e);a.J=f;a.K=g;a.fa=Math.max(0,b-f);a.da=Math.max(0,c-g);return a}t.Yc=function(a){G&&w(a,M,M,"intersectsRect:r");return this.Wu(a.x,a.y,a.width,a.height)}; +t.Wu=function(a,b,c,d){G&&(E(a,M,"intersects:x"),E(b,M,"intersects:y"),E(a,M,"intersects:w"),E(b,M,"intersects:h"),(0>c||0>d)&&v("Rect.intersects:Width and height cannot be negative"));var e=this.fa,f=this.J;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.da;c=this.K;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; +function ic(a,b){var c=a.fa,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.da;a=a.K;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Ze=function(a){G&&w(a,K,M,"unionPoint:p");return lc(this,a.x,a.y,0,0)};t.cd=function(a){G&&w(a,M,M,"unionRect:r");return lc(this,a.J,a.K,a.fa,a.da)}; +t.Bv=function(a,b,c,d){G?(E(a,M,"union:x"),E(b,M,"union:y"),void 0===c?c=0:E(c,M,"union:w"),void 0===d?d=0:E(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.la()):(void 0===c&&(c=0),void 0===d&&(d=0));return lc(this,a,b,c,d)};function lc(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.fa,b+d);c=Math.max(a.K+a.da,c+e);a.J=f;a.K=g;a.fa=b-f;a.da=c-g;return a} +t.Di=function(a,b,c){G&&(E(a,M,"setSpot:x"),E(b,M,"setSpot:y"),w(c,Ib,M,"setSpot:spot"),this.la());this.J=a-c.offsetX-c.x*this.fa;this.K=b-c.offsetY-c.y*this.da;return this}; function mc(a,b,c,d,e,f,g,h){G?(E(a,M,"contains:rx"),E(b,M,"contains:ry"),E(c,M,"contains:rw"),E(d,M,"contains:rh"),E(e,M,"contains:x"),E(f,M,"contains:y"),void 0===g?g=0:E(g,M,"contains:w"),void 0===h?h=0:E(h,M,"contains:h"),(0>c||0>d||0>g||0>h)&&v("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} function nc(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersects:rx"),E(b,M,"intersects:ry"),E(c,M,"intersects:rw"),E(d,M,"intersects:rh"),E(e,M,"intersects:x"),E(f,M,"intersects:y"),E(g,M,"intersects:w"),E(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Oz=function(){return 0===this.width&&0===this.height}; M.alloc=function(){var a=oc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=oc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){oc.push(a)}; -oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"y"),this.la(a));this.K=a}},width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(A(a,"number",M,"width"),this.la(a));0>a&&Ba(a,">= 0",M,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.fa}, -set:function(a){G&&(A(a,"number",M,"height"),this.la(a));0>a&&Ba(a,">= 0",M,"height");this.fa=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"left"),this.la(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"top"),this.la(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.ga},set:function(a){G&&(E(a,M,"right"),this.la(a));this.J+=a-(this.J+this.ga)}}, -bottom:{configurable:!0,get:function(){return this.K+this.fa},set:function(a){G&&(E(a,M,"top"),this.la(a));this.K+=a-(this.K+this.fa)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(w(a,K,M,"position"),this.la(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Hb(this.ga,this.fa)},set:function(a){G&&(w(a,Hb,M,"size"),this.la(a));this.ga=a.width;this.fa=a.height}},center:{configurable:!0, -enumerable:!0,get:function(){return new K(this.J+this.ga/2,this.K+this.fa/2)},set:function(a){G&&(w(a,K,M,"center"),this.la(a));this.J=a.x-this.ga/2;this.K=a.y-this.fa/2}},centerX:{configurable:!0,get:function(){return this.J+this.ga/2},set:function(a){G&&(E(a,M,"centerX"),this.la(a));this.J=a-this.ga/2}},centerY:{configurable:!0,get:function(){return this.K+this.fa/2},set:function(a){G&&(E(a,M,"centerY"),this.la(a));this.K=a-this.fa/2}}});M.prototype.isEmpty=M.prototype.Oz; -M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersectsLineSegment:x"),E(b,M,"intersectsLineSegment:y"),E(c,M,"intersectsLineSegment:w"),E(d,M,"intersectsLineSegment:h"),E(e,M,"intersectsLineSegment:p1x"),E(f,M,"intersectsLineSegment:p1y"),E(g,M,"intersectsLineSegment:p2x"),E(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.zx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Di; -M.prototype.union=M.prototype.Bv;M.prototype.unionRect=M.prototype.cd;M.prototype.unionPoint=M.prototype.Ye;M.prototype.intersects=M.prototype.Wu;M.prototype.intersectsRect=M.prototype.Yc;M.prototype.intersect=M.prototype.Vu;M.prototype.intersectRect=M.prototype.yx;M.prototype.grow=M.prototype.Iz;M.prototype.subtractMargin=M.prototype.xv;M.prototype.addMargin=M.prototype.so;M.prototype.inflate=M.prototype.Wc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; -M.prototype.containsRect=M.prototype.Qe;M.prototype.containsPoint=M.prototype.ea;M.prototype.equalsApprox=M.prototype.fb;M.prototype.equalTo=M.prototype.ni;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.sA;M.prototype.setPoint=M.prototype.bd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.vg;var pc=null,qc=null,oc=[];M.className="Rect";M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;M.ZeroRect=pc=(new M(0,0,0,0)).na();M.NoRect=qc=(new M(NaN,NaN,NaN,NaN)).na(); -M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;function gc(a,b,c,d){void 0===a?this.Ee=this.ve=this.Ne=this.Oe=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}gc.prototype.assign=function(a){this.Oe=a.Oe;this.Ne=a.Ne;this.ve=a.ve;this.Ee=a.Ee;return this}; -gc.prototype.vg=function(a,b,c,d){G&&(A(a,"number",gc,"setTo:t"),A(b,"number",gc,"setTo:r"),A(c,"number",gc,"setTo:b"),A(d,"number",gc,"setTo:l"),this.la());this.Oe=a;this.Ne=b;this.ve=c;this.Ee=d;return this};gc.prototype.set=function(a){G&&(w(a,gc,gc,"assign:m"),this.la());this.Oe=a.Oe;this.Ne=a.Ne;this.ve=a.ve;this.Ee=a.Ee;return this};gc.prototype.copy=function(){var a=new gc;a.Oe=this.Oe;a.Ne=this.Ne;a.ve=this.ve;a.Ee=this.Ee;return a};t=gc.prototype; +oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"y"),this.la(a));this.K=a}},width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",M,"width"),this.la(a));0>a&&Ba(a,">= 0",M,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.da}, +set:function(a){G&&(A(a,"number",M,"height"),this.la(a));0>a&&Ba(a,">= 0",M,"height");this.da=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",M,"left"),this.la(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(A(a,"number",M,"top"),this.la(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.fa},set:function(a){G&&(E(a,M,"right"),this.la(a));this.J+=a-(this.J+this.fa)}}, +bottom:{configurable:!0,get:function(){return this.K+this.da},set:function(a){G&&(E(a,M,"top"),this.la(a));this.K+=a-(this.K+this.da)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(w(a,K,M,"position"),this.la(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Hb(this.fa,this.da)},set:function(a){G&&(w(a,Hb,M,"size"),this.la(a));this.fa=a.width;this.da=a.height}},center:{configurable:!0, +enumerable:!0,get:function(){return new K(this.J+this.fa/2,this.K+this.da/2)},set:function(a){G&&(w(a,K,M,"center"),this.la(a));this.J=a.x-this.fa/2;this.K=a.y-this.da/2}},centerX:{configurable:!0,get:function(){return this.J+this.fa/2},set:function(a){G&&(E(a,M,"centerX"),this.la(a));this.J=a-this.fa/2}},centerY:{configurable:!0,get:function(){return this.K+this.da/2},set:function(a){G&&(E(a,M,"centerY"),this.la(a));this.K=a-this.da/2}}});M.prototype.isEmpty=M.prototype.Oz; +M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(E(a,M,"intersectsLineSegment:x"),E(b,M,"intersectsLineSegment:y"),E(c,M,"intersectsLineSegment:w"),E(d,M,"intersectsLineSegment:h"),E(e,M,"intersectsLineSegment:p1x"),E(f,M,"intersectsLineSegment:p1y"),E(g,M,"intersectsLineSegment:p2x"),E(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.Ax(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Di; +M.prototype.union=M.prototype.Bv;M.prototype.unionRect=M.prototype.cd;M.prototype.unionPoint=M.prototype.Ze;M.prototype.intersects=M.prototype.Wu;M.prototype.intersectsRect=M.prototype.Yc;M.prototype.intersect=M.prototype.Vu;M.prototype.intersectRect=M.prototype.zx;M.prototype.grow=M.prototype.Iz;M.prototype.subtractMargin=M.prototype.xv;M.prototype.addMargin=M.prototype.so;M.prototype.inflate=M.prototype.Bc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; +M.prototype.containsRect=M.prototype.Re;M.prototype.containsPoint=M.prototype.ga;M.prototype.equalsApprox=M.prototype.fb;M.prototype.equalTo=M.prototype.ni;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.sA;M.prototype.setPoint=M.prototype.bd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.wg;var pc=null,qc=null,oc=[];M.className="Rect";M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;M.ZeroRect=pc=(new M(0,0,0,0)).na();M.NoRect=qc=(new M(NaN,NaN,NaN,NaN)).na(); +M.parse=cc;M.stringify=dc;M.contains=mc;M.intersects=nc;function gc(a,b,c,d){void 0===a?this.Fe=this.we=this.Oe=this.Pe=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}gc.prototype.assign=function(a){this.Pe=a.Pe;this.Oe=a.Oe;this.we=a.we;this.Fe=a.Fe;return this}; +gc.prototype.wg=function(a,b,c,d){G&&(A(a,"number",gc,"setTo:t"),A(b,"number",gc,"setTo:r"),A(c,"number",gc,"setTo:b"),A(d,"number",gc,"setTo:l"),this.la());this.Pe=a;this.Oe=b;this.we=c;this.Fe=d;return this};gc.prototype.set=function(a){G&&(w(a,gc,gc,"assign:m"),this.la());this.Pe=a.Pe;this.Oe=a.Oe;this.we=a.we;this.Fe=a.Fe;return this};gc.prototype.copy=function(){var a=new gc;a.Pe=this.Pe;a.Oe=this.Oe;a.we=this.we;a.Fe=this.Fe;return a};t=gc.prototype; t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function rc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new gc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new gc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new gc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new gc(c,e):new gc(c,e,f,g)}return new gc} -function wc(a){G&&w(a,gc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.D=function(a){return a instanceof gc?this.Oe===a.top&&this.Ne===a.right&&this.ve===a.bottom&&this.Ee===a.left:!1};t.ni=function(a,b,c,d){return this.Oe===a&&this.Ne===b&&this.ve===c&&this.Ee===d}; -t.fb=function(a){return L.C(this.Oe,a.top)&&L.C(this.Ne,a.right)&&L.C(this.ve,a.bottom)&&L.C(this.Ee,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};gc.alloc=function(){var a=xc.pop();return void 0===a?new gc:a};gc.free=function(a){xc.push(a)}; -oa.Object.defineProperties(gc.prototype,{top:{configurable:!0,get:function(){return this.Oe},set:function(a){G&&(E(a,gc,"top"),this.la(a));this.Oe=a}},right:{configurable:!0,get:function(){return this.Ne},set:function(a){G&&(E(a,gc,"right"),this.la(a));this.Ne=a}},bottom:{configurable:!0,get:function(){return this.ve},set:function(a){G&&(E(a,gc,"bottom"),this.la(a));this.ve=a}},left:{configurable:!0,get:function(){return this.Ee},set:function(a){G&& -(E(a,gc,"left"),this.la(a));this.Ee=a}}});gc.prototype.isReal=gc.prototype.u;gc.prototype.equalsApprox=gc.prototype.fb;gc.prototype.equalTo=gc.prototype.ni;gc.prototype.equals=gc.prototype.D;gc.prototype.set=gc.prototype.set;gc.prototype.setTo=gc.prototype.vg;var yc=null,zc=null,xc=[];gc.className="Margin";gc.parse=rc;gc.stringify=wc;gc.ZeroMargin=yc=(new gc(0,0,0,0)).na();gc.TwoMargin=zc=(new gc(2,2,2,2)).na();gc.parse=rc;gc.stringify=wc; -function Ib(a,b,c,d){void 0===a?this.ke=this.je=this.K=this.J=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1}var Ec,Fc,Gc,Hc,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,ed,fd,gd,hd,id,jd,kd,ld,md,pd,qd,rd,sd,td;Ib.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.je=a.je;this.ke=a.ke;return this}; -Ib.prototype.vg=function(a,b,c,d){G&&(ud(a,"setTo:x"),ud(b,"setTo:y"),vd(c,"setTo:offx"),vd(d,"setTo:offy"),this.la());this.J=a;this.K=b;this.je=c;this.ke=d;return this};Ib.prototype.set=function(a){G&&(w(a,Ib,Ib,"set:s"),this.la());this.J=a.J;this.K=a.K;this.je=a.je;this.ke=a.ke;return this};Ib.prototype.copy=function(){var a=new Ib;a.J=this.J;a.K=this.K;a.je=this.je;a.ke=this.ke;return a};t=Ib.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; -t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function wd(a,b){a.J=NaN;a.K=NaN;a.je=b;return a} +function sc(a){G&&w(a,gc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.D=function(a){return a instanceof gc?this.Pe===a.top&&this.Oe===a.right&&this.we===a.bottom&&this.Fe===a.left:!1};t.ni=function(a,b,c,d){return this.Pe===a&&this.Oe===b&&this.we===c&&this.Fe===d}; +t.fb=function(a){return L.C(this.Pe,a.top)&&L.C(this.Oe,a.right)&&L.C(this.we,a.bottom)&&L.C(this.Fe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};gc.alloc=function(){var a=xc.pop();return void 0===a?new gc:a};gc.free=function(a){xc.push(a)}; +oa.Object.defineProperties(gc.prototype,{top:{configurable:!0,get:function(){return this.Pe},set:function(a){G&&(E(a,gc,"top"),this.la(a));this.Pe=a}},right:{configurable:!0,get:function(){return this.Oe},set:function(a){G&&(E(a,gc,"right"),this.la(a));this.Oe=a}},bottom:{configurable:!0,get:function(){return this.we},set:function(a){G&&(E(a,gc,"bottom"),this.la(a));this.we=a}},left:{configurable:!0,get:function(){return this.Fe},set:function(a){G&& +(E(a,gc,"left"),this.la(a));this.Fe=a}}});gc.prototype.isReal=gc.prototype.u;gc.prototype.equalsApprox=gc.prototype.fb;gc.prototype.equalTo=gc.prototype.ni;gc.prototype.equals=gc.prototype.D;gc.prototype.set=gc.prototype.set;gc.prototype.setTo=gc.prototype.wg;var yc=null,zc=null,xc=[];gc.className="Margin";gc.parse=rc;gc.stringify=sc;gc.ZeroMargin=yc=(new gc(0,0,0,0)).na();gc.TwoMargin=zc=(new gc(2,2,2,2)).na();gc.parse=rc;gc.stringify=sc; +function Ib(a,b,c,d){void 0===a?this.le=this.ke=this.K=this.J=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1}var Ec,Fc,Gc,Hc,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,ed,fd,gd,hd,id,jd,kd,ld,md,pd,qd,rd,sd,td;Ib.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.ke=a.ke;this.le=a.le;return this}; +Ib.prototype.wg=function(a,b,c,d){G&&(ud(a,"setTo:x"),ud(b,"setTo:y"),vd(c,"setTo:offx"),vd(d,"setTo:offy"),this.la());this.J=a;this.K=b;this.ke=c;this.le=d;return this};Ib.prototype.set=function(a){G&&(w(a,Ib,Ib,"set:s"),this.la());this.J=a.J;this.K=a.K;this.ke=a.ke;this.le=a.le;return this};Ib.prototype.copy=function(){var a=new Ib;a.J=this.J;a.K=this.K;a.ke=this.ke;a.le=this.le;return a};t=Ib.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this}; +t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function wd(a,b){a.J=NaN;a.K=NaN;a.ke=b;return a} function ud(a,b){(isNaN(a)||1a)&&Ba(a,"0 <= "+b+" <= 1",Ib,b)}function vd(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&Ba(a,"real number, not NaN or Infinity",Ib,b)} function xd(a){if("string"===typeof a){a=a.trim();if("None"===a)return Ec;if("TopLeft"===a)return Fc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Gc;if("TopRight"===a)return Hc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Jc;if("Center"===a)return Kc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Lc;if("BottomLeft"===a)return Mc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Nc;if("BottomRight"===a)return Oc;if("TopSide"===a)return Qc;if("LeftSide"=== a)return Rc;if("RightSide"===a)return Sc;if("BottomSide"===a)return Tc;if("TopBottomSides"===a)return Uc;if("LeftRightSides"===a)return Vc;if("TopLeftSides"===a)return Wc;if("TopRightSides"===a)return Xc;if("BottomLeftSides"===a)return Yc;if("BottomRightSides"===a)return Zc;if("NotTopSide"===a)return $c;if("NotLeftSide"===a)return ad;if("NotRightSide"===a)return ed;if("NotBottomSide"===a)return fd;if("AllSides"===a)return gd;if("Default"===a)return hd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=L.Mv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);L.Mv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=L.Mv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);L.Mv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Or:function(a,b,c,d,e,f,g,h,k,l,m,n){if(L.Yb(a,b,g,h,n,c,d)&&L.Yb(a,b,g,h,n,e,f))return L.Yb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var x=(d+q)/2,y=(c+u)/2;return L.Or(a, -b,p,r,d,c,x,y,k,l,m,n)||L.Or(x,y,q,u,e,f,g,h,k,l,m,n)},Ky:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Jy:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Nb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))lc(l,a,b,0,0),lc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ -2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Dl(a,b,m,n,d,c,q,u,k,l);L.Dl(q,u,p,r,e,f,g,h,k,l)}return l},Pe:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Pe(a,b,m,n,d,c,q,u,k,l);L.Pe(q,u,p,r,e,f,g,h,k,l)}return l},gv:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,e,f,l,c,d))return L.Yb(a, +b,p,r,d,c,x,y,k,l,m,n)||L.Or(x,y,q,u,e,f,g,h,k,l,m,n)},Uw:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Ky:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Nb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))lc(l,a,b,0,0),lc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ +2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Dl(a,b,m,n,d,c,q,u,k,l);L.Dl(q,u,p,r,e,f,g,h,k,l)}return l},Qe:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,g,h,k,c,d)&&L.Yb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;L.Qe(a,b,m,n,d,c,q,u,k,l);L.Qe(q,u,p,r,e,f,g,h,k,l)}return l},gv:function(a,b,c,d,e,f,g,h,k,l){if(L.Yb(a,b,e,f,l,c,d))return L.Yb(a, b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2;return L.gv(a,b,m,n,p,r,g,h,k,l)||L.gv(p,r,c,d,e,f,g,h,k,l)},NA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},fv:function(a,b,c,d,e,f,g,h){if(L.Yb(a,b,e,f,g,c,d))lc(h,a,b,0,0),lc(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;L.fv(a,b,k,l,m,n,g,h);L.fv(m,n,c,d,e,f,g,h)}return h},To:function(a,b,c,d,e,f,g,h){if(L.Yb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;L.To(a,b,k,l,m,n,g,h);L.To(m,n,c,d,e,f,g,h)}return h},uo:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(L.Yb(a,b,g,h,p,c,d)&&L.Yb(a,b,g,h,p,e,f)){if(!L.Nl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,x=(c+e)/2,y=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+x)/2;c=(u+y)/2;x=(x+e)/ 2;y=(y+f)/2;var z=(d+x)/2,B=(c+y)/2,C=Infinity,D=!1,J=0,U=0;L.uo(a,b,q,u,d,c,z,B,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var x=(c+e)/2,y=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+x)/2;c=(u+y)/2;x=(x+e)/2;y=(y+f)/2;var z=(d+x)/2,B=(c+y)/2;r+=L.vo(a,b,q,u,d,c,z,B,k,l,m,n,p);r+=L.vo(z,B,x,y,e,f,g,h,k,l,m,n,p)}return r},qh:function(a,b,c,d,e,f,g){if(L.ha(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(L.ha(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, -b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(L.ha(h,g))return L.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(L.ha(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return L.qh(a,b,c,d,e,g*(e-a)+b,k)},LA:function(a,b,c,d,e){return L.Ve(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},KA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},Hf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(L.Ve(a,b,a, -d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},JA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, -h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},es:function(a,b,c){return L.zx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},zx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):mc(a,b,c,d,e,f)||mc(a,b,c,d,g,h)||L.Nl(a,b,k,b,e,f,g,h)||L.Nl(k,b,k,l,e,f,g,h)||L.Nl(k,l,a,l,e,f,g,h)||L.Nl(a,l,a,b,e,f,g,h)?!0:!1},Nl:function(a,b,c,d,e,f,g,h){return 0>=L.Gl(a,b,c,d,e,f)*L.Gl(a,b,c,d,g,h)&&0>=L.Gl(e,f,g,h,a,b)*L.Gl(e, -f,g,h,c,d)},Gl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Ro:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Zw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5a)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, +b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(L.ha(h,g))return L.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(L.ha(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return L.qh(a,b,c,d,e,g*(e-a)+b,k)},LA:function(a,b,c,d,e){return L.We(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},KA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},If:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(L.We(a,b,a, +d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},JA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, +h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},es:function(a,b,c){return L.Ax(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},Ax:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):mc(a,b,c,d,e,f)||mc(a,b,c,d,g,h)||L.Nl(a,b,k,b,e,f,g,h)||L.Nl(k,b,k,l,e,f,g,h)||L.Nl(k,l,a,l,e,f,g,h)||L.Nl(a,l,a,b,e,f,g,h)?!0:!1},Nl:function(a,b,c,d,e,f,g,h){return 0>=L.Gl(a,b,c,d,e,f)*L.Gl(a,b,c,d,g,h)&&0>=L.Gl(e,f,g,h,a,b)*L.Gl(e, +f,g,h,c,d)},Gl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Ro:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},$w:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fc,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case N.v:var b=new M(this.startX,this.startY,0,0);b.Bv(this.endX,this.endY,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 N.G:b=new M(this.startX,this.startY,0,0);b.Bv(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.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 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case N.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=C-1?!0:null!==l[u+1].match(D)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());x===x.toLowerCase()&&(b=B.x+b,c=B.y+c);a.h(b,c)}function f(){e(B);return B}function g(){e(z);return z}function h(){var a=y.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?B:new K(2*B.x-z.x,2*B.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2");a=a.replace(k,"$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(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;ag&&(g+=360),q.startAngle+=g);0>a&&(q.startAngle=180-q.startAngle,q.sweepAngle=-q.sweepAngle); 0>d&&(q.startAngle=-q.startAngle,q.sweepAngle=-q.sweepAngle);q.radiusX*=Math.sqrt(a*a+c*c);void 0!==q.radiusY&&(q.radiusY*=Math.sqrt(b*b+d*d));break;case $d:g=q.endX;h=q.endY;q.endX=g*a+h*c+e;q.endY=g*b+h*d+f;if(0===q.radiusX||0===q.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),q.xAxisRotation+=g);0>a&&(q.xAxisRotation=180-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);0>d&&(q.xAxisRotation=-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);q.radiusX*=Math.sqrt(a*a+c*c); q.radiusY*=Math.sqrt(b*b+d*d);break;default:v("Unknown Segment type: "+q.type)}}}}this._isInvalidBounds=!0;return this}; -t.ea=function(a,b){void 0===b&&(b=0);var c=this.nd,d=this.od,e=this.Cc,f=this.Dc;switch(this.type){case N.j:return L.Yb(c,d,e,f,b,a.x,a.y);case N.v:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ea(a);M.free(g);return a;case N.G:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return fe(this,a,b,!0,!1);default:return!1}}; -function fe(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.m:return fe(this,a,b,!0,!1);default:return!1}}; +function fe(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; -t.ox=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; +t.px=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Ru=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Math.abs(e-c)?0<=a-h?90:270:1>Math.abs(a-h)?0<=e-c?0:180:180*Math.atan2(a-h,e-c)/Math.PI,b;g+=m}}return b}; -t.px=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; +t.qx=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=K.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Le=a,this.$h=0,G&&E(d,ke,"x1"),this.ai=Math.max(d,0),G&&E(e,ke,"y1"),this.Rg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= -!0)):(G&&E(d,ke,"x1"),this.Le=d,G&&E(e,ke,"y1"),this.$h=e,G&&E(f,ke,"x2"),a===Zd&&(f=Math.max(f,0)),this.ai=f,"number"===typeof g?(a===Zd&&(g=Math.max(g,0)),this.Rg=g):this.Rg=0);this.$d=null}ke.prototype.copy=function(){var a=new ke;a.wa=this.wa;a.m=this.m&-2;a.Cc=this.Cc;a.Dc=this.Dc;a.Le=this.Le;a.$h=this.$h;a.ai=this.ai;a.Rg=this.Rg;return a};t=ke.prototype; +function ke(a,b,c,d,e,f,g,h){Za(this);void 0===a?a=Dd:G&&ab(a,ke,ke,"constructor:type");this.wa=a;this.o=2;void 0!==b?(G&&E(b,ke,"ex"),this.Dc=b):this.Dc=0;void 0!==c?(G&&E(c,ke,"ey"),this.Ec=c):this.Ec=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===$d?(a=f%360,0>a&&(a+=360),this.Me=a,this.$h=0,G&&E(d,ke,"x1"),this.ai=Math.max(d,0),G&&E(e,ke,"y1"),this.Rg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= +!0)):(G&&E(d,ke,"x1"),this.Me=d,G&&E(e,ke,"y1"),this.$h=e,G&&E(f,ke,"x2"),a===Zd&&(f=Math.max(f,0)),this.ai=f,"number"===typeof g?(a===Zd&&(g=Math.max(g,0)),this.Rg=g):this.Rg=0);this.$d=null}ke.prototype.copy=function(){var a=new ke;a.wa=this.wa;a.o=this.o&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Me=this.Me;a.$h=this.$h;a.ai=this.ai;a.Rg=this.Rg;return a};t=ke.prototype; t.fb=function(a){if(!(a instanceof ke)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Wd:case Dd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Xd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Yd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Zd:return L.C(this.startAngle, a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case $d:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.ub=function(a){a.classType===ke?this.type=a:Ea(this,a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Wd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Dd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Xd:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Yd:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Zd:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case $d:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function ae(a,b){if(null!==a.$d&&!1===b._isInvalidBounds)return a.$d;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$d=[],a.$d;b=a.Le;var e=a.$h,f=L.Zw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=L.Zw(0,0,b>f?b:f,m,m+g,!0);f=Jb.alloc();f.reset();f.translate(c,d);f.rotate(a.Le,0,0);f.scale(k,r);N.Ma(b,f); +function ae(a,b){if(null!==a.$d&&!1===b._isInvalidBounds)return a.$d;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.$d=[],a.$d;b=a.Me;var e=a.$h,f=L.$w(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=L.$w(0,0,b>f?b:f,m,m+g,!0);f=Jb.alloc();f.reset();f.translate(c,d);f.rotate(a.Me,0,0);f.scale(k,r);N.Ma(b,f); Jb.free(f);a.$d=b;return a.$d} -oa.Object.defineProperties(ke.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.m&1)},set:function(a){this.m=a?this.m|1:this.m&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.m&2)},set:function(a){this.m=a?this.m|2:this.m&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.m&8)},set:function(a){this.isClosed!==a&&(this.m=a?this.m|8:this.m&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, -get:function(){return this.wa},set:function(a){G&&ab(a,ke,ke,"type");this._isFrozen&&xa(this,a);this.wa=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Cc},set:function(a){G&&E(a,ke,"endX");this._isFrozen&&xa(this,a);this.Cc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"endY");this._isFrozen&&xa(this,a);this.Dc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, -get:function(){return this.Le},set:function(a){G&&E(a,ke,"point1X");this._isFrozen&&xa(this,a);this.Le=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"point1Y");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.ai},set:function(a){G&&E(a,ke,"point2X");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, -get:function(){return this.Rg},set:function(a){G&&E(a,ke,"point2Y");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Le},set:function(a){G&&E(a,ke,"centerX");this._isFrozen&&xa(this,a);this.Le=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"centerY");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, -get:function(){return this.ai},set:function(a){G&&E(a,ke,"radiusX");0>a&&Ba(a,">= zero",ke,"radiusX");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.Rg},set:function(a){G&&E(a,ke,"radiusY");0>a&&Ba(a,">= zero",ke,"radiusY");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Cc},set:function(a){G&&E(a,ke,"startAngle");this._isFrozen&&xa(this, -a);a%=360;0>a&&(a+=360);this.Cc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Dc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.m&4)},set:function(a){this._isFrozen&&xa(this,a);this.m=a?this.m|4:this.m&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== -(this.m&16)},set:function(a){this._isFrozen&&xa(this,a);this.m=a?this.m|16:this.m&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Le},set:function(a){G&&E(a,ke,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Le=a;this._isInvalidBounds=!0}}});ke.prototype.equalsApprox=ke.prototype.fb; -var Wd=new F(ke,"Move",0),Dd=new F(ke,"Line",1),Xd=new F(ke,"Bezier",2),Yd=new F(ke,"QuadraticBezier",3),Zd=new F(ke,"Arc",4),$d=new F(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Wd;ke.Line=Dd;ke.Bezier=Xd;ke.QuadraticBezier=Yd;ke.Arc=Zd;ke.SvgArc=$d;function me(){this.H=null;this.pu=(new K(0,0)).freeze();this.at=(new K(0,0)).freeze();this.rp=this.Dq=0;this.sp=1;this.Kh="";this.Ir=this.Kp=!1;this.Ip=this.vp=0;this.zg=this.bq=this.iq=!1;this.Pp=null;this.Dr=0;this.yd=this.zr=null} -me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.H=this.H;a.pu.assign(this.viewPoint);a.at.assign(this.documentPoint);a.Dq=this.Dq;a.rp=this.rp;a.sp=this.sp;a.Kh=this.Kh;a.Kp=this.Kp;a.Ir=this.Ir;a.vp=this.vp;a.Ip=this.Ip;a.iq=this.iq;a.bq=this.bq;a.zg=this.zg;a.Pp=this.Pp;a.Dr=this.Dr;a.zr=this.zr;a.yd=this.yd;return a}; +oa.Object.defineProperties(ke.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.o&1)},set:function(a){this.o=a?this.o|1:this.o&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.o&2)},set:function(a){this.o=a?this.o|2:this.o&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.o&8)},set:function(a){this.isClosed!==a&&(this.o=a?this.o|8:this.o&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, +get:function(){return this.wa},set:function(a){G&&ab(a,ke,ke,"type");this._isFrozen&&xa(this,a);this.wa=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"endX");this._isFrozen&&xa(this,a);this.Dc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Ec},set:function(a){G&&E(a,ke,"endY");this._isFrozen&&xa(this,a);this.Ec=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, +get:function(){return this.Me},set:function(a){G&&E(a,ke,"point1X");this._isFrozen&&xa(this,a);this.Me=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"point1Y");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.ai},set:function(a){G&&E(a,ke,"point2X");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, +get:function(){return this.Rg},set:function(a){G&&E(a,ke,"point2Y");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Me},set:function(a){G&&E(a,ke,"centerX");this._isFrozen&&xa(this,a);this.Me=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.$h},set:function(a){G&&E(a,ke,"centerY");this._isFrozen&&xa(this,a);this.$h=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, +get:function(){return this.ai},set:function(a){G&&E(a,ke,"radiusX");0>a&&Ba(a,">= zero",ke,"radiusX");this._isFrozen&&xa(this,a);this.ai=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.Rg},set:function(a){G&&E(a,ke,"radiusY");0>a&&Ba(a,">= zero",ke,"radiusY");this._isFrozen&&xa(this,a);this.Rg=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Dc},set:function(a){G&&E(a,ke,"startAngle");this._isFrozen&&xa(this, +a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Ec},set:function(a){G&&E(a,ke,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.o&4)},set:function(a){this._isFrozen&&xa(this,a);this.o=a?this.o|4:this.o&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== +(this.o&16)},set:function(a){this._isFrozen&&xa(this,a);this.o=a?this.o|16:this.o&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Me},set:function(a){G&&E(a,ke,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Me=a;this._isInvalidBounds=!0}}});ke.prototype.equalsApprox=ke.prototype.fb; +var Wd=new F(ke,"Move",0),Dd=new F(ke,"Line",1),Xd=new F(ke,"Bezier",2),Yd=new F(ke,"QuadraticBezier",3),Zd=new F(ke,"Arc",4),$d=new F(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Wd;ke.Line=Dd;ke.Bezier=Xd;ke.QuadraticBezier=Yd;ke.Arc=Zd;ke.SvgArc=$d;function me(){this.H=null;this.pu=(new K(0,0)).freeze();this.at=(new K(0,0)).freeze();this.rp=this.Dq=0;this.sp=1;this.Kh="";this.Ir=this.Kp=!1;this.Ip=this.vp=0;this.Ag=this.bq=this.iq=!1;this.Pp=null;this.Dr=0;this.yd=this.zr=null} +me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.H=this.H;a.pu.assign(this.viewPoint);a.at.assign(this.documentPoint);a.Dq=this.Dq;a.rp=this.rp;a.sp=this.sp;a.Kh=this.Kh;a.Kp=this.Kp;a.Ir=this.Ir;a.vp=this.vp;a.Ip=this.Ip;a.iq=this.iq;a.bq=this.bq;a.Ag=this.Ag;a.Pp=this.Pp;a.Dr=this.Dr;a.zr=this.zr;a.yd=this.yd;return a}; me.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};me.prototype.Ho=function(a,b){var c=this.diagram;if(null===c)return b;ne(c,this.event,a,b);return b}; me.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;ne(c,this.event,a,b);b.assign(c.Es(b));return b}; oa.Object.defineProperties(me.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.pu},set:function(a){w(a,K,me,"viewPoint");this.pu.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.at},set:function(a){w(a,K,me,"documentPoint");this.at.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq= a}},button:{configurable:!0,get:function(){return this.rp},set:function(a){this.rp=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{configurable:!0,get:function(){return this.sp},set:function(a){this.sp=a}},key:{configurable:!0,get:function(){return this.Kh},set:function(a){this.Kh=a}},down:{configurable:!0,get:function(){return this.Kp},set:function(a){this.Kp=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.Ir},set:function(a){this.Ir=a}},clickCount:{configurable:!0,get:function(){return this.vp},set:function(a){this.vp=a}},delta:{configurable:!0,get:function(){return this.Ip},set:function(a){this.Ip=a}},isMultiTouch:{configurable:!0,get:function(){return this.iq},set:function(a){this.iq=a}},handled:{configurable:!0,get:function(){return this.bq},set:function(a){this.bq=a}},bubbles:{configurable:!0, -get:function(){return this.zg},set:function(a){this.zg=a}},event:{configurable:!0,get:function(){return this.Pp},set:function(a){this.Pp=a}},isTouchEvent:{configurable:!0,get:function(){var a=sa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=sa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.Dr},set:function(a){this.Dr=a}},targetDiagram:{configurable:!0, +get:function(){return this.Ag},set:function(a){this.Ag=a}},event:{configurable:!0,get:function(){return this.Pp},set:function(a){this.Pp=a}},isTouchEvent:{configurable:!0,get:function(){var a=sa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=sa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.Dr},set:function(a){this.Dr=a}},targetDiagram:{configurable:!0, get:function(){return this.zr},set:function(a){this.zr=a}},targetObject:{configurable:!0,get:function(){return this.yd},set:function(a){this.yd=a}},control:{configurable:!0,get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{configurable:!0,get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{configurable:!0, get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{configurable:!0,get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{configurable:!0,get: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},set:function(a){this.buttons= a?this.buttons|1:this.buttons&-2}},right:{configurable:!0,get: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},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{configurable:!0,get: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},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});me.prototype.getMultiTouchDocumentPoint=me.prototype.Cz;me.prototype.getMultiTouchViewPoint=me.prototype.Ho;me.className="InputEvent";function oe(){this.H=null;this.Ca="";this.Mq=this.vr=null}oe.prototype.copy=function(){var a=new oe;a.H=this.H;a.Ca=this.Ca;a.vr=this.vr;a.Mq=this.Mq;return a}; oe.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; oa.Object.defineProperties(oe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},subject:{configurable:!0,get:function(){return this.vr},set:function(a){this.vr=a}},parameter:{configurable:!0,get:function(){return this.Mq},set:function(a){this.Mq=a}}});oe.className="DiagramEvent"; -function pe(){this.Am=qe;this.qf=this.Cq="";this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}pe.prototype.clear=function(){this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}; -pe.prototype.copy=function(){var a=new pe;a.Am=this.Am;a.Cq=this.Cq;a.qf=this.qf;a.fc=this.fc;a.H=this.H;a.Jn=this.Jn;var b=this.Ln;a.Ln=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Kn;a.Kn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Fn;a.Fn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.En;a.En=Ga(b)&&"function"===typeof b.M?b.M():b;return a};pe.prototype.ub=function(a){a.classType===pe?this.change=a:Ea(this,a)}; +function pe(){this.Am=qe;this.rf=this.Cq="";this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}pe.prototype.clear=function(){this.En=this.Fn=this.Kn=this.Ln=this.Jn=this.H=this.fc=null}; +pe.prototype.copy=function(){var a=new pe;a.Am=this.Am;a.Cq=this.Cq;a.rf=this.rf;a.fc=this.fc;a.H=this.H;a.Jn=this.Jn;var b=this.Ln;a.Ln=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Kn;a.Kn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Fn;a.Fn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.En;a.En=Ga(b)&&"function"===typeof b.M?b.M():b;return a};pe.prototype.ub=function(a){a.classType===pe?this.change=a:Ea(this,a)}; pe.prototype.toString=function(){var a="";a=this.change===re?a+"* ":this.change===qe?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===re?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ra(this.object)),null!==this.oldValue&&(a+=" old: "+Ra(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ra(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};pe.prototype.L=function(a){return a?this.oldValue:this.newValue};pe.prototype.Ez=function(a){return a?this.oldParam:this.newParam};pe.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; pe.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};pe.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};pe.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; oa.Object.defineProperties(pe.prototype,{model:{configurable:!0,get:function(){return this.fc},set:function(a){this.fc=a}},diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},change:{configurable:!0,get:function(){return this.Am},set:function(a){G&&ab(a,pe,pe,"change");this.Am=a}},modelChange:{configurable:!0,get:function(){return this.Cq},set:function(a){G&&A(a,"string",pe,"modelChange");this.Cq=a}},propertyName:{configurable:!0, -enumerable:!0,get:function(){return this.qf},set:function(a){G&&"string"!==typeof a&&A(a,"function",pe,"propertyName");this.qf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Am===re&&("CommittedTransaction"===this.qf||"FinishedUndo"===this.qf||"FinishedRedo"===this.qf)}},object:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn=a}},oldValue:{configurable:!0,get:function(){return this.Ln},set:function(a){this.Ln= +enumerable:!0,get:function(){return this.rf},set:function(a){G&&"string"!==typeof a&&A(a,"function",pe,"propertyName");this.rf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Am===re&&("CommittedTransaction"===this.rf||"FinishedUndo"===this.rf||"FinishedRedo"===this.rf)}},object:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn=a}},oldValue:{configurable:!0,get:function(){return this.Ln},set:function(a){this.Ln= a}},oldParam:{configurable:!0,get:function(){return this.Kn},set:function(a){this.Kn=a}},newValue:{configurable:!0,get:function(){return this.Fn},set:function(a){this.Fn=a}},newParam:{configurable:!0,get:function(){return this.En},set:function(a){this.En=a}}});pe.prototype.redo=pe.prototype.redo;pe.prototype.canRedo=pe.prototype.canRedo;pe.prototype.undo=pe.prototype.undo;pe.prototype.canUndo=pe.prototype.canUndo;pe.prototype.getParam=pe.prototype.Ez; -pe.prototype.getValue=pe.prototype.L;pe.prototype.clear=pe.prototype.clear;var re=new F(pe,"Transaction",-1),qe=new F(pe,"Property",0),se=new F(pe,"Insert",1),te=new F(pe,"Remove",2);pe.className="ChangedEvent";pe.Transaction=re;pe.Property=qe;pe.Insert=se;pe.Remove=te;function ue(){this.o=(new H).freeze();this.Ca="";this.j=!1} +pe.prototype.getValue=pe.prototype.L;pe.prototype.clear=pe.prototype.clear;var re=new F(pe,"Transaction",-1),qe=new F(pe,"Property",0),se=new F(pe,"Insert",1),te=new F(pe,"Remove",2);pe.className="ChangedEvent";pe.Transaction=re;pe.Property=qe;pe.Insert=se;pe.Remove=te;function ue(){this.m=(new H).freeze();this.Ca="";this.j=!1} ue.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.ad(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -oa.Object.defineProperties(ue.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ue.prototype.optimize=ue.prototype.gk;ue.prototype.redo=ue.prototype.redo;ue.prototype.canRedo=ue.prototype.canRedo;ue.prototype.undo=ue.prototype.undo;ue.prototype.canUndo=ue.prototype.canUndo; -ue.prototype.clear=ue.prototype.clear;ue.className="Transaction";function ve(){this.Ht=new I;this.Gd=!1;this.v=(new H).freeze();this.Be=-1;this.o=999;this.De=!1;this.Ep=null;this.gi=0;this.j=!1;G&&(this.j=!0);this.He=(new H).freeze();this.il=new H;this.it=!0;this.st=this.gq=this.vt=this.ut=!1} +oa.Object.defineProperties(ue.prototype,{changes:{configurable:!0,get:function(){return this.m}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ue.prototype.optimize=ue.prototype.gk;ue.prototype.redo=ue.prototype.redo;ue.prototype.canRedo=ue.prototype.canRedo;ue.prototype.undo=ue.prototype.undo;ue.prototype.canUndo=ue.prototype.canUndo; +ue.prototype.clear=ue.prototype.clear;ue.className="Transaction";function ve(){this.Ht=new I;this.Gd=!1;this.v=(new H).freeze();this.Ce=-1;this.m=999;this.Ee=!1;this.Ep=null;this.gi=0;this.j=!1;G&&(this.j=!0);this.Ie=(new H).freeze();this.il=new H;this.it=!0;this.st=this.gq=this.vt=this.ut=!1} ve.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.N(d),null!==f&&f.clear(),b.sb(d),a.gq=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.N(0),null!==f&&f.clear(),b.sb(0),a.Be--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Be++);b.freeze()}a.isInternalTransaction||a.Pb("CommittedTransaction",c,e)}else{a.De=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| -a.Pb("RolledBackTransaction",c,e),a.De=!1}null!==e&&e.clear()}a.Ep=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.N(e),null!==b&&b.undo(),c.pa(),c.sb(e);c.freeze()}return!1}ve.prototype.canUndo=function(){if(!this.isEnabled||0a.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.N(d),null!==f&&f.clear(),b.sb(d),a.gq=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.N(0),null!==f&&f.clear(),b.sb(0),a.Ce--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Ce++);b.freeze()}a.isInternalTransaction||a.Pb("CommittedTransaction",c,e)}else{a.Ee=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| +a.Pb("RolledBackTransaction",c,e),a.Ee=!1}null!==e&&e.clear()}a.Ep=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.N(e),null!==b&&b.undo(),c.pa(),c.sb(e);c.freeze()}return!1}ve.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.it&&(a=a.diagram,null!==a&&!1===a.xi||Fa("Change not within a transaction: "+c.toString()))}}; ve.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; oa.Object.defineProperties(ve.prototype,{models:{configurable:!0,get:function(){return this.Ht.iterator}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){this.Gd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.N(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; -oa.Object.defineProperties(xe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",xe,"name");this.Ca=a}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",xe,"isEnabled");this.Gd=a}},isActive:{configurable:!0,get:function(){return this.ob},set:function(a){A(a,"boolean", -xe,"isActive");this.ob=a}},transactionResult:{configurable:!0,get:function(){return this.Ki},set:function(a){null!==a&&A(a,"string",xe,"transactionResult");this.Ki=a}}});xe.prototype.startTransaction=xe.prototype.Ja;xe.className="Tool";function Ua(){xe.call(this);this.name="ToolManager";this.jb=new H;this.tb=new H;this.Ib=new H;this.G=this.aa=850;this.o=(new Hb(2,2)).na();this.Ma=5E3;this.ma=Be;this.v=Ie;this.Dp=this.j=null;this.Hj=-1}na(Ua,xe);Ua.prototype.initializeStandardTools=function(){}; +oa.Object.defineProperties(xe.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof P&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",xe,"name");this.Ca=a}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",xe,"isEnabled");this.Gd=a}},isActive:{configurable:!0,get:function(){return this.ob},set:function(a){A(a,"boolean", +xe,"isActive");this.ob=a}},transactionResult:{configurable:!0,get:function(){return this.Ki},set:function(a){null!==a&&A(a,"string",xe,"transactionResult");this.Ki=a}}});xe.prototype.startTransaction=xe.prototype.Ja;xe.className="Tool";function Ua(){xe.call(this);this.name="ToolManager";this.jb=new H;this.tb=new H;this.Ib=new H;this.G=this.$=850;this.m=(new Hb(2,2)).na();this.Ma=5E3;this.ma=Be;this.v=Ie;this.Dp=this.j=null;this.Hj=-1}na(Ua,xe);Ua.prototype.initializeStandardTools=function(){}; Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Ce&&this.Dp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Je&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Ke){b.bubbles=!0;return}if(this.gestureBehavior===Je)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; for(var d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Me;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Hf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Hf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.Jx&&d.T("LinkRelinked",c,d.Jx),c.toPort!==d.Kx&&d.T("LinkRelinked",c,d.Kx)):If(e,g,f,k,h):If(e,null,null,null,null)}}}}Oe.prototype.doDragOver=function(){}; +function nf(a,b,c){var d=!1,e=a.Fg.length,f=0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ne;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Hf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Hf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.Kx&&d.T("LinkRelinked",c,d.Kx),c.toPort!==d.Lx&&d.T("LinkRelinked",c,d.Lx)):If(e,g,f,k,h):If(e,null,null,null,null)}}}}Oe.prototype.doDragOver=function(){}; function Jf(a,b){var c=a.diagram;a.dragsLink&&vf(a,!0);hf(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;Kf(a,e,f);f=yf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Re){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof T&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Re){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof T&&Lf(c,d,a);M.free(a)}}}function Kf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof wf||(c=a.mouseDrop,null!==c&&c(b))}function Lf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Qe(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof R},!0,function(a){return a instanceof R},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Sd(b)&&c.isAvoiding&&c.gb()} +c.selection.iterator;b.next();)d=b.value,d instanceof T&&Lf(c,d,a);M.free(a)}}}function Kf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof wf||(c=a.mouseDrop,null!==c&&c(b))}function Lf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Re(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof R},!0,function(a){return a instanceof R},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Sd(b)&&c.isAvoiding&&c.gb()} Oe.prototype.doDropOnto=function(){};Oe.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(qf(this,!1),Ue(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts)):this.mayMove()?(lf(this),sf(this,this.draggedParts,!0)):this.mayDragOut()?(qf(this,!1),sf(this,this.copiedParts,!1)):lf(this),uf(this,a.lastInput.documentPoint))}}; Oe.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(lf(this),qf(this,!0),Ue(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts),null!==this.copiedParts&&(a.T("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,lf(this),this.mayMove()&&(sf(this,this.draggedParts, -!0),uf(this,a.lastInput.documentPoint)));this.Tm=!0;Jf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Nf():this.draggedParts.Nf();this.copiedParts=null;b&&Mf(this);a.ab();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.T(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.T("ChangedSelection",a.selection)}}}; -Oe.prototype.simulatedMouseMove=function(a,b,c){if(null===Re)return!1;var d=Re.diagram;c instanceof Q||(c=null);var e=Ve;c!==e&&(null!==e&&e!==d&&(e.wg(),Re.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ve=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Qe.contains(e)||Qe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +!0),uf(this,a.lastInput.documentPoint)));this.Tm=!0;Jf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Of():this.draggedParts.Of();this.copiedParts=null;b&&Mf(this);a.ab();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.T(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.T("ChangedSelection",a.selection)}}}; +Oe.prototype.simulatedMouseMove=function(a,b,c){if(null===Re)return!1;var d=Re.diagram;c instanceof P||(c=null);var e=Ve;c!==e&&(null!==e&&e!==d&&(e.xg(),Re.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ve=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Qe.contains(e)||Qe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;M.free(f); -f=a.pr;g=new yb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof R&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Md())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.eb(),g.add(k,a.Md(h))));K.free(h);a.copiedParts=g;Se(a,g.Nf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ +f=a.pr;g=new yb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof R&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Md())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.eb(),g.add(k,a.Md(h))));K.free(h);a.copiedParts=g;Se(a,g.Of());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ 2)));a.doUpdateCursor(null,!0)}}}Oe.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Bs=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.un=null};Oe.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; oa.Object.defineProperties(Oe.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.tb},set:function(a){A(a,"boolean",Oe,"isCopyEnabled");this.tb=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"boolean",Oe,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.ma},set:function(a){w(a,Pe,Oe,"dragOptions");this.ma=a}},isGridSnapEnabled:{configurable:!0, enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){A(a,"boolean",Oe,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.jb},set:function(a){A(a,"boolean",Oe,"isComplexRoutingRealtime");this.jb=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){A(a,"boolean",Oe,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){w(a,Hb,Oe,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){w(a,Ib,Oe,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){w(a,K,Oe,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){A(a,"boolean",Oe,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){A(a,"boolean",Oe,"dragsTree"); -this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Mc},set:function(a){this.Mc=a}},nodropCursor:{configurable:!0,get:function(){return this.Nc},set:function(a){this.Nc=a}},currentPart:{configurable:!0,get:function(){return this.aa},set:function(a){null!==a&&w(a,S,Oe,"currentPart");this.aa=a}},copiedParts:{configurable:!0, -get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Nf():null!==this.draggedParts?this.draggedParts.Nf():this.te}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&w(a,R,Oe,"draggedLink");this.diagram.draggedLink=a}}, +this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Nc},set:function(a){this.Nc=a}},nodropCursor:{configurable:!0,get:function(){return this.Oc},set:function(a){this.Oc=a}},currentPart:{configurable:!0,get:function(){return this.$},set:function(a){null!==a&&w(a,S,Oe,"currentPart");this.$=a}},copiedParts:{configurable:!0, +get:function(){return this.m},set:function(a){this.m=a}},draggedParts:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Of():null!==this.draggedParts?this.draggedParts.Of():this.ue}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&w(a,R,Oe,"draggedLink");this.diagram.draggedLink=a}}, isDragOutStarted:{configurable:!0,get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{configurable:!0,get:function(){return this.pr},set:function(a){w(a,K,Oe,"startPoint");this.pr.D(a)||this.pr.assign(a)}},delay:{configurable:!0,get:function(){return this.Jk},set:function(a){A(a,"number",Oe,"delay");this.Jk=a}}});Oe.prototype.getDraggingSource=Oe.prototype.Bz;var Re=null,Ve=null;Oe.className="DraggingTool";Qe=new H; Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Re&&Re.doCancel();xe.prototype.doCancel.call(this)}; -function Pf(){0=d&&(d=.1);var e=this,f=b.sg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof T){var k=g.oa(Kc,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;k=d&&(d=.1);var e=this,f=b.tg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof T){var k=g.oa(Kc,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Do(b).count>=c)return!1}return!0}; Pf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Qd(b).count>=c)return!1}return!0}; @@ -423,12 +423,12 @@ function Rf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLab Pf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Sf){if(d===Tf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Uf(this,a,b,c,!0)}if(d===Vf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== a)return!1;return!Uf(this,a,b,c,!0)}if(d===Wf)return a===b?a=!0:(d=new I,d.add(b),a=Xf(this,d,a,b,c)),!a;if(d===Yf)return!Uf(this,a,b,c,!1);if(d===Zf)return a===b?a=!0:(d=new I,d.add(b),a=$f(this,d,a,b,c)),!a}return!0};function Uf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Uf(a,g,c,d,e)))return!0}return!1} function Xf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Xf(a,b,g,d,e)))return!0}return!1}function $f(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&$f(a,b,h,d,e))return!0}}return!1} -oa.Object.defineProperties(Pf.prototype,{portGravity:{configurable:!0,get:function(){return this.te},set:function(a){A(a,"number",Pf,"portGravity");0<=a&&(this.te=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Ma},set:function(a){A(a,"boolean",Pf,"isUnconnectedLinkValid");this.Ma=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Ii}, +oa.Object.defineProperties(Pf.prototype,{portGravity:{configurable:!0,get:function(){return this.ue},set:function(a){A(a,"number",Pf,"portGravity");0<=a&&(this.ue=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Ma},set:function(a){A(a,"boolean",Pf,"isUnconnectedLinkValid");this.Ma=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Ii}, set:function(a){w(a,R,Pf,"temporaryLink");this.Ii=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Hi},set:function(a){w(a,T,Pf,"temporaryFromNode");if(this.Hi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){w(a,O,Pf,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.U.indexOf(this.j);b.sb(c);b.Hb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Ji}, -set:function(a){w(a,T,Pf,"temporaryToNode");if(this.Ji=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){w(a,O,Pf,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.U.indexOf(this.o);b.sb(c);b.Hb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Ib},set:function(a){null!==a&&w(a,R,Pf,"originalLink");this.Ib=a}},originalFromNode:{configurable:!0,get:function(){return this.jb}, -set:function(a){null!==a&&w(a,T,Pf,"originalFromNode");this.jb=a}},originalFromPort:{configurable:!0,get:function(){return this.tb},set:function(a){null!==a&&w(a,O,Pf,"originalFromPort");this.tb=a}},originalToNode:{configurable:!0,get:function(){return this.Mc},set:function(a){null!==a&&w(a,T,Pf,"originalToNode");this.Mc=a}},originalToPort:{configurable:!0,get:function(){return this.Nc},set:function(a){null!==a&&w(a,O,Pf,"originalToPort");this.Nc=a}},isForwards:{configurable:!0, -enumerable:!0,get:function(){return this.ma},set:function(a){A(a,"boolean",Pf,"isForwards");this.ma=a}},validPortsCache:{configurable:!0,get:function(){return this.jp}},targetPort:{configurable:!0,get:function(){return this.Rf},set:function(a){null!==a&&w(a,O,Pf,"targetPort");this.Rf=a}},linkValidation:{configurable:!0,get:function(){return this.oj},set:function(a){null!==a&&A(a,"function",Pf,"linkValidation");this.oj=a}},portTargeted:{configurable:!0, -get:function(){return this.Qf},set:function(a){null!==a&&A(a,"function",Pf,"portTargeted");this.Qf=a}}});Pf.className="LinkingBaseTool";function ag(){0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof V)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};ug.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -ug.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.Ja(this.name),this.Jq.set(this.adornedObject.oa(this.handle.alignment.dv())),this.Mn.set(this.adornedObject.part.location),this.vw.set(this.adornedObject.desiredSize),this.et=this.computeCellSize(),this.gt= -this.computeMinSize(),this.ft=this.computeMaxSize(),this.isActive=!0))};ug.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};ug.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b}; +ug.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ja(this.name),this.Jq.set(this.adornedObject.oa(this.handle.alignment.dv())),this.Mn.set(this.adornedObject.part.location),this.vw.set(this.adornedObject.desiredSize),this.et=this.computeCellSize(),this.gt= +this.computeMinSize(),this.ft=this.computeMaxSize(),this.isActive=!0))};ug.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ve=this.handle=null;this.isActive=a.isMouseCaptured=!1};ug.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b}; ug.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};ug.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.gt,c=this.ft,d=this.et,e=this.adornedObject.$r(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.td();K.free(e)}}; ug.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.gt,c=this.ft,d=this.et,e=this.adornedObject.$r(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);K.free(e);a.ab();this.transactionResult=this.name;a.T("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -ug.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.eb();c=c.oa(this.handle.alignment.dv());if(a instanceof wf){var d=new H;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Pe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().qe(c),!0,e)}else a.location=a.location.copy().qe(c).add(this.oppositePoint);b.td()}}; +ug.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.eb();c=c.oa(this.handle.alignment.dv());if(a instanceof wf){var d=new H;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Pe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.td()}}; ug.prototype.computeResize=function(a,b,c,d,e,f){b.kc()&&(b=Kc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=K.alloc();L.Eo(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), @@ -496,283 +496,283 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig ug.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};ug.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ -d,b.y=-d);return a.oa(b)};Bg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.Wq=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Bg.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b};Bg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.oa(b)};Bg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ve=this.handle=null;this.Wq=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Bg.prototype.stopTransaction=function(){var a=this.diagram,b=xe.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.gk();return b};Bg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; Bg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};Bg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.ab();this.transactionResult=this.name;a.T("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; -Bg.prototype.rotate=function(a){G&&E(a,Bg,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.eb();var c=b.locationObject,d=b.rotateObject;if(c===d||c.ug(d))c=this.Mn.copy(),b.location=c.qe(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.td()}}; +Bg.prototype.rotate=function(a){G&&E(a,Bg,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.eb();var c=b.locationObject,d=b.rotateObject;if(c===d||c.vg(d))c=this.Mn.copy(),b.location=c.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.td()}}; Bg.prototype.computeRotate=function(a){a=this.rotationPoint.cb(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.si());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -oa.Object.defineProperties(Bg.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&w(a,O,Bg,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(w(a,O,Bg,"handle"),!(a.part instanceof Ce)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.ue},set:function(a){if(null!==a&&(w(a,O, -Bg,"handle"),a.part instanceof Ce))throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.ma},set:function(a){A(a,"number",Bg,"snapAngleMultiple");this.ma=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.aa},set:function(a){A(a,"number",Bg,"snapAngleEpsilon");this.aa=a}},originalAngle:{configurable:!0,get:function(){return this.uw}},rotationPoint:{configurable:!0, -enumerable:!0,get:function(){return this.Wq},set:function(a){this.Wq=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"number",Bg,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){A(a,"number",Bg,"handleDistance");this.G=a}}});Bg.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); +oa.Object.defineProperties(Bg.prototype,{handleArchetype:{configurable:!0,get:function(){return this.m},set:function(a){null!==a&&w(a,O,Bg,"handleArchetype");this.m=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(w(a,O,Bg,"handle"),!(a.part instanceof Ce)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.ve},set:function(a){if(null!==a&&(w(a,O, +Bg,"handle"),a.part instanceof Ce))throw Error("new handle must not be in an Adornment: "+a);this.ve=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.ma},set:function(a){A(a,"number",Bg,"snapAngleMultiple");this.ma=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.$},set:function(a){A(a,"number",Bg,"snapAngleEpsilon");this.$=a}},originalAngle:{configurable:!0,get:function(){return this.uw}},rotationPoint:{configurable:!0, +get:function(){return this.Wq},set:function(a){this.Wq=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){A(a,"number",Bg,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){A(a,"number",Bg,"handleDistance");this.G=a}}});Bg.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); function Cg(){xe.call(this);0e.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};bh.prototype.doStart=function(){lh=this;null!==this.textBlock&&this.doActivate()}; -bh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof ch&&(this.textBlock=b,null!==b.part)){a.animationManager.Bc();this.isActive=!0;this.ta=ih;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.di=this.textBlock.copy();var d=new M(this.textBlock.oa(Fc),this.textBlock.oa(Oc));a.pv(d);c.show(b,a,this);this.currentTextEditor=c}}}};bh.prototype.doCancel=function(){this.stopTool()}; +bh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof ch&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.ta=ih;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.di=this.textBlock.copy();var d=new M(this.textBlock.oa(Fc),this.textBlock.oa(Oc));a.pv(d);c.show(b,a,this);this.currentTextEditor=c}}}};bh.prototype.doCancel=function(){this.stopTool()}; bh.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};bh.prototype.doMouseDown=function(){this.isActive&&this.acceptText(mh)};bh.prototype.acceptText=function(a){switch(a){case mh:if(this.ta===oh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.ta===ih||this.ta===kh||this.ta===jh)this.ta=ph,qh(this);break;case rh:case gh:case hh:if(gh!==a||!0!==this.textBlock.isMultiline)if(this.ta===ih||this.ta===kh||this.ta===jh)this.ta=ph,qh(this)}}; function qh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ja(a.name),a.ta=oh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.T("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.ta=kh,a.doError(e,f))}} bh.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};bh.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};bh.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.ta=eh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};bh.prototype.doStop=function(){lh=null}; -bh.prototype.isValidText=function(a,b,c){w(a,ch,bh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};bh.prototype.Hx=function(a){var b=this.di;b.text=a;b.measure(this.textBlock.Lh,Infinity);return b}; -oa.Object.defineProperties(bh.prototype,{textBlock:{configurable:!0,get:function(){return this.ma},set:function(a){null!==a&&w(a,ch,bh,"textBlock");this.ma=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Me||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, -get:function(){return this.aa},set:function(a){ab(a,bh,bh,"starting");this.aa=a}},textValidation:{configurable:!0,get:function(){return this.Dj},set:function(a){null!==a&&A(a,"function",bh,"textValidation");this.Dj=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&A(a,"number",bh,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&A(a, -"boolean",bh,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.ta},set:function(a){this.ta!==a&&(ab(a,bh,bh,"starting"),this.ta=a)}}});bh.prototype.measureTemporaryTextBlock=bh.prototype.Hx; +bh.prototype.isValidText=function(a,b,c){w(a,ch,bh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};bh.prototype.Ix=function(a){var b=this.di;b.text=a;b.measure(this.textBlock.Lh,Infinity);return b}; +oa.Object.defineProperties(bh.prototype,{textBlock:{configurable:!0,get:function(){return this.ma},set:function(a){null!==a&&w(a,ch,bh,"textBlock");this.ma=a}},currentTextEditor:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Me||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, +get:function(){return this.$},set:function(a){ab(a,bh,bh,"starting");this.$=a}},textValidation:{configurable:!0,get:function(){return this.Dj},set:function(a){null!==a&&A(a,"function",bh,"textValidation");this.Dj=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&A(a,"number",bh,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&A(a,"boolean", +bh,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.ta},set:function(a){this.ta!==a&&(ab(a,bh,bh,"starting"),this.ta=a)}}});bh.prototype.measureTemporaryTextBlock=bh.prototype.Ix; var rh=new F(bh,"LostFocus",0),mh=new F(bh,"MouseDown",1),hh=new F(bh,"Tab",2),gh=new F(bh,"Enter",3),sh=new F(bh,"SingleClick",0),dh=new F(bh,"SingleClickSelected",1),nh=new F(bh,"DoubleClick",2),eh=new F(bh,"StateNone",0),ih=new F(bh,"StateActive",1),jh=new F(bh,"StateEditing",2),ph=new F(bh,"StateValidating",3),kh=new F(bh,"StateInvalid",4),oh=new F(bh,"StateValidated",5),lh=null;bh.className="TextEditingTool";bh.LostFocus=rh;bh.MouseDown=mh;bh.Tab=hh;bh.Enter=gh;bh.SingleClick=sh; bh.SingleClickSelected=dh;bh.DoubleClick=nh;bh.StateNone=eh;bh.StateActive=ih;bh.StateEditing=jh;bh.StateValidating=ph;bh.StateInvalid=kh;bh.StateValidated=oh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); -function th(a){uh||(vh(),uh=!0);this.H=ye;this.Qk=this.Eb=this.kq=this.ec=!1;this.Iw=!0;this.Rk=wh;this.ym=!1;this.Ih=this.Gd=!0;this.Fg=600;this.Vv=this.Gw=!1;this.Yd=new I;this.be=new xh;this.be.Xd=this;this.Li=new I;this.hu=new I;this.Er=new I;this.ql=new I;a&&Object.assign(this,a)}th.prototype.Xe=function(a){this.H=a};th.prototype.canStart=function(){return!0};function yh(a,b){a.Gd&&a.canStart(b)&&(a.Yd.add(b),a.defaultAnimation.isAnimating&&a.Bc(),zh(a.H),a.Eb=!0)} -function Ah(a){if(a.Gd&&a.Eb){var b=a.be,c=a.H,d=a.Yd.contains("Model");d&&(a.Qk=!0,a.Rk===wh?(b.isViewportUnconstrained=!0,b.xc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Rk===Bh&&b.xc.clear(),a.Iw=a.Rk===Ch&&c.Wt.D(c.va)?!0:!1,c.T("InitialAnimationStarting",a));d&&!a.Ih||0===b.xc.count?(a.Yd.clear(),a.Eb=!1,b.xc.clear(),Dh(b,c),a.Qk=!1,c.R()):(a.Yd.clear(),c.ng=!1,d=b.xc.get(c),c.autoScale!==Eh&&null!==d&&(delete d.start.scale,delete d.end.scale), -sa.requestAnimationFrame(function(){!1===a.Eb||b.ec||(c.Se("temporaryPixelRatio")&&Te(c),Fh(c),a.Eb=!1,b.start(),b.ec&&(Gh(a),c.ab(),Hh(b,0),Nf(c,!0),Ih(a),c.T("AnimationStarting",a)))}))}}function Jh(a){return a.Yd.contains("Trigger")&&1===a.Yd.count}function Kh(a,b,c,d){a.isTicking||Jh(a)||b instanceof R&&(null!==b.fromNode||null!==b.toNode)||a.be.add(b,"position",c,d,!1)}t=th.prototype;t.ss=function(a){return this.be.ss(a)};t.Yu=function(a){return this.be.Yu(a)}; -function Lh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function Oh(a,b){for(b=b.findLinksConnected();b.next();){var c=b.value;c.sf=c.points.copy();a.ql.add(c)}}function Rh(a,b,c,d,e){null===a&&(a=[0,0,0,0]);null===b&&(b=[0,0,0,0]);var f=a[0],g=a[1],h=a[2];a=a[3];var k=b[0],l=b[1],m=b[2];b=b[3];if(0===h||100===h)f=k,g=l;else if(0===m||100===m)k=f,l=g;180f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function vh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new yb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&Ba(a,">= 1",th,"duration");this.Fg=a}},isAnimating:{configurable:!0, +oa.Object.defineProperties(th.prototype,{animationReasons:{configurable:!0,get:function(){return this.Yd}},isEnabled:{configurable:!0,get:function(){return this.Gd},set:function(a){A(a,"boolean",th,"isEnabled");(this.Gd=a)&&this.Li.each(function(a){a.isAnimating||Infinity!==a.runCount||a.start()})}},duration:{configurable:!0,get:function(){return this.Gg},set:function(a){A(a,"number",th,"duration");1>a&&Ba(a,">= 1",th,"duration");this.Gg=a}},isAnimating:{configurable:!0, enumerable:!0,get:function(){return this.ec}},isTicking:{configurable:!0,get:function(){return this.kq}},isInitial:{configurable:!0,get:function(){return this.Ih},set:function(a){A(a,"boolean",th,"isInitial");this.Ih=a}},defaultAnimation:{configurable:!0,get:function(){return this.be}},activeAnimations:{configurable:!0,get:function(){return this.Li}},initialAnimationStyle:{configurable:!0,get:function(){return this.Rk},set:function(a){G&& -ab(a,th,th,"initialAnimationStyle");this.Rk=a}}});th.prototype.stopAnimation=th.prototype.Bc;var bi=null,uh=!1,wh=new F(th,"Default",1),Ch=new F(th,"AnimateLocations",2),Bh=new F(th,"None",3);th.className="AnimationManager";th.defineAnimationEffect=function(a,b){uh||(vh(),uh=!0);bi.add(a,b)};th.Default=wh;th.AnimateLocations=Ch;th.None=Bh; -function xh(a){this.nu=this.Fw=this.Xd=this.H=null;this.Zk=this.ec=this.j=!1;this.Xm=this.Nd=0;this.Cp=this.dt=ci;this.Yk=this.Wn=!1;this.Vt=1;this.Tt=0;this.Ed=this.Fg=NaN;this.Zv=0;this.Ym=null;this.o=zb;this.xc=new yb;this.Lt=new yb;this.Al=new I;this.Mt=new I;this.Wv=di;a&&Object.assign(this,a)}xh.prototype.suspend=function(){this.Zk=!0};xh.prototype.advanceTo=function(a,b){b&&(this.Zk=!1);this.Wn&&a>=this.Ed&&(this.Yk=!0,a-=this.Ed);this.Zv=a;Mh(this,!0);Gh(this.Xd);Nf(this.H);Ih(this.Xd);this.H.redraw()}; -function Dh(a,b){a.Lt.clear();a.Yk=!1;a.Tt=0;a.Ed=NaN;0=this.Ed&&(this.Yk=!0,a-=this.Ed);this.Zv=a;Mh(this,!0);Gh(this.Xd);Nf(this.H);Ih(this.Xd);this.H.redraw()}; +function Dh(a,b){a.Lt.clear();a.Yk=!1;a.Tt=0;a.Ed=NaN;0a.Xm?a.Ed:d-a.Nd;b&&(e=a.Zv,ea.Xm&&(a.Wn&&!a.Yk?(a.Nd=+new Date,a.Xm=a.Nd+a.Ed,a.Yk=!0):a.Il(!1))}}} function Hh(a,b){for(var c=a.Ed,d=a.xc.iterator,e=a.Yk;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Cp,b,c,a)}}}t.stop=function(){if(!this.ec)return this;this.Il(!0);return this}; t.Il=function(a){null!==this.nu&&this.nu.Yn.remove(this.Fw);if(this.ec){var b=this.H,c=this.Xd;this.Zk=this.ec=c.Qk=!1;Gh(c);for(var d=this.xc,e=this.Al.iterator;e.next();)b.remove(e.value);for(e=this.Mt.iterator;e.next();)e.value.w();e=this.Wn;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Ju,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Bu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Bu?k[n]:l[n],this.Cp,this.Ed,this.Ed,this)}h.Bu&&void 0!==m.location&&g instanceof S&&(g.location=m.location);h.jv&&g instanceof S&&g.Zb(!1)}b.ns.clear();mf(b,!1);b.ab();b.R();Nf(b,!0);if(c.defaultAnimation===this){for(n=c.ql.iterator;n.next();)e=n.value,null!==e.rf&&(e.points=e.rf,e.rf=null);c.ql.clear()}Nf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Wv);Ih(c);this.Tt++;!a&&this.Vt>this.Tt?(this.Yk=!1,this.start()):(this.Ym&&this.Ym(this),Dh(this,null),c.Il(this),b.Sb())}}; +h.Bu?k[n]:l[n],this.Cp,this.Ed,this.Ed,this)}h.Bu&&void 0!==m.location&&g instanceof S&&(g.location=m.location);h.jv&&g instanceof S&&g.Zb(!1)}b.ns.clear();mf(b,!1);b.ab();b.R();Nf(b,!0);if(c.defaultAnimation===this){for(n=c.ql.iterator;n.next();)e=n.value,null!==e.sf&&(e.points=e.sf,e.sf=null);c.ql.clear()}Nf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Wv);Ih(c);this.Tt++;!a&&this.Vt>this.Tt?(this.Yk=!1,this.start()):(this.Ym&&this.Ym(this),Dh(this,null),c.Il(this),b.Sb())}}; t.Kj=function(a,b){var c=b.actualBounds,d=null;b instanceof wf&&(d=b.placeholder);null!==d?(c=d.oa(Fc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof wf)for(a=a.memberParts;a.next();)d=a.value,d instanceof T&&this.Kj(d,b)}; t.Ij=function(a,b){if(a.isVisible()){var c=null;b instanceof wf&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.xc;c.contains(a)&&(c.L(a).jv=!0);if(a instanceof wf)for(a=a.memberParts;a.next();)c=a.value,c instanceof T&&this.Ij(c,b)}};t.Fz=function(a){var b=this.Lt.get(a);null===b&&(b={},this.Lt.add(a,b));return b}; -oa.Object.defineProperties(xh.prototype,{duration:{configurable:!0,get:function(){return this.Fg},set:function(a){A(a,"number",xh,"duration");1>a&&Ba(a,">= 1",xh,"duration");this.Fg=a}},reversible:{configurable:!0,get:function(){return this.Wn},set:function(a){this.Wn=a}},runCount:{configurable:!0,get:function(){return this.Vt},set:function(a){0a&&Ba(a,">= 1",xh,"duration");this.Gg=a}},reversible:{configurable:!0,get:function(){return this.Wn},set:function(a){this.Wn=a}},runCount:{configurable:!0,get:function(){return this.Vt},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}xh.className="Animation";xh.EaseLinear=function(a,b,c,d){return c*a/d+b};xh.EaseInOutQuad=ci;xh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};xh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};xh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};xh.EaseOutExpo=ei; -function ki(a,b,c){this.start=a;this.end=b;this.Ju={};this.Bu=c;this.jv=!1}ki.className="AnimationState";function li(a,b,c){this.yd=null;this.qf=a;this.io=c||mi;this.vk=null;void 0!==b&&(this.vk=b,void 0===c&&(this.io=ni))}li.prototype.copy=function(){var a=new li(this.qf);a.io=this.io;var b=this.vk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.vk=c}return a}; +xh.prototype.addTemporaryPart=xh.prototype.Fy;function ci(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}xh.className="Animation";xh.EaseLinear=function(a,b,c,d){return c*a/d+b};xh.EaseInOutQuad=ci;xh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};xh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};xh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};xh.EaseOutExpo=ei; +function ki(a,b,c){this.start=a;this.end=b;this.Ju={};this.Bu=c;this.jv=!1}ki.className="AnimationState";function li(a,b,c){this.yd=null;this.rf=a;this.io=c||mi;this.vk=null;void 0!==b&&(this.vk=b,void 0===c&&(this.io=ni))}li.prototype.copy=function(){var a=new li(this.rf);a.io=this.io;var b=this.vk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.vk=c}return a}; function oi(a,b){a=a.vk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} -oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.qf},set:function(a){this.qf=a}},animationSettings:{configurable:!0,get:function(){return this.vk},set:function(a){this.vk=a}},startCondition:{configurable:!0,get:function(){return this.io},set:function(a){G&&ab(a,li,li,"startCondition");this.io=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; -li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Za(this);this.H=null;this.Ra=new H;this.Ca="";this.yb=1;this.o=!1;this.j=this.Zh=this.v=this.Vi=this.Ui=this.Ti=this.Si=this.Qi=this.Ri=this.Pi=this.Xi=this.Oi=this.Wi=this.Ni=this.Mi=!0;this.Nn=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){this.Ra.clear();this.Nn.length=0};t.Xe=function(a){this.H=a}; +oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{configurable:!0,get:function(){return this.vk},set:function(a){this.vk=a}},startCondition:{configurable:!0,get:function(){return this.io},set:function(a){G&&ab(a,li,li,"startCondition");this.io=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; +li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Za(this);this.H=null;this.Ra=new H;this.Ca="";this.yb=1;this.m=!1;this.j=this.Zh=this.v=this.Vi=this.Ui=this.Ti=this.Si=this.Qi=this.Ri=this.Pi=this.Xi=this.Oi=this.Wi=this.Ni=this.Mi=!0;this.Nn=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){this.Ra.clear();this.Nn.length=0};t.Ye=function(a){this.H=a}; t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ra.iterator;h.next();){var k=h.value;k instanceof wf?e++:k instanceof T?d++:k instanceof R?f++:k instanceof Ce?g++:c++}h="";0c.Aq||h.height*e>c.Aq?b.zc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| +t.li=function(a,b,c,d,e,f,g){if(!g||vg(b)){if(null!==d&&b instanceof R&&(b.isOrthogonal&&d.push(b),!1===b.Dd))return;g=!1;for(d=b.containingGroup;null!==d;)g?null!==d.pb&&f.zx(d.pb):null!==d.pb&&(g=!0,f.assign(d.pb)),d=d.containingGroup;var h=b.actualBounds;d=!1;if(g&&b.isVisible()){if(!f.Yc(h))return;d=!f.Re(h)}d&&(a.save(),a.beginPath(),a.rect(f.x,f.y,f.width,f.height),a.clip());h.width*e>c.Aq||h.height*e>c.Aq?b.zc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(ti(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ti(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),ti(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.js()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Tc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ib(qe,a,this,b,c,d,e)};t.vi=function(a,b,c){var d=this.Ra;b.Mh=this;if(a>=d.count)a=d.count;else if(d.N(a)===b)return-1;d.Hb(a,b);b.Ko(c);d=this.diagram;null!==d&&(c?d.R():d.vi(b));ui(this,a,b);return a}; +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ib(qe,a,this,b,c,d,e)};t.vi=function(a,b,c){var d=this.Ra;b.Mh=this;if(a>=d.count)a=d.count;else if(d.N(a)===b)return-1;d.Hb(a,b);b.Ko(c);d=this.diagram;null!==d&&(c?d.R():d.vi(b));ui(this,a,b);return a}; t.rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.rc(a,b,c);var d=this.Ra;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.N(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Lo(c);d.sb(a);d=this.diagram;null!==d&&(c?d.R():d.rc(b));b.Mh=null;return a}; function ui(a,b,c){b=vi(a,b,c);if(c instanceof wf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ra.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.N(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.sb(b);a.Hb(f,c);return f}for(g=NaN;0<=--f&&(g=a.N(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.sb(b);a.Hb(h,c);return h}for(k=NaN;++h< e&&(k=a.N(h).zOrder,isNaN(k)););}return b} oa.Object.defineProperties(qi.prototype,{parts:{configurable:!0,get:function(){return this.Ra.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ra.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.H}},name:{configurable:!0,get:function(){return this.Ca},set:function(a){A(a,"string",qi,"name");var b=this.Ca;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= -c.layers;c.next();)c.value.name===a&&v("Layer.name is already present in this diagram: "+a);this.Ca=a;this.g("name",b,a);for(a=this.Ra.iterator;a.next();)a.value.layerName=this.Ca}}},opacity:{configurable:!0,get:function(){return this.yb},set:function(a){var b=this.yb;b!==a&&(A(a,"number",qi,"opacity"),(0>a||1a||1=a)return b;for(var c=this.$a.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; -Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; +function P(a,b){wi||(xi(),wi=!0);Za(this);ye=this;this.Bb=!0;this.Qa=null;this.Ga=this.Ha=0;this.Na=null;if(ah){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.pl=null;yi.add("Model",zi);var e=this;this.Ib=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.ca){b.diagram.ca=!1;try{var c=a.change;""===a.modelChange&&c===qe&&b.updateDataBindings(a.object, +a.propertyName)}finally{b.diagram.ca=!0}}};this.Nc=function(a){e.partManager.doModelChanged(a)};this.$t=this.cu=null;Ai(this);this.model=Bi();this.Xg=!0;Ci(this);this.layout=new Di;this.Xg=!1;this.jk=this.kk=this.ik=this.hk=this.aA=this.dk=this.Gv=null;this.Wo=function(){};this.preventDefault=null;this.kn=!1;this.Hh=new Ei;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Fi(this,a):b=a);this.Bb=!1;b&&this.im(b);return this}var Gi,ye; +function Ai(a){a.Xd=new th;a.Xd.Ye(a);a.Fb=17;a.yw=!1;a.mn=!1;a.Ut="default";a.$a=new H;a.qy=new yb;a.Rx();a.Qx();a.yb=1;a.va=(new K(NaN,NaN)).freeze();a.Wt=new K(NaN,NaN);a.Ea=1;a.Gp=1;a.ot=(new K(NaN,NaN)).freeze();a.pt=NaN;a.Gt=1E-4;a.Ct=100;a.Gb=new Jb;a.ru=(new K(NaN,NaN)).freeze();a.jt=(new M(NaN,NaN,NaN,NaN)).freeze();a.zj=(new gc(0,0,0,0)).freeze();a.Aj=di;a.fu=!1;a.Rt=null;a.Yt=null;a.yh=Eh;a.Ak=hd;a.Ig=Eh;a.eq=hd;a.nt=Fc;a.qt=Fc;a.hd=!0;a.hn=!1;a.De=new I;a.Eh=new yb;a.Sm=!0;a.lp=250;a.wk= +-1;a.np=(new gc(16,16,16,16)).freeze();a.og=!1;a.Kk=!1;a.Zm=!0;a.Sp=new me;a.Sp.diagram=a;a.Sg=new me;a.Sg.diagram=a;a.kj=new me;a.kj.diagram=a;a.Cg=null;a.pf=null;a.iu=!1;Hi(a);a.fi=new I;a.xt=!0;a.mu=Ii;a.iw=!1;a.ou=Sf;a.Xs="auto";a.Fp="auto";a.zh=null;a.Fh=null;a.Bh=null;a.Vh=null;a.Th=null;a.Sh=null;a.It=null;a.Qh=null;a.mt=!1;a.Rh=null;a.Uh=null;a.ei=null;a.Ch=null;a.Jt=!1;a.Qt={};a.ml=[null,null];a.Xg=!1;a.Aw=!1;a.gu=!1;a.$s=!1;a.kw=!0;a.jd=!1;a.hj=!1;a.Lw=!0;a.Ce=-2;a.Qg=new yb;a.Rn=new H; +a.Jg=!1;a.Gd=!0;a.Js=!0;a.Mi=!0;a.Ni=!0;a.Ks=!1;a.Ls=!0;a.Wi=!0;a.Oi=!0;a.Xi=!0;a.Ns=!0;a.Pi=!0;a.Ri=!0;a.Qi=!0;a.Si=!0;a.Ti=!0;a.Ui=!0;a.Vi=!0;a.Os=!0;a.Qs=!0;a.jw=!1;a.Xk=!1;a.en=!0;a.fn=!0;a.Ms=!0;a.Ps=!0;a.au=16;a.eu=16;a.$q=!1;a.Zt=!1;a.du=0;a.bu=0;a.zb=(new gc(5)).freeze();a.zw=(new I).freeze();a.Dt=999999999;a.gw=(new I).freeze();a.ej=!0;a.fj=!0;a.gj=!0;a.hf=!1;a.$f=!1;a.xh=!0;a.bg=!1;a.py=new I;a.hw=new I;a.bi=null;a.Tv=new Hb(8,8);a.Uv=999;a.tw=1;a.Bw=0;a.qd={scale:1,position:new K,bounds:new M, +Vw:new Hb,Jx:new Hb,Cx:!1};a.Jw=(new M(NaN,NaN,NaN,NaN)).freeze();a.mo=(new Hb(NaN,NaN)).freeze();a.Jp=(new M(NaN,NaN,NaN,NaN)).freeze();a.yt=!1;a.Pg=new yb;var b=new T,c=new ch;c.bind(new Ji("text","",Ra));b.add(c);a.ly=b;a.Pg.add("",b);b=new T;c=new ch;c.stroke="brown";c.bind(new Ji("text","",Ra));b.add(c);a.Pg.add("Comment",b);b=new T;b.selectable=!1;b.avoidable=!1;c=new Qf;c.figure="Ellipse";c.fill="black";c.stroke=null;c.desiredSize=(new Hb(3,3)).na();b.add(c);a.Pg.add("LinkLabel",b);a.dj=new yb; +b=new wf;b.selectionObjectName="GROUPPANEL";b.type=V.Vertical;c=new ch;c.font="bold 12pt sans-serif";c.bind(new Ji("text","",Ra));b.add(c);c=new V(V.Auto);c.name="GROUPPANEL";var d=new Qf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new wg;d.padding=(new gc(5,5,5,5)).na();c.add(d);b.add(c);a.jy=b;a.dj.add("",b);a.Oh=new yb;b=new R;c=new Qf;c.isPanelMain=!0;b.add(c);c=new Qf;c.toArrow="Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.ky=b;a.Oh.add("", +b);b=new R;c=new Qf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Oh.add("Comment",b);b=new Ce;b.type=V.Auto;c=new Qf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new wg;c.margin=(new gc(1.5,1.5,1.5,1.5)).na();b.add(c);a.Kt=b;a.lt=b;b=new Ce;b.type=V.Link;c=new Qf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.At=b;a.ee=null;a.aq=!1;a.Dk=null;a.partManager=new zi;a.toolManager=new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager; +a.currentTool=a.defaultTool;a.bt=null;a.Rm=new Pe;a.Nt=null;a.Ot=null;a.xr=!1;a.commandHandler=Ki();a.yr=!1;a.Up=null;a.Vp=Db;a.Hw=!1;a.qc=1;a.ci=null;a.Aq=1;a.Eq=0;a.rw=[0,0,0,0,0];a.Fq=0;a.lq=1;a.mw=0;a.nw=new K;a.yy=500;a.mp=new K;a.wt=!1}P.prototype.clear=function(){this.animationManager.Cc();this.model.clear();Li=null;Mi="";Ni(this,!1);this.Rn.clear();Oi();this.Qg.clear();this.bi=null;this.ab();this.eb();this.R()}; +function Ni(a,b){a.animationManager.Cc(!0);a.zw=(new I).freeze();a.gw=(new I).freeze();var c=a.skipsUndoManager,d=null!==a.fc&&void 0!==a.fc;d&&(a.skipsUndoManager=!0);var e=null;null!==a.ee&&(e=a.ee.part,null!==e&&a.remove(e));var f=[],g=a.$a.length;if(b){for(b=0;b=a)return b;for(var c=this.$a.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};P.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; +P.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; function Ri(a){var b=a.Na.Xa;b instanceof HTMLCanvasElement&&(a.addEventListener(b,"pointerdown",a.hk,!1),a.addEventListener(b,"pointermove",a.ik,!1),a.addEventListener(b,"pointerup",a.kk,!1),a.addEventListener(b,"pointerout",a.jk,!1),a.addEventListener(b,"pointerenter",a.$y,!1),a.addEventListener(b,"pointerleave",a.az,!1),a.addEventListener(b,"wheel",a.dk,!1),a.addEventListener(b,"keydown",a.Rz,!1),a.addEventListener(b,"keyup",a.Sz,!1),a.addEventListener(b,"blur",a.My,!1),a.addEventListener(b,"focus", -a.Ny,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(sa,"resize",a.Gv,!1),Ya&&a.addEventListener(b,"touchstart",function(a){a.preventDefault()},!1))}function Te(a){30q&&(this.position=x.h(-(b.scrollWidth-this.Ha)+y-this.Ha/e+m,this.position.y))),a.ty&&this.allowVerticalScroll&&(hu&&(this.position= -x.h(this.position.x,-(b.scrollHeight-this.Ga)+a.scrollTop-this.Ga/e+f))),K.free(x),Wi(this),this.fj=this.$q=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);zh(this);return Xi(this,a)}; +"gray";c.strokeWidth=1;c.interval=10;b.add(c);c=new S;c.add(b);c.layerName="Grid";c.zOrder=0;c.isInDocumentBounds=!1;c.isAnimated=!1;c.pickable=!1;c.locationObjectName="GRID";a.add(c);a.partManager.parts.remove(c);b.visible=!1;return b}function Ti(){this.H.Zt?this.H.Zt=!1:this.H.isEnabled?this.H.ax(this):Ui(this.H)}function Vi(a){this.H.isEnabled?(this.H.du=a.target.scrollTop,this.H.bu=a.target.scrollLeft):Ui(this.H)} +P.prototype.ax=function(a){if(null!==this.Na){var b=this.cu,c=this.$t;this.$q=!0;var d=this.documentBounds,e=this.viewportBounds,f=this.zj,g=d.x-f.left,h=d.y-f.top,k=d.width+f.left+f.right,l=d.height+f.top+f.bottom,m=d.right+f.right;f=d.bottom+f.bottom;var n=e.x;d=e.y;var p=e.width,r=e.height,q=e.right,u=e.bottom;e=this.scale;var x=a.scrollLeft;if(this.mn)switch(this.Ut){case "negative":x=x+a.scrollWidth-a.clientWidth;break;case "reverse":x=a.scrollWidth-x-a.clientWidth}var y=x;pq&&(this.position=x.h(-(b.scrollWidth-this.Ha)+y-this.Ha/e+m,this.position.y))),a.uy&&this.allowVerticalScroll&&(hu&&(this.position= +x.h(this.position.x,-(b.scrollHeight-this.Ga)+a.scrollTop-this.Ga/e+f))),K.free(x),Wi(this),this.fj=this.$q=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};P.prototype.computeBounds=function(a){void 0===a&&(a=new M);zh(this);return Xi(this,a)}; function Xi(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.so(a.zb),b;for(var c=!0,d=a.$a.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===mj?(b=k>h?(g-a.Fb)/d:(f-a.Fb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.Aj;this.Aj=di;this.scale=hj(this,lj);a!==di&&(Yi(this,!1),ij(this,this.documentBounds,this.Ha/this.Ea,this.Ga/this.Ea,this.Ak,!1));this.Aj=a};t=Q.prototype; -t.DA=function(a,b){void 0===b&&(b=lj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===lj||b===mj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ha;var f=this.Ga;e=b===mj?f/d>e/c?(f-(this.gf?this.Fb:0))/d:(e-(this.Zf?this.Fb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; -t.Fy=function(a,b){this.eb();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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))};t.Az=function(a){if(a instanceof O){this.Up=a;var b=K.alloc();this.Vp=this.ep(a.oa(Fc,b));K.free(b)}else this.Up=null,this.Vp=Db}; +P.prototype.computePartsBounds=function(a,b){void 0===b&&(b=!1);var c=null;if(Ha(a))for(var d=0;dc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===mj?(b=k>h?(g-a.Fb)/d:(f-a.Fb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +P.prototype.zoomToFit=function(){var a=this.Aj;this.Aj=di;this.scale=hj(this,lj);a!==di&&(Yi(this,!1),ij(this,this.documentBounds,this.Ha/this.Ea,this.Ga/this.Ea,this.Ak,!1));this.Aj=a};t=P.prototype; +t.DA=function(a,b){void 0===b&&(b=lj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===lj||b===mj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ha;var f=this.Ga;e=b===mj?f/d>e/c?(f-(this.hf?this.Fb:0))/d:(e-(this.$f?this.Fb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; +t.Gy=function(a,b){this.eb();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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))};t.Az=function(a){if(a instanceof O){this.Up=a;var b=K.alloc();this.Vp=this.ep(a.oa(Fc,b));K.free(b)}else this.Up=null,this.Vp=Db}; function ij(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.Up){var l=K.alloc();l=a.Up.oa(Fc,l);h=l.x-a.Vp.x/a.scale;k=l.y-a.Vp.y/a.scale;e=Ec;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.zj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.ml[0])b=a.ml[c];else return;c=a.Na;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ha/c.width*c.left,b.clientY-a.Ga/c.height*c.top))}Q.prototype.ab=function(){this.ej||(this.ej=!0,this.Sb(!0))};function vj(a){a.jd||zh(a);a.eb()}Q.prototype.redraw=function(){this.Bb||this.jd||(this.R(),jj(this),this.td())};t=Q.prototype;t.Qz=function(){return this.ng}; -t.Vy=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Bc();b.isEnabled=!1;Nf(this);this.ag=!1;this.Wt=new K(NaN,NaN);b.isEnabled=c;this.jd=!0;var d=this;null!==a&&va(function(){d.jd=!1;yh(b,"Model");a(d)},1)};t.Sb=function(a){void 0===a&&(a=!1);if(!0!==this.ng&&!(this.Bb||!1===a&&this.jd)){this.ng=!0;var b=this;sa.requestAnimationFrame(function(){b.ng&&b.td()})}};t.td=function(){if(!this.Zm||this.ng)this.Zm&&(this.Zm=!1),Nf(this)}; +function ne(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.ml[0])b=a.ml[c];else return;c=a.Na;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ha/c.width*c.left,b.clientY-a.Ga/c.height*c.top))}P.prototype.ab=function(){this.ej||(this.ej=!0,this.Sb(!0))};function vj(a){a.jd||zh(a);a.eb()}P.prototype.redraw=function(){this.Bb||this.jd||(this.R(),jj(this),this.td())};t=P.prototype;t.Qz=function(){return this.og}; +t.Vy=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Cc();b.isEnabled=!1;Nf(this);this.bg=!1;this.Wt=new K(NaN,NaN);b.isEnabled=c;this.jd=!0;var d=this;null!==a&&va(function(){d.jd=!1;yh(b,"Model");a(d)},1)};t.Sb=function(a){void 0===a&&(a=!1);if(!0!==this.og&&!(this.Bb||!1===a&&this.jd)){this.og=!0;var b=this;sa.requestAnimationFrame(function(){b.og&&b.td()})}};t.td=function(){if(!this.Zm||this.og)this.Zm&&(this.Zm=!1),Nf(this)}; function kj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Bb||!a.fj||Ui(a)||(b&&zh(a),c&&Yi(a,!1))} -function Nf(a,b){if(!a.jd&&(a.ng=!1,null!==a.Qa||a.mo.u())){a.jd=!0;var c=a.animationManager,d=a.Rn;if(!c.isAnimating&&0!==d.length){for(var e=d.s,f=e.length,g=0;gb;b++){var c=a.Ce.iterator;if(null===c||0===a.Ce.count)break;a.Ce=new I;a.Fv(c,a.Ce);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof wf&&0!==(a.Y&65536)!==!1&&(a.Y=a.Y^65536)})}} +function zh(a){if(0!==a.De.count&&(a.jd||!a.animationManager.isTicking)){for(var b=0;23>b;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new I;a.Fv(c,a.De);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof wf&&0!==(a.Y&65536)!==!1&&(a.Y=a.Y^65536)})}} t.Fv=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof wf||(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof wf&&c.isVisible()&&Aj(this,c);for(a.reset();a.next();)c=a.value,c instanceof R&&c.isVisible()&&(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Ce&&c.isVisible()&&(c.Ai()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function Aj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof wf?(Bj(f)||Cj(f)||Dj(f))&&Aj(a,f):f instanceof R?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;en&&(z=U.left,B= -U.right),y.height>J&&(C=U.top,D=U.bottom)):(z=U.left,B=U.right,C=U.top,D=U.bottom);U=y.width+z+B;var aa=y.height+C+D;z=y.x-z;var Y=e.x;B=y.right+B;var W=e.right+r;C=y.y-C;var P=e.y;y=y.bottom+D;D=e.bottom+q;var la="1px",fa="1px";e=a.scale;u=U>u/e;x=aa>x/e;a.scrollMode===di&&(u||x)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1W+1&&(u=Math.max((B-W)*e+a.Ha,u)),n+r+1D+1&&(u=Math.max((y-D)*e+a.Ga,u)),J+q+1W+1&&(r=Math.max((B-W)*e+a.Ha,r)),n+1D+1&&(q=Math.max((y-D)*e+r,q)),J+1W+1&&(b=a.position.x*e));if(a.mn)switch(a.Ut){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(J+1D+1&&(l.scrollTop=a.position.y*e));u=a.Ha;x=a.Ga;l.style.width=u+(a.Zf?a.Fb:0)+"px";l.style.height=x+(a.gf?a.Fb:0)+"px";return c!==u||d!==x||a.animationManager.Eb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; -t.add=function(a){w(a,S,Q,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Vj(a.layerName),null===b&&(b=this.Vj("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.vi(99999999,a,a.diagram===this);0<=c&&this.ib(se,"parts",b,null,a,null,c);b.isTemporary||this.ab();a.F(1);c=a.layerChanged;null!==c&&c(a,null, -b)}};t.vi=function(a){this.partManager.vi(a);var b=this;Oj(a,function(a){Pj(b,a)});(a instanceof Ce||a instanceof wf&&null!==a.placeholder)&&a.w();null!==a.data&&Oj(a,function(a){Qj(b.partManager,a)});!0!==Cj(a)&&!0!==Dj(a)||this.Ce.add(a);Rj(a,!0,this);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()}; -t.rc=function(a){a.Mj();this.partManager.rc(a);var b=this;null!==a.data&&Oj(a,function(a){Tj(b.partManager,a,b)});this.Ce.remove(a);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()};t.remove=function(a){w(a,S,Q,"remove:part");Uj(this,a,!0)}; +Math.floor(k.y),Math.ceil(k.width),Math.ceil(k.height));f.clip();f.setTransform(h,0,0,h,0,0);f.transform(l.m11,l.m12,l.m21,l.m22,l.dx,l.dy);f.Vc();G&&G.El&&G.Gu&&G.Gu(this,f);h=this.$a.s;b=h.length;this.Vd(h,b,this,this.viewportBounds);Fj(this,f);f.globalAlpha=this.yb;for(g=0;gn&&(z=U.left,B= +U.right),y.height>J&&(C=U.top,D=U.bottom)):(z=U.left,B=U.right,C=U.top,D=U.bottom);U=y.width+z+B;var aa=y.height+C+D;z=y.x-z;var Y=e.x;B=y.right+B;var W=e.right+r;C=y.y-C;var Q=e.y;y=y.bottom+D;D=e.bottom+q;var la="1px",fa="1px";e=a.scale;u=U>u/e;x=aa>x/e;a.scrollMode===di&&(u||x)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1W+1&&(u=Math.max((B-W)*e+a.Ha,u)),n+r+1D+1&&(u=Math.max((y-D)*e+a.Ga,u)),J+q+1W+1&&(r=Math.max((B-W)*e+a.Ha,r)),n+1D+1&&(q=Math.max((y-D)*e+r,q)),J+1W+1&&(b=a.position.x*e));if(a.mn)switch(a.Ut){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(J+1D+1&&(l.scrollTop=a.position.y*e));u=a.Ha;x=a.Ga;l.style.width=u+(a.$f?a.Fb:0)+"px";l.style.height=x+(a.hf?a.Fb:0)+"px";return c!==u||d!==x||a.animationManager.Eb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=P.prototype; +t.add=function(a){w(a,S,P,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Vj(a.layerName),null===b&&(b=this.Vj("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.vi(99999999,a,a.diagram===this);0<=c&&this.ib(se,"parts",b,null,a,null,c);b.isTemporary||this.ab();a.F(1);c=a.layerChanged;null!==c&&c(a,null, +b)}};t.vi=function(a){this.partManager.vi(a);var b=this;Oj(a,function(a){Pj(b,a)});(a instanceof Ce||a instanceof wf&&null!==a.placeholder)&&a.w();null!==a.data&&Oj(a,function(a){Qj(b.partManager,a)});!0!==Cj(a)&&!0!==Dj(a)||this.De.add(a);Rj(a,!0,this);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()}; +t.rc=function(a){a.Mj();this.partManager.rc(a);var b=this;null!==a.data&&Oj(a,function(a){Tj(b.partManager,a,b)});this.De.remove(a);Sj(a)?(a.actualBounds.u()&&this.R(Mj(a,a.actualBounds)),this.ab()):a.isVisible()&&a.actualBounds.u()&&this.R(Mj(a,a.actualBounds));this.Sb()};t.remove=function(a){w(a,S,P,"remove:part");Uj(this,a,!0)}; function Uj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.F(2),c&&b.Sj(),c=d.rc(-1,b,!1),0<=c&&a.ib(te,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.vs=function(a,b){void 0===b&&(b=!1);if(Ha(a))for(var c=a.length,d=0;dd&&this.ab();return this}; -t.zy=function(a,b){ak(this,a,b);a.Xe(this);var c=this.$a,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.fc&&this.ib(te,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.ab();return this}; -t.jA=function(a){w(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.$a,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ra.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.fc&&this.ib(te,"layers",this,a,null,c,null);this.R();this.ab()}}};t.Vj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; -t.Qw=function(a){A(a,"function",Q,"addModelChangedListener:listener");null===this.nf&&(this.nf=new H);this.nf.add(a);this.model.fh(a);return this};t.lA=function(a){A(a,"function",Q,"removeModelChangedListener:listener");null!==this.nf&&(this.nf.remove(a),0===this.nf.count&&(this.nf=null));this.model.mk(a)};t.fh=function(a){A(a,"function",Q,"addChangedListener:listener");null===this.Bg&&(this.Bg=new H);this.Bg.add(a);return this}; -t.mk=function(a){A(a,"function",Q,"removeChangedListener:listener");null!==this.Bg&&(this.Bg.remove(a),0===this.Bg.count&&(this.Bg=null))};t.Pr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==re&&(this.isModified=!0);if(null!==this.Bg)for(var b=this.Bg,c=b.length,d=0;dd&&this.ab();return this}; +t.Ay=function(a,b){ak(this,a,b);a.Ye(this);var c=this.$a,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.fc&&this.ib(te,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.ab();return this}; +t.jA=function(a){w(a,qi,P,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.$a,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ra.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.fc&&this.ib(te,"layers",this,a,null,c,null);this.R();this.ab()}}};t.Vj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.Qw=function(a){A(a,"function",P,"addModelChangedListener:listener");null===this.pf&&(this.pf=new H);this.pf.add(a);this.model.fh(a);return this};t.lA=function(a){A(a,"function",P,"removeModelChangedListener:listener");null!==this.pf&&(this.pf.remove(a),0===this.pf.count&&(this.pf=null));this.model.mk(a)};t.fh=function(a){A(a,"function",P,"addChangedListener:listener");null===this.Cg&&(this.Cg=new H);this.Cg.add(a);return this}; +t.mk=function(a){A(a,"function",P,"removeChangedListener:listener");null!==this.Cg&&(this.Cg.remove(a),0===this.Cg.count&&(this.Cg=null))};t.Pr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==re&&(this.isModified=!0);if(null!==this.Cg)for(var b=this.Cg,c=b.length,d=0;dn.Ra.indexOf(r)&&n.vi(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Xb(),n.rc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof qi&&(b?(r.Xe(this),this.$a.Hb(p,r)):this.$a.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==re&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};Q.prototype.Ja=function(a){return this.undoManager.Ja(a)};Q.prototype.kb=function(a){return this.undoManager.kb(a)};Q.prototype.Mf=function(){return this.undoManager.Mf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ja(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Mf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; -Q.prototype.hp=function(){this.partManager.hp()}; -function fk(a,b,c){var d=a.animationManager;if(a.Bb||a.jd)a.Ea=c,Pi(a),a=a.Ea,d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,a));else if(null===a.Na)a.Ea=c,Pi(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ha,g=a.Ga;e.width=a.Ha/b;e.height=a.Ga/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.If(Rc)?h=0:l.If(Sc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.If(Qc)?k=0:l.If(Tc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| +P.prototype.changeState=function(a,b){if(null!==a&&a.diagram===this){var c=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var d=a.change;if(d===qe){var e=a.object;bk(e,a.propertyName,a.L(b));if(e instanceof O){var f=e.part;null!==f&&f.Xb()}this.isModified=!0}else if(d===se){var g=a.object,h=a.newParam,k=a.newValue;if(g instanceof V)if("number"===typeof h&&k instanceof O){b?g.rc(h):g.Hb(h,k);var l=g.part;null!==l&&l.Xb()}else"number"===typeof h&&k instanceof ck&&(k.isRow?dk(g,h, +b?void 0:k):ek(g,h,b?void 0:k));else if(g instanceof qi){var m=!0===a.oldParam;"number"===typeof h&&k instanceof S&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Xb(),g.rc(m?h:-1,k,m)):g.vi(h,k,m))}else g instanceof P?"number"===typeof h&&k instanceof qi&&(b?this.$a.sb(h):(k.Ye(this),this.$a.Hb(h,k))):v("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===te){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof V)"number"===typeof p&&r instanceof O?b?n.Hb(p,r):n.rc(p): +"number"===typeof p&&r instanceof ck&&(r.isRow?dk(n,p,b?r:void 0):ek(n,p,b?r:void 0));else if(n instanceof qi){var q=!0===a.newParam;"number"===typeof p&&r instanceof S&&(b?0>n.Ra.indexOf(r)&&n.vi(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Xb(),n.rc(q?p:-1,r,q)))}else n instanceof P?"number"===typeof p&&r instanceof qi&&(b?(r.Ye(this),this.$a.Hb(p,r)):this.$a.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==re&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};P.prototype.Ja=function(a){return this.undoManager.Ja(a)};P.prototype.kb=function(a){return this.undoManager.kb(a)};P.prototype.Nf=function(){return this.undoManager.Nf()};P.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ja(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Nf(),this.skipsUndoManager=c}};P.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +P.prototype.hp=function(){this.partManager.hp()}; +function fk(a,b,c){var d=a.animationManager;if(a.Bb||a.jd)a.Ea=c,Pi(a),a=a.Ea,d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,a));else if(null===a.Na)a.Ea=c,Pi(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ha,g=a.Ga;e.width=a.Ha/b;e.height=a.Ga/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Jf(Rc)?h=0:l.Jf(Sc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Jf(Qc)?k=0:l.Jf(Tc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| (c=a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ea=c;Pi(a);a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Bb=!1;Yi(a,!1);c=a.Ea;d.Eb&&(Jh(d)||d.be.add(d.H,"scale",b,c));a.R();jj(a)}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||jj(this);Wi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Eh||d||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.Xk&&e instanceof Ua&&(this.lastInput.documentPoint=this.Es(this.lastInput.viewPoint),Le(e,this));this.Bb||this.invalidateViewport(a,b);xj(this);this.qd.scale=c;this.qd.position.x=a.x;this.qd.position.y=a.y;this.qd.bounds.assign(a);this.qd.Uw.width= -Math.round(a.width*c);this.qd.Uw.height=Math.round(a.height*c);this.qd.Ix.width=this.Ha;this.qd.Ix.height=this.Ga;this.qd.Bx=d;this.T("ViewportBoundsChanged",this.qd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Yc(b)&&a.gb()})}}; -function xj(a,b){var c=a.de;if(null!==c&&c.visible){for(var d=Hb.alloc(),e=1,f=1,g=c.U.s,h=g.length,k=0;km||(gk(l.figure)?f=f*m/L.nx(f,m):e=e*m/L.nx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Eo(a,g,0,0,d.width, -d.height,b);b.offset(-d.width,-d.height);Hb.free(d);c.part.location=b;K.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.T("ChangingSelection",b);for(var c=b.Ka(),d=c.length,e=0;em||(gk(l.figure)?f=f*m/L.ox(f,m):e=e*m/L.ox(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Eo(a,g,0,0,d.width, +d.height,b);b.offset(-d.width,-d.height);Hb.free(d);c.part.location=b;K.free(b)}}P.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.T("ChangingSelection",b);for(var c=b.Ka(),d=c.length,e=0;e=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, +function zk(a,b){null===a.bi||a.bi.fs||void 0!==b&&(!b.avoidable||b.isLinkLabel)||(a.bi.fs=!0)}P.prototype.Sr=function(a){this.mp.assign(a);this.computeAutoScrollPosition(this.mp).fb(this.position)?this.xg():Ak(this)}; +function Ak(a){-1===a.wk&&(a.wk=va(function(){if(-1!==a.wk&&(a.xg(),null!==a.lastInput.event)){var b=a.computeAutoScrollPosition(a.mp);b.fb(a.position)||(a.position=b,a.lastInput.documentPoint=a.Es(a.mp),a.doMouseMove(),a.ej=!0,b=M.alloc(),a.computeBounds(b),b.cd(a.documentBounds),Kj(a,b),M.free(b),a.hd=!0,a.td(),Ak(a))}},a.lp))}P.prototype.xg=function(){-1!==this.wk&&(sa.clearTimeout(this.wk),this.wk=-1)}; +P.prototype.computeAutoScrollPosition=function(a){var b=this.position,c=this.np;if(0>=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.fb(zb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); -M.free(d);K.free(f);return b};t=Q.prototype;t.ps=function(){return null};t.av=function(){return null};t.Dy=function(a,b){this.py.add(a,b)};t.yu=function(a){(this.Hw=a)||this.nodes.each(function(a){a instanceof wf&&(a.Qp=null)})}; -function Bk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].cl){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Qg.iterator;g.next();)if(!g.value[0].cl){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.Wz=function(a){if(!ah)return null;void 0===a&&(a={});a.returnType="Image";return this.Fx(a)}; -t.Fx=function(a){void 0===a&&(a={});return Bk(this,this.Xz,a)}; +M.free(d);K.free(f);return b};t=P.prototype;t.ps=function(){return null};t.av=function(){return null};t.Ey=function(a,b){this.qy.add(a,b)};t.yu=function(a){(this.Hw=a)||this.nodes.each(function(a){a instanceof wf&&(a.Qp=null)})}; +function Bk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].cl){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Qg.iterator;g.next();)if(!g.value[0].cl){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.Wz=function(a){if(!ah)return null;void 0===a&&(a={});a.returnType="Image";return this.Gx(a)}; +t.Gx=function(a){void 0===a&&(a={});return Bk(this,this.Xz,a)}; t.Xz=function(a,b,c){var d=Ck(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Dk+"data":e=d.getImageData(0,0,c.width,c.height);break;case Dk:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";if("function"===typeof c.msToBlob)return b(c.msToBlob()),"msToBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Ck(a,b,c,d){a.animationManager.Bc();a.td();if(null===a.Na)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Hb(Infinity,Infinity):new Hb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var r=b.document||document,q=b.elementFinished|| -null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new gc(m):m instanceof gc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.dc.Tc(!0);p=new Ek(null,r);var x=p.context;if(!(f||g||l||k)){p.width=a.Ha+Math.ceil(m.left+m.right);p.height=a.Ga+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== +function Ck(a,b,c,d){a.animationManager.Cc();a.td();if(null===a.Na)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Hb(Infinity,Infinity):new Hb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var r=b.document||document,q=b.elementFinished|| +null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new gc(m):m instanceof gc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.dc.Uc(!0);p=new Ek(null,r);var x=p.context;if(!(f||g||l||k)){p.width=a.Ha+Math.ceil(m.left+m.right);p.height=a.Ga+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Bo=q;Hj(a,d.context,m,new Hb(p.width,p.height),a.Ea,a.va,l,n,u,b);return d.context}a.Sm=!1;Hj(a,x,m,new Hb(p.width,p.height),a.Ea,a.va,l,n,u,b);a.Sm=!0;return p.context}var y=a.Gp,z=a.documentBounds.copy();z.xv(a.zb);if(u)for(var B=a.$a.s,C=B.length,D=0;Dy?(g=y,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=y,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new gc(0);null!==h&&(y=h.width,h=h.height,"SVG"!==c&&e&&!Fk&&G&&(f>y|| z>h)&&(Fa("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(f)+"x"+Math.ceil(z)+" vs 2000x2000) Consider increasing the max size."),Fk=!0),isNaN(y)&&(y=2E3),isNaN(h)&&(h=2E3),isFinite(y)&&(f=Math.min(f,y)),isFinite(h)&&(z=Math.min(z,h)));p.width=Math.ceil(f);p.height=Math.ceil(z);if("SVG"===c){if(null===d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Bo=q;Hj(a,d.context,m,new Hb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b); return d.context}a.Sm=!1;Hj(a,x,m,new Hb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b);a.Sm=!0;return p.context} -oa.Object.defineProperties(Q.prototype,{div:{configurable:!0,get:function(){return this.Qa},set:function(a){null!==a&&w(a,HTMLDivElement,Q,"div");if(this.Qa!==a){var b=this.Qa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Na&&(b=this.Na.Xa,this.removeEventListener(b,"pointermove",this.ik,!1),this.removeEventListener(b,"pointerdown",this.hk,!1),this.removeEventListener(b,"pointerup",this.kk,!1),this.removeEventListener(b,"pointerout",this.jk,!1),this.Na.bx()), -this.pl&&(this.pl.disconnect(),this.pl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Na=null,this.removeEventListener(sa,"resize",this.Gv,!1),this.removeEventListener(sa,"wheel",this.dk,!0),ye===this&&(ye=null)):this.ag=!1;this.Qa=null;if(null!==a){if(b=a.H)b.div=null;Fi(this,a);this.redraw()}}}}, -Sw:{configurable:!0,get:function(){return this.Eq}},xi:{configurable:!0,get:function(){return this.ag}},draggedLink:{configurable:!0,get:function(){return this.bt},set:function(a){this.bt!==a&&(this.bt=a,null!==a&&(this.Nt=a.fromPort,this.Ot=a.toPort))}},Jx:{configurable:!0,get:function(){return this.Nt},set:function(a){this.Nt=a}},Kx:{configurable:!0,get:function(){return this.Ot},set:function(a){this.Ot=a}},animationManager:{configurable:!0, -enumerable:!0,get:function(){return this.Xd}},undoManager:{configurable:!0,get:function(){return this.fc.undoManager}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg},set:function(a){A(a,"boolean",Q,"skipsUndoManager");this.Xg=a;this.fc.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.$s},set:function(a){this.$s=a}},opacity:{configurable:!0,get:function(){return this.yb},set:function(a){var b=this.yb; -b!==a&&(A(a,"number",Q,"opacity"),(0>a||1a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.au=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(A(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"), -this.eu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.kj},set:function(a){G&&w(a,me,Q,"lastInput");this.kj=a}},previousInput:{configurable:!0,get:function(){return this.Sg},set:function(a){G&&w(a,me,Q,"previousInput");this.Sg=a}},firstInput:{configurable:!0,get:function(){return this.Sp},set:function(a){G&&w(a,me,Q,"firstInput");this.Sp=a}},currentCursor:{configurable:!0,get:function(){return this.Xs}, -set:function(a){""===a&&(a=this.Fp);if(this.Xs!==a){A(a,"string",Q,"currentCursor");var b=this.Na,c=this.Qa;if(null!==b&&null!==c){this.Xs=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.Fp},set:function(a){""=== -a&&(a="auto");var b=this.Fp;b!==a&&(A(a,"string",Q,"defaultCursor"),this.Fp=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(null!==a&&A(a,"function",Q,"click"),this.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(null!==a&&A(a,"function",Q,"doubleClick"),this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0, -enumerable:!0,get:function(){return this.Bh},set:function(a){var b=this.Bh;b!==a&&(null!==a&&A(a,"function",Q,"contextClick"),this.Bh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.Vh},set:function(a){var b=this.Vh;b!==a&&(null!==a&&A(a,"function",Q,"mouseOver"),this.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.Th},set:function(a){var b=this.Th;b!==a&&(null!==a&&A(a,"function",Q,"mouseHover"), -this.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Sh},set:function(a){var b=this.Sh;b!==a&&(null!==a&&A(a,"function",Q,"mouseHold"),this.Sh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0,get:function(){return this.It},set:function(a){var b=this.It;b!==a&&(null!==a&&A(a,"function",Q,"mouseDragOver"),this.It=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Qh},set:function(a){var b= -this.Qh;b!==a&&(G&&null!==a&&A(a,"function",Q,"mouseDrop"),this.Qh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"boolean",Q,"handlesDragDropForTopLevelParts"),this.mt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Rh},set:function(a){var b=this.Rh;b!==a&&(null!==a&&A(a,"function",Q,"mouseEnter"),this.Rh=a,this.g("mouseEnter", -b,a))}},mouseLeave:{configurable:!0,get:function(){return this.Uh},set:function(a){var b=this.Uh;b!==a&&(null!==a&&A(a,"function",Q,"mouseLeave"),this.Uh=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Ch}, -set:function(a){var b=this.Ch;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ch=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(this.ob=a,a.Xe(this))}},toolManager:{configurable:!0,get:function(){return this.te},set:function(a){this.te!==a&&(w(a,Ua,Q,"toolManager"),this.te=a,a.diagram=this)}},defaultTool:{configurable:!0, -get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&(w(a,xe,Q,"defaultTool"),this.tb=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.jb},set:function(a){var b=this.jb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(w(a,xe,Q,"currentTool"),this.jb=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.zw}}, -maxSelectionCount:{configurable:!0,get:function(){return this.Dt},set:function(a){var b=this.Dt;if(b!==a)if(A(a,"number",Q,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Dt=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0, -enumerable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(w(a,Ce,Q,"nodeSelectionAdornmentTemplate"),this.Kt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.lt},set:function(a){var b=this.lt;b!==a&&(w(a,Ce,Q,"groupSelectionAdornmentTemplate"),this.lt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.At}, -set:function(a){var b=this.At;b!==a&&(w(a,Ce,Q,"linkSelectionAdornmentTemplate"),this.At=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.gw}},isModified:{configurable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.kn&&this.Be!==a.historyIndex:this.kn},set:function(a){if(this.kn!==a){A(a,"boolean",Q,"isModified");this.kn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Be= -b.historyIndex);a||hk(this)}}},model:{configurable:!0,get:function(){return this.fc},set:function(a){var b=this.fc;if(b!==a){w(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Bc(!0);var c=Ni(this,!0);this.ag=!1;this.Zm=!0;this.Be=-2;this.ng=!1;var d=this.Bb;this.Bb=!0;yh(this.animationManager,"Model");b&&(null!==this.nf&&this.nf.each(function(a){b.mk(a)}), -b.mk(this.Mc));this.fc=a;this.partManager=ik(this.fc.type);for(var e=0;ea||1a&&Ba(a,">= 0",P,"scrollHorizontalLineChange"),this.au=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(A(a,"number",P,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",P,"scrollVerticalLineChange"), +this.eu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.kj},set:function(a){G&&w(a,me,P,"lastInput");this.kj=a}},previousInput:{configurable:!0,get:function(){return this.Sg},set:function(a){G&&w(a,me,P,"previousInput");this.Sg=a}},firstInput:{configurable:!0,get:function(){return this.Sp},set:function(a){G&&w(a,me,P,"firstInput");this.Sp=a}},currentCursor:{configurable:!0,get:function(){return this.Xs}, +set:function(a){""===a&&(a=this.Fp);if(this.Xs!==a){A(a,"string",P,"currentCursor");var b=this.Na,c=this.Qa;if(null!==b&&null!==c){this.Xs=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.Fp},set:function(a){""=== +a&&(a="auto");var b=this.Fp;b!==a&&(A(a,"string",P,"defaultCursor"),this.Fp=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(null!==a&&A(a,"function",P,"click"),this.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(null!==a&&A(a,"function",P,"doubleClick"),this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0, +enumerable:!0,get:function(){return this.Bh},set:function(a){var b=this.Bh;b!==a&&(null!==a&&A(a,"function",P,"contextClick"),this.Bh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.Vh},set:function(a){var b=this.Vh;b!==a&&(null!==a&&A(a,"function",P,"mouseOver"),this.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.Th},set:function(a){var b=this.Th;b!==a&&(null!==a&&A(a,"function",P,"mouseHover"), +this.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Sh},set:function(a){var b=this.Sh;b!==a&&(null!==a&&A(a,"function",P,"mouseHold"),this.Sh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0,get:function(){return this.It},set:function(a){var b=this.It;b!==a&&(null!==a&&A(a,"function",P,"mouseDragOver"),this.It=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Qh},set:function(a){var b= +this.Qh;b!==a&&(G&&null!==a&&A(a,"function",P,"mouseDrop"),this.Qh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"boolean",P,"handlesDragDropForTopLevelParts"),this.mt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Rh},set:function(a){var b=this.Rh;b!==a&&(null!==a&&A(a,"function",P,"mouseEnter"),this.Rh=a,this.g("mouseEnter", +b,a))}},mouseLeave:{configurable:!0,get:function(){return this.Uh},set:function(a){var b=this.Uh;b!==a&&(null!==a&&A(a,"function",P,"mouseLeave"),this.Uh=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Ch}, +set:function(a){var b=this.Ch;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ch=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(this.ob=a,a.Ye(this))}},toolManager:{configurable:!0,get:function(){return this.ue},set:function(a){this.ue!==a&&(w(a,Ua,P,"toolManager"),this.ue=a,a.diagram=this)}},defaultTool:{configurable:!0, +get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&(w(a,xe,P,"defaultTool"),this.tb=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.jb},set:function(a){var b=this.jb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(w(a,xe,P,"currentTool"),this.jb=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.zw}}, +maxSelectionCount:{configurable:!0,get:function(){return this.Dt},set:function(a){var b=this.Dt;if(b!==a)if(A(a,"number",P,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Dt=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",P,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0, +enumerable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(w(a,Ce,P,"nodeSelectionAdornmentTemplate"),this.Kt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.lt},set:function(a){var b=this.lt;b!==a&&(w(a,Ce,P,"groupSelectionAdornmentTemplate"),this.lt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.At}, +set:function(a){var b=this.At;b!==a&&(w(a,Ce,P,"linkSelectionAdornmentTemplate"),this.At=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.gw}},isModified:{configurable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.kn&&this.Ce!==a.historyIndex:this.kn},set:function(a){if(this.kn!==a){A(a,"boolean",P,"isModified");this.kn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Ce= +b.historyIndex);a||hk(this)}}},model:{configurable:!0,get:function(){return this.fc},set:function(a){var b=this.fc;if(b!==a){w(a,X,P,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Cc(!0);var c=Ni(this,!0);this.bg=!1;this.Zm=!0;this.Ce=-2;this.og=!1;var d=this.Bb;this.Bb=!0;yh(this.animationManager,"Model");b&&(null!==this.pf&&this.pf.each(function(a){b.mk(a)}), +b.mk(this.Nc));this.fc=a;this.partManager=ik(this.fc.type);for(var e=0;ethis.scale&&(this.scale=a)):Ba(a,"> 0",Q,"minScale"))}},maxScale:{configurable:!0, -enumerable:!0,get:function(){return this.Ct},set:function(a){E(a,Q,"maxScale");var b=this.Ct;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.ru},set:function(a){this.ru.D(a)||(w(a,K,Q,"zoomPoint"),this.ru=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Ak},set:function(a){var b=this.Ak;b.D(a)||(w(a,Ib,Q,"contentAlignment"),this.Ak=a=a.M(), -this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.eq},set:function(a){var b=this.eq;b.D(a)||(w(a,Ib,Q,"initialContentAlignment"),this.eq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,Q,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.ab(),this.g("padding",b,a))}},partManager:{configurable:!0, -enumerable:!0,get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(w(a,zi,Q,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Xe(null),this.Nc=a,a.Xe(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}}, -layout:{configurable:!0,get:function(){return this.Pc},set:function(a){var b=this.Pc;b!==a&&(w(a,Di,Q,"layout"),this.Pc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.Sb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.xt},set:function(a){var b=this.xt;if(b!==a&&(A(a,"boolean",Q,"isTreePathToChildren"),this.xt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Gk(a.value)}},treeCollapsePolicy:{configurable:!0, -enumerable:!0,get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(a!==Ii&&a!==Pk&&a!==Tk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.mu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{configurable:!0,get:function(){return this.iw},set:function(a){this.iw=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.Tv},set:function(a){this.bi=null;this.Tv=new Hb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0, -get:function(){return this.Uv},set:function(a){this.Uv=Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.lp},set:function(a){var b=this.lp;E(a,Q,"scale");b!==a&&(this.lp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.np},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,Q,"autoScrollRegion");var b=this.np;b.D(a)||(this.np=a=a.M(),this.ab(),this.g("autoScrollRegion",b,a))}}}); -oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return Uk.lc()},set:function(a){Uk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return Vk}}});Q.prototype.makeImageData=Q.prototype.Fx;Q.prototype.makeImage=Q.prototype.Wz;Q.prototype.cacheGroupExternalLinks=Q.prototype.yu;Q.prototype.addRenderer=Q.prototype.Dy;Q.prototype.makeSVG=Q.prototype.av;Q.prototype.makeSvg=Q.prototype.ps;Q.prototype.stopAutoScroll=Q.prototype.wg; -Q.prototype.doAutoScroll=Q.prototype.Sr;Q.prototype.isUnoccupied=Q.prototype.ak;Q.prototype.raiseDiagramEvent=Q.prototype.T;Q.prototype.removeDiagramListener=Q.prototype.Wl;Q.prototype.addDiagramListener=Q.prototype.Jj;Q.prototype.findTreeRoots=Q.prototype.zz;Q.prototype.layoutDiagram=Q.prototype.Uz;Q.prototype.findTopLevelGroups=Q.prototype.rz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.sz;Q.prototype.ensureBounds=Q.prototype.eb;Q.prototype.findLinksByExample=Q.prototype.Vr; -Q.prototype.findNodesByExample=Q.prototype.Wr;Q.prototype.findLinkForData=Q.prototype.Jc;Q.prototype.findNodeForData=Q.prototype.oi;Q.prototype.findPartForData=Q.prototype.Kc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Qb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Ud;Q.prototype.transformViewToDoc=Q.prototype.Es;Q.prototype.transformRectDocToView=Q.prototype.zA;Q.prototype.transformDocToView=Q.prototype.ep; -Q.prototype.centerRect=Q.prototype.Qr;Q.prototype.scrollToRect=Q.prototype.pv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.Lz;Q.prototype.highlight=Q.prototype.Kz;Q.prototype.selectCollection=Q.prototype.qA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.hp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Mf; -Q.prototype.commitTransaction=Q.prototype.kb;Q.prototype.startTransaction=Q.prototype.Ja;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.ib;Q.prototype.removeChangedListener=Q.prototype.mk;Q.prototype.addChangedListener=Q.prototype.fh;Q.prototype.removeModelChangedListener=Q.prototype.lA;Q.prototype.addModelChangedListener=Q.prototype.Qw;Q.prototype.findLayer=Q.prototype.Vj;Q.prototype.removeLayer=Q.prototype.jA;Q.prototype.addLayerAfter=Q.prototype.zy; -Q.prototype.addLayerBefore=Q.prototype.Ow;Q.prototype.addLayer=Q.prototype.Cl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Rj;Q.prototype.removeParts=Q.prototype.vs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.zu;Q.prototype.setProperties=Q.prototype.im;Q.prototype.attach=Q.prototype.xu;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.Px;Q.prototype.setInputOption=Q.prototype.rA; -Q.prototype.getInputOption=Q.prototype.Ml;Q.prototype.resetRenderingHints=Q.prototype.Qx;Q.prototype.setRenderingHint=Q.prototype.Ux;Q.prototype.getRenderingHint=Q.prototype.Se;Q.prototype.maybeUpdate=Q.prototype.td;Q.prototype.requestUpdate=Q.prototype.Sb;Q.prototype.delayInitialization=Q.prototype.Vy;Q.prototype.isUpdateRequested=Q.prototype.Qz;Q.prototype.invalidateDocumentBounds=Q.prototype.ab;Q.prototype.findObjectsNear=Q.prototype.sg;Q.prototype.findPartsNear=Q.prototype.nz; -Q.prototype.findObjectsIn=Q.prototype.Ef;Q.prototype.findPartsIn=Q.prototype.mx;Q.prototype.findObjectsAt=Q.prototype.pi;Q.prototype.findPartsAt=Q.prototype.mz;Q.prototype.findObjectAt=Q.prototype.jc;Q.prototype.findPartAt=Q.prototype.Kl;Q.prototype.focusObject=Q.prototype.Az;Q.prototype.alignDocument=Q.prototype.Fy;Q.prototype.zoomToRect=Q.prototype.DA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.$w;Q.prototype.focus=Q.prototype.focus; -var yi=new yb,Qi=null,ah=void 0!==sa.document,Li=null,Mi="",Eh=new F(Q,"None",0),lj=new F(Q,"Uniform",1),mj=new F(Q,"UniformToFill",2),Sf=new F(Q,"CycleAll",10),Wf=new F(Q,"CycleNotDirected",11),Yf=new F(Q,"CycleNotDirectedFast",12),Zf=new F(Q,"CycleNotUndirected",13),Tf=new F(Q,"CycleDestinationTree",14),Vf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Ii=new F(Q,"TreeParentCollapsed",21),Pk=new F(Q,"AllParentsCollapsed",22),Tk=new F(Q,"AnyParentsCollapsed", -23),Uk=new H,Vk="2.2.14",Dk="image",Fk=!1,Wk=null,wi=!1; +if(!b.D(a)){w(a,K,P,"position");var c=this.viewportBounds.copy();this.va.assign(a);Qh(this.animationManager,b,this.va);this.Bb||null===this.Na&&!this.mo.u()?Pi(this):(this.Bb=!0,a=this.scale,ij(this,this.Jp,this.Ha/a,this.Ga/a,this.Ak,!1),this.Bb=!1);if(!this.Bb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Ea,!1)}K.free(b)}},initialPosition:{configurable:!0,get:function(){return this.ot},set:function(a){this.ot.D(a)||(w(a,K,P,"initialPosition"),this.ot=a.M())}},initialScale:{configurable:!0, +enumerable:!0,get:function(){return this.pt},set:function(a){this.pt!==a&&(A(a,"number",P,"initialScale"),this.pt=a)}},grid:{configurable:!0,get:function(){null===this.ee&&(this.ee=Si(this));return this.ee},set:function(a){var b=this.ee;if(b!==a){null===b&&(b=this.ee=Si(this));w(a,V,P,"grid");a.type!==V.Grid&&v("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b);this.ee=a;a.name="GRID";null!==c&&c.add(a);xj(this);this.R();this.g("grid",b,a)}}},viewportBounds:{configurable:!0, +enumerable:!0,get:function(){return this.Jw}},viewSize:{configurable:!0,get:function(){return this.mo},set:function(a){var b=this.viewSize;b.D(a)||(w(a,Hb,P,"viewSize"),this.mo=a=a.M(),this.Ga=this.Ha=0,a.u()?(this.Ha=a.width,this.Ga=a.height):null!==this.Qa&&(this.Ha=this.Qa.clientWidth||1,this.Ga=this.Qa.clientHeight||1),Pi(this),this.ab(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{configurable:!0,get:function(){return this.jt},set:function(a){var b=this.jt; +b.D(a)||(w(a,M,P,"fixedBounds"),(G&&Infinity===a.width||-Infinity===a.width||Infinity===a.height||-Infinity===a.height)&&v("fixedBounds width/height must not be Infinity"),this.jt=a=a.M(),this.ab(),this.g("fixedBounds",b,a))}},scrollMargin:{configurable:!0,get:function(){return this.zj},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"scrollMargin");var b=this.zj;b.D(a)||(this.zj=a=a.M(),this.g("scrollMargin",b,a),this.Wo())}},scrollMode:{configurable:!0,get:function(){return this.Aj}, +set:function(a){var b=this.Aj;b!==a&&(ab(a,P,P,"scrollMode"),this.Aj=a,a===di&&Yi(this,!1),this.g("scrollMode",b,a),this.R())}},scrollsPageOnFocus:{configurable:!0,get:function(){return this.fu},set:function(a){var b=this.fu;b!==a&&(A(a,"boolean",P,"scrollsPageOnFocus"),this.fu=a,this.g("scrollsPageOnFocus",b,a))}},positionComputation:{configurable:!0,get:function(){return this.Rt},set:function(a){var b=this.Rt;b!==a&&(null!==a&&A(a,"function",P,"positionComputation"), +this.Rt=a,Yi(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{configurable:!0,get:function(){return this.Yt},set:function(a){var b=this.Yt;b!==a&&(null!==a&&A(a,"function",P,"scaleComputation"),this.Yt=a,fk(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{configurable:!0,get:function(){return this.Jp}},isVirtualized:{configurable:!0,get:function(){return this.yt},set:function(a){var b=this.yt;b!==a&&(A(a,"boolean", +P,"isVirtualized"),this.yt=a,this.g("isVirtualized",b,a))}},scale:{configurable:!0,get:function(){return this.Ea},set:function(a){var b=this.Ea;E(a,P,"scale");b!==a&&fk(this,b,a)}},defaultScale:{configurable:!0,get:function(){return this.Gp},set:function(a){G&&E(a,P,"defaultScale");!G||0this.scale&&(this.scale=a)):Ba(a,"> 0",P,"minScale"))}},maxScale:{configurable:!0, +enumerable:!0,get:function(){return this.Ct},set:function(a){E(a,P,"maxScale");var b=this.Ct;b!==a&&(0 0",P,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.ru},set:function(a){this.ru.D(a)||(w(a,K,P,"zoomPoint"),this.ru=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Ak},set:function(a){var b=this.Ak;b.D(a)||(w(a,Ib,P,"contentAlignment"),this.Ak=a=a.M(), +this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.eq},set:function(a){var b=this.eq;b.D(a)||(w(a,Ib,P,"initialContentAlignment"),this.eq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.ab(),this.g("padding",b,a))}},partManager:{configurable:!0, +enumerable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(w(a,zi,P,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Ye(null),this.Oc=a,a.Ye(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}}, +layout:{configurable:!0,get:function(){return this.Qc},set:function(a){var b=this.Qc;b!==a&&(w(a,Di,P,"layout"),this.Qc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.Sb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.xt},set:function(a){var b=this.xt;if(b!==a&&(A(a,"boolean",P,"isTreePathToChildren"),this.xt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Gk(a.value)}},treeCollapsePolicy:{configurable:!0, +enumerable:!0,get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(a!==Ii&&a!==Pk&&a!==Tk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.mu=a,this.g("treeCollapsePolicy",b,a))}},Ve:{configurable:!0,get:function(){return this.iw},set:function(a){this.iw=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.Tv},set:function(a){this.bi=null;this.Tv=new Hb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0, +get:function(){return this.Uv},set:function(a){this.Uv=Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.lp},set:function(a){var b=this.lp;E(a,P,"scale");b!==a&&(this.lp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.np},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,P,"autoScrollRegion");var b=this.np;b.D(a)||(this.np=a=a.M(),this.ab(),this.g("autoScrollRegion",b,a))}}}); +oa.Object.defineProperties(P,{licenseKey:{configurable:!0,get:function(){return Uk.lc()},set:function(a){Uk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return Vk}}});P.prototype.makeImageData=P.prototype.Gx;P.prototype.makeImage=P.prototype.Wz;P.prototype.cacheGroupExternalLinks=P.prototype.yu;P.prototype.addRenderer=P.prototype.Ey;P.prototype.makeSVG=P.prototype.av;P.prototype.makeSvg=P.prototype.ps;P.prototype.stopAutoScroll=P.prototype.xg; +P.prototype.doAutoScroll=P.prototype.Sr;P.prototype.isUnoccupied=P.prototype.ak;P.prototype.raiseDiagramEvent=P.prototype.T;P.prototype.removeDiagramListener=P.prototype.Wl;P.prototype.addDiagramListener=P.prototype.Jj;P.prototype.findTreeRoots=P.prototype.zz;P.prototype.layoutDiagram=P.prototype.Uz;P.prototype.findTopLevelGroups=P.prototype.rz;P.prototype.findTopLevelNodesAndLinks=P.prototype.sz;P.prototype.ensureBounds=P.prototype.eb;P.prototype.findLinksByExample=P.prototype.Vr; +P.prototype.findNodesByExample=P.prototype.Wr;P.prototype.findLinkForData=P.prototype.Kc;P.prototype.findNodeForData=P.prototype.oi;P.prototype.findPartForData=P.prototype.Lc;P.prototype.findLinkForKey=P.prototype.findLinkForKey;P.prototype.findNodeForKey=P.prototype.Qb;P.prototype.findPartForKey=P.prototype.findPartForKey;P.prototype.rebuildParts=P.prototype.Ud;P.prototype.transformViewToDoc=P.prototype.Es;P.prototype.transformRectDocToView=P.prototype.zA;P.prototype.transformDocToView=P.prototype.ep; +P.prototype.centerRect=P.prototype.Qr;P.prototype.scrollToRect=P.prototype.pv;P.prototype.scroll=P.prototype.scroll;P.prototype.highlightCollection=P.prototype.Lz;P.prototype.highlight=P.prototype.Kz;P.prototype.selectCollection=P.prototype.qA;P.prototype.select=P.prototype.select;P.prototype.updateAllRelationshipsFromData=P.prototype.hp;P.prototype.updateAllTargetBindings=P.prototype.updateAllTargetBindings;P.prototype.commit=P.prototype.commit;P.prototype.rollbackTransaction=P.prototype.Nf; +P.prototype.commitTransaction=P.prototype.kb;P.prototype.startTransaction=P.prototype.Ja;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.ib;P.prototype.removeChangedListener=P.prototype.mk;P.prototype.addChangedListener=P.prototype.fh;P.prototype.removeModelChangedListener=P.prototype.lA;P.prototype.addModelChangedListener=P.prototype.Qw;P.prototype.findLayer=P.prototype.Vj;P.prototype.removeLayer=P.prototype.jA;P.prototype.addLayerAfter=P.prototype.Ay; +P.prototype.addLayerBefore=P.prototype.Ow;P.prototype.addLayer=P.prototype.Cl;P.prototype.moveParts=P.prototype.moveParts;P.prototype.copyParts=P.prototype.Rj;P.prototype.removeParts=P.prototype.vs;P.prototype.remove=P.prototype.remove;P.prototype.add=P.prototype.add;P.prototype.clearDelayedGeometries=P.prototype.zu;P.prototype.setProperties=P.prototype.im;P.prototype.attach=P.prototype.xu;P.prototype.set=P.prototype.set;P.prototype.resetInputOptions=P.prototype.Qx;P.prototype.setInputOption=P.prototype.rA; +P.prototype.getInputOption=P.prototype.Ml;P.prototype.resetRenderingHints=P.prototype.Rx;P.prototype.setRenderingHint=P.prototype.Vx;P.prototype.getRenderingHint=P.prototype.Te;P.prototype.maybeUpdate=P.prototype.td;P.prototype.requestUpdate=P.prototype.Sb;P.prototype.delayInitialization=P.prototype.Vy;P.prototype.isUpdateRequested=P.prototype.Qz;P.prototype.invalidateDocumentBounds=P.prototype.ab;P.prototype.findObjectsNear=P.prototype.tg;P.prototype.findPartsNear=P.prototype.nz; +P.prototype.findObjectsIn=P.prototype.Ff;P.prototype.findPartsIn=P.prototype.nx;P.prototype.findObjectsAt=P.prototype.pi;P.prototype.findPartsAt=P.prototype.mz;P.prototype.findObjectAt=P.prototype.jc;P.prototype.findPartAt=P.prototype.Kl;P.prototype.focusObject=P.prototype.Az;P.prototype.alignDocument=P.prototype.Gy;P.prototype.zoomToRect=P.prototype.DA;P.prototype.zoomToFit=P.prototype.zoomToFit;P.prototype.diagramScroll=P.prototype.ax;P.prototype.focus=P.prototype.focus; +var yi=new yb,Qi=null,ah=void 0!==sa.document,Li=null,Mi="",Eh=new F(P,"None",0),lj=new F(P,"Uniform",1),mj=new F(P,"UniformToFill",2),Sf=new F(P,"CycleAll",10),Wf=new F(P,"CycleNotDirected",11),Yf=new F(P,"CycleNotDirectedFast",12),Zf=new F(P,"CycleNotUndirected",13),Tf=new F(P,"CycleDestinationTree",14),Vf=new F(P,"CycleSourceTree",15),di=new F(P,"DocumentScroll",1),fi=new F(P,"InfiniteScroll",2),Ii=new F(P,"TreeParentCollapsed",21),Pk=new F(P,"AllParentsCollapsed",22),Tk=new F(P,"AnyParentsCollapsed", +23),Uk=new H,Vk="2.2.15",Dk="image",Fk=!1,Wk=null,wi=!1; function xi(){if(ah){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d6038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Jb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Jb.prototype.Rd=Jb.prototype.Tw; -Wk=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",Q,"inherit");A(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){ah=a?void 0!==sa.document:!1}; -Q.isUsingDOM=function(){return ah};Q.None=Eh;Q.Uniform=lj;Q.UniformToFill=mj;Q.CycleAll=Sf;Q.CycleNotDirected=Wf;Q.CycleNotDirectedFast=Yf;Q.CycleNotUndirected=Zf;Q.CycleDestinationTree=Tf;Q.CycleSourceTree=Vf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Ii;Q.AllParentsCollapsed=Pk;Q.AnyParentsCollapsed=Tk;function Ei(){this.uy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.vd=this.j=!0:this.vd=null} -function Gj(a,b){b.dc.setTransform(b.qc,0,0,b.qc,0,0);b.dc.Uc();if(null===a.vd)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.vd=!0;if(ah){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=Uk.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); +Wk=a}}P.className="Diagram";P.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof P?b.H:null};P.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",P,"inherit");A(b,"function",P,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};P.useDOM=function(a){ah=a?void 0!==sa.document:!1}; +P.isUsingDOM=function(){return ah};P.None=Eh;P.Uniform=lj;P.UniformToFill=mj;P.CycleAll=Sf;P.CycleNotDirected=Wf;P.CycleNotDirectedFast=Yf;P.CycleNotUndirected=Zf;P.CycleDestinationTree=Tf;P.CycleSourceTree=Vf;P.DocumentScroll=di;P.InfiniteScroll=fi;P.TreeParentCollapsed=Ii;P.AllParentsCollapsed=Pk;P.AnyParentsCollapsed=Tk;function Ei(){this.vy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.vd=this.j=!0:this.vd=null} +function Gj(a,b){b.dc.setTransform(b.qc,0,0,b.qc,0,0);b.dc.Vc();if(null===a.vd)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.vd=!0;if(ah){var d=P[Va("76a115b6ed251eaf4692")];if(d)for(var e=Uk.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); f=Va(d[2]);if(-1g&&f!==Va("7da71ca0ad381e90")&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.vd=!(0<=g&&gk.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(sa.document[Va("78a712aa")]){sa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g); k=sa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8"));var l=sa.getComputedStyle(g).getPropertyValue(Va("75b817b0ea2202"));sa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g);if(k)if(g=sa[Va("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.vd=!1;break}else if(g&&g(Va("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& +"none",e.style.touchAction="none");a.Na=e;a.dc=e.context;d=a.dc;a.qc=a.computePixelRatio();a.viewSize.u()||(a.Ha=a.Qa.clientWidth||1,a.Ga=a.Qa.clientHeight||1);Nj(a,a.Ha,a.Ga);a.Qa.insertBefore(e.Xa,a.Qa.firstChild);e=new Ek(null);e.width=1;e.height=1;a.bw=e;a.my=e.context;if(ah){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ha+"px";e.style.height=a.Ga+"px";e.style.zIndex="1";f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Qa.appendChild(e); +e.appendChild(f);e.onscroll=Ti;e.addEventListener("pointerdown",Vi);e.H=a;e.ty=!0;e.uy=!0;a.cu=e;a.$t=f}a.Wo=ua(function(){a.ci=null;a.R()},300);a.Gv=ua(function(){Fh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.dk=function(b){if(a.isEnabled){var c=qj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& (d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0c||Math.abs(e.y-b.screenY)>c)?a.lq++:a.lq=1;d.clickCount=a.lq;a.mw=b.timeStamp;a.nw.vg(b.screenX,b.screenY); +b;else if(null!==c[1]&&c[1].pointerId===b.pointerId)c[1]=b,d=!0;else if(null===c[0])c[0]=b;else if(null===c[1])c[1]=b,d=!0;else{b.preventDefault();return}if(c="touch"===b.pointerType||"pen"===b.pointerType)a.iu=!1,a.wt=!0;var e=d;d=tj(a,b,!0,!1,!0,e);rj(a,b,d);d.targetDiagram=sj(b,b.target);d.targetObject=null;e||d.clone(a.Sp);e=a.nw;c=c?25:10;b.timeStamp-a.mwc||Math.abs(e.y-b.screenY)>c)?a.lq++:a.lq=1;d.clickCount=a.lq;a.mw=b.timeStamp;a.nw.wg(b.screenX,b.screenY); a.doMouseDown();1===b.button?b.preventDefault():uj(a,d,b)}};a.ik=function(b){if(a.isEnabled){a.Xk=!0;var c=a.ml;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}if(c[0].pointerId===b.pointerId){c=tj(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX,b.clientY);null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f= b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;rj(a,f,c);c.targetObject=null;a.doMouseMove();uj(a,c,b)}}};a.kk=function(b){if(a.isEnabled){a.Xk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Qt;if(c&&a.iu)delete d[b.pointerId],b.preventDefault();else if(d=a.ml,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]=null;d=tj(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY)); -null!==e&&e.H instanceof Q&&e.H!==a&&rj(e.H,b,d);null===e&&(e=b.target);rj(a,b,d);d.clickCount=a.lq;d.targetDiagram=sj(b,e);d.targetObject=null;a.doMouseUp();uj(a,d,b);c&&(a.wt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.jk=function(b){if(a.isEnabled){a.Xk=!1;var c=a.Qt;c[b.pointerId]&&delete c[b.pointerId];c=a.ml;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.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.ct=d.ba["d"+Xk[1]+Xk[2]+"wI"+Dk.slice(1,5)]["b"+Yk.slice(1,b)](d.ba,Wk,b,b);d.Tc(!0);Ri(a)}}Ei.className="DiagramHelper";function Xe(a){this.j=void 0===a?new K:a;this.o=new K}oa.Object.defineProperties(Xe.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}}});var Xk="DraggingInfo"; +null!==e&&e.H instanceof P&&e.H!==a&&rj(e.H,b,d);null===e&&(e=b.target);rj(a,b,d);d.clickCount=a.lq;d.targetDiagram=sj(b,e);d.targetObject=null;a.doMouseUp();uj(a,d,b);c&&(a.wt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.jk=function(b){if(a.isEnabled){a.Xk=!1;var c=a.Qt;c[b.pointerId]&&delete c[b.pointerId];c=a.ml;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.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.ct=d.ba["d"+Xk[1]+Xk[2]+"wI"+Dk.slice(1,5)]["b"+Yk.slice(1,b)](d.ba,Wk,b,b);d.Uc(!0);Ri(a)}}Ei.className="DiagramHelper";function Xe(a){this.j=void 0===a?new K:a;this.m=new K}oa.Object.defineProperties(Xe.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a}}});var Xk="DraggingInfo"; Xe.className="DraggingInfo";function Yj(a,b,c){this.node=a;this.info=b;this.Tu=c}Yj.className="DraggingNodeInfoPair";function Pe(){this.reset()}Pe.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Hb(NaN,NaN)).freeze();this.gridSnapCellSpot=Fc;this.gridSnapOrigin=(new K(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Pe.className="DraggingOptions"; -function Zk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;$k(c);b&&c.im(b);return c}na(Zk,Q);function $k(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=Gc;a.layout=new al}Zk.prototype.reset=function(){Q.prototype.reset.call(this);$k(this)};Zk.className="Palette"; -function bl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.aa=null;c.en=!1;c.fn=!1;c.G=!0;c.v=!0;c.ma=0;c.o=!1;c.sl=null;c.Ux("drawShadows",!1);a=new S;var e=new Qf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= -"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new gc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new cl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.Rf=function(){d.ab();dl(d)};c.Wd=function(){null!==d.observed&&(d.ab(),d.R())};c.Ma=function(){1>d.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Qf=function(){null!==d.observed&&dl(d)};c.autoScale=lj;c.Bb=!1;b&&Object.assign(c,b);return c}na(bl,Q);bl.prototype.computePixelRatio=function(){return 1}; -bl.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Na,b=this.dc;if(null!==a&&null!==b){Ej(this);if(null===this.sl){var c=new Ek(null);c.width=a.width;c.height=a.height;this.sl=c}try{this.Na=this.sl,this.dc=this.Na.context,this.dc.Tc(!0),this.dc.setTransform(1,0,0,1,0,0),this.dc.clearRect(0,0,this.Na.width,this.Na.height),el(this)}finally{this.Na=a,this.dc=b}}}Q.prototype.redraw.call(this)}; -bl.prototype.zc=function(){null===this.Qa&&v("No div specified");null===this.Na&&v("No canvas specified");if(!(this.Na instanceof Lj)&&(ri(this.box),this.hd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.xi){Ej(this);var b=this.Na;a=this.dc;a.Tc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?el(this):null!==this.sl&&(a.drawImage(this.sl.Xa,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +function Zk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=P.call(this,a)||this;else c=P.call(this)||this,b=a;$k(c);b&&c.im(b);return c}na(Zk,P);function $k(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=Gc;a.layout=new al}Zk.prototype.reset=function(){P.prototype.reset.call(this);$k(this)};Zk.className="Palette"; +function bl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=P.call(this,a)||this;else c=P.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.$=null;c.en=!1;c.fn=!1;c.G=!0;c.v=!0;c.ma=0;c.m=!1;c.sl=null;c.Vx("drawShadows",!1);a=new S;var e=new Qf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new gc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new cl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.Sf=function(){d.ab();dl(d)};c.Wd=function(){null!==d.observed&&(d.ab(),d.R())};c.Ma=function(){1>d.updateDelay?d.R():d.m||(d.m=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Rf=function(){null!==d.observed&&dl(d)};c.autoScale=lj;c.Bb=!1;b&&Object.assign(c,b);return c}na(bl,P);bl.prototype.computePixelRatio=function(){return 1}; +bl.prototype.redraw=function(){if(this.m&&1<=this.updateDelay){this.m=!1;var a=this.Na,b=this.dc;if(null!==a&&null!==b){Ej(this);if(null===this.sl){var c=new Ek(null);c.width=a.width;c.height=a.height;this.sl=c}try{this.Na=this.sl,this.dc=this.Na.context,this.dc.Uc(!0),this.dc.setTransform(1,0,0,1,0,0),this.dc.clearRect(0,0,this.Na.width,this.Na.height),el(this)}finally{this.Na=a,this.dc=b}}}P.prototype.redraw.call(this)}; +bl.prototype.zc=function(){null===this.Qa&&v("No div specified");null===this.Na&&v("No canvas specified");if(!(this.Na instanceof Lj)&&(ri(this.box),this.hd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.xi){Ej(this);var b=this.Na;a=this.dc;a.Uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?el(this):null!==this.sl&&(a.drawImage(this.sl.Xa,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.qc,this.qc),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.$a.s;for(var c=b.length,d=0;da&&(a=0);this.ma!==a&&(this.ma=a)}}});bl.className="Overview";function cl(){Oe.call(this);this.j=null}na(cl,Oe); cl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale?!1:b.allowZoom};fl.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);E(a,fl,"increaseZoom:factor");var b=this.diagram;b.autoScale===Eh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; fl.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);E(a,fl,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Eh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};fl.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);E(a,fl,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; fl.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);E(a,fl,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -fl.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Bc();a.redraw();var c=a.position,d=a.scale;yh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.su&&!isNaN(this.zt)&&a.documentBounds.D(this.qu)?(a.scale=this.zt,a.position=this.lw,this.su=NaN,this.qu=pc):(this.zt=d,this.lw=c.copy(),a.zoomToFit(),this.su=a.scale,this.qu=a.documentBounds.copy());Ah(b)};fl.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -fl.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w(a,S,fl,"part");var b=this.diagram;b.eb();if(null===a){try{null!==this.fg&&(this.fg.next()?a=this.fg.value:this.fg=null)}catch(k){this.fg=null}null===a&&(0a&&(a+=360));return a}; -t.Ff=function(){if(0!==(this.m&4096)===!1)return this.Lk;var a=this.Ea;return null!==this.panel?a*this.panel.Ff():a};t.$r=function(a,b){void 0===b&&(b=new K);b.assign(a);this.ne.Rd(b);return b};t.bs=function(a,b,c){return this.Xj(a.x,a.y,b.x,b.y,c)}; -t.Xj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.Hf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.Hf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +t.g=function(a,b,c){this.ib(qe,a,this,b,c)};t.Ge=function(a,b,c,d){var e=this.wc;e.h(a,b,c,d);if(1!==this.Ea||0!==this.Lb){null===this.Nb&&(this.Nb=new Jb);var f=this.Nb;f.reset();this.bo(f,a,b,c,d);f.fp(e)}};function wl(a,b,c,d){if(!1===a.pickable)return!1;d.multiply(a.transform);return c?a.Yc(b,d):a.hh(b,d)} +t.mx=function(a,b,c){if(!1===this.pickable)return!1;var d=this.naturalBounds;b=a.Df(b);return c?Lb(a.x,a.y,0,0,0,d.height)<=b||Lb(a.x,a.y,0,d.height,d.width,d.height)<=b||Lb(a.x,a.y,d.width,d.height,d.width,0)<=b||Lb(a.x,a.y,d.width,0,0,0)<=b:a.zd(0,0)<=b&&a.zd(0,d.height)<=b&&a.zd(d.width,0)<=b&&a.zd(d.width,d.height)<=b};t.se=function(){return!0}; +t.ga=function(a){G&&w(a,K,O,"containsPoint:p");var b=K.alloc();b.assign(a);this.transform.La(b);var c=this.actualBounds;if(!c.u())return K.free(b),!1;var d=this.diagram;if(null!==d&&d.wt){var e=d.Ml("extraTouchThreshold"),f=d.Ml("extraTouchArea"),g=f/2,h=this.naturalBounds;d=this.Gf()*d.scale;var k=1/d;if(h.width*da&&(a+=360));return a}; +t.Gf=function(){if(0!==(this.o&4096)===!1)return this.Lk;var a=this.Ea;return null!==this.panel?a*this.panel.Gf():a};t.$r=function(a,b){void 0===b&&(b=new K);b.assign(a);this.oe.Rd(b);return b};t.bs=function(a,b,c){return this.Xj(a.x,a.y,b.x,b.y,c)}; +t.Xj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.If(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.If(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; O.prototype.measure=function(a,b,c,d){if(!1!==Bj(this)){var e=this.Mg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=0;this instanceof Qf&&(g=this.strokeWidth);90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof V;switch(xl(this,!0)){case yg:g=e=0;h&&(b=a=Infinity); break;case Bd:isFinite(a)&&a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case jl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case kl:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.Db>a.width)))c=!0;this.m=c?this.m|256:this.m&-257;this.Jb.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Tl(f,this.Jb);yl(this,!1);M.free(f)};t=O.prototype;t.gh=function(){}; +this.xq>a.height||this.Db>a.width)))c=!0;this.o=c?this.o|256:this.o&-257;this.Jb.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Tl(f,this.Jb);yl(this,!1);M.free(f)};t=O.prototype;t.gh=function(){}; function zl(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.wc;c=a.Mg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=xl(a,!0);c===d&&f===e&&(b=yg);switch(b){case yg:if(c>d||f>e)wj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Bd:wj(a,!0);a.measure(d,e,0,0);break;case jl:wj(a,!0);a.measure(d,f,0,0);break;case kl:wj(a,!0),a.measure(c,e,0,0)}}} t.Tl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||Al(c,!0),this.R(),ec(a,b)||(c.oh(),this.In(c)))};t.In=function(a){null!==this.portId&&(Al(a,!0),a instanceof T&&Bl(a,this))}; -t.zc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof V&&(this.type===V.TableRow||this.type===V.TableColumn),e=this.Jb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Jb;d=this.gc;var g=this.areaBackground,h=this.cc;null===g&&null===h||a.Uc();null!==g&&(ti(this,a,g,!0,!0,d,e),g instanceof Cl&&g.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(g)):a.fillRect(e.x,e.y,e.width,e.height)); -null!==h&&(ti(this,a,h,!0,!1,d,e),h instanceof Cl&&h.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(h)):a.fillRect(e.x,e.y,e.width,e.height));this.mi(a,b)}else if(!this.ex(a,b)){this instanceof R&&this.ck(!1);G&&G.El&&G.bz&&G.bz(a,this);d=this.transform;g=this.panel;0!==(this.m&4096)===!0&&El(this);var k=this.part;h=!1;var l=0;if(k&&b.Se("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.qc}m=this.zi();var n;if(!(n=b.hj||!m)){var p=this.naturalBounds; +t.zc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof V&&(this.type===V.TableRow||this.type===V.TableColumn),e=this.Jb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Jb;d=this.gc;var g=this.areaBackground,h=this.cc;null===g&&null===h||a.Vc();null!==g&&(ti(this,a,g,!0,!0,d,e),g instanceof Cl&&g.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(g)):a.fillRect(e.x,e.y,e.width,e.height)); +null!==h&&(ti(this,a,h,!0,!1,d,e),h instanceof Cl&&h.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(h)):a.fillRect(e.x,e.y,e.width,e.height));this.mi(a,b)}else if(!this.gx(a,b)){this instanceof R&&this.ck(!1);G&&G.El&&G.bz&&G.bz(a,this);d=this.transform;g=this.panel;0!==(this.o&4096)===!0&&El(this);var k=this.part;h=!1;var l=0;if(k&&b.Te("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.qc}m=this.zi();var n;if(!(n=b.hj||!m)){var p=this.naturalBounds; n=this.wh;var r=n.m11,q=n.m21,u=n.dx,x=n.m12,y=n.m22,z=n.dy,B,C=B=0;n=B*r+C*q+u;var D=B*x+C*y+z;B=p.width+l;C=0;var J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);var U=Math.min(D,B);var aa=Math.max(n+0,J)-C;var Y=Math.max(D+0,B)-U;n=C;D=U;B=p.width+l;C=p.height+l;J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);U=Math.min(D,B);aa=Math.max(n+aa,J)-C;Y=Math.max(D+Y,B)-U;n=C;D=U;B=0;C=p.height+l;J=B*r+C*q+u;B=B*x+C*y+z;C=Math.min(n,J);U=Math.min(D,B);aa=Math.max(n+aa,J)-C;Y=Math.max(D+Y,B)-U;n=C;D=U;l=b.viewportBounds; -p=l.x;r=l.y;n=!(n>l.width+p||p>aa+n||D>l.height+r||r>Y+D)}if(n){n=0!==(this.m&256);a.clipInsteadOfFill&&(n=!1);this instanceof ch&&(a.font=this.font);if(n){D=g.re()?g.naturalBounds:g.actualBounds;null!==this.pb?(p=this.pb,aa=p.x,Y=p.y,l=p.width,p=p.height):(aa=Math.max(e.x,D.x),Y=Math.max(e.y,D.y),l=Math.min(e.right,D.right)-aa,p=Math.min(e.bottom,D.bottom)-Y);if(aa>e.width+e.x||e.x>D.width+D.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(aa,Y,l,p);a.clip()}if(m){if(!k.isVisible()){1!== -c&&(a.globalAlpha=f);return}h&&(D=k.shadowOffset,a.wv(D.x*b.scale*b.qc,D.y*b.scale*b.qc,k.shadowBlur),Fl(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?Fl(a):h&&!1===this.shadowVisible&&Gl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Uc(),ti(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof Cl&&this.areaBackground.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Df(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12, -d.m21,d.m22,d.dx,d.dy);h&&(null!==g&&0!==(g.m&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)&&null===this.shadowVisible&&Gl(a);null!==this.cc&&(a.Uc(),Hl(this,a,k,e));G&&G.El&&G.cz&&G.cz(a,this);h&&(null!==this.cc||null!==this.areaBackground||null!==g&&0!==(g.m&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)?(Il(this,!0),null===this.shadowVisible&&Gl(a)):Il(this,!1);this.mi(a,b);h&&0!==(this.m&512)===!0&&Fl(a);m&&h&&Gl(a);n&&(a.restore(),a.Tc(this instanceof -V));d.js()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22*b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function Hl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.fw();a instanceof Qf&&(e=a.ya.bounds,f=e.x,g=e.y,h=e.width,e=e.height);ti(a,b,a.cc,!0,!1,c,d);a.cc instanceof Cl&&a.cc.type===Dl?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.Df(a.cc)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.ex=function(){return!1};t.mi=function(){}; -function ti(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Jl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Qf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Kl)&&c.xe&&(c.type===Ll||c.zk===h&&c.Us===k))var m=c.xe;else{var n=0,p=0,r=0,q=0,u=0,x=0;x=u=0;e?(u=g.x,x=g.y):d||(u-=l/2,x-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ -c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=x;q+=x;if(c.type===Ml)m=b.createLinearGradient(n,p,r,q);else if(c.type===Dl)x=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,x=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,x);else if(c.type===Ll)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else Aa(c.type,"Brush type");if(c.type!==Ll&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.xe=m,null!== -m&&(c.zk=h,c.Us=k),null===m&&c.type===Ll&&-1!==c.zk)){c.zk=-1;var y=a.diagram;null!==y&&-1===c.zk&&va(function(){y.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.ug=function(a){if(a instanceof V)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Kf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Kf():!0}; -t.Jf=function(){for(var a=this instanceof V?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function El(a){if(0!==(a.m&2048)===!0){var b=a.Gb;b.reset();if(!a.Jb.u()||!a.wc.u()){Nl(a,!1);return}b.translate(a.Jb.x-a.wc.x,a.Jb.y-a.wc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.bo(b,c.x,c.y,c.width,c.height)}Nl(a,!1);Ol(a,!0)}0!==(a.m&4096)===!0&&(b=a.panel,null===b?(a.wh.set(a.Gb),a.Lk=a.scale,Ol(a,!1)):null!==b.ne&&(c=a.wh,c.reset(),b.re()?c.multiply(b.wh):null!==b.panel&&c.multiply(b.panel.wh),c.multiply(a.Gb),a.Lk=a.scale*b.Lk,Ol(a,!1)))} -t.bo=function(a,b,c,d,e){1!==this.Ea&&a.scale(this.Ea);if(0!==this.Lb){var f=K.alloc();f.Di(b,c,d,e,Kc);a.rotate(this.Lb,f.x,f.y);K.free(f)}};t.w=function(a){if(!Bj(this)){void 0===a&&(a=!1);wj(this,!0);yl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Zj=function(){Bj(this)||(wj(this,!0),yl(this,!0))};function Pl(a){if(!Cj(a)){var b=a.panel;null!==b?b.w():a.zi()&&(b=a.diagram,null!==b&&(b.Ce.add(a),a instanceof T&&a.Bd(),b.Sb()));yl(a,!0)}} -t.Wk=function(){0!==(this.m&2048)===!1&&(Nl(this,!0),Ol(this,!0))};t.Xu=function(){Ol(this,!0)};t.R=function(){var a=this.part;null!==a&&a.R()}; +p=l.x;r=l.y;n=!(n>l.width+p||p>aa+n||D>l.height+r||r>Y+D)}if(n){n=0!==(this.o&256);a.clipInsteadOfFill&&(n=!1);this instanceof ch&&(a.font=this.font);if(n){D=g.se()?g.naturalBounds:g.actualBounds;null!==this.pb?(p=this.pb,aa=p.x,Y=p.y,l=p.width,p=p.height):(aa=Math.max(e.x,D.x),Y=Math.max(e.y,D.y),l=Math.min(e.right,D.right)-aa,p=Math.min(e.bottom,D.bottom)-Y);if(aa>e.width+e.x||e.x>D.width+D.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(aa,Y,l,p);a.clip()}if(m){if(!k.isVisible()){1!== +c&&(a.globalAlpha=f);return}h&&(D=k.shadowOffset,a.wv(D.x*b.scale*b.qc,D.y*b.scale*b.qc,k.shadowBlur),Fl(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?Fl(a):h&&!1===this.shadowVisible&&Gl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Vc(),ti(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof Cl&&this.areaBackground.type===Dl?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.Ef(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12, +d.m21,d.m22,d.dx,d.dy);h&&(null!==g&&0!==(g.o&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)&&null===this.shadowVisible&&Gl(a);null!==this.cc&&(a.Vc(),Hl(this,a,k,e));G&&G.El&&G.cz&&G.cz(a,this);h&&(null!==this.cc||null!==this.areaBackground||null!==g&&0!==(g.o&512)||null!==g&&(g.type===V.Auto||g.type===V.Spot)&&g.Ab()!==this)?(Il(this,!0),null===this.shadowVisible&&Gl(a)):Il(this,!1);this.mi(a,b);h&&0!==(this.o&512)===!0&&Fl(a);m&&h&&Gl(a);n&&(a.restore(),a.Uc(this instanceof +V));d.js()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22*b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function Hl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.fw();a instanceof Qf&&(e=a.ya.bounds,f=e.x,g=e.y,h=e.width,e=e.height);ti(a,b,a.cc,!0,!1,c,d);a.cc instanceof Cl&&a.cc.type===Dl?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.Ef(a.cc)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.gx=function(){return!1};t.mi=function(){}; +function ti(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Jl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Qf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Kl)&&c.ye&&(c.type===Ll||c.zk===h&&c.Us===k))var m=c.ye;else{var n=0,p=0,r=0,q=0,u=0,x=0;x=u=0;e?(u=g.x,x=g.y):d||(u-=l/2,x-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=x;q+=x;if(c.type===Ml)m=b.createLinearGradient(n,p,r,q);else if(c.type===Dl)x=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,x=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,x);else if(c.type===Ll)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else Aa(c.type,"Brush type");if(c.type!==Ll&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ye=m,null!== +m&&(c.zk=h,c.Us=k),null===m&&c.type===Ll&&-1!==c.zk)){c.zk=-1;var y=a.diagram;null!==y&&-1===c.zk&&va(function(){y.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.vg=function(a){if(a instanceof V)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Lf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Lf():!0}; +t.Kf=function(){for(var a=this instanceof V?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; +function El(a){if(0!==(a.o&2048)===!0){var b=a.Gb;b.reset();if(!a.Jb.u()||!a.wc.u()){Nl(a,!1);return}b.translate(a.Jb.x-a.wc.x,a.Jb.y-a.wc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.bo(b,c.x,c.y,c.width,c.height)}Nl(a,!1);Ol(a,!0)}0!==(a.o&4096)===!0&&(b=a.panel,null===b?(a.wh.set(a.Gb),a.Lk=a.scale,Ol(a,!1)):null!==b.oe&&(c=a.wh,c.reset(),b.se()?c.multiply(b.wh):null!==b.panel&&c.multiply(b.panel.wh),c.multiply(a.Gb),a.Lk=a.scale*b.Lk,Ol(a,!1)))} +t.bo=function(a,b,c,d,e){1!==this.Ea&&a.scale(this.Ea);if(0!==this.Lb){var f=K.alloc();f.Di(b,c,d,e,Kc);a.rotate(this.Lb,f.x,f.y);K.free(f)}};t.w=function(a){if(!Bj(this)){void 0===a&&(a=!1);wj(this,!0);yl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Zj=function(){Bj(this)||(wj(this,!0),yl(this,!0))};function Pl(a){if(!Cj(a)){var b=a.panel;null!==b?b.w():a.zi()&&(b=a.diagram,null!==b&&(b.De.add(a),a instanceof T&&a.Bd(),b.Sb()));yl(a,!0)}} +t.Wk=function(){0!==(this.o&2048)===!1&&(Nl(this,!0),Ol(this,!0))};t.Xu=function(){Ol(this,!0)};t.R=function(){var a=this.part;null!==a&&a.R()}; function xl(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===V.Table)return Ql(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===V.Auto&&d.Ab()===a)return Rl(a,Bd,b);if(c===ll){if(null!==d){if(d.type===V.Spot&&d.Ab()===a)return Rl(a,Bd,b);c=d.defaultStretch;return c===ll?Rl(a,yg,b):Rl(a,c,b)}return Rl(a,yg,b)}return Rl(a,c,b)} function Ql(a,b,c,d){var e=a.stretch;if(e!==ll)return Rl(a,e,d);var f=e=null;switch(b.stretch){case kl:f=!0;break;case Bd:f=!0}switch(c.stretch){case jl:e=!0;break;case Bd:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===jl||b===Bd);null===f&&(f=b===kl||b===Bd);return!0===e&&!0===f?Rl(a,Bd,d):!0===e?Rl(a,jl,d):!0===f?Rl(a,kl,d):Rl(a,yg,d)} -function Rl(a,b,c){if(c)return b;if(b===yg)return yg;c=a.desiredSize;if(c.u())return yg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===jl)return yg;if(b===Bd)return kl}else{if(b===kl)return yg;if(b===Bd)return jl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===kl)return yg;if(b===Bd)return jl}else{if(b===jl)return yg;if(b===Bd)return kl}return b}function Il(a,b){a.m=b?a.m|512:a.m&-513}function tl(a){return 0!==(a.m&1024)}function Sl(a,b){a.m=b?a.m|1024:a.m&-1025} -function Nl(a,b){a.m=b?a.m|2048:a.m&-2049}function Ol(a,b){a.m=b?a.m|4096:a.m&-4097}function Bj(a){return 0!==(a.m&8192)}function wj(a,b){a.m=b?a.m|8192:a.m&-8193}function Cj(a){return 0!==(a.m&16384)}function yl(a,b){a.m=b?a.m|16384:a.m&-16385}t.Bi=function(a){this.eg=a};t.As=function(){};t.tv=function(a){this.va=a;Pl(this);return!0};t.hm=function(a,b){if(this.va.x!==a||this.va.y!==b)this.va.h(a,b),this.Wk()};t.fw=function(){return 0}; +function Rl(a,b,c){if(c)return b;if(b===yg)return yg;c=a.desiredSize;if(c.u())return yg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===jl)return yg;if(b===Bd)return kl}else{if(b===kl)return yg;if(b===Bd)return jl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===kl)return yg;if(b===Bd)return jl}else{if(b===jl)return yg;if(b===Bd)return kl}return b}function Il(a,b){a.o=b?a.o|512:a.o&-513}function tl(a){return 0!==(a.o&1024)}function Sl(a,b){a.o=b?a.o|1024:a.o&-1025} +function Nl(a,b){a.o=b?a.o|2048:a.o&-2049}function Ol(a,b){a.o=b?a.o|4096:a.o&-4097}function Bj(a){return 0!==(a.o&8192)}function wj(a,b){a.o=b?a.o|8192:a.o&-8193}function Cj(a){return 0!==(a.o&16384)}function yl(a,b){a.o=b?a.o|16384:a.o&-16385}t.Bi=function(a){this.fg=a};t.As=function(){};t.tv=function(a){this.va=a;Pl(this);return!0};t.hm=function(a,b){if(this.va.x!==a||this.va.y!==b)this.va.h(a,b),this.Wk()};t.fw=function(){return 0}; function Tl(a){var b=a.part;if(b instanceof T&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||Bl(b,a)}}function Ul(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof V?a instanceof T?a.Bd():a.nk(a,function(a){Tl(a)}):Tl(a))} t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new Ji(a,b,c,d):e=a;e.yd=this;a=this.jh();null!==a&&Vl(a)&&v("Cannot add a Binding to a template that has already been copied: "+e);null===this.localBindings&&(this.localBindings=new H);this.localBindings.add(e);return this};t.set=function(a){if(G)for(var b in a)(b.startsWith("_")||-1!==b.indexOf("."))&&v("Property with underscore or period passed to GraphObject.set. Did you mean to use GraphObject.assign?");Object.assign(this,a);return this}; t.xu=function(a){Wl(this,a);return this};t.apply=function(a){a(this);return this};t.im=function(a){Ij(this,a);return this};t.qz=function(){return this.jh()};t.jh=function(){for(var a=this instanceof V?this:this.panel;null!==a;){if(null!==a.allBindings)return a;a=a.panel}return null};t.Av=function(a){a.yd=this;null===this.animationTriggers&&(this.animationTriggers=new yb);this.animationTriggers.add(a.propertyName,a);return this}; -function Xl(a,b){for(var c=1;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new db;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Ij(a,e)}else Ij(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+ +ck?(a=d,w(b,ck,ck,"copyFrom:pd"),b.isRow?a.height=b.height:a.width=b.width,a.minimum=b.minimum,a.maximum=b.maximum,a.alignment=b.alignment,a.stretch=b.stretch,a.sizing=b.sizing,a.hg=null===b.separatorPadding?null:b.separatorPadding.M(),a.separatorStroke=b.separatorStroke,a.separatorStrokeWidth=b.separatorStrokeWidth,a.Bj=null,b.separatorDashArray&&(a.Bj=Ja(b.separatorDashArray)),a.background=b.background,a.coversSeparators=b.coversSeparators,a.ae=b.ae):v("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+ +a)}else if(b instanceof F)"function"===typeof a.ub?a.ub(b):Ea(a,b);else if(b instanceof $l)a.type=b;else if(b instanceof Ji)a instanceof O?a.bind(b):a instanceof ck?a.bind(b):v("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(b instanceof li)a instanceof O?a.Av(b):v("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(b instanceof je)a instanceof N&&a.type===N.m?a.figures.add(b):v("A PathFigure can only be added to a Path Geometry, not to: "+ +a);else if(b instanceof ke)a instanceof je?a.segments.add(b):v("A PathSegment can only be added to a PathFigure, not to: "+a);else if(b instanceof Di)a instanceof P?a.layout=b:a instanceof wf?a.layout=b:v("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(b))for(c=0;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new db;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Ij(a,e)}else Ij(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+ a)}function am(a,b){A(a,"string",O,"defineBuilder:name");A(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);Yl.add(a,b)} function bm(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} -oa.Object.defineProperties(O.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.pp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new rl),this.B.pp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Qf:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new rl),this.B.Qf=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.jp:null},set:function(a){this.srcBindings!== -a&&(null===this.B&&(this.B=new rl),this.B.jp=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Ji:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&A(a,"boolean",O,"shadowVisible"),ql(this),this.B.Ji=a,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Mc:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&A(a,"function",O,"enabledChanged"),ql(this), -this.B.Mc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.ar:mg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&ab(a,R,O,"segmentOrientation"),null===this.Wa&&(this.Wa=new cm),this.Wa.ar=a,this.w(),this.g("segmentOrientation",b,a),a===mg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.v:-Infinity},set:function(a){G&&A(a,"number",O,"segmentIndex");a= -Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Wa&&(this.Wa=new cm),this.Wa.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Wa?this.Wa.o:0},set:function(a){G&&A(a,"number",O,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&v("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ea=a,this.w(),this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Lb},set:function(a){var b=this.Lb;b!==a&&(G&&E(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Ul(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0, enumerable:!0,get:function(){return this.fd},set:function(a){G&&w(a,Hb,O,"desiredSize");var b=a.width,c=a.height,d=this.fd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.fd=a=a.M(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",d,a),tl(this)&&(a=this.part,null!==a&&(ul(this,a,"width"),ul(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.fd.width},set:function(a){var b=this.fd.width;b===a||isNaN(b)&&isNaN(a)||(G&& A(a,"number",O,"width"),b=this.fd,this.fd=a=(new Hb(a,this.fd.height)).freeze(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",b,a),tl(this)&&(a=this.part,null!==a&&ul(this,a,"width")))}},height:{configurable:!0,get:function(){return this.fd.height},set:function(a){var b=this.fd.height;b===a||isNaN(b)&&isNaN(a)||(G&&A(a,"number",O,"height"),b=this.fd,this.fd=a=(new Hb(this.fd.width,a)).freeze(),this.w(),this instanceof Qf&&this.sc(),this.g("desiredSize",b,a),tl(this)&&(a= -this.part,null!==a&&ul(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Pb},set:function(a){var b=this.minSize;b.D(a)||(G&&w(a,Hb,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),ql(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Ub},set:function(a){var b=this.maxSize;b.D(a)||(G&&w(a,Hb,O,"maxSize"),a=a.copy(),isNaN(a.width)&& -(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),ql(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.wc}},naturalBounds:{configurable:!0,get:function(){return this.gc}},margin:{configurable:!0,get:function(){return this.Mg},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,O,"margin");var b=this.Mg;b.D(a)||(this.Mg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0, -enumerable:!0,get:function(){0!==(this.m&2048)===!0&&El(this);return this.Gb}},ne:{configurable:!0,get:function(){0!==(this.m&4096)===!0&&El(this);return this.wh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B?this.B.jb:null},set:function(a){this.animationTriggers!==a&&(ql(this),this.B.jb=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.Hi:yg},set:function(a){this.reshapingBehavior!==a&&(ql(this), -this.B.Hi=a)}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,O,"alignment"),a.kc()&&!a.Rb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.M(),Pl(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Cg},set:function(a){G&&E(a,O,"column");a=Math.round(a);var b=this.Cg;b!==a&&(0>a&&Ba(a,">= 0",O,"column"),this.Cg=a,this.w(),this.g("column", +this.part,null!==a&&ul(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Pb},set:function(a){var b=this.minSize;b.D(a)||(G&&w(a,Hb,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),ql(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.m:Ub},set:function(a){var b=this.maxSize;b.D(a)||(G&&w(a,Hb,O,"maxSize"),a=a.copy(),isNaN(a.width)&& +(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),ql(this),this.B.m=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.wc}},naturalBounds:{configurable:!0,get:function(){return this.gc}},margin:{configurable:!0,get:function(){return this.Mg},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,O,"margin");var b=this.Mg;b.D(a)||(this.Mg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0, +enumerable:!0,get:function(){0!==(this.o&2048)===!0&&El(this);return this.Gb}},oe:{configurable:!0,get:function(){0!==(this.o&4096)===!0&&El(this);return this.wh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B?this.B.jb:null},set:function(a){this.animationTriggers!==a&&(ql(this),this.B.jb=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.Hi:yg},set:function(a){this.reshapingBehavior!==a&&(ql(this), +this.B.Hi=a)}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,O,"alignment"),a.kc()&&!a.Rb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.M(),Pl(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Dg},set:function(a){G&&E(a,O,"column");a=Math.round(a);var b=this.Dg;b!==a&&(0>a&&Ba(a,">= 0",O,"column"),this.Dg=a,this.w(),this.g("column", b,a))}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Ib:1},set:function(a){G&&A(a,"number",O,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",O,"columnSpan"),ql(this),this.B.Ib=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.Xn},set:function(a){G&&E(a,O,"row");a=Math.round(a);var b=this.Xn;b!==a&&(0>a&&Ba(a,">= 0",O,"row"),this.Xn=a,this.w(),this.g("row",b,a))}},rowSpan:{configurable:!0, enumerable:!0,get:function(){return null!==this.B?this.B.Ii:1},set:function(a){G&&A(a,"number",O,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",O,"rowSpan"),ql(this),this.B.Ii=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Ki:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&A(a,"function",O,"spanAllocation"),ql(this),this.B.Ki=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0, enumerable:!0,get:function(){return this.tk},set:function(a){var b=this.tk;b.D(a)||(G&&w(a,Ib,O,"alignmentFocus"),!G||!a.kc()||a.Rb()||a.No()&&this instanceof T||v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.tk=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.Sn},set:function(a){var b=this.Sn;if(b!==a){G&&null!==a&&A(a,"string",O,"portId");var c=this.part;null===c||c instanceof T||v("Cannot set portID on a Link: "+ -a);null!==b&&null!==c&&em(c,this);this.Sn=a;null!==a&&null!==c&&(c.Te=!0,fm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0,get:function(){return null!==this.da?this.da.Gj:Ec},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,O,"toSpot"),a=a.M(),this.Xc(),this.da.Gj=a,this.g("toSpot",b,a),Tl(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.Ej:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&A(a,"number",O, -"toEndSegmentLength"),0>a&&Ba(a,">= 0",O,"toEndSegmentLength"),this.Xc(),this.da.Ej=a,this.g("toEndSegmentLength",b,a),Tl(this))}},toShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.Fj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",O,"toShortLength"),this.Xc(),this.da.Fj=a,this.g("toShortLength",b,a),Tl(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.da?this.da.Fr:null},set:function(a){var b=this.toLinkable; -b!==a&&(G&&null!==a&&A(a,"boolean",O,"toLinkable"),this.Xc(),this.da.Fr=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!==this.da?this.da.Gr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&A(a,"number",O,"toMaxLinks"),0>a&&Ba(a,">= 0",O,"toMaxLinks"),this.Xc(),this.da.Gr=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.da?this.da.cj:Ec},set:function(a){var b=this.fromSpot;b.D(a)||(G&& -w(a,Ib,O,"fromSpot"),a=a.M(),this.Xc(),this.da.cj=a,this.g("fromSpot",b,a),Tl(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.aj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&A(a,"number",O,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",O,"fromEndSegmentLength"),this.Xc(),this.da.aj=a,this.g("fromEndSegmentLength",b,a),Tl(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.bj:0},set:function(a){var b= -this.fromShortLength;b!==a&&(G&&A(a,"number",O,"fromShortLength"),this.Xc(),this.da.bj=a,this.g("fromShortLength",b,a),Tl(this))}},fromLinkable:{configurable:!0,get:function(){return null!==this.da?this.da.Xp:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&A(a,"boolean",O,"fromLinkable"),this.Xc(),this.da.Xp=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.da?this.da.Yp:Infinity},set:function(a){var b=this.fromMaxLinks; -b!==a&&(G&&A(a,"number",O,"fromMaxLinks"),0>a&&Ba(a,">= 0",O,"fromMaxLinks"),this.Xc(),this.da.Yp=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(A(a,"string",O,"cursor"),ql(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.zh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&A(a,"function",O,"click"),ql(this), +a);null!==b&&null!==c&&em(c,this);this.Sn=a;null!==a&&null!==c&&(c.Ue=!0,fm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gj:Ec},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,O,"toSpot"),a=a.M(),this.Xc(),this.ea.Gj=a,this.g("toSpot",b,a),Tl(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Ej:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&A(a,"number",O, +"toEndSegmentLength"),0>a&&Ba(a,">= 0",O,"toEndSegmentLength"),this.Xc(),this.ea.Ej=a,this.g("toEndSegmentLength",b,a),Tl(this))}},toShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",O,"toShortLength"),this.Xc(),this.ea.Fj=a,this.g("toShortLength",b,a),Tl(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fr:null},set:function(a){var b=this.toLinkable; +b!==a&&(G&&null!==a&&A(a,"boolean",O,"toLinkable"),this.Xc(),this.ea.Fr=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&A(a,"number",O,"toMaxLinks"),0>a&&Ba(a,">= 0",O,"toMaxLinks"),this.Xc(),this.ea.Gr=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.cj:Ec},set:function(a){var b=this.fromSpot;b.D(a)||(G&& +w(a,Ib,O,"fromSpot"),a=a.M(),this.Xc(),this.ea.cj=a,this.g("fromSpot",b,a),Tl(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.aj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&A(a,"number",O,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",O,"fromEndSegmentLength"),this.Xc(),this.ea.aj=a,this.g("fromEndSegmentLength",b,a),Tl(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.bj:0},set:function(a){var b= +this.fromShortLength;b!==a&&(G&&A(a,"number",O,"fromShortLength"),this.Xc(),this.ea.bj=a,this.g("fromShortLength",b,a),Tl(this))}},fromLinkable:{configurable:!0,get:function(){return null!==this.ea?this.ea.Xp:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&A(a,"boolean",O,"fromLinkable"),this.Xc(),this.ea.Xp=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.ea?this.ea.Yp:Infinity},set:function(a){var b=this.fromMaxLinks; +b!==a&&(G&&A(a,"number",O,"fromMaxLinks"),0>a&&Ba(a,">= 0",O,"fromMaxLinks"),this.Xc(),this.ea.Yp=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(A(a,"string",O,"cursor"),ql(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.zh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&A(a,"function",O,"click"),ql(this), this.B.zh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(null!==a&&A(a,"function",O,"doubleClick"),ql(this),this.B.Fh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&A(a,"function",O,"contextClick"),ql(this),this.B.Bh=a,this.g("contextClick",b, a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Rh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseEnter"),ql(this),this.B.Rh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Uh:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseLeave"),ql(this),this.B.Uh=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0, get:function(){return null!==this.B?this.B.Vh:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&A(a,"function",O,"mouseOver"),ql(this),this.B.Vh=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.Th:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&A(a,"function",O,"mouseHover"),ql(this),this.B.Th=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Sh: -null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&A(a,"function",O,"mouseHold"),ql(this),this.B.Sh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Wd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseDragEnter"),ql(this),this.B.Wd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Rf:null},set:function(a){var b= -this.mouseDragLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseDragLeave"),ql(this),this.B.Rf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&A(a,"function",O,"mouseDrop"),ql(this),this.B.Qh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.aa:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&& -A(a,"function",O,"actionDown"),ql(this),this.B.aa=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.ma:null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&A(a,"function",O,"actionMove"),ql(this),this.B.ma=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Ma:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&A(a,"function",O,"actionUp"),ql(this),this.B.Ma= +null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&A(a,"function",O,"mouseHold"),ql(this),this.B.Sh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Wd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&A(a,"function",O,"mouseDragEnter"),ql(this),this.B.Wd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.Sf:null},set:function(a){var b= +this.mouseDragLeave;b!==a&&(null!==a&&A(a,"function",O,"mouseDragLeave"),ql(this),this.B.Sf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&A(a,"function",O,"mouseDrop"),ql(this),this.B.Qh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.$:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&& +A(a,"function",O,"actionDown"),ql(this),this.B.$=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.ma:null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&A(a,"function",O,"actionMove"),ql(this),this.B.ma=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Ma:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&A(a,"function",O,"actionUp"),ql(this),this.B.Ma= a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!==a&&(null!==a&&A(a,"function",O,"actionCancel"),ql(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.ei:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof Ce||a instanceof Me||v("GraphObject.toolTip must be an Adornment or HTMLInfo."), ql(this),this.B.ei=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(!G||a instanceof Ce||a instanceof Me||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),ql(this),this.B.Ch=a,this.g("contextMenu",b,a))}}});O.prototype.trigger=O.prototype.Av;O.prototype.findBindingPanel=O.prototype.jh;O.prototype.findTemplateBinder=O.prototype.qz;O.prototype.setProperties=O.prototype.im; -O.prototype.apply=O.prototype.apply;O.prototype.attach=O.prototype.xu;O.prototype.set=O.prototype.set;O.prototype.isEnabledObject=O.prototype.Jf;O.prototype.isVisibleObject=O.prototype.Kf;O.prototype.isContainedBy=O.prototype.ug;O.prototype.getNearestIntersectionPoint=O.prototype.bs;O.prototype.getLocalPoint=O.prototype.$r;O.prototype.getDocumentScale=O.prototype.Ff;O.prototype.getDocumentAngle=O.prototype.si;O.prototype.getDocumentBounds=O.prototype.ti;O.prototype.getDocumentPoint=O.prototype.oa; -O.prototype.intersectsRect=O.prototype.Yc;O.prototype.containedInRect=O.prototype.hh;O.prototype.containsRect=O.prototype.Qe;O.prototype.containsPoint=O.prototype.ea;O.prototype.raiseChanged=O.prototype.g;O.prototype.raiseChangedEvent=O.prototype.ib;O.prototype.addCopyProperty=O.prototype.Nw;var Yl=null;O.className="GraphObject";Yl=new yb; +O.prototype.apply=O.prototype.apply;O.prototype.attach=O.prototype.xu;O.prototype.set=O.prototype.set;O.prototype.isEnabledObject=O.prototype.Kf;O.prototype.isVisibleObject=O.prototype.Lf;O.prototype.isContainedBy=O.prototype.vg;O.prototype.getNearestIntersectionPoint=O.prototype.bs;O.prototype.getLocalPoint=O.prototype.$r;O.prototype.getDocumentScale=O.prototype.Gf;O.prototype.getDocumentAngle=O.prototype.si;O.prototype.getDocumentBounds=O.prototype.ti;O.prototype.getDocumentPoint=O.prototype.oa; +O.prototype.intersectsRect=O.prototype.Yc;O.prototype.containedInRect=O.prototype.hh;O.prototype.containsRect=O.prototype.Re;O.prototype.containsPoint=O.prototype.ga;O.prototype.raiseChanged=O.prototype.g;O.prototype.raiseChangedEvent=O.prototype.ib;O.prototype.addCopyProperty=O.prototype.Nw;var Yl=null;O.className="GraphObject";Yl=new yb; am("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Xl(V,V.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof V){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xl(Qf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ib(0,0,2.76142374915397,2.761423749153969),spot2:new Ib(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Jf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= -c}};b.mouseLeave=function(a,b){b.Jf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Jf()&&b instanceof V&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Qf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram, -g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Jf()&&d instanceof V&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Qf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xl(Qf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ib(0,0,2.76142374915397,2.761423749153969),spot2:new Ib(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Kf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= +c}};b.mouseLeave=function(a,b){b.Kf()&&b instanceof V&&(a=b.lb("ButtonBorder"),a instanceof Qf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Kf()&&b instanceof V&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Qf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Qf){var f=b.diagram, +g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Kf()&&d instanceof V&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Qf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); am("TreeExpanderButton",function(){var a=Xl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Xl(Qf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Sb},(new Ji("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).So()),{visible:!1},(new Ji("visible","isTreeLeaf",function(a){return!a})).So());a.click=function(a,c){c=c.part;c instanceof Ce&&(c=c.adornedPart);if(c instanceof T){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); @@ -1055,87 +1055,87 @@ a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};r am("ContextMenu",function(){return Xl(Ce,V.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Ji("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});am("ContextMenuButton",function(){var a=Xl("Button");a.stretch=jl;var b=a.lb("ButtonBorder");b instanceof Qf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Ib(0,0,2,3),b.spot2=new Ib(1,1,-2,-2));return a}); am("PanelExpanderButton",function(a){var b=bm(a,"COLLAPSIBLE"),c=Xl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Xl(Qf,{name:"ButtonIcon",strokeWidth:2},(new Ji("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).So(b))); a=c.lb("ButtonBorder");a instanceof Qf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.jh();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ja("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); -am("CheckBoxButton",function(a){var b=bm(a);a=Xl("Button",{desiredSize:new Hb(14,14)},Xl(Qf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Ag,visible:!1},""!==b?(new Ji("visible",b)).Gx():[]));a.click=function(a,d){if(d instanceof V){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.lb("ButtonIcon");c.Ja("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +am("CheckBoxButton",function(a){var b=bm(a);a=Xl("Button",{desiredSize:new Hb(14,14)},Xl(Qf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Ag,visible:!1},""!==b?(new Ji("visible",b)).Hx():[]));a.click=function(a,d){if(d instanceof V){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.lb("ButtonIcon");c.Ja("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.kb("checkbox")}}};return a}); am("CheckBox",function(a){a=bm(a);a=Xl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new gc(0,1,0,0)});var b=Xl(V,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});O.None=yg=new F(O,"None",0);O.Default=ll=new F(O,"Default",0);O.Vertical=kl=new F(O,"Vertical",4);O.Horizontal=jl=new F(O,"Horizontal",5);O.Fill=Bd=new F(O,"Fill",3);O.Uniform=Ag=new F(O,"Uniform",1); O.UniformToFill=ml=new F(O,"UniformToFill",2);O.FlipVertical=nl=new F(O,"FlipVertical",1);O.FlipHorizontal=ol=new F(O,"FlipHorizontal",2);O.FlipBoth=pl=new F(O,"FlipBoth",3);O.make=Xl;O.getBuilders=function(){var a=new yb,b;for(b in Yl)if(b!==b.toLowerCase()){var c=Yl.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};O.defineBuilder=am; O.build=function(a,b){var c=Yl.L(a);if("function"===typeof c&&(c=c(null),c instanceof O))return b&&c.set(b),c;v('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')};O.takeBuilderArgument=bm; -function rl(){this.oc=!1;this.Ca="";this.pp=-1;this.ob=this.jp=this.Qf=null;this.j="";this.jb=this.Ki=this.Mc=this.Ch=this.ei=this.G=this.Ma=this.ma=this.aa=this.Qh=this.Rf=this.Wd=this.Sh=this.Th=this.Vh=this.Uh=this.Rh=this.Bh=this.Fh=this.zh=null;this.v=Pb;this.o=Ub;this.kg=ll;this.Ib=this.Ii=1;this.Hi=yg;this.te=this.Ji=this.tb=null;this.Nc="category"} -rl.prototype.copy=function(){var a=new rl;a.Ca=this.Ca;a.pp=this.pp;a.Qf=this.Qf;a.ob=this.ob;a.j=this.j;a.zh=this.zh;a.Fh=this.Fh;a.Bh=this.Bh;a.Rh=this.Rh;a.Uh=this.Uh;a.Vh=this.Vh;a.Th=this.Th;a.Sh=this.Sh;a.Wd=this.Wd;a.Rf=this.Rf;a.Qh=this.Qh;a.aa=this.aa;a.ma=this.ma;a.Ma=this.Ma;a.G=this.G;a.ei=this.ei;a.Ch=this.Ch;a.Mc=this.Mc;a.Ki=this.Ki;a.jb=this.jb;a.v=this.v.M();a.o=this.o.M();a.kg=this.kg;a.Ii=this.Ii;a.Ib=this.Ib;a.Hi=this.Hi;a.tb=this.tb;a.Ji=this.Ji;a.te=this.te;a.Nc=this.Nc;return a}; -function cm(){this.v=-Infinity;this.o=0;this.G=zb;this.ar=mg;this.j=this.aa="None"}cm.prototype.copy=function(){var a=new cm;a.v=this.v;a.o=this.o;a.G=this.G.M();a.ar=this.ar;a.aa=this.aa;a.j=this.j;return a};cm.className="LinkElementSettings";function sl(){this.Gj=this.cj=hd;this.Fj=this.bj=this.Ej=this.aj=NaN;this.Fr=this.Xp=null;this.Gr=this.Yp=Infinity} +function rl(){this.oc=!1;this.Ca="";this.pp=-1;this.ob=this.jp=this.Rf=null;this.j="";this.jb=this.Ki=this.Nc=this.Ch=this.ei=this.G=this.Ma=this.ma=this.$=this.Qh=this.Sf=this.Wd=this.Sh=this.Th=this.Vh=this.Uh=this.Rh=this.Bh=this.Fh=this.zh=null;this.v=Pb;this.m=Ub;this.lg=ll;this.Ib=this.Ii=1;this.Hi=yg;this.ue=this.Ji=this.tb=null;this.Oc="category"} +rl.prototype.copy=function(){var a=new rl;a.Ca=this.Ca;a.pp=this.pp;a.Rf=this.Rf;a.ob=this.ob;a.j=this.j;a.zh=this.zh;a.Fh=this.Fh;a.Bh=this.Bh;a.Rh=this.Rh;a.Uh=this.Uh;a.Vh=this.Vh;a.Th=this.Th;a.Sh=this.Sh;a.Wd=this.Wd;a.Sf=this.Sf;a.Qh=this.Qh;a.$=this.$;a.ma=this.ma;a.Ma=this.Ma;a.G=this.G;a.ei=this.ei;a.Ch=this.Ch;a.Nc=this.Nc;a.Ki=this.Ki;a.jb=this.jb;a.v=this.v.M();a.m=this.m.M();a.lg=this.lg;a.Ii=this.Ii;a.Ib=this.Ib;a.Hi=this.Hi;a.tb=this.tb;a.Ji=this.Ji;a.ue=this.ue;a.Oc=this.Oc;return a}; +function cm(){this.v=-Infinity;this.m=0;this.G=zb;this.ar=mg;this.j=this.$="None"}cm.prototype.copy=function(){var a=new cm;a.v=this.v;a.m=this.m;a.G=this.G.M();a.ar=this.ar;a.$=this.$;a.j=this.j;return a};cm.className="LinkElementSettings";function sl(){this.Gj=this.cj=hd;this.Fj=this.bj=this.Ej=this.aj=NaN;this.Fr=this.Xp=null;this.Gr=this.Yp=Infinity} sl.prototype.copy=function(){var a=new sl;a.cj=this.cj.M();a.Gj=this.Gj.M();a.aj=this.aj;a.Ej=this.Ej;a.bj=this.bj;a.Fj=this.Fj;a.Xp=this.Xp;a.Fr=this.Fr;a.Yp=this.Yp;a.Gr=this.Gr;return a};sl.className="LinkSettings";function gm(){this.Za=[1,0,0,1,0,0]}gm.prototype.copy=function(){var a=new gm;a.Za[0]=this.Za[0];a.Za[1]=this.Za[1];a.Za[2]=this.Za[2];a.Za[3]=this.Za[3];a.Za[4]=this.Za[4];a.Za[5]=this.Za[5];return a}; -gm.prototype.translate=function(a,b){this.Za[4]+=this.Za[0]*a+this.Za[2]*b;this.Za[5]+=this.Za[1]*a+this.Za[3]*b};gm.prototype.scale=function(a,b){this.Za[0]*=a;this.Za[1]*=a;this.Za[2]*=b;this.Za[3]*=b};gm.className="STransform";function hm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Ww=[];this.pattern=null}hm.prototype.addColorStop=function(a,b){this.Ww.push({offset:a,color:b})};hm.className="SGradient"; +gm.prototype.translate=function(a,b){this.Za[4]+=this.Za[0]*a+this.Za[2]*b;this.Za[5]+=this.Za[1]*a+this.Za[3]*b};gm.prototype.scale=function(a,b){this.Za[0]*=a;this.Za[1]*=a;this.Za[2]*=b;this.Za[3]*=b};gm.className="STransform";function hm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Xw=[];this.pattern=null}hm.prototype.addColorStop=function(a,b){this.Xw.push({offset:a,color:b})};hm.className="SGradient"; function Lj(a,b){this.ownerDocument=a=void 0===b?sa.document:b;this.bA="http://www.w3.org/2000/svg";void 0!==a&&(this.Xa=this.$b("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Xa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Xa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.Bo=null;this.context=new im(this)} Lj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.style.width=c+"px",this.style.height=d+"px",this.Xa.setAttributeNS(null,"width",c+"px"),this.Xa.setAttributeNS(null,"height",d+"px"),this.Xa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.pw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.pw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Lj.prototype.$b=function(a,b,c){a=this.ownerDocument.createElementNS(this.bA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Lj.prototype.getBoundingClientRect=function(){return this.Xa.getBoundingClientRect()};Lj.prototype.focus=function(){this.Xa.focus()};Lj.prototype.bx=function(){this.ownerDocument=null}; +Lj.prototype.$b=function(a,b,c){a=this.ownerDocument.createElementNS(this.bA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Lj.prototype.getBoundingClientRect=function(){return this.Xa.getBoundingClientRect()};Lj.prototype.focus=function(){this.Xa.focus()};Lj.prototype.ex=function(){this.ownerDocument=null}; oa.Object.defineProperties(Lj.prototype,{width:{configurable:!0,get:function(){return this.Xa.width.baseVal.value},set:function(a){this.Xa.width=a}},height:{configurable:!0,get:function(){return this.Xa.height.baseVal.value},set:function(a){this.Xa.height=a}},style:{configurable:!0,get:function(){return this.Xa.style}}});Lj.className="SVGSurface"; -function im(a){this.Ds=a;this.svg=a.Xa;this.stack=[];this.sd=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Wg=this.kr=this.jr=0;this.ls=null;this.path=[];this.rt=!1;this.Zg=null;this.Cj=0;this.Re=new gm; +function im(a){this.Ds=a;this.svg=a.Xa;this.stack=[];this.sd=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Wg=this.kr=this.jr=0;this.ls=null;this.path=[];this.rt=!1;this.Zg=null;this.Cj=0;this.Se=new gm; jm(this,1,0,0,1,0,0);var b=pb++,c=this.$b("clipPath",{id:"mainClip"+b});c.appendChild(this.$b("rect",{x:0,y:0,width:a.width,height:a.height}));this.pw=c;this.Ds.Xa.appendChild(c);this.sd[0].setAttributeNS(null,"clip-path","url(#mainClip"+b+")");this.dA={}}t=im.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,r=b+n,q=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,q,a-m,b-n]),this.path.push(["A",c,c,0,1,q,p,r])):1E-6=Math.PI),q,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[]};t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){}; -t.clip=function(){this.addPath("clipPath",this.path,this.Re)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new hm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.clip=function(){this.addPath("clipPath",this.path,this.Se)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new hm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.dA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+pb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$b("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$b(Dk,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; t.createRadialGradient=function(a,b,c,d,e,f){var g=new hm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g}; t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width,n=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=n);d=d||0;e=e||0;f=f||0;g=g||0;h=h||0;k=k||0;a={x:0,y:0,width:m||d,height:n||e,href:l};L.ha(d,h)&&L.ha(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(a.preserveAspectRatio= -"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+pb++,g=this.$b("clipPath",{id:f}),g.appendChild(this.$b("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";km(this,Dk,a,this.Re,l);this.addElement(Dk,a)};t.fill=function(){this.addPath("fill",this.path,this.Re)}; -t.Df=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.Re);this.addElement("rect",a)};t.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};km(this,"fill",b,this.Re);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; +"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+pb++,g=this.$b("clipPath",{id:f}),g.appendChild(this.$b("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";km(this,Dk,a,this.Se,l);this.addElement(Dk,a)};t.fill=function(){this.addPath("fill",this.path,this.Se)}; +t.Ef=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.Se);this.addElement("rect",a)};t.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};km(this,"fill",b,this.Se);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.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"])}; -t.restore=function(){this.Re=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.lineDashOffset=a.lineDashOffset;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}; -t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(e=0;eg.width+g.x||g.x> -k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;jm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.zi()&&!this.isVisible())return!0;a.Re.Za=[1,0,0,1,0,0];(this instanceof ch&&1g.width+g.x||g.x> +k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;jm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.zi()&&!this.isVisible())return!0;a.Se.Za=[1,0,0,1,0,0];(this instanceof ch&&1b?(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.Cm?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.Cm?this.clip():this.fill()};t.Fi=function(){this.Cm||this.stroke()};t.wv=function(a,b,c){this.jr=a;this.kr=b;this.Wg=c}; -t.Tr=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Rr=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Tc=function(a){a&&(this.Ss="");this.Rs=this.Ts=""}; +t.quadraticCurveTo=function(a,b,c,d){this.ba.quadraticCurveTo(a,b,c,d)};t.rect=function(a,b,c,d){this.ba.rect(a,b,c,d)};t.restore=function(){this.ba.restore()};t.save=function(){this.Vc();this.ba.save()};Kl.prototype.rotate=function(a){this.Fl.rotate(57.2958*a,0,0)};t=Kl.prototype;t.setTransform=function(a,b,c,d,e,f){this.Fl.setTransform(a,b,c,d,e,f)};t.scale=function(a,b){this.Fl.scale(a,b)};t.translate=function(a,b){this.Fl.translate(a,b)};t.stroke=function(){this.ba.stroke()}; +t.transform=function(a,b,c,d,e,f){if(1!==a||0!==b||0!==c||1!==d||0!==e||0!==f){var g=this.Fl,h=g.m11*a+g.m21*b;a=g.m12*a+g.m22*b;b=g.m11*c+g.m21*d;c=g.m12*c+g.m22*d;g.dx=g.m11*e+g.m21*f+g.dx;g.dy=g.m12*e+g.m22*f+g.dy;g.m11=h;g.m12=a;g.m21=b;g.m22=c}};t.Vc=function(){var a=this.Fl;this.ba.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)}; +t.Ef=function(a){if(a instanceof Cl&&a.type===Dl){var b=a.zk;a=a.Us;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.Cm?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.Cm?this.clip():this.fill()};t.Fi=function(){this.Cm||this.stroke()};t.wv=function(a,b,c){this.jr=a;this.kr=b;this.Wg=c}; +t.Tr=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Rr=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Uc=function(a){a&&(this.Ss="");this.Rs=this.Ts=""}; oa.Object.defineProperties(Kl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.Rs!==a&&(this.Rs=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.Ss!==a&&(this.Ss=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, set:function(a){this.ba.lineCap=a}},lineDashOffset:{configurable:!0,get:function(){return this.ba.lineDashOffset},set:function(a){this.ba.lineDashOffset=a}},lineJoin:{configurable:!0,get:function(){return this.ba.lineJoin},set:function(a){this.ba.lineJoin=a}},lineWidth:{configurable:!0,get:function(){return this.ba.lineWidth},set:function(a){this.ba.lineWidth=a}},miterLimit:{configurable:!0,get:function(){return this.ba.miterLimit},set:function(a){this.ba.miterLimit= a}},shadowBlur:{configurable:!0,get:function(){return this.ba.shadowBlur},set:function(a){this.ba.shadowBlur=a}},shadowColor:{configurable:!0,get:function(){return this.ba.shadowColor},set:function(a){this.ba.shadowColor=a}},shadowOffsetX:{configurable:!0,get:function(){return this.ba.shadowOffsetX},set:function(a){this.ba.shadowOffsetX=a}},shadowOffsetY:{configurable:!0,get:function(){return this.ba.shadowOffsetY},set:function(a){this.ba.shadowOffsetY= a}},strokeStyle:{configurable:!0,get:function(){return this.ba.strokeStyle},set:function(a){this.Ts!==a&&(this.Ts=this.ba.strokeStyle=a)}},textAlign:{configurable:!0,get:function(){return this.ba.textAlign},set:function(a){this.ba.textAlign=a}},imageSmoothingEnabled:{configurable:!0,get:function(){return this.ba.imageSmoothingEnabled},set:function(a){this.ba.imageSmoothingEnabled=a}},clipInsteadOfFill:{configurable:!0,get:function(){return this.Cm}, -set:function(a){this.Cm=a}}});var mm=Object.freeze([]);Kl.className="CanvasSurfaceContext";function nm(){this.G=this.o=this.v=this.j=0}nm.className="ColorNumbers"; -function Cl(a,b){om||(pm(),om=!0);Za(this);this._isFrozen=!1;void 0===a?(this.wa=Jl,this.yk="black"):"string"===typeof a?(this.wa=Jl,G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.yk=a):(G&&ab(a,Cl,Cl,"constructor:type"),this.wa=a,this.yk="black");a=this.wa;a===Ml?(this.Nd=Gc,this.Mk=Nc):this.Mk=a===Dl?this.Nd=Kc:this.Nd=Ec;this.qr=0;this.Np=NaN;this.xe=this.Oq=this.we=null;this.Us=this.zk=0;b&&Object.assign(this,b)} -Cl.prototype.copy=function(){var a=new Cl;a.wa=this.wa;a.yk=this.yk;a.Nd=this.Nd.M();a.Mk=this.Mk.M();a.qr=this.qr;a.Np=this.Np;null!==this.we&&(a.we=this.we.copy());a.Oq=this.Oq;return a};t=Cl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.we&&this.we.freeze();return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.we&&this.we.pa();return this};t.ub=function(a){a.classType===Cl?this.type=a:Ea(this,a)}; +set:function(a){this.Cm=a}}});var mm=Object.freeze([]);Kl.className="CanvasSurfaceContext";function nm(){this.G=this.m=this.v=this.j=0}nm.className="ColorNumbers"; +function Cl(a,b){om||(pm(),om=!0);Za(this);this._isFrozen=!1;void 0===a?(this.wa=Jl,this.yk="black"):"string"===typeof a?(this.wa=Jl,G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.yk=a):(G&&ab(a,Cl,Cl,"constructor:type"),this.wa=a,this.yk="black");a=this.wa;a===Ml?(this.Nd=Gc,this.Mk=Nc):this.Mk=a===Dl?this.Nd=Kc:this.Nd=Ec;this.qr=0;this.Np=NaN;this.ye=this.Oq=this.xe=null;this.Us=this.zk=0;b&&Object.assign(this,b)} +Cl.prototype.copy=function(){var a=new Cl;a.wa=this.wa;a.yk=this.yk;a.Nd=this.Nd.M();a.Mk=this.Mk.M();a.qr=this.qr;a.Np=this.Np;null!==this.xe&&(a.xe=this.xe.copy());a.Oq=this.Oq;return a};t=Cl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.xe&&this.xe.freeze();return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.xe&&this.xe.pa();return this};t.ub=function(a){a.classType===Cl?this.type=a:Ea(this,a)}; t.toString=function(){var a="Brush(";if(this.type===Jl)a+=this.color;else if(a=this.type===Ml?a+"Linear ":this.type===Dl?a+"Radial ":this.type===Ll?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Cl,"addColorStop:loc");A(b,"string",Cl,"addColorStop:color");G&&!qm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.we&&(this.we=new yb);this.we.add(a,b);this.wa===Jl&&(this.type=Ml);this.xe=null;return this}; +t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Cl,"addColorStop:loc");A(b,"string",Cl,"addColorStop:color");G&&!qm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.xe&&(this.xe=new yb);this.xe.add(a,b);this.wa===Jl&&(this.type=Ml);this.ye=null;return this}; function qm(a){if("black"===a)return!0;if(""===a)return!1;G&&A(a,"string",Cl,"isValidColor");om||(pm(),om=!0);var b=rm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c} t.Vz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?sm:b;if(this.type===Jl)gi(this.color),this.color=tm(a,b);else if((this.type===Ml||this.type===Dl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,tm(a,b));return this};function um(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?sm:c;gi(a);return tm(b,c)} t.Uy=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?sm:b;if(this.type===Jl)gi(this.color),this.color=tm(-a,b);else if((this.type===Ml||this.type===Dl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,tm(-a,b));return this};function vm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?sm:c;gi(a);return tm(-b,c)} -function wm(a,b,c){gi(a);a=xm.j;var d=xm.v,e=xm.o,f=xm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((xm.j-a)*c+a)+", "+Math.round((xm.v-d)*c+d)+", "+Math.round((xm.o-e)*c+e)+", "+Math.round((xm.G-f)*c+f)+")"} -t.Ax=function(){if(this.type===Jl)return ym(this.color);if((this.type===Ml||this.type===Dl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Dl)return ym(a.first().value);if(null!==a.get(.5))return ym(a.get(.5));if(2===a.count)return a=a.Ka(),ym(wm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return ym(wm(a.get(c),a.get(d),1-f/e))}return!1}; -function ym(a){if(!a)return!1;if(a instanceof Cl)return a.Ax();gi(a);return 128>(299*xm.j+587*xm.v+114*xm.o)/1E3} -function tm(a,b){switch(b){case sm:b=100*zm(xm.j);var c=100*zm(xm.v),d=100*zm(xm.o);Am.j=.4124564*b+.3575761*c+.1804375*d;Am.v=.2126729*b+.7151522*c+.072175*d;Am.o=.0193339*b+.119192*c+.9503041*d;Am.G=xm.G;b=Bm(Am.j/Cm[0]);c=Bm(Am.v/Cm[1]);d=Bm(Am.o/Cm[2]);Dm.j=116*c-16;Dm.v=500*(b-c);Dm.o=200*(c-d);Dm.G=Am.G;Dm.j=Math.min(100,Math.max(0,Dm.j+100*a));a=(Dm.j+16)/116;b=a-Dm.o/200;Am.j=Cm[0]*Em(Dm.v/500+a);Am.v=Cm[1]*(Dm.j>Fm*Gm?Math.pow(a,3):Dm.j/Fm);Am.o=Cm[2]*Em(b);Am.G=Dm.G;a=-.969266*Am.j+1.8760108* -Am.v+.041556*Am.o;b=.0556434*Am.j+-.2040259*Am.v+1.0572252*Am.o;xm.j=255*Hm((3.2404542*Am.j+-1.5371385*Am.v+-.4985314*Am.o)/100);xm.v=255*Hm(a/100);xm.o=255*Hm(b/100);xm.G=Am.G;xm.j=Math.round(xm.j);255xm.j&&(xm.j=0);xm.v=Math.round(xm.v);255xm.v&&(xm.v=0);xm.o=Math.round(xm.o);255xm.o&&(xm.o=0);return"rgba("+xm.j+", "+xm.v+", "+xm.o+", "+xm.G+")";case Im:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ -ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){om||(pm(),om=!0);var b=rm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,xm.j=a[0],xm.v=a[1],xm.o=a[2],xm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),xm.j=0,xm.v=0,xm.o=0,xm.G=1)}} -function hi(){var a=xm.j/255,b=xm.v/255,c=xm.o/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=xm.G}function zm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Hm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function wm(a,b,c){gi(a);a=xm.j;var d=xm.v,e=xm.m,f=xm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((xm.j-a)*c+a)+", "+Math.round((xm.v-d)*c+d)+", "+Math.round((xm.m-e)*c+e)+", "+Math.round((xm.G-f)*c+f)+")"} +t.Bx=function(){if(this.type===Jl)return ym(this.color);if((this.type===Ml||this.type===Dl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Dl)return ym(a.first().value);if(null!==a.get(.5))return ym(a.get(.5));if(2===a.count)return a=a.Ka(),ym(wm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return ym(wm(a.get(c),a.get(d),1-f/e))}return!1}; +function ym(a){if(!a)return!1;if(a instanceof Cl)return a.Bx();gi(a);return 128>(299*xm.j+587*xm.v+114*xm.m)/1E3} +function tm(a,b){switch(b){case sm:b=100*zm(xm.j);var c=100*zm(xm.v),d=100*zm(xm.m);Am.j=.4124564*b+.3575761*c+.1804375*d;Am.v=.2126729*b+.7151522*c+.072175*d;Am.m=.0193339*b+.119192*c+.9503041*d;Am.G=xm.G;b=Bm(Am.j/Cm[0]);c=Bm(Am.v/Cm[1]);d=Bm(Am.m/Cm[2]);Dm.j=116*c-16;Dm.v=500*(b-c);Dm.m=200*(c-d);Dm.G=Am.G;Dm.j=Math.min(100,Math.max(0,Dm.j+100*a));a=(Dm.j+16)/116;b=a-Dm.m/200;Am.j=Cm[0]*Em(Dm.v/500+a);Am.v=Cm[1]*(Dm.j>Fm*Gm?Math.pow(a,3):Dm.j/Fm);Am.m=Cm[2]*Em(b);Am.G=Dm.G;a=-.969266*Am.j+1.8760108* +Am.v+.041556*Am.m;b=.0556434*Am.j+-.2040259*Am.v+1.0572252*Am.m;xm.j=255*Hm((3.2404542*Am.j+-1.5371385*Am.v+-.4985314*Am.m)/100);xm.v=255*Hm(a/100);xm.m=255*Hm(b/100);xm.G=Am.G;xm.j=Math.round(xm.j);255xm.j&&(xm.j=0);xm.v=Math.round(xm.v);255xm.v&&(xm.v=0);xm.m=Math.round(xm.m);255xm.m&&(xm.m=0);return"rgba("+xm.j+", "+xm.v+", "+xm.m+", "+xm.G+")";case Im:return hi(),ii.m=Math.min(100,Math.max(0,ii.m+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.m+"%, "+ +ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){om||(pm(),om=!0);var b=rm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,xm.j=a[0],xm.v=a[1],xm.m=a[2],xm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),xm.j=0,xm.v=0,xm.m=0,xm.G=1)}} +function hi(){var a=xm.j/255,b=xm.v/255,c=xm.m/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.m=Math.round(100*e);ii.G=xm.G}function zm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Hm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function Bm(a){return a>Gm?Math.pow(a,1/3):(Fm*a+16)/116}function Em(a){var b=a*a*a;return b>Gm?b:(116*a-16)/Fm}function dm(a,b){"string"===typeof a?G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Cl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function pm(){rm=ah?(new Ek(null)).context:null} -oa.Object.defineProperties(Cl.prototype,{type:{configurable:!0,get:function(){return this.wa},set:function(a){this._isFrozen&&xa(this,a);ab(a,Cl,Cl,"type");this.wa=a;this.start.kc()&&(a===Ml?this.start=Gc:a===Dl&&(this.start=Kc));this.end.kc()&&(a===Ml?this.end=Nc:a===Dl&&(this.end=Kc));this.xe=null}},color:{configurable:!0,get:function(){return this.yk},set:function(a){this._isFrozen&&xa(this,a);G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); -this.yk=a;this.xe=null}},start:{configurable:!0,get:function(){return this.Nd},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"start");this.Nd=a.M();this.xe=null}},end:{configurable:!0,get:function(){return this.Mk},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"end");this.Mk=a.M();this.xe=null}},startRadius:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"startRadius");0>a&&Ba(a,">= zero",Cl, -"startRadius");this.qr=a;this.xe=null}},endRadius:{configurable:!0,get:function(){return this.Np},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"endRadius");0>a&&Ba(a,">= zero",Cl,"endRadius");this.Np=a;this.xe=null}},colorStops:{configurable:!0,get:function(){return this.we},set:function(a){this._isFrozen&&xa(this,a);G&&w(a,yb,Cl,"colorStops");this.we=a;this.xe=null}},pattern:{configurable:!0,get:function(){return this.Oq},set:function(a){this._isFrozen&& -xa(this,a);this.Oq=a;this.xe=null}}});Cl.prototype.isDark=Cl.prototype.Ax;Cl.prototype.darkenBy=Cl.prototype.Uy;Cl.prototype.lightenBy=Cl.prototype.Vz;Cl.prototype.addColorStop=Cl.prototype.addColorStop;var Gm=216/24389,Fm=24389/27,Cm=[95.047,100,108.883],rm=null,xm=new nm,ii=new nm,Am=new nm,Dm=new nm,om=!1;Cl.className="Brush";var Jl;Cl.Solid=Jl=new F(Cl,"Solid",0);var Ml;Cl.Linear=Ml=new F(Cl,"Linear",1);var Dl;Cl.Radial=Dl=new F(Cl,"Radial",2);var Ll;Cl.Pattern=Ll=new F(Cl,"Pattern",4);var sm; +oa.Object.defineProperties(Cl.prototype,{type:{configurable:!0,get:function(){return this.wa},set:function(a){this._isFrozen&&xa(this,a);ab(a,Cl,Cl,"type");this.wa=a;this.start.kc()&&(a===Ml?this.start=Gc:a===Dl&&(this.start=Kc));this.end.kc()&&(a===Ml?this.end=Nc:a===Dl&&(this.end=Kc));this.ye=null}},color:{configurable:!0,get:function(){return this.yk},set:function(a){this._isFrozen&&xa(this,a);G&&!qm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); +this.yk=a;this.ye=null}},start:{configurable:!0,get:function(){return this.Nd},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"start");this.Nd=a.M();this.ye=null}},end:{configurable:!0,get:function(){return this.Mk},set:function(a){this._isFrozen&&xa(this,a);w(a,Ib,Cl,"end");this.Mk=a.M();this.ye=null}},startRadius:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"startRadius");0>a&&Ba(a,">= zero",Cl, +"startRadius");this.qr=a;this.ye=null}},endRadius:{configurable:!0,get:function(){return this.Np},set:function(a){this._isFrozen&&xa(this,a);E(a,Cl,"endRadius");0>a&&Ba(a,">= zero",Cl,"endRadius");this.Np=a;this.ye=null}},colorStops:{configurable:!0,get:function(){return this.xe},set:function(a){this._isFrozen&&xa(this,a);G&&w(a,yb,Cl,"colorStops");this.xe=a;this.ye=null}},pattern:{configurable:!0,get:function(){return this.Oq},set:function(a){this._isFrozen&& +xa(this,a);this.Oq=a;this.ye=null}}});Cl.prototype.isDark=Cl.prototype.Bx;Cl.prototype.darkenBy=Cl.prototype.Uy;Cl.prototype.lightenBy=Cl.prototype.Vz;Cl.prototype.addColorStop=Cl.prototype.addColorStop;var Gm=216/24389,Fm=24389/27,Cm=[95.047,100,108.883],rm=null,xm=new nm,ii=new nm,Am=new nm,Dm=new nm,om=!1;Cl.className="Brush";var Jl;Cl.Solid=Jl=new F(Cl,"Solid",0);var Ml;Cl.Linear=Ml=new F(Cl,"Linear",1);var Dl;Cl.Radial=Dl=new F(Cl,"Radial",2);var Ll;Cl.Pattern=Ll=new F(Cl,"Pattern",4);var sm; Cl.Lab=sm=new F(Cl,"Lab",5);var Im;Cl.HSL=Im=new F(Cl,"HSL",6); Cl.randomColor=function(a,b){void 0===a&&(a=128);G&&(E(a,Cl,"randomColor:min"),(0>a||255b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+ -a};Cl.isValidColor=qm;Cl.lighten=function(a){return um(a)};Cl.lightenBy=um;Cl.darken=function(a){return vm(a)};Cl.darkenBy=vm;Cl.mix=wm;Cl.isDark=ym;function $l(){this.Ca="Base"}$l.prototype.measure=function(){};$l.prototype.Yz=function(a,b,c,d,e){a.measure(b,c,d,e)};$l.prototype.arrange=function(){};$l.prototype.Hy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};$l.prototype.hA=function(a){a.Zj()};$l.prototype.zc=function(){}; -oa.Object.defineProperties($l.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},classType:{configurable:!0,get:function(){return V}}});$l.prototype.remeasureObject=$l.prototype.hA;$l.prototype.arrangeElement=$l.prototype.Hy;$l.prototype.measureElement=$l.prototype.Yz;$l.className="PanelLayout";function Jm(){this.Ca="Base"}na(Jm,$l); +a};Cl.isValidColor=qm;Cl.lighten=function(a){return um(a)};Cl.lightenBy=um;Cl.darken=function(a){return vm(a)};Cl.darkenBy=vm;Cl.mix=wm;Cl.isDark=ym;function $l(){this.Ca="Base"}$l.prototype.measure=function(){};$l.prototype.Yz=function(a,b,c,d,e){a.measure(b,c,d,e)};$l.prototype.arrange=function(){};$l.prototype.Iy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};$l.prototype.hA=function(a){a.Zj()};$l.prototype.zc=function(){}; +oa.Object.defineProperties($l.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){this.Ca=a}},classType:{configurable:!0,get:function(){return V}}});$l.prototype.remeasureObject=$l.prototype.hA;$l.prototype.arrangeElement=$l.prototype.Iy;$l.prototype.measureElement=$l.prototype.Yz;$l.className="PanelLayout";function Jm(){this.Ca="Base"}na(Jm,$l); Jm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Km(a);for(var k=0;kaa&&(tb=Math.max(aa-Af,0));var Hk=0===P.sa;P.pc=P.pc+tb;P.actual=P.sa+tb;aa=Math.max(aa-(tb+(Hk?Af:0)),0)}if(1===sc.columnSpan&&(Xb===yg||Xb===kl)){P=a.getColumnDefinition(Wb);var $i=P.Vc();tb=Math.max(dg-P.actual,0);tb+$i>U&&(tb=Math.max(U-$i,0));var fo=0===P.sa;P.pc=P.pc+tb;P.actual=P.sa+tb;U=Math.max(U- -(tb+(fo?$i:0)),0)}zf&&sc.Zj()}}}}}Pa(z);var ce=0,De=0;f=a.columnCount;for(var Ng=0;Ng=a.rowCount);bf++)P=a.getRowDefinition(bb.row+bf),tb=0,tb=Xb===Bd||Xb===kl?Math.max(P.minimum,0===Hd[bb.row+bf]?P.maximum:Math.min(Hd[bb.row+bf],P.maximum)):Math.max(P.minimum,isNaN(P.Gc)?P.maximum:Math.min(P.Gc,P.maximum)),Ud.height+=tb,Dc+=P.minimum;for(var dd=1;dd=a.columnCount);dd++)P=a.getColumnDefinition(bb.column+dd),tb=0,tb=Xb===Bd||Xb===jl?Math.max(P.minimum,0===Pc[bb.column+dd]?P.maximum:Math.min(Pc[bb.column+dd], -P.maximum)):Math.max(P.minimum,isNaN(P.Gc)?P.maximum:Math.min(P.Gc,P.maximum)),Ud.width+=tb,Lk+=P.minimum;xb.width+=Ud.width;xb.height+=Ud.height;var Zh=bb.margin,Ff=Zh.right+Zh.left,bj=Zh.top+Zh.bottom;bb.measure(xb.width,xb.height,Lk,Dc);for(var $h=bb.measuredBounds,Vd=Math.max($h.width+Ff,0),hg=Math.max($h.height+bj,0),Gf=0,ai=0;ai=a.rowCount);ai++)P=a.getRowDefinition(bb.row+ai),Gf+=P.total||0;if(Gf=cf)&&!(bb.row+Ge>=a.rowCount);Ge++){P=a.getRowDefinition(bb.row+Ge);var ef=P.sa||0,ff=df(bb,P,ee);G&&"number"!==typeof ff&&v(bb+" spanAllocation does not return a number: "+ff);P.actual=Math.min(P.maximum,ef+ff);P.sa!==ef&&(cf-=P.sa-ef)}for(;0Id&&(P.actual=Math.min(P.maximum,Id+cf),P.sa!==Id&&(cf-=P.sa-Id));if(0===P.index)break;P=a.getRowDefinition(P.index-1)}}for(var Qg=0,gf=0;gf=a.columnCount);gf++)P= -a.getColumnDefinition(bb.column+gf),Qg+=P.total||0;if(Qg=Rg)&&!(bb.column+ig>=a.columnCount);ig++){P=a.getColumnDefinition(bb.column+ig);var cj=P.sa||0,dj=He(bb,P,ho);G&&"number"!==typeof dj&&v(bb+" spanAllocation does not return a number: "+dj);P.actual=Math.min(P.maximum,cj+dj);P.sa!==cj&&(Rg-=P.sa-cj)}for(;0Mk&&(P.actual=Math.min(P.maximum, -Mk+Rg),P.sa!==Mk&&(Rg-=P.sa-Mk));if(0===P.index)break;P=a.getColumnDefinition(P.index-1)}}}}Pa(B);Hb.free(Ud);Hb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Pc&&Pa(Pc);var Sg=0,Tg=0,Nk=a.desiredSize,Lr=a.maxSize;Xb=xl(a,!0);var ej=De=ce=0,fj=0;f=a.columnCount;for(var Ok=0;Okaa&&(tb=Math.max(aa-Af,0));var Hk=0===Q.sa;Q.pc=Q.pc+tb;Q.actual=Q.sa+tb;aa=Math.max(aa-(tb+(Hk?Af:0)),0)}if(1===tc.columnSpan&&(Yb===yg||Yb===kl)){Q=a.getColumnDefinition(Xb);var $i=Q.Wc();tb=Math.max(dg-Q.actual,0);tb+$i>U&&(tb=Math.max(U-$i,0));var fo=0===Q.sa;Q.pc=Q.pc+tb;Q.actual=Q.sa+tb;U=Math.max(U- +(tb+(fo?$i:0)),0)}zf&&tc.Zj()}}}}}Pa(z);var ce=0,De=0;f=a.columnCount;for(var Ng=0;Ng=a.rowCount);bf++)Q=a.getRowDefinition(cb.row+bf),tb=0,tb=Yb===Bd||Yb===kl?Math.max(Q.minimum,0===Hd[cb.row+bf]?Q.maximum:Math.min(Hd[cb.row+bf],Q.maximum)):Math.max(Q.minimum,isNaN(Q.Hc)?Q.maximum:Math.min(Q.Hc,Q.maximum)),Ud.height+=tb,Dc+=Q.minimum;for(var dd=1;dd=a.columnCount);dd++)Q=a.getColumnDefinition(cb.column+dd),tb=0,tb=Yb===Bd||Yb===jl?Math.max(Q.minimum,0===Pc[cb.column+dd]?Q.maximum:Math.min(Pc[cb.column+dd], +Q.maximum)):Math.max(Q.minimum,isNaN(Q.Hc)?Q.maximum:Math.min(Q.Hc,Q.maximum)),Ud.width+=tb,Lk+=Q.minimum;xb.width+=Ud.width;xb.height+=Ud.height;var Zh=cb.margin,Ff=Zh.right+Zh.left,bj=Zh.top+Zh.bottom;cb.measure(xb.width,xb.height,Lk,Dc);for(var $h=cb.measuredBounds,Vd=Math.max($h.width+Ff,0),hg=Math.max($h.height+bj,0),Gf=0,ai=0;ai=a.rowCount);ai++)Q=a.getRowDefinition(cb.row+ai),Gf+=Q.total||0;if(Gf=cf)&&!(cb.row+Ge>=a.rowCount);Ge++){Q=a.getRowDefinition(cb.row+Ge);var ef=Q.sa||0,ff=df(cb,Q,ee);G&&"number"!==typeof ff&&v(cb+" spanAllocation does not return a number: "+ff);Q.actual=Math.min(Q.maximum,ef+ff);Q.sa!==ef&&(cf-=Q.sa-ef)}for(;0Id&&(Q.actual=Math.min(Q.maximum,Id+cf),Q.sa!==Id&&(cf-=Q.sa-Id));if(0===Q.index)break;Q=a.getRowDefinition(Q.index-1)}}for(var Qg=0,gf=0;gf=a.columnCount);gf++)Q= +a.getColumnDefinition(cb.column+gf),Qg+=Q.total||0;if(Qg=Rg)&&!(cb.column+ig>=a.columnCount);ig++){Q=a.getColumnDefinition(cb.column+ig);var cj=Q.sa||0,dj=He(cb,Q,ho);G&&"number"!==typeof dj&&v(cb+" spanAllocation does not return a number: "+dj);Q.actual=Math.min(Q.maximum,cj+dj);Q.sa!==cj&&(Rg-=Q.sa-cj)}for(;0Mk&&(Q.actual=Math.min(Q.maximum, +Mk+Rg),Q.sa!==Mk&&(Rg-=Q.sa-Mk));if(0===Q.index)break;Q=a.getColumnDefinition(Q.index-1)}}}}Pa(B);Hb.free(Ud);Hb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Pc&&Pa(Pc);var Sg=0,Tg=0,Nk=a.desiredSize,Lr=a.maxSize;Yb=xl(a,!0);var ej=De=ce=0,fj=0;f=a.columnCount;for(var Ok=0;Ok=a.rowCount);P++){var la=a.getRowDefinition(z+P);0!==la.sa&&(y.height+=la.total)}for(P=1;P=a.columnCount);P++)la=a.getColumnDefinition(C+P),0!==la.sa&&(y.width+=la.total);var fa=D.sa+y.width,za=B.sa+y.height;P=h;la=k;var Ma=fa,sb=za,wb=h,Vb=k,tb=fa,Ye=za;h+fa>c.width&&(tb=Math.max(c.width-h,0));k+za>c.height&&(Ye=Math.max(c.height-k,0));var ib=Y.alignment;if(ib.Rb()){ib=a.defaultAlignment;ib.mb()||(ib=Kc);var Ed=ib.x; -var Wb=ib.y;var Ze=ib.offsetX;ib=ib.offsetY;var Ic=D.alignment,bd=B.alignment;Ic.mb()&&(Ed=Ic.x,Ze=Ic.offsetX);bd.mb()&&(Wb=bd.y,ib=bd.offsetY)}else Ed=ib.x,Wb=ib.y,Ze=ib.offsetX,ib=ib.offsetY;if(isNaN(Ed)||isNaN(Wb))Wb=Ed=.5,ib=Ze=0;Ic=W.width;bd=W.height;var Ac=Y.margin,sc=Ac.left+Ac.right,zf=Ac.top+Ac.bottom,Fd=Ql(Y,B,D,!1);!isNaN(Y.desiredSize.width)||Fd!==Bd&&Fd!==jl||(Ic=Math.max(fa-sc,0));!isNaN(Y.desiredSize.height)||Fd!==Bd&&Fd!==kl||(bd=Math.max(za-zf,0));fa=Y.maxSize;za=Y.minSize;Ic=Math.min(fa.width, -Ic);bd=Math.min(fa.height,bd);Ic=Math.max(za.width,Ic);bd=Math.max(za.height,bd);fa=bd+zf;P+=Ma*Ed-(Ic+sc)*Ed+Ze+Ac.left;la+=sb*Wb-fa*Wb+ib+Ac.top;Y.visible&&(mc(wb,Vb,tb,Ye,P,la,W.width,W.height)?Y.arrange(P,la,Ic,bd):Y.arrange(P,la,Ic,bd,new M(wb,Vb,tb,Ye)))}}Hb.free(y);for(a=0;a=a.rowCount);Q++){var la=a.getRowDefinition(z+Q);0!==la.sa&&(y.height+=la.total)}for(Q=1;Q=a.columnCount);Q++)la=a.getColumnDefinition(C+Q),0!==la.sa&&(y.width+=la.total);var fa=D.sa+y.width,za=B.sa+y.height;Q=h;la=k;var Ma=fa,sb=za,wb=h,Wb=k,tb=fa,Ye=za;h+fa>c.width&&(tb=Math.max(c.width-h,0));k+za>c.height&&(Ye=Math.max(c.height-k,0));var jb=Y.alignment;if(jb.Rb()){jb=a.defaultAlignment; +jb.mb()||(jb=Kc);var Ed=jb.x;var Xb=jb.y;var Ze=jb.offsetX;jb=jb.offsetY;var Ic=D.alignment,bd=B.alignment;Ic.mb()&&(Ed=Ic.x,Ze=Ic.offsetX);bd.mb()&&(Xb=bd.y,jb=bd.offsetY)}else Ed=jb.x,Xb=jb.y,Ze=jb.offsetX,jb=jb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,jb=Ze=0;Ic=W.width;bd=W.height;var Ac=Y.margin,tc=Ac.left+Ac.right,zf=Ac.top+Ac.bottom,Fd=Ql(Y,B,D,!1);!isNaN(Y.desiredSize.width)||Fd!==Bd&&Fd!==jl||(Ic=Math.max(fa-tc,0));!isNaN(Y.desiredSize.height)||Fd!==Bd&&Fd!==kl||(bd=Math.max(za-zf,0));fa= +Y.maxSize;za=Y.minSize;Ic=Math.min(fa.width,Ic);bd=Math.min(fa.height,bd);Ic=Math.max(za.width,Ic);bd=Math.max(za.height,bd);fa=bd+zf;Q+=Ma*Ed-(Ic+tc)*Ed+Ze+Ac.left;la+=sb*Xb-fa*Xb+jb+Ac.top;Y.visible&&(mc(wb,Wb,tb,Ye,Q,la,W.width,W.height)?Y.arrange(Q,la,Ic,bd):Y.arrange(Q,la,Ic,bd,new M(wb,Wb,tb,Ye)))}}Hb.free(y);for(a=0;a=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.U.s,u=q.length,x=0;xB)){y=gk(y.figure);for(var C=0;CB&&z.push(D))}}}}q= +Ym.prototype.zc=function(a,b,c){c=a.Gf()*c.scale;0>=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.U.s,u=q.length,x=0;xB)){y=gk(y.figure);for(var C=0;CB&&z.push(D))}}}}q= a.U.s;u=q.length;for(x=0;xe*y*c))){B=J.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=y-Math.min(-B,y));B=Math.round(B%y);y=J.opacity;C=1;if(1!==y){if(0===y)continue;C=b.globalAlpha;b.globalAlpha=C*y}D=r[x];var U=!1,aa=J.strokeDashArray;null!==aa&&(U=!0,b.Tr(aa,J.strokeDashOffset));if("LineV"===J.figure&&null!==J.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;eb)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),B=z.measuredBounds,c.cd(B),r.push(B);else{var C=z.segmentIndex,D=z.segmentFraction,J=z.alignmentFocus;J.kc()&&(J=Kc);var U=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.ya;B=Na();Y.Ru(D,B);var W=K.allocAt(B[0],B[1]);W.add(k.i(0));Y.type=== -N.j?W.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&W.offset(-Y.startX,-Y.startY));Y=B[2];if(U!==mg){var P=k.computeAngle(z,U,Y);z.Lb=P}P=W.x-b.x;var la=W.y-b.y;K.free(W);Pa(B)}else if(C<-n||C>=n)B=K.alloc(),k.xg(),k.computeMidPoint(B),Y=k.midAngle,U!==mg&&(P=k.computeAngle(z,U,Y),z.Lb=P),P=B.x-b.x,la=B.y-b.y,K.free(B);else{P=0;0<=C?(la=m.N(C),B=Cfa+10?0<=C?Y.cb(la):la.cb(Y):fa>W+10?0<=C?B.cb(P):P.cb(B):0<=C?Y.cb(P):P.cb(Y)}else Y=0<=C?la.cb(B):B.cb(la);U!==mg&&(P=k.computeAngle(z,U,Y),z.Lb=P);P=la.x+(B.x-la.x)*D-b.x;la=la.y+(B.y-la.y)*D-b.y}z.measure(Infinity,Infinity,0,0);B=z.measuredBounds;W=z.naturalBounds;var za=0;z instanceof Qf&&(za=z.strokeWidth);fa=W.width+za;var Ma=W.height+za;q.reset();q.translate(-B.x,-B.y);q.scale(z.scale,z.scale);q.rotate(U===mg?z.angle:Y,fa/2,Ma/2);U!==bn&&U!==cn||q.rotate(90, -fa/2,Ma/2);U!==dn&&U!==en||q.rotate(-90,fa/2,Ma/2);U===fn&&(45Y||225Y)&&q.rotate(-Y,fa/2,Ma/2);W=new M(0,0,fa,Ma);u.Ci(W,J);q.La(u);J=-u.x+za/2*z.scale;z=-u.y+za/2*z.scale;x.assign(aa);za=isNaN(aa.x);var sb=isNaN(aa.y);if(za||sb){fa=fa/2+3;Ma=Ma/2+3;var wb=45<=Y&&135>=Y,Vb=225<=Y&&315>=Y;U===mg&&(wb||Vb)?(x.x=sb?fa:aa.y,x.y=za?Ma:aa.x,wb?0<=C||isNaN(C)&&.5>D||!za||(x.y=-Ma):Vb&&((0<=C||isNaN(C)&&.5>D)&&za&&(x.y=-Ma),sb&&(x.x=-fa))):(za&&(x.x=0<=C||isNaN(C)&&.5>D?fa:-fa),sb&&(x.y=-Ma), -x.rotate(Y))}else x.rotate(Y);P+=x.x;la+=x.y;W.set(B);W.h(P+J,la+z,B.width,B.height);r.push(W);c.cd(W)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.mg=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);bc(e,c.width||0,c.height||0);Jb.free(q);K.free(u);K.free(x)}}}}; -$m.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Ce||a instanceof R){var d=a,e=null;a instanceof Ce&&(e=a,d=e.adornedPart);var f=a instanceof Ce?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=K.alloc(),r=n,x=q,r.xg(),r.computeMidPoint(x),r=n.midAngle,l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,x=q.y, -K.free(q);else{u=0;0<=h?(q=b.s[h],x=hz+10?0<=h?r.cb(q):q.cb(r):z>y+10?0<=h?x.cb(u):u.cb(x):0<=h?r.cb(u):u.cb(r)}else r=0<=h?q.cb(x):x.cb(q);l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(x.x-q.x)*k;x=q.y+(x.y-q.y)*k}if(p.No())g.location=new K(n,x);else{p.kc()&&(p=Kc);q=Jb.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, +N.j?W.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&W.offset(-Y.startX,-Y.startY));Y=B[2];if(U!==mg){var Q=k.computeAngle(z,U,Y);z.Lb=Q}Q=W.x-b.x;var la=W.y-b.y;K.free(W);Pa(B)}else if(C<-n||C>=n)B=K.alloc(),k.yg(),k.computeMidPoint(B),Y=k.midAngle,U!==mg&&(Q=k.computeAngle(z,U,Y),z.Lb=Q),Q=B.x-b.x,la=B.y-b.y,K.free(B);else{Q=0;0<=C?(la=m.N(C),B=Cfa+10?0<=C?Y.cb(la):la.cb(Y):fa>W+10?0<=C?B.cb(Q):Q.cb(B):0<=C?Y.cb(Q):Q.cb(Y)}else Y=0<=C?la.cb(B):B.cb(la);U!==mg&&(Q=k.computeAngle(z,U,Y),z.Lb=Q);Q=la.x+(B.x-la.x)*D-b.x;la=la.y+(B.y-la.y)*D-b.y}z.measure(Infinity,Infinity,0,0);B=z.measuredBounds;W=z.naturalBounds;var za=0;z instanceof Qf&&(za=z.strokeWidth);fa=W.width+za;var Ma=W.height+za;q.reset();q.translate(-B.x,-B.y);q.scale(z.scale,z.scale);q.rotate(U===mg?z.angle:Y,fa/2,Ma/2);U!==bn&&U!==cn||q.rotate(90, +fa/2,Ma/2);U!==dn&&U!==en||q.rotate(-90,fa/2,Ma/2);U===fn&&(45Y||225Y)&&q.rotate(-Y,fa/2,Ma/2);W=new M(0,0,fa,Ma);u.Ci(W,J);q.La(u);J=-u.x+za/2*z.scale;z=-u.y+za/2*z.scale;x.assign(aa);za=isNaN(aa.x);var sb=isNaN(aa.y);if(za||sb){fa=fa/2+3;Ma=Ma/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;U===mg&&(wb||Wb)?(x.x=sb?fa:aa.y,x.y=za?Ma:aa.x,wb?0<=C||isNaN(C)&&.5>D||!za||(x.y=-Ma):Wb&&((0<=C||isNaN(C)&&.5>D)&&za&&(x.y=-Ma),sb&&(x.x=-fa))):(za&&(x.x=0<=C||isNaN(C)&&.5>D?fa:-fa),sb&&(x.y=-Ma), +x.rotate(Y))}else x.rotate(Y);Q+=x.x;la+=x.y;W.set(B);W.h(Q+J,la+z,B.width,B.height);r.push(W);c.cd(W)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.ng=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);bc(e,c.width||0,c.height||0);Jb.free(q);K.free(u);K.free(x)}}}}; +$m.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Ce||a instanceof R){var d=a,e=null;a instanceof Ce&&(e=a,d=e.adornedPart);var f=a instanceof Ce?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=K.alloc(),r=n,x=q,r.yg(),r.computeMidPoint(x),r=n.midAngle,l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,x=q.y, +K.free(q);else{u=0;0<=h?(q=b.s[h],x=hz+10?0<=h?r.cb(q):q.cb(r):z>y+10?0<=h?x.cb(u):u.cb(x):0<=h?r.cb(u):u.cb(r)}else r=0<=h?q.cb(x):x.cb(q);l!==mg&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(x.x-q.x)*k;x=q.y+(x.y-q.y)*k}if(p.No())g.location=new K(n,x);else{p.kc()&&(p=Kc);q=Jb.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, 0,0);var B=g.naturalBounds;u=M.allocAt(0,0,B.width,B.height);y=K.alloc();y.Ci(u,p);q.La(y);p=-y.x;z=-y.y;var C=B.width,D=B.height;B=K.alloc();B.assign(m);var J=isNaN(m.x),U=isNaN(m.y);if(J||U){C=C/2+3;D=D/2+3;var aa=45<=r&&135>=r,Y=225<=r&&315>=r;l===mg&&(aa||Y)?(B.x=U?C:m.y,B.y=J?D:m.x,aa?0<=h||isNaN(h)&&.5>k||!J||(B.y=-D):Y&&((0<=h||isNaN(h)&&.5>k)&&J&&(B.y=-D),U&&(B.x=-C))):(J&&(B.x=0<=h||isNaN(h)&&.5>k?C:-C),U&&(B.y=-D),B.rotate(r))}else B.rotate(r);n+=B.x;x+=B.y;q.fp(u);p+=u.x;z+=u.y;h=K.allocAt(n+ p,x+z);g.move(h);K.free(h);K.free(B);K.free(y);M.free(u);Jb.free(q)}}null!==e?e.ck(!1):d.ck(!1)}}; -function an(a,b,c,d){if(!1!==Bj(d)){var e=d.strokeWidth;0===e&&a instanceof Ce&&a.type===V.Link&&a.adornedObject instanceof Qf&&(e=a.adornedObject.strokeWidth);e*=d.Ea;a instanceof R&&null!==a.ya?(a=a.ya.bounds,d.Fe(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Ce&&null!==a.adornedPart.ya?(a=a.adornedPart.ya.bounds,d.Fe(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Fe(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.ya?d.gc.h(0,0,e.width,e.height):d.gc.assign(d.ya.bounds);wj(d,!1)}} +function an(a,b,c,d){if(!1!==Bj(d)){var e=d.strokeWidth;0===e&&a instanceof Ce&&a.type===V.Link&&a.adornedObject instanceof Qf&&(e=a.adornedObject.strokeWidth);e*=d.Ea;a instanceof R&&null!==a.ya?(a=a.ya.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Ce&&null!==a.adornedPart.ya?(a=a.adornedPart.ya.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Ge(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.ya?d.gc.h(0,0,e.width,e.height):d.gc.assign(d.ya.bounds);wj(d,!1)}} function gn(){this.Ca="Base"}na(gn,$l); -gn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Ab();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var r=h.geometry,q=h.strokeWidth,u=r.flattenedSegments,x=r.flattenedLengths,y=r.flattenedTotalLength,z=u.length,B=0,C=0,D=Na(),J=0;Jfa&&(fa+=360);aa.push(fa)}B=P;C=la}D.push(aa)}if(null===a.graduatedIntervals){for(var za=[],Ma=a.U.s,sb=Ma.length,wb=0;wbYe))for(var ib=0;ibYe&&tb.push(Wb)}}}}a.graduatedIntervals=za}var Ze=a.graduatedIntervals;var Ic=a.U.s,bd=Ic.length,Ac=0,sc=0,zf=y;a.graduatedMarks= -[];for(var Fd,Sh=0;ShZi*Xb*y/a.graduatedRange&&null===Bc.graduatedSkip)){var Mg=x[0][0],Rd=0,tc=0;sc=y*Bc.graduatedStart-1E-4;zf=y*Bc.graduatedEnd+1E-4;var dg=Zi*Xb,Cc=a.graduatedTickBase;if(Cca.graduatedMin+dg&&(Cc-=Math.floor((Cc-a.graduatedMin)/dg)*dg);for(var Hk=Ze[Sh],$i=Cc,fo=1E-6*a.graduatedMax, -ce=1;Cc<=a.graduatedMax+fo;ce++){a:{for(var De=Hk.length,Ng=0;Ng-Th){var Cf=!1;break a}}Cf=!0}if(Cf&&(Cc>a.graduatedMax&&(Cc=a.graduatedMax),null===Bc.graduatedSkip||Bc instanceof ch&&!Bc.graduatedSkip(Cc,Bc)||Bc instanceof Qf&&!Bc.graduatedSkip(Cc,Bc))&&(Ac=(Cc-a.graduatedMin)*y/a.graduatedRange,Ac>y&&(Ac=y),sc<=Ac&&Ac<=zf)){for(var de=D[Rd][tc],$e=x[Rd][tc];RdMg&&tc< -x[Rd].length-1;)tc++,de=D[Rd][tc],$e=x[Rd][tc],Mg+=$e;if(Ac<=Mg)break;Rd++;tc=0;de=D[Rd][tc];$e=x[Rd][tc];Mg+=$e}var uc=u[Rd],Sd=uc[2*tc],Ik=uc[2*tc+1],Ee=(Ac-(Mg-$e))/$e,Uh=new K(Sd+(uc[2*tc+2]-Sd)*Ee+q/2-r.bounds.x,Ik+(uc[2*tc+3]-Ik)*Ee+q/2-r.bounds.y);Uh.scale(h.scale,h.scale);a:{var Gd=de,eg=D[Rd];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Og){var Vh=1-Math.abs(.5-Ee);de=(Gd*Vh+Td*(1-Vh))%360;break a}}}de=Gd}if(Bc instanceof ch){var nd="";null!==Bc.graduatedFunction?(nd=Bc.graduatedFunction(Cc,Bc),nd=null!==nd&&void 0!==nd?nd.toString():""):nd=(+Cc.toFixed(2)).toString();""!==nd&&Fd.push({Vl:Uh,angle:de,text:nd})}else Fd.push({Vl:Uh,angle:de})}Cc=$i+ce*dg}}}a.graduatedMarks.push(Fd)}Pa(D); -var xb=a.graduatedMarks;if(null!==xb)for(var aj=d.length,ic=0;icod;od++){switch(od){case 0:vc.h(Ud,Hd);break;case 1:vc.h(Ud+Wh,Hd);break;case 2:vc.h(Ud,Hd+gg);break;case 3:vc.h(Ud+Wh,Hd+gg)}vc.rotate(bb+jb.angle);vc.offset(Kk,Yh);0===Xh&&0===od?Pc.h(vc.x,vc.y,0,0):Pc.Ye(vc);vc.offset(-Kk,-Yh);vc.rotate(-bb-jb.angle)}K.free(vc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Pc);lc(af,Pc.x,Pc.y,Pc.width,Pc.height)}else if(jb instanceof ch){var cd=a,Lk=e;null===cd.temporaryTextBlock&&(cd.temporaryTextBlock=new ch);var Dc=cd.temporaryTextBlock;hn(Dc,jb); -var bf=jb.alignmentFocus;bf.kc()&&(bf=Gc);for(var dd=jb.segmentOrientation,Zh=jb.segmentOffset,Ff=new M,bj=0,$h=0,Vd=0,hg=0,Gf=0,ai=jc.length,cf=0;cffa&&(fa+=360);aa.push(fa)}B=Q;C=la}D.push(aa)}if(null===a.graduatedIntervals){for(var za=[],Ma=a.U.s,sb=Ma.length,wb=0;wbYe))for(var jb=0;jbYe&&tb.push(Xb)}}}}a.graduatedIntervals=za}var Ze=a.graduatedIntervals;var Ic=a.U.s,bd=Ic.length,Ac=0,tc=0,zf=y;a.graduatedMarks= +[];for(var Fd,Sh=0;ShZi*Yb*y/a.graduatedRange&&null===Bc.graduatedSkip)){var Mg=x[0][0],Rd=0,uc=0;tc=y*Bc.graduatedStart-1E-4;zf=y*Bc.graduatedEnd+1E-4;var dg=Zi*Yb,Cc=a.graduatedTickBase;if(Cca.graduatedMin+dg&&(Cc-=Math.floor((Cc-a.graduatedMin)/dg)*dg);for(var Hk=Ze[Sh],$i=Cc,fo=1E-6*a.graduatedMax, +ce=1;Cc<=a.graduatedMax+fo;ce++){a:{for(var De=Hk.length,Ng=0;Ng-Th){var Cf=!1;break a}}Cf=!0}if(Cf&&(Cc>a.graduatedMax&&(Cc=a.graduatedMax),null===Bc.graduatedSkip||Bc instanceof ch&&!Bc.graduatedSkip(Cc,Bc)||Bc instanceof Qf&&!Bc.graduatedSkip(Cc,Bc))&&(Ac=(Cc-a.graduatedMin)*y/a.graduatedRange,Ac>y&&(Ac=y),tc<=Ac&&Ac<=zf)){for(var de=D[Rd][uc],$e=x[Rd][uc];RdMg&&uc< +x[Rd].length-1;)uc++,de=D[Rd][uc],$e=x[Rd][uc],Mg+=$e;if(Ac<=Mg)break;Rd++;uc=0;de=D[Rd][uc];$e=x[Rd][uc];Mg+=$e}var vc=u[Rd],Sd=vc[2*uc],Ik=vc[2*uc+1],Ee=(Ac-(Mg-$e))/$e,Uh=new K(Sd+(vc[2*uc+2]-Sd)*Ee+q/2-r.bounds.x,Ik+(vc[2*uc+3]-Ik)*Ee+q/2-r.bounds.y);Uh.scale(h.scale,h.scale);a:{var Gd=de,eg=D[Rd];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Og){var Vh=1-Math.abs(.5-Ee);de=(Gd*Vh+Td*(1-Vh))%360;break a}}}de=Gd}if(Bc instanceof ch){var nd="";null!==Bc.graduatedFunction?(nd=Bc.graduatedFunction(Cc,Bc),nd=null!==nd&&void 0!==nd?nd.toString():""):nd=(+Cc.toFixed(2)).toString();""!==nd&&Fd.push({Vl:Uh,angle:de,text:nd})}else Fd.push({Vl:Uh,angle:de})}Cc=$i+ce*dg}}}a.graduatedMarks.push(Fd)}Pa(D); +var xb=a.graduatedMarks;if(null!==xb)for(var aj=d.length,jc=0;jcod;od++){switch(od){case 0:wc.h(Ud,Hd);break;case 1:wc.h(Ud+Wh,Hd);break;case 2:wc.h(Ud,Hd+gg);break;case 3:wc.h(Ud+Wh,Hd+gg)}wc.rotate(cb+kb.angle);wc.offset(Kk,Yh);0===Xh&&0===od?Pc.h(wc.x,wc.y,0,0):Pc.Ze(wc);wc.offset(-Kk,-Yh);wc.rotate(-cb-kb.angle)}K.free(wc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Pc);lc(af,Pc.x,Pc.y,Pc.width,Pc.height)}else if(kb instanceof ch){var cd=a,Lk=e;null===cd.temporaryTextBlock&&(cd.temporaryTextBlock=new ch);var Dc=cd.temporaryTextBlock;hn(Dc,kb); +var bf=kb.alignmentFocus;bf.kc()&&(bf=Gc);for(var dd=kb.segmentOrientation,Zh=kb.segmentOffset,Ff=new M,bj=0,$h=0,Vd=0,hg=0,Gf=0,ai=kc.length,cf=0;cfVd||225Vd)&&Id.rotate(-Vd,ef/2,ff/2);var Qg=M.allocAt(0,0,ef,ff),gf=K.alloc();gf.Ci(Qg,bf);Id.La(gf);var Rg=-gf.x,ho=-gf.y,He=K.alloc();He.assign(Zh);isNaN(He.x)&&(He.x=ef/2+3);isNaN(He.y)&&(He.y=-(ff/2+3));He.rotate(Vd);bj+=He.x+Rg;$h+=He.y+ho;var ig=new M(bj,$h,df.width,df.height),cj=new M(df.x,df.y,df.width,df.height),dj=new M(Ge.x,Ge.y,Ge.width,Ge.height); -ee.Tz=hg;ee.lineCount=Dc.lineCount;ee.lines=[Dc.Db,Dc.Lh,Dc.df,Dc.Ke,Dc.Oc,Dc.ac,Dc.ze];ee.actualBounds=ig;ee.measuredBounds=cj;ee.naturalBounds=dj;0===cf?Ff.assign(ig):Ff.cd(ig);K.free(He);K.free(gf);M.free(Qg);Jb.free(Id)}null!==cd.graduatedBounds&&cd.graduatedBounds.push(Ff);lc(Lk,Ff.x,Ff.y,Ff.width,Ff.height)}wj(jb,!1)}}}; +ee.Tz=hg;ee.lineCount=Dc.lineCount;ee.lines=[Dc.Db,Dc.Lh,Dc.ef,Dc.Le,Dc.Pc,Dc.ac,Dc.Ae];ee.actualBounds=ig;ee.measuredBounds=cj;ee.naturalBounds=dj;0===cf?Ff.assign(ig):Ff.cd(ig);K.free(He);K.free(gf);M.free(Qg);Jb.free(Id)}null!==cd.graduatedBounds&&cd.graduatedBounds.push(Ff);lc(Lk,Ff.x,Ff.y,Ff.width,Ff.height)}wj(kb,!1)}}}; gn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Ab(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=e&&(e=1);for(var g=f.actualBounds,h=a.U.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* +gn.prototype.zc=function(a,b,c){var d=c.hj;c.hj=!0;var e=a.naturalBounds,f=e.width;e=e.height;b.save();b.beginPath();b.rect(-1,-1,f+1,e+1);b.clip();f=a.Ab();f.zc(b,c);e=a.Gf()*c.scale;0>=e&&(e=1);for(var g=f.actualBounds,h=a.U.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* n.scale,x=n.alignmentFocus;x.kc()&&(x=Gc);for(var y=0;yf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ti(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.Tr(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-=p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.zb;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Rr()}}}} -function ln(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=nn(a,!0),l=nn(a,!1),m=0;mp)){var r=n.Vc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= +function ln(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=nn(a,!0),l=nn(a,!1),m=0;mp)){var r=n.Wc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= q;q=n.position+q;r+=n.actual;q+r>p&&(r=p-q);0>=r||(p=a.zb,ti(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,q+p.top,g.width-(p.left+p.right),r):b.fillRect(q+p.left,p.top,r,g.height-(p.top+p.bottom)))}}}}function nn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(q),K.free(q));K.free(m);f&&e.transform(g);return l}; t.w=function(a){if(!Bj(this)){O.prototype.w.call(this,a);a=null;if(this.wa===V.Auto||this.wa===V.Link)a=this.Ab();for(var b=this.U.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Bd:this.w(!0);this.measure(c+h,d+g,0,0);break;case jl:this.w(!0);this.measure(c+h,f+g,0,0);break;case kl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.wa.arrange(this,e,this.mg)}}; -t.ih=function(a){var b=this.naturalBounds,c=Km(this);if(mc(0,0,b.width,b.height,a.x,a.y)){b=this.U.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Kb(e.set(a),f.transform),f.ea(e))return K.free(e),!0}K.free(e);return null===this.cc&&null===this.areaBackground?!1:!0}return!1};t.Ur=function(a){if(this.bindingId===a)return this;for(var b=this.U.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Bd:this.w(!0);this.measure(c+h,d+g,0,0);break;case jl:this.w(!0);this.measure(c+h,f+g,0,0);break;case kl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.wa.arrange(this,e,this.ng)}}; +t.ih=function(a){var b=this.naturalBounds,c=Km(this);if(mc(0,0,b.width,b.height,a.x,a.y)){b=this.U.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Kb(e.set(a),f.transform),f.ga(e))return K.free(e),!0}K.free(e);return null===this.cc&&null===this.areaBackground?!1:!0}return!1};t.Ur=function(a){if(this.bindingId===a)return this;for(var b=this.U.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof V?m:null;p=Jb.alloc();p.set(g); -if(null!==m?m.Ef(a,b,c,d,e,p):wl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Jb.free(p)}}}void 0===f&&Jb.free(g);return d}void 0===f&&Jb.free(g);return!1};function un(a,b,c,d){for(var e=a.U.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof V&&un(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} -t.sg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.re(),k=h?a:Kb(K.allocAt(a.x,a.y),this.transform),l=h?b:Kb(K.allocAt(b.x,b.y),this.transform),m=k.Cf(l),n=0x.width||u.y>x.height||0>u.x+u.width||0>u.y+u.height))if(q.re()?(u=q.transform,Kb(k.set(a),u),Kb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof V?q:null,null!==q?q.sg(k,l,c,d,e,f):u.lx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; +t.Ff=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Jb.alloc(),g.reset());g.multiply(this.transform);if(this.hh(a,g))return un(this,b,c,e),void 0===f&&Jb.free(g),!0;if(this.Yc(a,g)){if(!this.isAtomic)for(var h=Km(this),k=this.U.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof V?m:null;p=Jb.alloc();p.set(g); +if(null!==m?m.Ff(a,b,c,d,e,p):wl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Jb.free(p)}}}void 0===f&&Jb.free(g);return d}void 0===f&&Jb.free(g);return!1};function un(a,b,c,d){for(var e=a.U.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof V&&un(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.tg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.se(),k=h?a:Kb(K.allocAt(a.x,a.y),this.transform),l=h?b:Kb(K.allocAt(b.x,b.y),this.transform),m=k.Df(l),n=0x.width||u.y>x.height||0>u.x+u.width||0>u.y+u.height))if(q.se()?(u=q.transform,Kb(k.set(a),u),Kb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof V?q:null,null!==q?q.tg(k,l,c,d,e,f):u.mx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; function Qm(a){var b=null;a instanceof Qf&&(b=a.spot1,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=Fc);return b}function Rm(a){var b=null;a instanceof Qf&&(b=a.spot2,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Oc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.ah=null;Bj(this)||this.w();b.w(!1);null!==b.portId?this.Te=!0:b instanceof V&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.Jf()||vn(this,b,!1);c=this.part;null!==c&&(c.Wh=null,c.cg=NaN,this.Te&&c instanceof T&&(c.Te=!0),c.Te&&c instanceof T&&(c.yc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.ib(te,"elements",this,b,null,d,null),c.ib(se,"elements",this,null,b,null,a)))};function wn(a,b){a.m=b?a.m|16777216:a.m&-16777217}t.remove=function(a){w(a,O,V,"remove:element");for(var b=this.U.s,c=b.length,d=-1,e=0;e=e.count&&a>=e.count)return; +e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.ah=null;Bj(this)||this.w();b.w(!1);null!==b.portId?this.Ue=!0:b instanceof V&&!0===b.Ue&&(this.Ue=!0);this.graduatedIntervals=null;this.Kf()||vn(this,b,!1);c=this.part;null!==c&&(c.Wh=null,c.dg=NaN,this.Ue&&c instanceof T&&(c.Ue=!0),c.Ue&&c instanceof T&&(c.yc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.ib(te,"elements",this,b,null,d,null),c.ib(se,"elements",this,null,b,null,a)))};function wn(a,b){a.o=b?a.o|16777216:a.o&-16777217}t.remove=function(a){w(a,O,V,"remove:element");for(var b=this.U.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",V,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new ck;c.Bi(this);c.isRow=!0;c.index=a;b[a]=c;this.ib(se,"rowdefs",this,null,c,null,a)}return b[a]}; V.prototype.nA=function(a){G&&E(a,V,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",V,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ib(te,"rowdefs",this,c,null,a,null);this.w()}}};function dk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof ck?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} V.prototype.getColumnDefinition=function(a){G&&E(a,V,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",V,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new ck;c.Bi(this);c.isRow=!1;c.index=a;b[a]=c;this.ib(se,"coldefs",this,null,c,null,a)}return b[a]};t=V.prototype; t.iA=function(a){G&&E(a,V,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",V,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ib(te,"coldefs",this,c,null,a,null);this.w()}}};function ek(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof ck?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} t.oz=function(a){if(0>a||this.type!==V.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==V.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;e=c.elements.count&&!(c instanceof S)){var d=!1;if(1===c.elements.count&&(d=null!==c.itemArray,!d))for(h=b.iterator;h.next();)if("itemArray"===h.value.targetProperty){d=!0;break}d||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),yn=!0)}}))} t.Sy=function(a){void 0===a&&(a=!1);var b=this.copy();pn(b,function(a){a instanceof V&&(a.allBindings=null,a.vb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Av(b.value.copy())}))});a&&xg(b);return b}; t.Pa=function(a){var b=this.allBindings;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.lb(e),null===d){G&&Fa("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d= -d.model.modelData;else continue;var f=this,g=c.Gi;if(-1!==g){if(f=this.Ur(g),null===f)continue}else null!==c.yd&&(f=c.yd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.jo;if(0!==e){if(!(f instanceof V))continue;1===e?f=f.getColumnDefinition(c.yl):2===e&&(f=f.getRowDefinition(c.yl))}void 0!==f&&c.Dv(f,d)}}};t.kx=function(a){if(void 0===a||null===a||null===this.ee)return null;A(a,"object",V,"findItemPanelForData");return this.ee.L(a)}; +d.model.modelData;else continue;var f=this,g=c.Gi;if(-1!==g){if(f=this.Ur(g),null===f)continue}else null!==c.yd&&(f=c.yd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.jo;if(0!==e){if(!(f instanceof V))continue;1===e?f=f.getColumnDefinition(c.yl):2===e&&(f=f.getRowDefinition(c.yl))}void 0!==f&&c.Dv(f,d)}}};t.lx=function(a){if(void 0===a||null===a||null===this.fe)return null;A(a,"object",V,"findItemPanelForData");return this.fe.L(a)}; function zn(a,b){a=a.U.s;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.rc(this.U.length-1,!1);An(this,this.itemArray)}; -function An(a,b){var c=sn(a);if(null===b||0===b.length)for(;a.U.length>c;)a.rc(a.U.length-1,!1);else if(a.U.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){xg(e);e=e.copy();if(0!==(e.m&16777216)){var f=a.jh();null!==f&&wn(f,!0)}"object"===typeof b&&(null===a.ee&&(a.ee=new yb),a.ee.add(b,e));f=c+sn(a);a.Hb(f,e);d&&(e.vb=b,En(a,f,c),e.vb=null);e.data=b}}} +function An(a,b){var c=sn(a);if(null===b||0===b.length)for(;a.U.length>c;)a.rc(a.U.length-1,!1);else if(a.U.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){xg(e);e=e.copy();if(0!==(e.o&16777216)){var f=a.jh();null!==f&&wn(f,!0)}"object"===typeof b&&(null===a.fe&&(a.fe=new yb),a.fe.add(b,e));f=c+sn(a);a.Hb(f,e);d&&(e.vb=b,En(a,f,c),e.vb=null);e.data=b}}} function En(a,b,c){for(a=a.U;ba&&Ba(a,">= 0",V,"padding"), a=new gc(a)):(w(a,gc,V,"padding"),0>a.left&&Ba(a.left,">= 0",V,"padding:value.left"),0>a.right&&Ba(a.right,">= 0",V,"padding:value.right"),0>a.top&&Ba(a.top,">= 0",V,"padding:value.top"),0>a.bottom&&Ba(a.bottom,">= 0",V,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.w(),this.g("padding",b,a))}},defaultAlignment:{configurable:!0,get:function(){return this.Om},set:function(a){var b=this.Om;b.D(a)||(G&&w(a,Ib,V,"defaultAlignment"),this.Om=a=a.M(),this.w(),this.g("defaultAlignment", -b,a))}},defaultStretch:{configurable:!0,get:function(){return this.Vf},set:function(a){var b=this.Vf;b!==a&&(ab(a,O,V,"defaultStretch"),this.Vf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.W?this.W.Hp:yc},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,V,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.W&&(this.W=new Jn),this.W.Hp=a,this.w(),this.g("defaultSeparatorPadding", +b,a))}},defaultStretch:{configurable:!0,get:function(){return this.Wf},set:function(a){var b=this.Wf;b!==a&&(ab(a,O,V,"defaultStretch"),this.Wf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.W?this.W.Hp:yc},set:function(a){"number"===typeof a?a=new gc(a):G&&w(a,gc,V,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.W&&(this.W=new Jn),this.W.Hp=a,this.w(),this.g("defaultSeparatorPadding", b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.W?this.W.ma:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Cl)&&(a instanceof Cl&&a.freeze(),null===this.W&&(this.W=new Jn),this.W.ma=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.W?this.W.Ma:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; -b!==a&&isFinite(a)&&0<=a&&(null===this.W&&(this.W=new Jn),this.W.Ma=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.W?this.W.aa:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",V,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.Ib=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.W?this.W.jb:0},set:function(a){var b= -this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.jb=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;if(b!==a){var c=this instanceof S&&!(this instanceof Ce);c&&A(a,"object",V,"data");xg(this);this.vb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof R?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a, -this)):this instanceof S&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ee&&(null!==b&&c.ee.remove(b),null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Pa()}}},itemIndex:{configurable:!0,get:function(){return this.sn},set:function(a){var b=this.sn;b!==a&&(this.sn=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.ob:null},set:function(a){this.localBindings!== +this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.W&&(this.W=new Jn),this.W.jb=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;if(b!==a){var c=this instanceof S&&!(this instanceof Ce);c&&A(a,"object",V,"data");xg(this);this.vb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof R?(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a, +this)):this instanceof S&&(null!==b&&c.df.remove(b),null!==a&&c.df.add(a,this))):(c=this.panel,null!==c&&null!==c.fe&&(null!==b&&c.fe.remove(b),null!==a&&c.fe.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Pa()}}},itemIndex:{configurable:!0,get:function(){return this.sn},set:function(a){var b=this.sn;b!==a&&(this.sn=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.ob:null},set:function(a){this.localBindings!== a&&(null===this.B&&(this.B=new rl),this.B.ob=a)}},itemArray:{configurable:!0,get:function(){return this.Jh},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Jh;if(b!==a||null!==a&&zn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Tj(c.partManager,this,c),this.Jh=a,null!==c&&null!==a&&Qj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||An(this,a)}}},itemTemplate:{configurable:!0, enumerable:!0,get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.L("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new yb}var b=this.itemTemplateMap.L("");b!==a&&(w(a,V,V,"itemTemplate"),(a instanceof S||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.iv())}},itemTemplateMap:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.te:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){w(a,yb,V,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof S||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}ql(this);this.B.te=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.iv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== -this.B?this.B.Nc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",V,"itemCategoryProperty"),ql(this),this.B.Nc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(A(a,"boolean",V,"isAtomic"),this.m^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== -(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(G&&(A(a,"boolean",V,"isClipping"),!a||this.type===V.Spot||this instanceof wf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.m^=2097152,this instanceof wf&&(this.pb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.m&33554432)},set:function(a){var b=0!==(this.m&33554432);b!==a&&(A(a,"boolean",V,"isOpposite"),this.m^=33554432,this.w(), -this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);if(b!==a){A(a,"boolean",V,"isEnabled");var c=null===this.panel||this.panel.Jf();this.m^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&vn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(G&&A(a,"string",V,"alignmentFocusName"), -this.$e=a,this.w(),this.g("alignmentFocusName",b,a))}}}); +enumerable:!0,get:function(){return null!==this.B?this.B.ue:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){w(a,yb,V,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof S||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}ql(this);this.B.ue=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.iv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== +this.B?this.B.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",V,"itemCategoryProperty"),ql(this),this.B.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(A(a,"boolean",V,"isAtomic"),this.o^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== +(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(G&&(A(a,"boolean",V,"isClipping"),!a||this.type===V.Spot||this instanceof wf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.o^=2097152,this instanceof wf&&(this.pb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.o&33554432)},set:function(a){var b=0!==(this.o&33554432);b!==a&&(A(a,"boolean",V,"isOpposite"),this.o^=33554432,this.w(), +this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);if(b!==a){A(a,"boolean",V,"isEnabled");var c=null===this.panel||this.panel.Kf();this.o^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&vn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.af},set:function(a){var b=this.af;b!==a&&(G&&A(a,"string",V,"alignmentFocusName"), +this.af=a,this.w(),this.g("alignmentFocusName",b,a))}}}); oa.Object.defineProperties(V,{Position:{configurable:!0,get:function(){return Zl.L("Position")}},Horizontal:{configurable:!0,get:function(){return Zl.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return Zl.L("Vertical")}},Spot:{configurable:!0,get:function(){return Zl.L("Spot")}},Auto:{configurable:!0,get:function(){return Zl.L("Auto")}},Table:{configurable:!0,get:function(){return Zl.L("Table")}},Viewbox:{configurable:!0, enumerable:!0,get:function(){return Zl.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return Zl.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return Zl.L("TableColumn")}},Link:{configurable:!0,get:function(){return Zl.L("Link")}},Grid:{configurable:!0,get:function(){return Zl.L("Grid")}},Graduated:{configurable:!0,get:function(){return Zl.L("Graduated")}}});V.prototype.rebuildItemElements=V.prototype.iv; -V.prototype.findItemPanelForData=V.prototype.kx;V.prototype.updateTargetBindings=V.prototype.Pa;V.prototype.copyTemplate=V.prototype.Sy;V.prototype.graduatedValueForPoint=V.prototype.Hz;V.prototype.graduatedPointForValue=V.prototype.Gz;V.prototype.findColumnForLocalX=V.prototype.gz;V.prototype.findRowForLocalY=V.prototype.oz;V.prototype.removeColumnDefinition=V.prototype.iA;V.prototype.removeRowDefinition=V.prototype.nA;V.prototype.removeAt=V.prototype.sb;V.prototype.remove=V.prototype.remove; +V.prototype.findItemPanelForData=V.prototype.lx;V.prototype.updateTargetBindings=V.prototype.Pa;V.prototype.copyTemplate=V.prototype.Sy;V.prototype.graduatedValueForPoint=V.prototype.Hz;V.prototype.graduatedPointForValue=V.prototype.Gz;V.prototype.findColumnForLocalX=V.prototype.gz;V.prototype.findRowForLocalY=V.prototype.oz;V.prototype.removeColumnDefinition=V.prototype.iA;V.prototype.removeRowDefinition=V.prototype.nA;V.prototype.removeAt=V.prototype.sb;V.prototype.remove=V.prototype.remove; V.prototype.insertAt=V.prototype.Hb;V.prototype.elt=V.prototype.N;V.prototype.add=V.prototype.add;V.prototype.findObject=V.prototype.lb;V.prototype.findInVisualTree=V.prototype.Jl;V.prototype.walkVisualTreeFrom=V.prototype.nk;V.prototype.findMainElement=V.prototype.Ab;var yn=!1,Gn=!1,Hn=null,Zl=new yb;V.className="Panel";V.definePanelLayout=In;In("Position",new Jm);In("Vertical",new Mm);In("Auto",new Pm);In("Link",new $m); -function Kn(){this.$p=0;this.G=100;this.ma=10;this.aa=0;this.di=this.o=this.j=this.v=null}Kn.prototype.copy=function(){var a=new Kn;a.$p=this.$p;a.G=this.G;a.ma=this.ma;a.aa=this.aa;a.v=this.v;a.j=this.j;a.o=this.o;a.di=this.di;return a};Kn.className="GradPanelSettings";function Jn(){this.Nc=[];this.Mc=[];this.j=this.tb=Ln;this.jb=this.Ib=0;this.Hp=yc;this.Ma=1;this.aa=this.ma=null;this.G=1;this.ob=this.o=this.v=null} -Jn.prototype.copy=function(a){for(var b=new Jn,c=this.Nc,d=c.length,e=b.Nc,f=0;fa&&Ba(a,">= 0",ck,"height"),this.Gc=a,this.actual=this.sa,null!== -this.panel&&this.panel.w(),this.Pb("height",b,a))}},width:{configurable:!0,get:function(){return this.Gc},set:function(a){var b=this.Gc;b!==a&&(G&&A(a,"number",ck,"width"),0>a&&Ba(a,">= 0",ck,"width"),this.Gc=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("width",b,a))}},minimum:{configurable:!0,get:function(){return this.rj},set:function(a){var b=this.rj;b!==a&&(G&&A(a,"number",ck,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",ck,"minimum"),this.rj=a,this.actual= +oa.Object.defineProperties(ck.prototype,{panel:{configurable:!0,get:function(){return this.fg}},isRow:{configurable:!0,get:function(){return this.jq},set:function(a){this.jq=a}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb=a}},height:{configurable:!0,get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(G&&A(a,"number",ck,"height"),0>a&&Ba(a,">= 0",ck,"height"),this.Hc=a,this.actual=this.sa,null!== +this.panel&&this.panel.w(),this.Pb("height",b,a))}},width:{configurable:!0,get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(G&&A(a,"number",ck,"width"),0>a&&Ba(a,">= 0",ck,"width"),this.Hc=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("width",b,a))}},minimum:{configurable:!0,get:function(){return this.rj},set:function(a){var b=this.rj;b!==a&&(G&&A(a,"number",ck,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",ck,"minimum"),this.rj=a,this.actual= this.sa,null!==this.panel&&this.panel.w(),this.Pb("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.pj},set:function(a){var b=this.pj;b!==a&&(G&&A(a,"number",ck,"maximum"),0>a&&Ba(a,">= 0",ck,"maximum"),this.pj=a,this.actual=this.sa,null!==this.panel&&this.panel.w(),this.Pb("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(G&&w(a,Ib,ck,"alignment"),this.Kb=a.M(),null!==this.panel&&this.panel.w(), -this.Pb("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.kg},set:function(a){var b=this.kg;b!==a&&(G&&ab(a,O,ck,"stretch"),this.kg=a,null!==this.panel&&this.panel.w(),this.Pb("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.gg},set:function(a){"number"===typeof a?a=new gc(a):null!==a&&G&&w(a,gc,ck,"separatorPadding");var b=this.gg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.gg=a,null!==this.panel&&this.panel.w(), +this.Pb("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(G&&ab(a,O,ck,"stretch"),this.lg=a,null!==this.panel&&this.panel.w(),this.Pb("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.hg},set:function(a){"number"===typeof a?a=new gc(a):null!==a&&G&&w(a,gc,ck,"separatorPadding");var b=this.hg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.hg=a,null!==this.panel&&this.panel.w(), this.Pb("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.$n},set:function(a){var b=this.$n;b!==a&&(null!==a&&dm(a,"RowColumnDefinition.separatorStroke"),a instanceof Cl&&a.freeze(),this.$n=a,null!==this.panel&&this.panel.w(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.ao},set:function(a){var b=this.ao;b!==a&&(this.ao=a,null!==this.panel&&this.panel.w(),this.Pb("separatorStrokeWidth", b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Bj},set:function(a){var b=this.Bj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",ck,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,x=Na(),y=2;yn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;y=0;q=x[y];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Pa(x);return}e>q?(z=e-q,e=q):z=0;var B=Math.sqrt(e*e/(1+p*p));0>n&&(B=-B);h+=B;k+=p*B;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.mi(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){y++;if(y===x.length){Pa(x);return}q=x[y];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Pa(x)}} -t.mi=function(a,b){var c=this.Sc,d=this.Nk;if(null!==c||null!==d){var e=this.ya;if(null!==e){a.Uc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ti(this,a,d,!0,!1,g,f);var h=this.part,k=this.lg;null===c||0!==k||null===h||!this.isPanelMain&&h.Ab()!==this||(k=h.type===V.Link&&h instanceof Ce&&"Selection"===h.category&&h.adornedObject instanceof Qf&&h.adornedPart.Ab()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ti(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= -this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Se("drawShadows")&&(f=h.isShadowed);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.Tr(k,this.strokeDashOffset));if(e.type===N.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.Fi();else if(e.type===N.v){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n-k);a.beginPath();a.rect(e, -p,l,k);null!==d&&a.Df(d);if(null!==c){h&&f&&Gl(a);if(0===l||0===k)a.beginPath(),a.rect(e,p,Math.max(l,.1),Math.max(k,.1));a.Fi();h&&f&&Fl(a)}}else if(e.type===N.G)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+L.yg*e,k-p,l+e,k-L.yg*p,l+e,k),a.bezierCurveTo(l+e,k+L.yg*p,l+L.yg*e,k+p,l,k+p),a.bezierCurveTo(l-L.yg*e,k+p,l-e,k+L.yg*p,l-e,k),a.bezierCurveTo(l-e,k-L.yg*p,l-L.yg*e,k-p,l,k-p), -a.closePath(),null!==d&&a.Df(d),null!==c&&(h&&f?(Gl(a),a.Fi(),Fl(a)):a.Fi());else if(e.type===N.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==r?r.endX:l.startX,null!==r?r.endY:l.startY)}else if(r=ae(u,l),x=r.length,0===x)a.lineTo(u.centerX,u.centerY);else for(var y=0;y(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.Yb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== -N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Wc(-d,-d);if(f.ea(a))return M.free(f),!1;f.Wc(d,d)}null!==this.stroke&&f.Wc(e,e);a=f.ea(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?he(c,a.x,a.y,e):fe(c,a,e,1(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.Yb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== +N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Bc(-d,-d);if(f.ga(a))return M.free(f),!1;f.Bc(d,d)}null!==this.stroke&&f.Bc(e,e);a=f.ga(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), +!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.m)return M.free(f),null===this.fill?he(c,a.x,a.y,e):fe(c,a,e,1=this.strokeWidth)m=L.Ve(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), -d=m*b);b=Na();a=new K;L.Ve(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.Ve(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* -(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),y-=q,z-= -u;r.contains(y,z);)y-=q,z-=u;e.x=h;e.y=k;for(u=0;u=this.strokeWidth)m=L.We(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), +d=m*b);b=Na();a=new K;L.We(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.We(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* +(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),y-=q,z-= +u;r.contains(y,z);)y-=q,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ha(k.y,a))&&(k.yb||L.ha(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} -t.lx=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.ih(a,!0))return!0;var e=a.Cf(b),f=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.ih(a,!0))return!0;var e=a.Df(b),f=e;1.5=e||Mb(b,f,0,-n)>= -e||Mb(b,f,0,n)>=e||Mb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Lb(a.x,a.y,f,h,k,h)>e&&Lb(a.x,a.y,k,l,f,l)>e&&Lb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?he(b,a.x,a.y,f):fe(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Xd:var p=Na();L.Pe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Yd:p=Na();L.To(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Zd:case $d:p=n.type===Zd?ae(n,f):be(n,f,g,m);var r=p.length;if(0===r){g=n.type===Zd?n.centerX:n.endX;m=n.type===Zd?n.centerY:n.endY;if(a.zd(g,m)> -e)return!1;break}n=null;for(var q=Na(),u=0;u=e||Mb(b,f,m,0)>=e?!1:!0}else if(b.type===N.m){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Lb(a.x,a.y,f,h,k,h)>e&&Lb(a.x,a.y,k,l,f,l)>e&&Lb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?he(b,a.x,a.y,f):fe(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Xd:var p=Na();L.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Yd:p=Na();L.To(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Zd:case $d:p=n.type===Zd?ae(n,f):be(n,f,g,m);var r=p.length;if(0===r){g=n.type===Zd?n.centerX:n.endX;m=n.type===Zd?n.centerY:n.endY;if(a.zd(g,m)> +e)return!1;break}n=null;for(var q=Na(),u=0;ub+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); +Qf.makeGeometry=function(a,b,c){if("None"!==a.toArrow)var d=Vn[a.toArrow];else"None"!==a.fromArrow?d=Vn[a.fromArrow]:(d=L.te[a.figure],"string"===typeof d&&(d=L.te[d]),void 0===d&&v("Unknown Shape.figure: "+a.figure),d=d(a,b,c),d.Uk=b,d.Tk=c);if(null===d){var e=L.te.Rectangle;"function"===typeof e&&(d=e(a,b,c))}G&&(d.bounds.width>b+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); return d};function Wn(a){var b=Vn[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=Vn[c];if(void 0===b){var d=null,e;for(e in L.qm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.qm[d],!1),Vn[d]=a,c!==d&&(Vn[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} -oa.Object.defineProperties(Qf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.ya?this.ya:this.Od},set:function(a){var b=this.ya,c=this.Od;if(b!==a){null!==a?(G&&w(a,N,Qf,"geometry"),this.Od=this.ya=a.freeze()):this.Od=this.ya=null;var d=this.part;null!==d&&(d.cg=NaN);this.w();this.g("geometry",b||c,a);tl(this)&&(a=this.part,null!==a&&ul(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, -set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){G&&A(a,"boolean",Qf,"isGeometryPositioned");var b=0!==(this.m&1048576);b!==a&&(G&&A(a,"boolean",Qf,"isGeometryPositioned"),this.m^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.Nk},set:function(a){var b= -this.Nk;b!==a&&(null!==a&&dm(a,"Shape.fill"),a instanceof Cl&&a.freeze(),this.Nk=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(null!==a&&dm(a,"Shape.stroke"),a instanceof Cl&&a.freeze(),this.Sc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;if(b!==a)if(G&&E(a,Qf,"strokeWidth"),0<=a){this.lg=a;this.w();var c=this.part; -null!==c&&(c.cg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Qf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.rr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Qf,"strokeCap"):(Nn(this),this.Sa.rr=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.sr:"miter"}, -set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Qf,"strokeJoin"):(Nn(this),this.Sa.sr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.tr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&E(a,Qf,"strokeMiterLimit"),1<=a){Nn(this);this.Sa.tr=a;this.R();var c=this.part;null!==c&&(c.cg=NaN);this.g("strokeMiterLimit", +oa.Object.defineProperties(Qf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.ya?this.ya:this.Od},set:function(a){var b=this.ya,c=this.Od;if(b!==a){null!==a?(G&&w(a,N,Qf,"geometry"),this.Od=this.ya=a.freeze()):this.Od=this.ya=null;var d=this.part;null!==d&&(d.dg=NaN);this.w();this.g("geometry",b||c,a);tl(this)&&(a=this.part,null!==a&&ul(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, +set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){G&&A(a,"boolean",Qf,"isGeometryPositioned");var b=0!==(this.o&1048576);b!==a&&(G&&A(a,"boolean",Qf,"isGeometryPositioned"),this.o^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.Nk},set:function(a){var b= +this.Nk;b!==a&&(null!==a&&dm(a,"Shape.fill"),a instanceof Cl&&a.freeze(),this.Nk=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Tc},set:function(a){var b=this.Tc;b!==a&&(null!==a&&dm(a,"Shape.stroke"),a instanceof Cl&&a.freeze(),this.Tc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.mg},set:function(a){var b=this.mg;if(b!==a)if(G&&E(a,Qf,"strokeWidth"),0<=a){this.mg=a;this.w();var c=this.part; +null!==c&&(c.dg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Qf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.rr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Qf,"strokeCap"):(Nn(this),this.Sa.rr=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.sr:"miter"}, +set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Qf,"strokeJoin"):(Nn(this),this.Sa.sr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.tr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&E(a,Qf,"strokeMiterLimit"),1<=a){Nn(this);this.Sa.tr=a;this.R();var c=this.part;null!==c&&(c.dg=NaN);this.g("strokeMiterLimit", b,a)}else G&&Ba(a,"value >= 1",Qf,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.Zg},set:function(a){var b=this.Zg;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Qf,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.dc!==a&&(c=!1);!1===b.Se("textGreeking")&& -(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case ol:a.translate(e,0);a.scale(-1,1);break;case nl:a.translate(0,f);a.scale(1,-1);break;case pl:a.translate(e,f),a.scale(-1,-1)}a.Uc();m=this.kd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.li(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Oc&&null!==this.ac)for(p=0;pe&&(r=e);d+=b;this.li(this.ac[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case ol:a.scale(-1, +t.mi=function(a,b){if(null!==this.Tc&&0!==this.hc.length&&null!==this.Be){var c=this.naturalBounds,d=this.actualBounds,e=c.width,f=c.height,g=co(this),h=a.textAlign=this.textAlign,k=b.mn;"start"===h?h=k?"right":"left":"end"===h&&(h=k?"left":"right");k=this.isUnderline;var l=this.isStrikethrough;ti(this,a,this.Tc,!0,!1,c,d);(k||l)&&ti(this,a,this.Tc,!1,!1,c,d);d=0;c=!1;var m=this.oe,n=m.dx-(g*m.m21+m.dx);m=m.dy-(g*m.m22+m.dy);var p=b.scale;8>(n*n+m*m)*p*p&&(c=!0);b.dc!==a&&(c=!1);!1===b.Te("textGreeking")&& +(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case ol:a.translate(e,0);a.scale(-1,1);break;case nl:a.translate(0,f);a.scale(1,-1);break;case pl:a.translate(e,f),a.scale(-1,-1)}a.Vc();m=this.kd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Ae)n=this.Db,n>e&&(n=e),this.li(this.Ae,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Pc&&null!==this.ac)for(p=0;pe&&(r=e);d+=b;this.li(this.ac[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case ol:a.scale(-1, 1);a.translate(-e,0);break;case nl:a.scale(1,-1);a.translate(0,-f);break;case pl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.li=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==eo?eo(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==lo?lo(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ n+g,d),b.stroke()))}; -t.Sl=function(a,b,c,d){this.Lh=a;var e=this.Ae;null!==Zn&&mo!==e&&(mo=Zn.font=e);this.Db=this.Ke=0;this.ze=this.ac=this.Oc=this.df=null;var f;if(isNaN(this.desiredSize.width)){e=this.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===no&&(g=g.trim());f=Math.max(f,oo(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=oo(e);e=Math.min(e, -a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=po(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.Db&&null!==this.Oc&&null!==this.ac&&this.overflow===qo&&(b=this.Ae,b=this.overflow===qo?ro(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,co(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.ac.length))){k=this.ac[h];for(b=Math.max(1, -a-b);oo(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Ke=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 +t.Sl=function(a,b,c,d){this.Lh=a;var e=this.Be;null!==Zn&&mo!==e&&(mo=Zn.font=e);this.Db=this.Le=0;this.Ae=this.ac=this.Pc=this.ef=null;var f;if(isNaN(this.desiredSize.width)){e=this.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===no&&(g=g.trim());f=Math.max(f,oo(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=oo(e);e=Math.min(e, +a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=po(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.Db&&null!==this.Pc&&null!==this.ac&&this.overflow===qo&&(b=this.Be,b=this.overflow===qo?ro(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,co(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.ac.length))){k=this.ac[h];for(b=Math.max(1, +a-b);oo(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Le=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 c&&1c;){var n=1;l=oo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=oo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);uo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.kd+k>a.maxLines)break}m=xo(a,g);for(l=oo(b+m);0a.maxLines))break}a.Ke=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Ke)}} -function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===Zn?8*a.length:Zn.measureText(a).width}function co(a){if(null!==a.df)return a.df;var b=a.Ae;if(null===Zn){var c=16;return a.df=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*Zn.measureText("M").width,Bo[b]=c,Co++);return a.df=c} +l=oo(l);e&&(b=b.trim());if(""!==b&&("\u00ad"===b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=oo(b),f=Math.max(f,m)),uo(a,b,n),k++,a.kd+k>a.maxLines))break}a.Le=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Le)}} +function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===Zn?8*a.length:Zn.measureText(a).width}function co(a){if(null!==a.ef)return a.ef;var b=a.Be;if(null===Zn){var c=16;return a.ef=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*Zn.measureText("M").width,Bo[b]=c,Co++);return a.ef=c} function ro(a){if(null===Zn)return 6;if(void 0!==Do[a]&&5E3>Eo)var b=Do[a];else b=Zn.measureText(so).width,Do[a]=b,Eo++;return b} -function po(a,b){var c=a.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,co(a)+d);if(0===c.length)return a.Db=0,a.kd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.kd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==wo){a.Ke=0;var k=Hb.alloc();vo(a,f,b,k);e+=k.height;Hb.free(k);a.kd+=a.Ke}else vo(a,f,b,null),e+=d,a.kd++;a.kd===a.maxLines&&(h=!0)}f=g+1}return a.xq=e} -oa.Object.defineProperties(ch.prototype,{font:{configurable:!0,get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(G&&(A(a,"string",ch,"font"),bo(a)||v('Not a valid font: "'+a+'"')),this.Ae=a,this.df=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.hc},set:function(a){var b=this.hc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.hc=a,this.w(),this.g("text",b,a))}},textAlign:{configurable:!0,get:function(){return null!== -this.ia?this.ia.Ar:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&A(a,"string",ch,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?($n(this),this.ia.Ar=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',ch,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.Yf:yg},set:function(a){var b=this.flip;b!==a&&(ab(a,O,ch,"flip"),$n(this),this.ia.Yf=a,this.R(),this.g("flip",b,a))}},verticalAlignment:{configurable:!0, +function po(a,b){var c=a.hc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,co(a)+d);if(0===c.length)return a.Db=0,a.kd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.kd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==wo){a.Le=0;var k=Hb.alloc();vo(a,f,b,k);e+=k.height;Hb.free(k);a.kd+=a.Le}else vo(a,f,b,null),e+=d,a.kd++;a.kd===a.maxLines&&(h=!0)}f=g+1}return a.xq=e} +oa.Object.defineProperties(ch.prototype,{font:{configurable:!0,get:function(){return this.Be},set:function(a){var b=this.Be;b!==a&&(G&&(A(a,"string",ch,"font"),bo(a)||v('Not a valid font: "'+a+'"')),this.Be=a,this.ef=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.hc},set:function(a){var b=this.hc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.hc=a,this.w(),this.g("text",b,a))}},textAlign:{configurable:!0,get:function(){return null!== +this.ia?this.ia.Ar:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&A(a,"string",ch,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?($n(this),this.ia.Ar=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',ch,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.Zf:yg},set:function(a){var b=this.flip;b!==a&&(ab(a,O,ch,"flip"),$n(this),this.ia.Zf=a,this.R(),this.g("flip",b,a))}},verticalAlignment:{configurable:!0, enumerable:!0,get:function(){return null!==this.ia?this.ia.Kr:kd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(w(a,Ib,ch,"verticalAlignment"),a.kc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),$n(this),this.ia.Kr=a,Pl(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.gc.u()){var a=Hb.alloc();vo(this,this.hc,999999,a);var b=a.width;Hb.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)|| -(b=c.width);isNaN(c.height)||(a=c.height);bc(this.gc,b,a)}return this.gc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(G&&A(a,"boolean",ch,"isMultiline"),this.m^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);b!==a&&(G&&A(a,"boolean",ch,"isUnderline"),this.m^=4194304,this.R(),this.g("isUnderline", -b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.m&8388608)},set:function(a){var b=0!==(this.m&8388608);b!==a&&(G&&A(a,"boolean",ch,"isStrikethrough"),this.m^=8388608,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.Nr:Fo},set:function(a){var b=this.wrap;b!==a&&(G&&ab(a,ch,ch,"wrap"),$n(this),this.ia.Nr=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!== -this.ia?this.ia.Lq:Go},set:function(a){var b=this.overflow;b!==a&&(G&&ab(a,ch,ch,"overflow"),$n(this),this.ia.Lq=a,this.w(),this.g("overflow",b,a))}},stroke:{configurable:!0,get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(null!==a&&dm(a,"TextBlock.stroke"),a instanceof Cl&&a.freeze(),this.Sc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.kd}},lineHeight:{configurable:!0,get:function(){return co(this)}}, -editable:{configurable:!0,get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(G&&A(a,"boolean",ch,"editable"),this.m^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia?this.ia.Cr:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Me||v("TextBlock.textEditor must be an HTMLInfo."),$n(this),this.ia.Cr=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0, +(b=c.width);isNaN(c.height)||(a=c.height);bc(this.gc,b,a)}return this.gc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(G&&A(a,"boolean",ch,"isMultiline"),this.o^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);b!==a&&(G&&A(a,"boolean",ch,"isUnderline"),this.o^=4194304,this.R(),this.g("isUnderline", +b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.o&8388608)},set:function(a){var b=0!==(this.o&8388608);b!==a&&(G&&A(a,"boolean",ch,"isStrikethrough"),this.o^=8388608,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.Nr:Fo},set:function(a){var b=this.wrap;b!==a&&(G&&ab(a,ch,ch,"wrap"),$n(this),this.ia.Nr=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!== +this.ia?this.ia.Lq:Go},set:function(a){var b=this.overflow;b!==a&&(G&&ab(a,ch,ch,"overflow"),$n(this),this.ia.Lq=a,this.w(),this.g("overflow",b,a))}},stroke:{configurable:!0,get:function(){return this.Tc},set:function(a){var b=this.Tc;b!==a&&(null!==a&&dm(a,"TextBlock.stroke"),a instanceof Cl&&a.freeze(),this.Tc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.kd}},lineHeight:{configurable:!0,get:function(){return co(this)}}, +editable:{configurable:!0,get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(G&&A(a,"boolean",ch,"editable"),this.o^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia?this.ia.Cr:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Me||v("TextBlock.textEditor must be an HTMLInfo."),$n(this),this.ia.Cr=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0, get:function(){return null!==this.ia?this.ia.Fd:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&A(a,"function",ch,"errorFunction"),$n(this),this.ia.Fd=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka?this.ka.Vk:1},set:function(a){var b=this.interval;G&&E(a,ch,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new Xn);this.ka.Vk=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null); this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&E(a,ch,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",ch,"maxLines"),$n(this),this.ia.vq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Oc?this.Oc:[this.Db],arrText:null!==this.ac?this.ac:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{configurable:!0,get:function(){return this.Bm},set:function(a){var b=this.Bm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",ch,"choices:value"),this.Bm=a,this.g("choices",b,a))}}}); +0>=a&&Ba(a,"> 0",ch,"maxLines"),$n(this),this.ia.vq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Pc?this.Pc:[this.Db],arrText:null!==this.ac?this.ac:[this.Ae],maxLineWidth:this.Db,fontHeight:this.ef}}},choices:{configurable:!0,get:function(){return this.Bm},set:function(a){var b=this.Bm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",ch,"choices:value"),this.Bm=a,this.g("choices",b,a))}}}); var eo=null,lo=null,wo=new F(ch,"None",0),to=new F(ch,"WrapFit",1),Fo=new F(ch,"WrapDesiredSize",2),yo=new F(ch,"WrapBreakAll",3),Go=new F(ch,"OverflowClip",0),qo=new F(ch,"OverflowEllipsis",1),no=new F(ch,"FormatTrim",0),Ao=new F(ch,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new db,Co=0,Do=new db,Eo=0,so="...",mo="",Zn=null,Yn=!1;ch.className="TextBlock"; -function ao(){this.oc=!1;this.Fd=null;this.Yf=yg;this.Wp=no;this.vq=Infinity;this.Lq=Go;this.nr=this.mr=0;this.Ar="start";this.Dj=this.Cr=this.Br=null;this.Kr=kd;this.Nr=Fo}ao.prototype.copy=function(){var a=new ao;a.Fd=this.Fd;a.Yf=this.Yf;a.Wp=this.Wp;a.vq=this.vq;a.Lq=this.Lq;a.mr=this.mr;a.nr=this.nr;a.Ar=this.Ar;a.Br=this.Br;a.Cr=this.Cr;a.Dj=this.Dj;a.Kr=this.Kr;a.Nr=this.Nr;return a};ch.getEllipsis=function(){return so};ch.setEllipsis=function(a){so=a;Do=new db;Eo=0};ch.getBaseline=function(){return eo}; -ch.setBaseline=function(a){eo=a};ch.getUnderline=function(){return lo};ch.setUnderline=function(a){lo=a};ch.isValidFont=bo;ch.FormatNone=Ao;ch.FormatTrim=no;ch.None=wo;ch.OverflowClip=Go;ch.OverflowEllipsis=qo;ch.WrapBreakAll=yo;ch.WrapDesiredSize=Fo;ch.WrapFit=to;function Xn(){this.Vk=1;this.v=0;this.j=1;this.o=this.G=null}Xn.prototype.copy=function(){var a=new Xn;a.Vk=this.Vk;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};Xn.className="GradElementSettings"; -function kk(a,b){O.call(this);this.Gg=null;this.fo="";this.Yg=qc;this.Pk=Bd;this.$g=this.Fd=null;this.Ok=Kc;this.Yf=yg;this.xl=null;this.jn=!1;this.Gh=!0;this.cl=!1;this.tl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;na(kk,O);kk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.Gg;a.fo=this.fo;a.Yg=this.Yg.M();a.Pk=this.Pk;a.Yf=this.Yf;a.Fd=this.Fd;a.$g=this.$g;a.Ok=this.Ok.M();a.Gh=this.Gh;a.tl=this.tl}; +function ao(){this.oc=!1;this.Fd=null;this.Zf=yg;this.Wp=no;this.vq=Infinity;this.Lq=Go;this.nr=this.mr=0;this.Ar="start";this.Dj=this.Cr=this.Br=null;this.Kr=kd;this.Nr=Fo}ao.prototype.copy=function(){var a=new ao;a.Fd=this.Fd;a.Zf=this.Zf;a.Wp=this.Wp;a.vq=this.vq;a.Lq=this.Lq;a.mr=this.mr;a.nr=this.nr;a.Ar=this.Ar;a.Br=this.Br;a.Cr=this.Cr;a.Dj=this.Dj;a.Kr=this.Kr;a.Nr=this.Nr;return a};ch.getEllipsis=function(){return so};ch.setEllipsis=function(a){so=a;Do=new db;Eo=0};ch.getBaseline=function(){return eo}; +ch.setBaseline=function(a){eo=a};ch.getUnderline=function(){return lo};ch.setUnderline=function(a){lo=a};ch.isValidFont=bo;ch.FormatNone=Ao;ch.FormatTrim=no;ch.None=wo;ch.OverflowClip=Go;ch.OverflowEllipsis=qo;ch.WrapBreakAll=yo;ch.WrapDesiredSize=Fo;ch.WrapFit=to;function Xn(){this.Vk=1;this.v=0;this.j=1;this.m=this.G=null}Xn.prototype.copy=function(){var a=new Xn;a.Vk=this.Vk;a.v=this.v;a.j=this.j;a.G=this.G;a.m=this.m;return a};Xn.className="GradElementSettings"; +function kk(a,b){O.call(this);this.Hg=null;this.fo="";this.Yg=qc;this.Pk=Bd;this.$g=this.Fd=null;this.Ok=Kc;this.Zf=yg;this.xl=null;this.jn=!1;this.Gh=!0;this.cl=!1;this.tl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;na(kk,O);kk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.Hg;a.fo=this.fo;a.Yg=this.Yg.M();a.Pk=this.Pk;a.Zf=this.Zf;a.Fd=this.Fd;a.$g=this.$g;a.Ok=this.Ok.M();a.Gh=this.Gh;a.tl=this.tl}; kk.prototype.ub=function(a){a===yg||a===Ag||a===ml?this.imageStretch=a:O.prototype.ub.call(this,a)};kk.prototype.toString=function(){return"Picture("+this.source+")#"+lb(this)};function Oi(a){void 0===a&&(a="");A(a,"string",kk,"clearCache:url");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new db,Io=0)} -function Jo(a,b){b.ny||(b.sq=function(c){b.hq=!0;b.dn=!1;var d=b.Dg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src")||"";var g=e.Qg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case Bd:m=d.width;n=d.height;break;case Ag:case ml:p===Ag?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===ml&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ -d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Ff()*b.scale;var q=m*p*n*p,u=h*g/q,x=c.__goCache;p=null;var y=Ko;if(c.hq&&void 0!==x&&4y*y)for(null===x.ki&&(Lo(x,4,k,l,c),Lo(x,16,k,l,c)),k=x.ki,l=k.length,q=0;qy*y)for(null===x.ki&&(Lo(x,4,k,l,c),Lo(x,16,k,l,c)),k=x.ki,l=k.length,q=0;qa)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Of[d];if(void 0!==e)return e;var f=a*L.yg;e=(new N).add((new je(a,0,!0)).add(new ke(Dd,b-a,0)).add(new ke(Xd,b,a,b-f,0,b,f)).add(new ke(Dd,b,c-a)).add(new ke(Xd,b-a,c,b,c-f,b-f,c)).add(new ke(Dd,a,c)).add(new ke(Xd,0,c-a,f,c,0,c-f)).add(new ke(Dd,0,a)).add((new ke(Xd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Pf[d];if(void 0!==e)return e;var f=a*L.zg;e=(new N).add((new je(a,0,!0)).add(new ke(Dd,b-a,0)).add(new ke(Xd,b,a,b-f,0,b,f)).add(new ke(Dd,b,c-a)).add(new ke(Xd,b-a,c,b,c-f,b-f,c)).add(new ke(Dd,a,c)).add(new ke(Xd,0,c-a,f,c,0,c-f)).add(new ke(Dd,0,a)).add((new ke(Xd,a,0,0,f,f,0)).close()));1e.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new I;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ue=!1}}; +t.xz=function(a){void 0===a&&(a=Infinity);A(a,"number",T,"findTreeParts:level");var b=new I;gl(b,this,!1,a,!0);return b};T.prototype.collapseTree=function(a){void 0===a&&(a=1);E(a,T,"collapseTree:level");1>a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ve){b.Ve=!0;var c=new I;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ve=!1}}; function wp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new I;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ue=!1}}; +T.prototype.expandTree=function(a){void 0===a&&(a=2);E(a,T,"expandTree:level");2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ve){b.Ve=!0;var c=new I;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Ii);b.Ve=!1}}; function yp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Do():a.Qd();k.next();){var l=k.value;l.isTreeLink&&(h||l.Dd||l.gb(),l=l.Io(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Zb(!0),l.oh(),g&&e.Kj(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, a.h(b.x,b.y,0,0));return a};oa.Object.defineProperties(wg.prototype,{padding:{configurable:!0,get:function(){return this.zb},set:function(a){"number"===typeof a?a=new gc(a):w(a,gc,wg,"padding");var b=this.zb;b.D(a)||(this.zb=a=a.M(),this.g("padding",b,a),this.w())}}});wg.className="Placeholder"; -function R(a){S.call(this,V.Link);this.Ta=8;this.ef=null;this.ff="";this.uf=this.$m=null;this.vf="";this.ko=null;this.rk=mg;this.Jm=0;this.Lm=mg;this.Mm=NaN;this.xj=Dp;this.eo=.5;this.xd=null;this.Ob=(new H).freeze();this.rf=this.Rc=null;this.ol=new M;this.ya=new N;this.v=this.o=this.Tf=this.Xf=null;this.ku=new K;this.Tp=this.Ew=this.Dw=null;this.kt=NaN;this.da=null;this.j=[];a&&Object.assign(this,a)}na(R,S); -R.prototype.cloneProtected=function(a){S.prototype.cloneProtected.call(this,a);a.Ta=this.Ta&-113;a.ff=this.ff;a.$m=this.$m;a.vf=this.vf;a.ko=this.ko;a.rk=this.rk;a.Jm=this.Jm;a.Lm=this.Lm;a.Mm=this.Mm;a.xj=this.xj;a.eo=this.eo;null!==this.da&&(a.da=this.da.copy())};t=R.prototype;t.Bf=function(a){S.prototype.Bf.call(this,a);this.ff=a.ff;this.vf=a.vf;a.Rc=null;a.gb();a.Tf=this.Tf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; -t.ub=function(a){a.classType===R?2===(a.value&2)?this.routing=a:a===pg||a===lg||a===kg?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==mg&&v("Unknown Link enum value for a Link property: "+a):S.prototype.ub.call(this,a)};t.Xc=function(){null===this.da&&(this.da=new sl)};t.Ai=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Cj(a)||Dj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Cj(a)||Dj(a))?!1:!0};t.tv=function(){return!1}; +function R(a){S.call(this,V.Link);this.Ta=8;this.ff=null;this.gf="";this.vf=this.$m=null;this.wf="";this.ko=null;this.rk=mg;this.Jm=0;this.Lm=mg;this.Mm=NaN;this.xj=Dp;this.eo=.5;this.xd=null;this.Ob=(new H).freeze();this.sf=this.Sc=null;this.ol=new M;this.ya=new N;this.v=this.m=this.Uf=this.Yf=null;this.ku=new K;this.Tp=this.Ew=this.Dw=null;this.kt=NaN;this.ea=null;this.j=[];a&&Object.assign(this,a)}na(R,S); +R.prototype.cloneProtected=function(a){S.prototype.cloneProtected.call(this,a);a.Ta=this.Ta&-113;a.gf=this.gf;a.$m=this.$m;a.wf=this.wf;a.ko=this.ko;a.rk=this.rk;a.Jm=this.Jm;a.Lm=this.Lm;a.Mm=this.Mm;a.xj=this.xj;a.eo=this.eo;null!==this.ea&&(a.ea=this.ea.copy())};t=R.prototype;t.Cf=function(a){S.prototype.Cf.call(this,a);this.gf=a.gf;this.wf=a.wf;a.Sc=null;a.gb();a.Uf=this.Uf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; +t.ub=function(a){a.classType===R?2===(a.value&2)?this.routing=a:a===pg||a===lg||a===kg?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==mg&&v("Unknown Link enum value for a Link property: "+a):S.prototype.ub.call(this,a)};t.Xc=function(){null===this.ea&&(this.ea=new sl)};t.Ai=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Cj(a)||Dj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Cj(a)||Dj(a))?!1:!0};t.tv=function(){return!1}; t.As=function(){};t.Zc=function(){return!1};R.prototype.computeAngle=function(a,b,c){return R.computeAngle(b,c)};R.computeAngle=function(a,b){switch(a){default:case mg:a=0;break;case jn:a=b;break;case bn:a=b+90;break;case dn:a=b-90;break;case Hp:a=b+180;break;case kn:a=L.Ro(b);90a&&(a-=180);break;case cn:a=L.Ro(b+90);90a&&(a-=180);break;case en:a=L.Ro(b-90);90a&&(a-=180);break;case fn:a=L.Ro(b);if(45a||225a)return 0;90a&&(a-=180)}return L.Ro(a)}; -function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.ix(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.ca,g.ca=!0);e(a,c,b);null!==g&&(g.ca=f)}!a.Dd||a.Dw!==c&&a.Ew!==c||a.gb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=R.prototype; +function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.jx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.ca,g.ca=!0);e(a,c,b);null!==g&&(g.ca=f)}!a.Dd||a.Dw!==c&&a.Ew!==c||a.gb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=R.prototype; t.oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&S.prototype.oh.call(this)};t.Io=function(a){G&&w(a,T,R,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Dz=function(a){G&&w(a,O,R,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function tp(a,b){null===a.xd&&(a.xd=new I);a.xd.add(b);a.w()} -t.Ko=function(a){S.prototype.Ko.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Lo=function(a){S.prototype.Lo.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; +t.Ko=function(a){S.prototype.Ko.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ff;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.vf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Lo=function(a){S.prototype.Lo.call(this,a);Ip(this)&&this.Mo(this.actualBounds);if(!a){a=this.ff;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.vf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; t.Sj=function(){this.Dd=!0;if(null!==this.xd){var a=this.diagram;if(null!==a)for(var b=this.xd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};R.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; R.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?S.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),S.prototype.move.call(this,a,!1),K.free(a));rf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; R.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};R.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; -R.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(Db),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.Qu(.5,a),a.add(this.i(0)),c=this.ya.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===pg){if(3===b)return this.i(1);d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);var e=this.i(c+1), -f=this.i(c+2);c=this.i(c+3);L.Ky(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a}; -R.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).cb(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.ox(.5);if(this.computeCurve()===pg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.Jy(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0c/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- +b.y)));return a}; +R.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).cb(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pg))return this.ya.px(.5);if(this.computeCurve()===pg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.Ky(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.cb(d)};t=R.prototype;t.i=function(a){return this.Ob.s[a]}; -t.bd=function(a,b){G&&(w(b,K,R,"setPoint"),b.u()||v("Link.setPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.ad(a,b)};t.P=function(a,b,c){G&&(E(b,R,"setPointAt:x"),E(c,R,"setPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.ad(a,new K(b,c))}; -t.Mz=function(a,b){G&&(w(b,K,R,"insertPoint"),b.u()||v("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.Hb(a,b)};t.l=function(a,b,c){G&&(E(b,R,"insertPointAt:x"),E(c,R,"insertPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.Hb(a,new K(b,c))}; -t.me=function(a){G&&(w(a,K,R,"addPoint"),a.u()||v("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.add(a)};t.yf=function(a,b){G&&(E(a,R,"insertPointAt:x"),E(b,R,"insertPointAt:y"));G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.add(new K(a,b))}; -t.lv=function(a){G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.sb(a)};t.Nj=function(){G&&null===this.Rc&&v("Call Link.startRoute before modifying the points of the route.");this.Ob.clear()}; -function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.Dd,e=new H,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Eb?a.w():(a.ie.h(a.ie.x+b,a.ie.y+c),a.va.h(a.va.x+b,a.va.y+c),Pl(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= -a.i(a.pointsCount-1)));null!==g&&g.animationManager.Eb&&(b=g.animationManager,a.rf=e,b.ql.add(a));a.g("points",f,e)}}t.uh=function(){null===this.Rc&&(this.Rc=this.Ob,this.Ob=this.Ob.copy())}; -t.Af=function(){if(null!==this.Rc){for(var a=this.Rc,b=this.Ob,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= -(0>k?-1:1)*n+r,x=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var y=r,z=q;L.C(k,0)?z=0k?-1:1)*n+r,z=m*(y-r)+q);this.Nj();this.me(f);this.yf(u,x);this.yf(y,z);this.me(p);this.bd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.bd(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.me(d),this.yf(f,h),this.me(e);else{this.me(d);this.me(e);h=M.alloc();b.ti(h);k=h.ea(e);p.ti(h);l=h.ea(d);if(k||l)g=b.oa(Qp(g),new K),this.bd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.oa(Qp(c),new K),this.bd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Nj();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)x=this.computeEndSegmentLength(a,b,g,!0),r= +(0>k?-1:1)*n+r,x=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var y=r,z=q;L.C(k,0)?z=0k?-1:1)*n+r,z=m*(y-r)+q);this.Nj();this.ne(f);this.zf(u,x);this.zf(y,z);this.ne(p);this.bd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.bd(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ne(d),this.zf(f,h),this.ne(e);else{this.ne(d);this.ne(e);h=M.alloc();b.ti(h);k=h.ga(e);p.ti(h);l=h.ga(d);if(k||l)g=b.oa(Qp(g),new K),this.bd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.oa(Qp(c),new K),this.bd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Nj();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)x=this.computeEndSegmentLength(a,b,g,!0),r= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(x+=Math.abs(B)*(m?1:2)),0===r?q=x:90===r?u=x:180===r?q=-x:270===r?u=-x:(q=x*Math.cos(r*Math.PI/180),u=x*Math.sin(r*Math.PI/180)),g.kc()&&l&&(x=b.oa(Kc,K.alloc()),y=K.allocAt(x.x+1E3*q,x.y+1E3*u),this.getLinkPointFromPoint(a,b,x,y,!0,n),K.free(x),K.free(y));x=this.getLinkPoint(d,e,c,!1,m,a,b);var C=z=y=0;if(m||!k||l){var D=this.computeEndSegmentLength(d,e, c,!1);C=this.getLinkDirection(d,e,x,c,!1,m,a,b);l&&(k||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(C+=m?0:30,0>B&&(C+=180));0>C?C+=360:360<=C&&(C-=360);l&&(D+=Math.abs(B)*(m?1:2));0===C?y=D:90===C?z=D:180===C?y=-D:270===C?z=-D:(y=D*Math.cos(C*Math.PI/180),z=D*Math.sin(C*Math.PI/180));c.kc()&&l&&(c=e.oa(Kc,K.alloc()),g=K.allocAt(c.x+1E3*y,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,x),K.free(c),K.free(g))}c=n;if(m||!h||l)c=new K(n.x+q,n.y+u);g=x;if(m||!k||l)g=new K(x.x+y,x.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} -R.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.re()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.ne;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Xj(e,d,g,c,f);null!== +n,f-2,g)?this.bd(f-1,x):!p&&!m&&k&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +R.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.se()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.oe;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Xj(e,d,g,c,f);null!== a&&f.transform(a);return f};function Sp(a,b){var c=b.Tn;null===c&&(c=new Tp,c.port=b,c.node=b.part,b.Tn=c);return Up(c,a)} -R.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!Pp(c))return b.oa(c,h),h;if(c.$c()){var k=Sp(this,b);if(null!==k){h.assign(k.Po);if(e&&this.routing===Vp){var l=Sp(this,g);if(null!==l&&k.Hl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.If(Qc)||c.If(Tc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= +R.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!Pp(c))return b.oa(c,h),h;if(c.$c()){var k=Sp(this,b);if(null!==k){h.assign(k.Po);if(e&&this.routing===Vp){var l=Sp(this,g);if(null!==l&&k.Hl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Jf(Qc)||c.Jf(Tc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= b.oa(Qp(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=Rp(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.oa(Qp(k),f),e&&(g=Rp(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; -R.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Rp(k,h.copy()):c):(c=K.alloc(),h=h.oa(Kc,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +R.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Rp(k,h.copy()):c):(c=K.alloc(),h=h.oa(Kc,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}d.kc()&&g.Sd(a)&&(k+=180,360<=k&&(k-=360));if(Pp(d))return k;a=b.si();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};R.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.$c()&&(a=Sp(this,b),null!==a))return a.Iu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; R.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Kc:(b=this.fromSpot,b.Rb()&&(b=a.fromSpot),a=b===hd?Ec:b)):(a=b?b:this.toPort,null===a?a=Kc:(b=this.toSpot,b.Rb()&&(b=a.toSpot),a=b===hd?Ec:b));return a};function Pp(a){return a===Ec||.5===a.x&&.5===a.y}function Qp(a){return.5===a.x&&.5===a.y?a:Kc} R.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==mg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Jb.alloc();n.set(g); -if(m instanceof V)h=m.Ef(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Qf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.hh(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Qe(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var x=K.alloc(),y=K.alloc(),z=K.alloc(),B=Jb.alloc();B.set(q);B.bv(m.transform);B.gs();y.x=p;y.y=u;y.transform(B);x.x=h;x.y=u;x.transform(B);q=!1;Tn(m,x,y,z)?q=!0:(x.x=p,x.y=r,x.transform(B),Tn(m,x,y,z)?q=!0:(y.x= +R.prototype.Ff=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Jb.alloc(),g.reset());g.multiply(this.transform);if(this.hh(a,g))return un(this,b,c,e),void 0===f&&Jb.free(g),!0;if(this.Yc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.U.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Jb.alloc();n.set(g); +if(m instanceof V)h=m.Ff(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Qf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.hh(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Re(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var x=K.alloc(),y=K.alloc(),z=K.alloc(),B=Jb.alloc();B.set(q);B.bv(m.transform);B.gs();y.x=p;y.y=u;y.transform(B);x.x=h;x.y=u;x.transform(B);q=!1;Tn(m,x,y,z)?q=!0:(x.x=p,x.y=r,x.transform(B),Tn(m,x,y,z)?q=!0:(y.x= h,y.y=r,y.transform(B),Tn(m,x,y,z)?q=!0:(x.x=h,x.y=u,x.transform(B),Tn(m,x,y,z)&&(q=!0))));Jb.free(B);K.free(x);K.free(y);K.free(z);h=q}}else h=m.hh(h,n)}else h=wl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Jb.free(n)}}}void 0===f&&Jb.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Jb.free(g);return!1}; -R.prototype.computeCurve=function(){if(null===this.Xf){var a=this.fromPort,b=this.isOrthogonal;this.Xf=null!==a&&a===this.toPort&&!b}return this.Xf?pg:this.curve};R.prototype.computeCorner=function(){if(this.curve===pg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; +R.prototype.computeCurve=function(){if(null===this.Yf){var a=this.fromPort,b=this.isOrthogonal;this.Yf=null!==a&&a===this.toPort&&!b}return this.Yf?pg:this.curve};R.prototype.computeCorner=function(){if(this.curve===pg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; R.prototype.findMidLabel=function(){for(var a=this.path,b=this.U.s,c=b.length,d=0;dk?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);L.ha(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.bd(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.P(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.bd(c,d)}}return!0;case Gp:f=this.i(a);n=this.i(c);if(!f.fb(b)||!n.fb(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.bd(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.u()&&k.u()){h.Wc(Yp,Yp);k.Wc(Yp,Yp);h.Ye(a);k.Ye(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, -a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ea(a)||h.ea(c))? +R.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.u()&&k.u()){h.Bc(Yp,Yp);k.Bc(Yp,Yp);h.Ze(a);k.Ze(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ga(a)||h.ga(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left,m.x=l.x, -m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.ea(a)||h.ea(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x= +m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.ga(a)||h.ga(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x= c.x,m.y=l.y;if(l.y>h.top&&l.y=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l.h(Math.min((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l.h(a.x,c.y),m.h((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.x,a.y,c.x, -c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.ea(a)||h.ea(c))?l.x=this.computeMidOrthoPosition(a.x, +c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.ga(a)||h.ga(c))?l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1):c.xa.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ea(a)||h.ea(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(wk(r),h.Wc(r.xo*r.Cx,r.wo*r.Ex),Zp(r,a,b,n,d,h,!1),k=$p(r, +(l.x=a.xh.right)90===d&&(k.ga(a)||h.ga(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(wk(r),h.Bc(r.xo*r.Ex,r.wo*r.Fx),Zp(r,a,b,n,d,h,!1),k=$p(r, n.x,n.y));if(!r.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.P(2,h.x,h.y),this.l(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)L.C(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.P(2,h,a.y),this.P(3,h,g.y)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=r.wo/2&&(this.P(2,h.x,a.y),this.P(3,g.x,a.y)),this.l(2,h.x,a.y)):this.P(2,a.x,h.y);else if(90===b||270===b)L.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): -Math.min(h.y,a.y),this.P(2,a.x,h),this.P(3,g.x,h)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=r.xo/2&&(this.P(2,a.x,h.y),this.P(3,a.x,g.y)),this.l(2,a.x,h.y)):this.P(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.yf(f.x,q.y):this.yf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.me(l.copy()),this.me(m.copy()));K.free(l);K.free(m)}}; +Math.min(h.y,a.y),this.P(2,a.x,h),this.P(3,g.x,h)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=r.xo/2&&(this.P(2,a.x,h.y),this.P(3,a.x,g.y)),this.l(2,a.x,h.y)):this.P(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.zf(f.x,q.y):this.zf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ne(l.copy()),this.ne(m.copy()));K.free(l);K.free(m)}}; R.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function Zj(a){if(null===a.diagram||!a.isAvoiding||!rk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=sk(a.diagram,!0,a.containingGroup,null);for(var d=1;dcq&&$p(b,m,n)!==l-1&&($p(b,c-h,d)===l-1?(e=180,m=c-h,n=d):$p(b,c+h,d)===l-1?(e=0,m=c+h,n=d):$p(b,c,d-k)===l-1?(e=270,m=c,n=d-k):$p(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>cq&&$p(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>cq)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ -k)*k+k/2;l>cq&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),$p(b,g,m)===l-1?bq(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.yf(c,d)} +k)*k+k/2;l>cq&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),$p(b,g,m)===l-1?bq(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.zf(c,d)} R.prototype.fz=function(a){G&&w(a,K,R,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=Lb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=N.j,this.mm=!0,a;var c=!1,d=this.diagram;null!==d&&Ip(this)&&d.Eh.contains(this)&&(0!==this.ol.width||0!==this.ol.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Ob.s;var g=this.computeCurve();if(g===pg&&3<=b&&!L.ha(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kx?q>r?(f.x= y-B,f.y=r-B,e.x=y+u,e.y=r+u):(f.x=y-B,f.y=r+B,e.x=y+u,e.y=r-u):q>r?(f.x=y+B,f.y=r-B,e.x=y-u,e.y=r+u):(f.x=y+B,f.y=r+B,e.x=y-u,e.y=r-u));L.ha(x,y)&&L.ha(r,q)&&(r>p?(z>y?(f.x=y-B,f.y=r-B,e.x=y+u):(f.x=y+B,f.y=r-B,e.x=y-u),e.y=r+u):(z>y?(f.x=y-B,f.y=r+B,e.x=y+u):(f.x=y+B,f.y=r+B,e.x=y-u),e.y=r-u));if(L.ha(x,y)&&L.ha(y,z)||L.ha(p,r)&&L.ha(r,q))x=.5*(x+z),p=.5*(p+q),f.x=x,f.y=p,e.x=x,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&L.ha(g.x,this.i(0).x)&&L.ha(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x), c.y=.5*(g.y+l.y));Ld(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,zb));l=.5*(l+m.x);g=.5*(g+m.y);Ld(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);K.free(b);K.free(c);K.free(f);K.free(e)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=dq(this,g.copy(),!1,zb)),Ld(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0)); @@ -1699,44 +1701,44 @@ function eq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ha(b.x,f.x)&&L.ha(b.y,f.y);){ function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===lg?Kd(b,n,r,!1):Ld(b,p,m,n,m,n,r)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===lg?Kd(b,r,m,!1):Ld(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function hq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ra.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,x)n&&!L.C(g,x)){h.x=q;h.y=n;m=!0;break a}}else if(!L.C(n,r)&& L.C(g,x)&&Math.min(n,r)g&&Math.min(q,u)m&&!L.C(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}K.free(h)}function Ip(a){a=a.curve;return a===kg||a===lg}function Mp(a,b){if(b||Ip(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Eh.contains(a)||0===a.ol.width&&0===a.ol.height||b.Eh.add(a,a.ol.copy())} R.prototype.Mo=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ra.s;for(var g=e.length,h=0;ha&&Ba(a,">= 0",R,"fromEndSegmentLength"),this.Xc(),this.da.aj=a,this.g("fromEndSegmentLength",b,a),this.gb())}},fromShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.bj:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&A(a,"number",R,"fromShortLength"), -this.Xc(),this.da.bj=a,this.sc(!0),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.da?this.da.Gj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,R,"toSpot"),a=a.M(),this.Xc(),this.da.Gj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&&pp(this.toPort),this.gb())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.da?this.da.Ej:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&& -A(a,"number",R,"toEndSegmentLength"),0>a&&Ba(a,">= 0",R,"toEndSegmentLength"),this.Xc(),this.da.Ej=a,this.g("toEndSegmentLength",b,a),this.gb())}},toShortLength:{configurable:!0,get:function(){return null!==this.da?this.da.Fj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",R,"toShortLength"),this.Xc(),this.da.Fj=a,this.sc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.xd?!1:0a&&Ba(a,">= 0",R,"fromEndSegmentLength"),this.Xc(),this.ea.aj=a,this.g("fromEndSegmentLength",b,a),this.gb())}},fromShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.bj:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&A(a,"number",R,"fromShortLength"), +this.Xc(),this.ea.bj=a,this.sc(!0),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.ea?this.ea.Gj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&w(a,Ib,R,"toSpot"),a=a.M(),this.Xc(),this.ea.Gj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&&pp(this.toPort),this.gb())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Ej:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&& +A(a,"number",R,"toEndSegmentLength"),0>a&&Ba(a,">= 0",R,"toEndSegmentLength"),this.Xc(),this.ea.Ej=a,this.g("toEndSegmentLength",b,a),this.gb())}},toShortLength:{configurable:!0,get:function(){return null!==this.ea?this.ea.Fj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&A(a,"number",R,"toShortLength"),this.Xc(),this.ea.Fj=a,this.sc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.xd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ye(f),e=2;ed&&(d=-d)):L.ha(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Cf(e)); +enumerable:!0,get:function(){var a=this.Ab();return a instanceof Qf?a:null}},routeBounds:{configurable:!0,get:function(){this.yg();var a=this.ol,b=Infinity,c=Infinity,d=this.pointsCount;if(0===d)a.h(NaN,NaN,0,0);else{if(1===d)d=this.i(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.h(d.x,d.y,0,0);else if(2===d){d=this.i(0);var e=this.i(1);b=Math.min(d.x,e.x);c=Math.min(d.y,e.y);a.h(d.x,d.y,0,0);a.Ze(e)}else if(this.computeCurve()===pg&&3<=d&&!this.isOrthogonal)if(e=this.i(0),b=e.x,c=e.y,a.h(b, +c,0,0),3===d){d=this.i(1);b=Math.min(d.x,b);c=Math.min(d.y,c);var f=this.i(2);b=Math.min(f.x,b);c=Math.min(f.y,c);L.Dl(e.x,e.y,d.x,d.y,d.x,d.y,f.x,f.y,.5,a)}else for(f=3;f=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ze(f),e=2;ed&&(d=-d)):L.ha(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Df(e)); a.push(d)}}return this.Tp}},flattenedTotalLength:{configurable:!0,get:function(){var a=this.kt;if(isNaN(a)){for(var b=this.flattenedLengths,c=b.length,d=a=0;d=this.pointsCount?0:this.isOrthogonal||!Pp(this.computeSpot(!0))?1:0}}, +a);c.freeze();this.Ob=c;this.sc(!0);Lp(this);a=this.diagram;null!==a&&(a.xi||a.undoManager.isUndoingRedoing||a.ns.add(this),a.animationManager.Eb&&(a=a.animationManager,this.sf=c,a.ql.add(this)));this.g("points",b,c)}}},pointsCount:{configurable:!0,get:function(){return this.Ob.count}},Dd:{configurable:!0,get:function(){return 0!==(this.Ta&16)},set:function(a){0!==(this.Ta&16)!==a&&(this.Ta^=16)}},suspendsRouting:{configurable:!0,get:function(){return 0!== +(this.Ta&32)},set:function(a){0!==(this.Ta&32)!==a&&(this.Ta^=32)}},computingPoints:{configurable:!0,get:function(){return 0!==(this.Ta&64)},set:function(a){0!==(this.Ta&64)!==a&&(this.Ta^=64)}},defaultFromPoint:{configurable:!0,get:function(){return this.m},set:function(a){this.m=a.copy()}},defaultToPoint:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a.copy()}},isOrthogonal:{configurable:!0,get:function(){return 2=== +(this.xj.value&2)}},isAvoiding:{configurable:!0,get:function(){return 4===(this.xj.value&4)}},mm:{configurable:!0,get:function(){return 0!==(this.Ta&128)},set:function(a){0!==(this.Ta&128)!==a&&(this.Ta^=128)}},geometry:{configurable:!0,get:function(){this.mm||(this.yg(),this.ya=this.makeGeometry());return this.ya}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Pp(this.computeSpot(!0))?1:0}}, lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!Pp(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.rk},set:function(a){var b=this.rk;b!==a&&(G&&a!==mg&&a!==Ep&&a!==Fp&&a!==Gp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.rk=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.Jm}, set:function(a){var b=this.Jm;b!==a&&(G&&A(a,"number",R,"corner"),this.Jm=a,this.sc(!0),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.Lm},set:function(a){var b=this.Lm;b!==a&&(G&&a!==mg&&a!==pg&&a!==lg&&a!==kg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.Lm=a,this.gb(),this.sc(!0),Mp(this,b===lg||b===kg||a===lg||a===kg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.Mm}, -set:function(a){var b=this.Mm;b!==a&&(G&&A(a,"number",R,"curviness"),this.Mm=a,this.gb(),this.sc(!1),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.xj},set:function(a){var b=this.xj;b!==a&&(G&&a!==Dp&&a!==lq&&a!==mq&&a!==Vp&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.xj=a,this.Xf=null,this.gb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, -get:function(){return this.eo},set:function(a){var b=this.eo;b!==a&&(G&&A(a,"number",R,"smoothness"),this.eo=a,this.sc(!0),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.yi())return a.model.Ac(this.data)}}});R.prototype.invalidateOtherJumpOvers=R.prototype.Mo;R.prototype.findClosestSegment=R.prototype.fz;R.prototype.updateRoute=R.prototype.xg;R.prototype.invalidateRoute=R.prototype.gb;R.prototype.rollbackRoute=R.prototype.nv; -R.prototype.commitRoute=R.prototype.Af;R.prototype.startRoute=R.prototype.uh;R.prototype.clearPoints=R.prototype.Nj;R.prototype.removePoint=R.prototype.lv;R.prototype.addPointAt=R.prototype.yf;R.prototype.addPoint=R.prototype.me;R.prototype.insertPointAt=R.prototype.l;R.prototype.insertPoint=R.prototype.Mz;R.prototype.setPointAt=R.prototype.P;R.prototype.setPoint=R.prototype.bd;R.prototype.getPoint=R.prototype.i;R.prototype.getOtherPort=R.prototype.Dz;R.prototype.getOtherNode=R.prototype.Io; +set:function(a){var b=this.Mm;b!==a&&(G&&A(a,"number",R,"curviness"),this.Mm=a,this.gb(),this.sc(!1),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.xj},set:function(a){var b=this.xj;b!==a&&(G&&a!==Dp&&a!==lq&&a!==mq&&a!==Vp&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.xj=a,this.Yf=null,this.gb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, +get:function(){return this.eo},set:function(a){var b=this.eo;b!==a&&(G&&A(a,"number",R,"smoothness"),this.eo=a,this.sc(!0),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.yi())return a.model.Ac(this.data)}}});R.prototype.invalidateOtherJumpOvers=R.prototype.Mo;R.prototype.findClosestSegment=R.prototype.fz;R.prototype.updateRoute=R.prototype.yg;R.prototype.invalidateRoute=R.prototype.gb;R.prototype.rollbackRoute=R.prototype.nv; +R.prototype.commitRoute=R.prototype.Bf;R.prototype.startRoute=R.prototype.uh;R.prototype.clearPoints=R.prototype.Nj;R.prototype.removePoint=R.prototype.lv;R.prototype.addPointAt=R.prototype.zf;R.prototype.addPoint=R.prototype.ne;R.prototype.insertPointAt=R.prototype.l;R.prototype.insertPoint=R.prototype.Mz;R.prototype.setPointAt=R.prototype.P;R.prototype.setPoint=R.prototype.bd;R.prototype.getPoint=R.prototype.i;R.prototype.getOtherPort=R.prototype.Dz;R.prototype.getOtherNode=R.prototype.Io; var Np=null,Op=null,Dp=new F(R,"Normal",1),lq=new F(R,"Orthogonal",2),mq=new F(R,"AvoidsNodes",6),Vp=new F(R,"AvoidsNodesStraight",7),mg=new F(R,"None",0),pg=new F(R,"Bezier",9),lg=new F(R,"JumpGap",10),kg=new F(R,"JumpOver",11),Ep=new F(R,"End",17),Fp=new F(R,"Scale",18),Gp=new F(R,"Stretch",19),jn=new F(R,"OrientAlong",21),bn=new F(R,"OrientPlus90",22),dn=new F(R,"OrientMinus90",23),Hp=new F(R,"OrientOpposite",24),kn=new F(R,"OrientUpright",25),cn=new F(R,"OrientPlus90Upright",26),en=new F(R,"OrientMinus90Upright", 27),fn=new F(R,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;R.className="Link";R.Normal=Dp;R.Orthogonal=lq;R.AvoidsNodes=mq;R.AvoidsNodesStraight=Vp;R.None=mg;R.Bezier=pg;R.JumpGap=lg;R.JumpOver=kg;R.End=Ep;R.Scale=Fp;R.Stretch=Gp;R.OrientAlong=jn;R.OrientPlus90=bn;R.OrientMinus90=dn;R.OrientOpposite=Hp;R.OrientUpright=kn;R.OrientPlus90Upright=cn;R.OrientMinus90Upright=en;R.OrientUpright45=fn;R.EndSegmentStep=8;R.CurvinessStart=Xp;R.SpacingMin=Wp;R.OrthoShortCut=Yp; -function kq(a,b,c,d){Za(this);this.De=this.fq=!1;this.qs=a;this.Lx=b;this.cv=c;this.Mx=d;this.links=[]}kq.prototype.Ol=function(){if(!this.fq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Kd=Math.floor((a.x-this.tc)/this.tc)*this.tc;this.Ld=Math.floor((b-this.uc)/this.uc)*this.uc;this.xn=Math.ceil((c+2*this.tc)/this.tc)*this.tc;this.yn=Math.ceil((d+2*this.uc)/this.uc)*this.uc;a=1+(Math.ceil((this.xn-this.Kd)/this.tc)|0);b=1+(Math.ceil((this.yn-this.Ld)/this.uc)|0);if(null===this.bc||this.hi=cq&&(c[d]=nq)} tk.prototype.ak=function(a,b,c,d){if(a>this.xn||a+cthis.yn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.hi)|0;for(c=Math.min(b+e-1,this.ii)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===yk)return!1}return!0}; @@ -1748,72 +1750,72 @@ a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:be)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===sq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==sq){g.push(k);g.push(l);if(rq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=sq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} oa.Object.defineProperties(tk.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Kd,this.Ld,this.xn-this.Kd,this.yn-this.Ld)}},xo:{configurable:!0,get:function(){return this.tc},set:function(a){0=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> -a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Tp.prototype.Ol=function(){this.oe.length=0}; -function Up(a,b){var c=a.oe;if(0===c.length){a:if(!a.Qo){c=a.Qo;a.Qo=!0;var d=null,e=a.node,f=e instanceof wf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.jx();else{if(!f.actualBounds.u()){a.Qo=c;break a}d=f;g=d.Ku()}f=a.oe.length=0;var h=a.port.oa(Fc,K.alloc()),k=a.port.oa(Oc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.Ye(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.si();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& -l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Sd(d),n=l.computeSpot(m,a.port);if(n.$c()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.cb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=tq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.oe[f];void 0===r?(r=new uq(l,p,n),a.oe[f]=r):(r.link=l,r.angle=p,r.Lc= -n);r.ev.set(m);f++}}}}K.free(h);a.oe.sort(Tp.prototype.j);k=a.oe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(B)?(z=Math.abs(B)/r,r=Math.abs(B)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(B)?(z=Math.abs(B)/ -m,m=Math.abs(B)):z=1}y=0}var J=C.Po;if(d===Ap){C=C.link.computeThickness();C*=z;J.set(D);switch(q){case 8:J.x=D.x+u/2+p/2-y-C/2;break;case 2:J.y=D.y+B/2+r/2-y-C/2;break;case 1:J.x=D.x+u/2-n/2+y+C/2;break;default:case 4:J.y=D.y+B/2-m/2+y+C/2}y+=C}else{var U=.5;d===lp&&(U=(C.Jo+1)/(C.Hl+1));J.x=D.x+u*U;J.y=D.y+B*U}}}K.free(h);K.free(k);K.free(g);K.free(l);D=a.oe;for(f=0;fb.Lc?1:a.angleb.angle?1:0}; -Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Ec,b.fromPort===this.port),d=a.Jo;if(0>d)return c;var e=a.Hl;if(1>=e||!b.isOrthogonal)return c;b=a.ev;var f=a.Po;if(2===a.Lc||8===a.Lc)d=e-1-d;return((a=2===a.Lc||4===a.Lc)?b.y180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Tp.prototype.Ol=function(){this.pe.length=0}; +function Up(a,b){var c=a.pe;if(0===c.length){a:if(!a.Qo){c=a.Qo;a.Qo=!0;var d=null,e=a.node,f=e instanceof wf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.kx();else{if(!f.actualBounds.u()){a.Qo=c;break a}d=f;g=d.Ku()}f=a.pe.length=0;var h=a.port.oa(Fc,K.alloc()),k=a.port.oa(Oc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.Ze(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.si();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Sd(d),n=l.computeSpot(m,a.port);if(n.$c()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.cb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=tq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.pe[f];void 0===r?(r=new uq(l,p,n),a.pe[f]=r):(r.link=l,r.angle=p,r.Mc= +n);r.ev.set(m);f++}}}}K.free(h);a.pe.sort(Tp.prototype.j);k=a.pe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(B)?(z=Math.abs(B)/r,r=Math.abs(B)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(B)?(z=Math.abs(B)/ +m,m=Math.abs(B)):z=1}y=0}var J=C.Po;if(d===Ap){C=C.link.computeThickness();C*=z;J.set(D);switch(q){case 8:J.x=D.x+u/2+p/2-y-C/2;break;case 2:J.y=D.y+B/2+r/2-y-C/2;break;case 1:J.x=D.x+u/2-n/2+y+C/2;break;default:case 4:J.y=D.y+B/2-m/2+y+C/2}y+=C}else{var U=.5;d===lp&&(U=(C.Jo+1)/(C.Hl+1));J.x=D.x+u*U;J.y=D.y+B*U}}}K.free(h);K.free(k);K.free(g);K.free(l);D=a.pe;for(f=0;fb.Mc?1:a.angleb.angle?1:0}; +Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Ec,b.fromPort===this.port),d=a.Jo;if(0>d)return c;var e=a.Hl;if(1>=e||!b.isOrthogonal)return c;b=a.ev;var f=a.Po;if(2===a.Mc||8===a.Mc)d=e-1-d;return((a=2===a.Mc||4===a.Mc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; Di.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof R)&&(xq(h),this.rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof wf&&(h.rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= 0,c=b,d+=f+20,f=0):e++}}};Di.prototype.rh=function(a){return!a.location.u()||a instanceof wf&&a.rh?!0:!1};function wq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof T?k.isLinkLabel||(k instanceof wf?null===k.layout?wq(a,b,k.memberParts,!1,e,f,g,h):(xq(k),b.add(k)):(xq(k),b.add(k))):g&&k instanceof R?b.add(k):!h||!k.Zc()||k instanceof T||(xq(k),b.add(k)))}} function xq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.eb()}Di.prototype.ui=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Di.prototype.Vw=function(a){var b=new I;a instanceof Q?(wq(this,b,a.nodes,!0,null,!0,!0,!0),wq(this,b,a.links,!0,null,!0,!0,!0),wq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof wf?wq(this,b,a.memberParts,!1,null,!0,!0,!0):wq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Di.prototype.Ww=function(a){var b=new I;a instanceof P?(wq(this,b,a.nodes,!0,null,!0,!0,!0),wq(this,b,a.links,!0,null,!0,!0,!0),wq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof wf?wq(this,b,a.memberParts,!1,null,!0,!0,!0):wq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; Di.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.oa(Fc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Di.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Di.prototype.workerLayout=function(){return!1}; -function yq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.yj&&(c.running=zq(a.yj));null!==a.og&&(c.waiting=zq(a.og));a.workerStateChanged(c,a)}}function zq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Di.prototype.Ly=function(){var a=Aq(this.constructor);a&&(null!==a.Ze&&a.Ze.terminate(),a.Ze=null,a.Ql.iteratorValues.each(function(a){a.Mr=!1;a.yj=null;a.og=null;a.wr=!1;yq(a)}),a.Ql.clear())}; -function Bq(a,b){var c=Aq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function Aq(a){var b=null;if("function"===typeof a){if(b=Cq.get(a),!b){var c=Qa(a);b=Cq.get(c);b||(b=new Dq,b.Cu=a,b.name=c,b.j=a.name,b.wx=Eq,Cq.set(c,b),Cq.set(a,b),Cq.set(a.name,b))}}else"string"===typeof a&&(b=Cq.get(a));return b} -Di.prototype.Ev=function(){if("undefined"===typeof Worker||!Fq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Mr&&(this.wr=!0,this.og=this.yj=null,yq(this)),!1;var a=Aq(this.constructor);if(null===a)return!1;null===a.Ze&&(a.Ze=new Worker(Fq),a.Ze.onerror=function(a){a.preventDefault();Fa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Ze.j=function(a){Fa("Worker serialization error: "+a)},a.Ze.onmessage= -function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)Fa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Ql.get(c.id)){a.Ql.remove(c.id);b.Mr=!1;b.yj=null;if(b.wr)b.wr=!1,b.og=null;else{var d=Gq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}yq(b,c.time);c=b.og;if(null!==c)b.og=null;else for(d=a.Ql.iteratorValues;d.next();){var e=d.value;c=e.og;if(null!==c){e.og=null;break}}null!==c&&Hq(b,c)}},a.Ze.postMessage({_GoJS:"_GoJS", -url:a.wx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Ze.postMessage({_GoJS:"_GoJS",url:b})}),a.Ze.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.yj?this.og=this.network:Hq(this,this.network);yq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Hq(a,b){a.Mr=!0;var c=Aq(a.constructor),d=Iq(a,b,!0);d._GoJS="_GoJS";c.Ze.postMessage(d);c.Ql.set(lb(a),a);a.yj=b} +function yq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.yj&&(c.running=zq(a.yj));null!==a.pg&&(c.waiting=zq(a.pg));a.workerStateChanged(c,a)}}function zq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Di.prototype.Ly=function(){var a=Aq(this.constructor);a&&(null!==a.$e&&a.$e.terminate(),a.$e=null,a.Ql.iteratorValues.each(function(a){a.Mr=!1;a.yj=null;a.pg=null;a.wr=!1;yq(a)}),a.Ql.clear())}; +function Bq(a,b){var c=Aq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function Aq(a){var b=null;if("function"===typeof a){if(b=Cq.get(a),!b){var c=Qa(a);b=Cq.get(c);b||(b=new Dq,b.Cu=a,b.name=c,b.j=a.name,b.xx=Eq,Cq.set(c,b),Cq.set(a,b),Cq.set(a.name,b))}}else"string"===typeof a&&(b=Cq.get(a));return b} +Di.prototype.Ev=function(){if("undefined"===typeof Worker||!Fq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Mr&&(this.wr=!0,this.pg=this.yj=null,yq(this)),!1;var a=Aq(this.constructor);if(null===a)return!1;null===a.$e&&(a.$e=new Worker(Fq),a.$e.onerror=function(a){a.preventDefault();Fa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.$e.j=function(a){Fa("Worker serialization error: "+a)},a.$e.onmessage= +function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&P.version&&c.version!==P.version)Fa("Failure: GoJS v"+P.version+" Worker v"+c.version);else if(b=a.Ql.get(c.id)){a.Ql.remove(c.id);b.Mr=!1;b.yj=null;if(b.wr)b.wr=!1,b.pg=null;else{var d=Gq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}yq(b,c.time);c=b.pg;if(null!==c)b.pg=null;else for(d=a.Ql.iteratorValues;d.next();){var e=d.value;c=e.pg;if(null!==c){e.pg=null;break}}null!==c&&Hq(b,c)}},a.$e.postMessage({_GoJS:"_GoJS", +url:a.xx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.$e.postMessage({_GoJS:"_GoJS",url:b})}),a.$e.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.yj?this.pg=this.network:Hq(this,this.network);yq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Hq(a,b){a.Mr=!0;var c=Aq(a.constructor),d=Iq(a,b,!0);d._GoJS="_GoJS";c.$e.postMessage(d);c.Ql.set(lb(a),a);a.yj=b} function Iq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?lb(a):a.id,layout:Qa(a.constructor),p:d,AA:e,dz:f};a.onNetworkSerialization(2,c,b,d);return d} -function Gq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.AA,g=new yb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Qb(a.key));null!==b?b=e.Lj(b):(b=e.createVertex(),e.qg(b));c&&null!==a.key&&(b.data={Kh:a.key});g.set(a.id,b)});var h=b.dz,k=new yb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Bl(f);f.link=b;c&&null!==a.key&&(f.data={Kh:a.key});k.set(a.id, +function Gq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.AA,g=new yb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Qb(a.key));null!==b?b=e.Lj(b):(b=e.createVertex(),e.rg(b));c&&null!==a.key&&(b.data={Kh:a.key});g.set(a.id,b)});var h=b.dz,k=new yb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Bl(f);f.link=b;c&&null!==a.key&&(f.data={Kh:a.key});k.set(a.id, f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.deserializeVertexProperties(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Di.prototype.onNetworkSerialization=function(){}; -oa.Object.defineProperties(Di.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&w(a,Q,Di,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&w(a,wf,Di,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.ln},set:function(a){this.ln!==a&&(A(a,"boolean",Di,"isOngoing"),this.ln=a)}},isInitial:{configurable:!0, +oa.Object.defineProperties(Di.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&w(a,P,Di,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.m},set:function(a){this.m!==a&&(null!==a&&w(a,wf,Di,"group"),this.m=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.ln},set:function(a){this.ln!==a&&(A(a,"boolean",Di,"isOngoing"),this.ln=a)}},isInitial:{configurable:!0, enumerable:!0,get:function(){return this.Ih},set:function(a){A(a,"boolean",Di,"isInitial");this.Ih=a;a||(this.qn=!0)}},isViewportSized:{configurable:!0,get:function(){return this.rn},set:function(a){this.rn!==a&&(A(a,"boolean",Di,"isViewportSized"),(this.rn=a)&&this.F())}},isRouting:{configurable:!0,get:function(){return this.on},set:function(a){this.on!==a&&(A(a,"boolean",Di,"isRouting"),this.on=a)}},isRealtime:{configurable:!0,get:function(){return this.nn}, set:function(a){this.nn!==a&&(null!==a&&A(a,"boolean",Di,"isRealtime"),this.nn=a)}},isValidLayout:{configurable:!0,get:function(){return this.qn},set:function(a){this.qn!==a&&(A(a,"boolean",Di,"isValidLayout"),this.qn=a,a||(a=this.diagram,null!==a&&(a.xh=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&w(a,vq,Di,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.zm}, set:function(a){this.zm!==a&&(null!==a&&A(a,"function",Di,"boundsComputation"),this.zm=a,this.F())}},arrangementOrigin:{configurable:!0,get:function(){return this.vm},set:function(a){w(a,K,Di,"arrangementOrigin");this.vm.D(a)||(this.vm.assign(a),this.F())}},id:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.zn},set:function(a){this.zn!==a&&(null!==a&&A(a,"function", -Di,"mayUseWorkerFunction"),this.zn=a)}},workerStateChanged:{configurable:!0,get:function(){return this.oo},set:function(a){this.oo!==a&&(null!==a&&A(a,"function",Di,"workerStateChanged"),this.oo=a)}}});Di.prototype.useWorker=Di.prototype.Ev;Di.declareWorkerLayout=Bq;Di.prototype.cancelWorker=Di.prototype.Ly;Di.prototype.collectParts=Di.prototype.Vw;Di.prototype.getLayoutBounds=Di.prototype.ui;Di.prototype.invalidateLayout=Di.prototype.F; +Di,"mayUseWorkerFunction"),this.zn=a)}},workerStateChanged:{configurable:!0,get:function(){return this.oo},set:function(a){this.oo!==a&&(null!==a&&A(a,"function",Di,"workerStateChanged"),this.oo=a)}}});Di.prototype.useWorker=Di.prototype.Ev;Di.declareWorkerLayout=Bq;Di.prototype.cancelWorker=Di.prototype.Ly;Di.prototype.collectParts=Di.prototype.Ww;Di.prototype.getLayoutBounds=Di.prototype.ui;Di.prototype.invalidateLayout=Di.prototype.F; var Cq=new yb,Eq="object"===typeof sa.document&&sa.document.currentScript?sa.document.currentScript.src:"",Fq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Di.className="Layout";Di.GoJSScriptURL=Eq;Di.declareWorkerLayout=Bq; -"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:Q.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=Aq(a.layout));var d=null;c&&c.Cu&&(d=new c.Cu);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=Gq(d,a,!0); -d.workerLayout=function(){var a=Iq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new H)}});function Dq(){this.Cu=null;this.wx=this.j=this.name="";this.scripts=[];this.Ze=null;this.Ql=new yb}function vq(a){Za(this);G&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.Pc=a;this.wf=new I;this.ye=new I;this.rs=new yb;this.ms=new yb} -vq.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new I;this.ye=new I;this.rs=new yb;this.ms=new yb}; -vq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.wf.count+" edges: "+this.ye.count;if(1=a)return b;b+=" vertexes: "+this.xf.count+" edges: "+this.ze.count;if(1b?1:0):1:null!==b?-1:0} -oa.Object.defineProperties(Jq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Cd._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.Pd._dataArray}},data:{configurable:!0,get:function(){return this.vb},set:function(a){this.vb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.Xh}, -set:function(a){if(this.Xh!==a){G&&null!==a&&w(a,T,Jq,"node");this.Xh=a;a.eb();var b=this.network.layout,c=M.alloc(),d=b.ui(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof wf)&&(a=a.locationObject.oa(Kc),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&w(a,M,Jq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, -get:function(){return this.o},set:function(a){this.o.D(a)||(G&&w(a,K,Jq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&E(a,Jq,"centerX"),b.pa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&E(a,Jq,"centerY"),b.pa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, -get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},width:{configurable:!0, +oa.Object.defineProperties(Jq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Cd._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.Pd._dataArray}},data:{configurable:!0,get:function(){return this.vb},set:function(a){this.vb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.m.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.Xh}, +set:function(a){if(this.Xh!==a){G&&null!==a&&w(a,T,Jq,"node");this.Xh=a;a.eb();var b=this.network.layout,c=M.alloc(),d=b.ui(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof wf)&&(a=a.locationObject.oa(Kc),a.u())){this.m.h(a.x-b,a.y-e);return}this.m.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&w(a,M,Jq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, +get:function(){return this.m},set:function(a){this.m.D(a)||(G&&w(a,K,Jq,"focus"),this.m.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.m.x},set:function(a){var b=this.j;b.x+this.m.x!==a&&(G&&E(a,Jq,"centerX"),b.pa(),b.x=a-this.m.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.m.y},set:function(a){var b=this.j;b.y+this.m.y!==a&&(G&&E(a,Jq,"centerY"),b.pa(),b.y=a-this.m.y,b.freeze())}},focusX:{configurable:!0, +get:function(){return this.m.x},set:function(a){var b=this.m;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.m.y},set:function(a){var b=this.m;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.pa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.pa(),b.y=a,b.freeze())}},width:{configurable:!0, enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.pa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.pa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.tb},set:function(a){G&&w(a,vq,Jq,"network");this.tb=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); return a.iterator}},destinationVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{configurable:!0,get:function(){return this.Cd.iterator}},destinationEdges:{configurable:!0, enumerable:!0,get:function(){return this.Pd.iterator}},edges:{configurable:!0,get:function(){for(var a=new H,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{configurable:!0,get:function(){return this.Cd.count+this.Pd.count}}});Jq.prototype.deleteDestinationEdge=Jq.prototype.Du;Jq.prototype.addDestinationEdge=Jq.prototype.tu;Jq.prototype.deleteSourceEdge=Jq.prototype.Eu; @@ -1821,86 +1823,86 @@ Jq.prototype.addSourceEdge=Jq.prototype.vu;Jq.className="LayoutVertex";Jq.standa Jq.smartComparer=function(a,b){G&&w(a,Jq,Jq,"smartComparer:m");G&&w(b,Jq,Jq,"smartComparer:n");if(null!==a){if(null!==b){a=a.Xh;var c=b.Xh;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ja("Layout");d=[];switch(this.alignment){case Zq:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= m=0;nf-1|| 0g)d.push(new M(0,u,g+h,y)),x=0,q=r,u+=y,y=0;y=Math.max(y,J);switch(p){case Yq:C=-C.width;break;default:C=0}B.moveTo(q+C,u);switch(p){case Yq:q-=D;break;default:q+=D}x++}d.push(new M(0,u,g+h,y));M.free(l);break;case Rq:k=g;m=f;n=b;p=c;g=M.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(q=0;q=l&&(k-=l);l=B=0;D=Math.max(this.cellSize.height,1);C=f=0;J=!0;x=K.alloc();for(U=0;Um-1||0k){d.push(new M(0,J?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;h=l&&(k-=l);l=B=0;D=Math.max(this.cellSize.height,1);C=f=0;J=!0;x=K.alloc();for(U=0;Um-1||0k){d.push(new M(0,J?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -oa.Object.defineProperties(al.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.qo},set:function(a){this.qo!==a&&(A(a,"number",al,"wrappingWidth"),0n)){var u=n+sn(q);q.rc(u,!0);En(q,u,n)}}b.isModified=!0}}finally{b.ca=!0}}}}};zi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Pa(a);for(b=this.nodes.iterator;b.next();)b.value.Pa(a);for(b=this.links.iterator;b.next();)b.value.Pa(a)}; -zi.prototype.hp=function(){for(var a=this.H.model,b=new I,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new cb;e.add("[");c&&1=d)return"[]";var e=new bb;e.add("[");c&&1d)return;La(a.Fc,d)}Mr(a,"nodeDataArray",te,"nodeDataArray",a,b,null,d,null);a.gp(b)}t.mA=function(a){if(Ha(a))for(var b=a.length,c=0;cd)return;La(a.Gc,d)}Mr(a,"nodeDataArray",te,"nodeDataArray",a,b,null,d,null);a.gp(b)}t.mA=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Mr(this,"",se,"",a,null,c,null,b)}; -t.kv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),E(b,X,"removeArrayItem:idx"));a===this.Fc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",te,"",a,c,null,b,null)};t.Go=function(a){if(null===a)return"";var b=this.tj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; +Fn(a,b);d!==c&&(bk(a,b,c),this.ts(a,b,d,c))};t=X.prototype;t.set=function(a,b,c){this.setDataProperty(a,b,c)};t.to=function(a,b){if(b){var c=this.hb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.zy=function(a,b){this.ds(a,-1,b)}; +t.ds=function(a,b,c){G&&(Ia(a,X,"insertArrayItem:arr"),E(b,X,"insertArrayItem:idx"),a===this.Gc&&v("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray"));0>b&&(b=a.length);Ka(a,b,c);Mr(this,"",se,"",a,null,c,null,b)}; +t.kv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),E(b,X,"removeArrayItem:idx"));a===this.Gc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",te,"",a,c,null,b,null)};t.Go=function(a){if(null===a)return"";var b=this.tj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; t.em=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.tj;if(""!==c)if(this.hb(a)){var d=Fn(a,c);void 0===d&&(d="");d!==b&&(bk(a,c,b),Mr(this,"nodeCategory",qe,c,a,d,b))}else bk(a,c,b)}};t.gm=function(a,b){this.em(b,this.Go(a))};t.Pl=function(){return!1};t.$j=function(){return!1};t.yi=function(){return!1};t.ks=function(){return!1};t.wi=function(){return!1};function Bi(){return new X} function Gr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return Gr(a,b.constructor);return typeof b}function Jr(a){return Qr[a]?Qr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Fn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){G&&Fa("property get error: "+d.toString())}return c} function bk(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){G&&Fa("property set error: "+d.toString())}} oa.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.Ca},set:function(a){var b=this.Ca;b!==a&&(A(a,"string",X,"name"),this.Ca=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.Nm},set:function(a){var b=this.Nm;b!==a&&(A(a,"string",X,"dataFormat"),this.Nm=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.Jg},set:function(a){var b=this.Jg;b!==a&&(A(a,"boolean", -X,"isReadOnly"),this.Jg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(A(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Pa(a))}},undoManager:{configurable:!0,get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(w(a,ve,X,"undoManager"),null!==b&&b.Ox(this),this.o=a,null!==a&&a.Pw(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg}, +X,"isReadOnly"),this.Jg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(A(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Pa(a))}},undoManager:{configurable:!0,get:function(){return this.m},set:function(a){var b=this.m;b!==a&&(w(a,ve,X,"undoManager"),null!==b&&b.Px(this),this.m=a,null!==a&&a.Pw(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Xg}, set:function(a){A(a,"boolean",X,"skipsUndoManager");this.Xg=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.Yh},set:function(a){var b=this.Yh;b!==a&&(Nr(a,X,"nodeKeyProperty"),""===a&&v("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===te){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.bg.add(a),this.ld[c]!==a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)):(this.bg.remove(a),this.ld[c]=== -a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Gf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Rl=function(a){if(void 0!==a){var b=this.Yi;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),bk(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; -t.qx=function(a){return mr(this,a,!0)};t.qv=function(a,b){ur(this,a,b,!0)};t.ux=function(a){return mr(this,a,!1)};t.uv=function(a,b){ur(this,a,b,!1)};function mr(a,b,c){if(null!==b&&(a=c?a.kf:a.lf,""!==a&&(a=Fn(b,a),void 0!==a))){if(or(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function ur(a,b,c,d){null===c&&(c=void 0);void 0===c||or(c)||Aa(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.kf:a.lf;if(""!==e)if(c=a.Rl(c),a.Ic(b)){var f=Fn(b,e);f!==c&&(sr(a,f,b),bk(b,e,c),null===a.ic(c)&&tr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}}t.sx=function(a){return lr(this,a,!0)};t.rv=function(a,b){vr(this,a,b,!0)};t.vx=function(a){return lr(this,a,!1)}; -t.vv=function(a,b){vr(this,a,b,!1)};function lr(a,b,c){if(null===b)return"";a=c?a.mj:a.nj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function vr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.mj:a.nj;if(""!==e)if(a.Ic(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(bk(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}} -t.Gf=function(a){if(null===a)return Vr;var b=this.he;if(""===b)return Vr;a=Fn(a,b);return void 0===a?Vr:a};t.ys=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.he;if(""!==c)if(this.Ic(a)){var d=Fn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Ic(a)&&(sr(this,b,a),Mr(this,"linkLabelKeys",te,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.Ac=function(a){if(null!==a){var b=this.Nh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(or(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.xs=function(a,b){void 0!==b&&null!==b&&or(b)||Aa(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Nh;if(""!==c)if(this.Ic(a)){var d=Fn(a,c);d!==b&&null===this.kh(b)&&(bk(a,c,b),void 0!==d&&this.wb.remove(d),this.wb.add(b,a),Mr(this,"linkKey",qe,c,a,d,b),"string"===typeof c&&this.Pa(a,c))}else bk(a,c,b)}}; +Sr.prototype.changeState=function(a,b){if(null!==a&&a.model===this){if(a.change===qe){var c=a.object,d=a.propertyName;if(d===this.linkKeyProperty&&this.Jc(c)){var e=a.L(b);b=a.L(!b);void 0!==b&&this.wb.remove(b);void 0!==e&&this.wb.add(e,c);bk(c,d,e);return}}else if(a.change===se){c=a.newParam;if("linkDataArray"===a.modelChange){a=a.newValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.cg.remove(a),this.ld[c]===a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)):(this.cg.add(a),this.ld[c]!== +a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)));return}if("linkLabelKeys"===a.modelChange){d=this.Hf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)):0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===te){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.cg.add(a),this.ld[c]!==a&&this.ld.splice(c,0,a),void 0!==d&&this.wb.add(d,a)):(this.cg.remove(a),this.ld[c]=== +a&&this.ld.splice(c,1),void 0!==d&&this.wb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Hf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Rl=function(a){if(void 0!==a){var b=this.Yi;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),bk(c,this.nodeKeyProperty,a),this.yf(c))}return a}}; +t.sx=function(a){return mr(this,a,!0)};t.qv=function(a,b){ur(this,a,b,!0)};t.vx=function(a){return mr(this,a,!1)};t.uv=function(a,b){ur(this,a,b,!1)};function mr(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=Fn(b,a),void 0!==a))){if(or(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function ur(a,b,c,d){null===c&&(c=void 0);void 0===c||or(c)||Aa(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Rl(c),a.Jc(b)){var f=Fn(b,e);f!==c&&(sr(a,f,b),bk(b,e,c),null===a.ic(c)&&tr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}}t.tx=function(a){return lr(this,a,!0)};t.rv=function(a,b){vr(this,a,b,!0)};t.wx=function(a){return lr(this,a,!1)}; +t.vv=function(a,b){vr(this,a,b,!1)};function lr(a,b,c){if(null===b)return"";a=c?a.mj:a.nj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function vr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.mj:a.nj;if(""!==e)if(a.Jc(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(bk(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",qe,e,b,f,c),"string"===typeof e&&a.Pa(b,e))}else bk(b,e,c)}} +t.Hf=function(a){if(null===a)return Vr;var b=this.ie;if(""===b)return Vr;a=Fn(a,b);return void 0===a?Vr:a};t.ys=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.ie;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(sr(this,b,a),Mr(this,"linkLabelKeys",te,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +t.Ac=function(a){if(null!==a){var b=this.Nh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(or(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.xs=function(a,b){void 0!==b&&null!==b&&or(b)||Aa(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Nh;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);d!==b&&null===this.kh(b)&&(bk(a,c,b),void 0!==d&&this.wb.remove(d),this.wb.add(b,a),Mr(this,"linkKey",qe,c,a,d,b),"string"===typeof c&&this.Pa(a,c))}else bk(a,c,b)}}; t.kh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&or(a)?this.wb.L(a):null}; t.os=function(a){if(null!==a){var b=this.Nh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.wb.contains(c)){var d=this.el;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.wb.contains(c))){bk(a,b,c);return}if("string"===typeof c){for(d=2;this.wb.contains(c+d);)d++;bk(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.wb.count-1;this.wb.contains(c);)c--;bk(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; -t.Ic=function(a){return null===a?!1:this.bg.contains(a)};t.ji=function(a){null!==a&&(nb(a),this.Ic(a)||qr(this,a,!0))};function qr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.wb.L(d)===b)return;a.os(b);d=a.Ac(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.wb.add(d,b)}a.bg.add(b);d=null;c&&(d=a.ld.length,a.ld.splice(d,0,b));Mr(a,"linkDataArray",se,"linkDataArray",a,null,b,null,d);Wr(a,b)} -t.By=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ld.splice(d,1)}Mr(a,"linkDataArray",te,"linkDataArray",a,b,null,d,null);c=mr(a,b,!0);sr(a,c,b);c=mr(a,b,!1);sr(a,c,b);d=a.Gf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd)return;a.ld.splice(d,1)}Mr(a,"linkDataArray",te,"linkDataArray",a,b,null,d,null);c=mr(a,b,!0);sr(a,c,b);c=mr(a,b,!1);sr(a,c,b);d=a.Hf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new H;b.addAll(a.iterator);a=new H;var c=new H;var d=this.sort(b);var e,f,g=this.Ap;var h=this.arrangement;var k=this.nodeDiameterFormula; var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle;isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===ms&&k===ns?h=Zr:h===ms&&k!==ns&&(h=this.arrangement);if((this.direction===hs||this.direction===is)&&this.sorting!==bs){for(k=0;!(k>=d.length);k+=2){a.add(d.N(k));if(k+1>=d.length)break;c.add(d.N(k+1))}this.direction===hs?(this.arrangement===ms&&a.reverse(),d=new H,d.addAll(a), d.addAll(c)):(this.arrangement===ms&&c.reverse(),d=new H,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;rp&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ms){isNaN(b)&&(b=6);if(h!==Zr&&h!==ms){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=r/(360<=p?k:k-1)}this.cw=h;this.nc=l;this.Um=m;this.dw=n;this.Mp=p;this.$i=b;this.le=f;this.Ap=g;b=d;d=this.cw;h=this.nc;l=this.dw;m=this.Mp;n=this.$i;p=this.le;k=this.Ap;if(this.direction!==hs&&this.direction!==is||d!==ms)if(this.direction===hs||this.direction===is){g=0;switch(d){case ls:g=180*ss(this,h,p,l,k)/Math.PI;break;case Zr:k=b=0;g=a.first();null!==g&&(b=ps(g,Math.PI/2));g=c.first(); +(q.diameter+u.diameter)/2);g+=b;e=qs(this,g*(360<=p?k:k-1),m,n*Math.PI/180,p*Math.PI/180);e>l?(l=e,f=l*m):g=r/(360<=p?k:k-1)}this.cw=h;this.nc=l;this.Um=m;this.dw=n;this.Mp=p;this.$i=b;this.me=f;this.Ap=g;b=d;d=this.cw;h=this.nc;l=this.dw;m=this.Mp;n=this.$i;p=this.me;k=this.Ap;if(this.direction!==hs&&this.direction!==is||d!==ms)if(this.direction===hs||this.direction===is){g=0;switch(d){case ls:g=180*ss(this,h,p,l,k)/Math.PI;break;case Zr:k=b=0;g=a.first();null!==g&&(b=ps(g,Math.PI/2));g=c.first(); null!==g&&(k=ps(g,Math.PI/2));g=180*ss(this,h,p,l,n+(b+k)/2)/Math.PI;break;case ks:g=m/b.length}if(this.direction===hs){switch(d){case ls:ts(this,a,l,js);break;case Zr:us(this,a,l,js);break;case ks:vs(this,a,m/2,l,js)}switch(d){case ls:ts(this,c,l+g,as);break;case Zr:us(this,c,l+g,as);break;case ks:vs(this,c,m/2,l+g,as)}}else{switch(d){case ls:ts(this,c,l,js);break;case Zr:us(this,c,l,js);break;case ks:vs(this,c,m/2,l,js)}switch(d){case ls:ts(this,a,l+g,as);break;case Zr:us(this,a,l+g,as);break;case ks:vs(this, a,m/2,l+g,as)}}}else switch(d){case ls:ts(this,b,l,this.direction);break;case Zr:us(this,b,l,this.direction);break;case ks:vs(this,b,m,l,this.direction);break;case ms:ws(this,b,m,l,this.direction)}else ws(this,b,m,l-m/2,as)}this.updateParts();this.network=null;this.isValidLayout=!0}; -function vs(a,b,c,d,e){var f=a.Mp,g=a.nc;a=a.le;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===as?f:-f);0>f;)f+=360;f%=360;180c){for(f=d+(e===as?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;zs(a,k,l,m,n,e,f)||As(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.uj++;if(!(23Math.abs(r)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.uj?a.nc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;zs(a,k,l,n,p,e,m)||As(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.uj++;if(!(23a.uj?a.nc-f/(2*Math.PI):a.nc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function As(a,b,c,d,e,f,g){var h=a.nc,k=a.le,l=0;a=(d[e].height+d[e+1].height)/2+a.$i;d=!1;if(0<=b!==(f===as)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Yr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -Yr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.nc,c.y=this.arrangementOrigin.y+this.le);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.eb(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.qe(c.qe(a)),this.group.move(b),this.Rv=b.qe(a))}; -Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function rs(a,b,c,d,e){var f=a.qy;if(.001>Math.abs(a.Um-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.uj?a.nc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;zs(a,k,l,n,p,e,m)||As(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.uj++;if(!(23a.uj?a.nc-f/(2*Math.PI):a.nc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function As(a,b,c,d,e,f,g){var h=a.nc,k=a.me,l=0;a=(d[e].height+d[e+1].height)/2+a.$i;d=!1;if(0<=b!==(f===as)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Yr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +Yr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.nc,c.y=this.arrangementOrigin.y+this.me);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.eb(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.re(c.re(a)),this.group.move(b),this.Rv=b.re(a))}; +Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function rs(a,b,c,d,e){var f=a.sy;if(.001>Math.abs(a.Um-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} function qs(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?rs(a,1,c,d,e):rs(a,1,c))}function ss(a,b,c,d,e){if(.001>Math.abs(a.Um-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} Yr.prototype.sort=function(a){switch(this.sorting){case fs:break;case gs:a.reverse();break;case ds:a.sort(this.comparer);break;case es:a.sort(this.comparer);a.reverse();break;case bs:return this.gk(Bs(a));default:v("Invalid sorting type.")}return a}; function Bs(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.N(f));b[f]=-1;f=a.N(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} @@ -2081,39 +2083,39 @@ c.indexOf(b[l][z]),0<=D&&(D=Math.abs(u-(D>=u?D+1:D)),y+=Dr||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.wl=a:this.wl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Tb},set:function(a){this.Tb!==a&&(ab(a,Yr,Yr,"arrangement"),a===ms||a===Zr||a===ls||a===ks)&&(this.Tb=a,this.F())}},direction:{configurable:!0,get:function(){return this.O},set:function(a){this.O!==a&&(ab(a,Yr,Yr,"direction"), -a===as||a===js||a===hs||a===is)&&(this.O=a,this.F())}},sorting:{configurable:!0,get:function(){return this.md},set:function(a){this.md!==a&&(ab(a,Yr,Yr,"sorting"),a===fs||a===gs||a===ds||es||a===bs)&&(this.md=a,this.F())}},comparer:{configurable:!0,get:function(){return this.ed},set:function(a){this.ed!==a&&(A(a,"function",Yr,"comparer"),this.ed=a,this.F())}},spacing:{configurable:!0,get:function(){return this.tf},set:function(a){this.tf!==a&&(A(a,"number", -Yr,"spacing"),this.tf=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Gn},set:function(a){this.Gn!==a&&(ab(a,Yr,Yr,"nodeDiameterFormula"),a===cs||a===ns)&&(this.Gn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.nc}},actualYRadius:{configurable:!0,get:function(){return this.le}},actualSpacing:{configurable:!0,get:function(){return this.$i}},actualCenter:{configurable:!0,get:function(){return this.Rv}}}); +a===as||a===js||a===hs||a===is)&&(this.O=a,this.F())}},sorting:{configurable:!0,get:function(){return this.md},set:function(a){this.md!==a&&(ab(a,Yr,Yr,"sorting"),a===fs||a===gs||a===ds||es||a===bs)&&(this.md=a,this.F())}},comparer:{configurable:!0,get:function(){return this.ed},set:function(a){this.ed!==a&&(A(a,"function",Yr,"comparer"),this.ed=a,this.F())}},spacing:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf!==a&&(A(a,"number", +Yr,"spacing"),this.uf=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Gn},set:function(a){this.Gn!==a&&(ab(a,Yr,Yr,"nodeDiameterFormula"),a===cs||a===ns)&&(this.Gn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.nc}},actualYRadius:{configurable:!0,get:function(){return this.me}},actualSpacing:{configurable:!0,get:function(){return this.$i}},actualCenter:{configurable:!0,get:function(){return this.Rv}}}); var Zr=new F(Yr,"ConstantSpacing",0),ls=new F(Yr,"ConstantDistance",1),ks=new F(Yr,"ConstantAngle",2),ms=new F(Yr,"Packed",3),as=new F(Yr,"Clockwise",4),js=new F(Yr,"Counterclockwise",5),hs=new F(Yr,"BidirectionalLeft",6),is=new F(Yr,"BidirectionalRight",7),fs=new F(Yr,"Forwards",8),gs=new F(Yr,"Reverse",9),ds=new F(Yr,"Ascending",10),es=new F(Yr,"Descending",11),bs=new F(Yr,"Optimized",12),cs=new F(Yr,"Pythagorean",13),ns=new F(Yr,"Circular",14);Yr.className="CircularLayout";Yr.ConstantSpacing=Zr; Yr.ConstantDistance=ls;Yr.ConstantAngle=ks;Yr.Packed=ms;Yr.Clockwise=as;Yr.Counterclockwise=js;Yr.BidirectionalLeft=hs;Yr.BidirectionalRight=is;Yr.Forwards=fs;Yr.Reverse=gs;Yr.Ascending=ds;Yr.Descending=es;Yr.Optimized=bs;Yr.Pythagorean=cs;Yr.Circular=ns;function $r(){this.Ll=-Infinity;this.pm=this.pk=null} $r.prototype.compare=function(a,b){if(0this.Ll||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ -p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Hs(l,h,e,f,p.width,p.height,d),n=l[k],r=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.Yc(c)&&(a++,2a.network.vertexes.count)return!1;a.dh=a.network.vertexes.Ka();a=a.dh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.Td-a.Td});for(b=a.length-1;0<=b&&1>=a[b].Td;)b--;return 1=g))){for(var l=h=0,m=k.count-g;m=g))){for(var l=h=0,m=k.count-g;mr&&(r=1);h=L.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new K(p.x+g,p.y+h)}}a.network=d;return c} -function Ms(a,b,c){G&&(w(b,Fs,Es,"popNetwork:oldnet"),E(c,Es,"popNetwork:level"));for(c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.We){var e=d.We.N(d.ov);d.Td=e.Gs;var f=e.Kv,g=e.Lv;d.bounds=new M(d.centerX-f,d.centerY-g,e.Hs,e.Fs);d.focus=new K(f,g);d.ov--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function Ns(a,b,c){G&&(w(b,Ps,Es,"surroundNode:oldnet"),E(c,Es,"surroundNode:level"));var d=b.Oj;if(null!==d&&0!==d.count){c=b.centerX;var e=b.centerY,f=b.width,g=b.height;null!==b.We&&0=n.Td?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=n.Td?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=c+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} function Hs(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.$f;var l=d=h=0;for(f= +function Rs(a){null===a.dh&&(a.dh=a.network.vertexes.Ka());var b=a.dh;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.ag;var l=d=h=0;for(f= 0;fc||l-k>c){if(e)break}else if(m-r>c||r-m>c){if(!e)break}else{var q=Qs(g,p);1>q?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Ss),q=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*q):kr?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Ss),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;eu&&0u&&0a[this.Ec]&&(this.Ph=a[c]-1,this.Ec=c),a[c]u&&0u&&0a[this.Fc]&&(this.Ph=a[c]-1,this.Fc=c),a[c]g)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.zf===l.zf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lg)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.Af===l.Af||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lu||n===u&&r>q)&&h++;xn||u===n&&q>r)&&h++}}}if(0>=c)for(k=d[g].destinationEdgesArrayAccess,l=0;lu||n===u&&m>x)&&h++,qn||u===n&&x>m)&&h++);f[g*e+g]=h;for(k=g+1;k=c)for(h=d[g].destinationEdgesArrayAccess,B=d[k].destinationEdgesArrayAccess, l=0;lb.toVertex.index&&(a.bm(b),b.rev=!0);break;case Vs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.rg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Og=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -rt(this,b);for(d.reset();d.next();)b=d.value,-1===b.rg&&rt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.rgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cb.toVertex.index&&(a.bm(b),b.rev=!0);break;case Vs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.sg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Og=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +rt(this,b);for(d.reset();d.next();)b=d.value,-1===b.sg&&rt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.sgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cf+1&&(p+=4*(z-f),r+=4*(z-(f+1)))}C=d[f].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f+1&&(r+=1)}C=d[f+1].sourceEdges.iterator;for(C.reset();C.next();)if(z=C.value,B=z.fromVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;zf+1&&(p+=4*(z-(f+1)),r+=4*(z-f))}C=d[f+1].destinationEdges.iterator; for(C.reset();C.next();)if(z=C.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f&&(p+=1)}z=B=0;C=g[d[f].index];var D=h[d[f].index],J=g[d[f+1].index],U=h[d[f+1].index];-1!==C&&(B+=Math.abs(C-q),z+=Math.abs(C-y));-1!==D&&(B+=Math.abs(D-q),z+=Math.abs(D-y));-1!==J&&(B+=Math.abs(J-u),z+=Math.abs(J-x));-1!==U&&(B+=Math.abs(U-u),z+=Math.abs(U-x));if(r>1)+8*d;this.Oa*=8}if(0!==(this.dg&2))for(c=!0;c;){c=!1;for(b=this.Ec+1;b<=this.Da;b++)c=Ht(this,b,1)|| -c;for(b=this.Ec-1;0<=b;b--)c=Ht(this,b,-1)||c;c=Ht(this,this.Ec,0)||c}if(0!==(this.dg&4)){for(b=this.Ec+1;b<=this.Da;b++)It(this,b,1);for(b=this.Ec-1;0<=b;b--)It(this,b,-1);It(this,this.Ec,0)}a&&(Jt(this,-1),Jt(this,1));if(0!==(this.dg&2))for(c=!0;c;){c=!1;c=Ht(this,this.Ec,0)||c;for(b=this.Ec+1;b<=this.Da;b++)c=Ht(this,b,0)||c;for(b=this.Ec-1;0<=b;b--)c=Ht(this,b,0)||c}}; +Us.prototype.straightenAndPack=function(){var a=0!==(this.eg&1);var b=0!==(this.eg&Gt);1E3>1)+8*d;this.Oa*=8}if(0!==(this.eg&2))for(c=!0;c;){c=!1;for(b=this.Fc+1;b<=this.Da;b++)c=Ht(this,b,1)|| +c;for(b=this.Fc-1;0<=b;b--)c=Ht(this,b,-1)||c;c=Ht(this,this.Fc,0)||c}if(0!==(this.eg&4)){for(b=this.Fc+1;b<=this.Da;b++)It(this,b,1);for(b=this.Fc-1;0<=b;b--)It(this,b,-1);It(this,this.Fc,0)}a&&(Jt(this,-1),Jt(this,1));if(0!==(this.eg&2))for(c=!0;c;){c=!1;c=Ht(this,this.Fc,0)||c;for(b=this.Fc+1;b<=this.Da;b++)c=Ht(this,b,0)||c;for(b=this.Fc-1;0<=b;b--)c=Ht(this,b,0)||c}}; function Ht(a,b,c){G&&(E(b,Us,"bendStraighten:unfixedLayer"),E(c,Us,"bendStraighten:direction"));for(var d=!1;Kt(a,b,c);)d=!0;return d} function Kt(a,b,c){G&&(E(b,Us,"shiftbendStraighten:unfixedLayer"),E(c,Us,"shiftbendStraighten:direction"));var d,e=ct(a,b),f=a.Mb[b],g=jt(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?r=m-1:r=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var q=p=0,u= 0;if(0>=c)for(var x=e[d].sourceEdges.iterator;x.next();){var y=x.value;var z=y.fromVertex;if(y.valid&&z.layer!==b){var B=et(y);var C=y.portFromColOffset;y=y.portToColOffset;z=z.column;p+=(Math.abs(m+y-(z+C))+1)*B;q+=(Math.abs(r+y-(z+C))+1)*B;u+=(Math.abs(n+y-(z+C))+1)*B}}if(0<=c)for(x=e[d].destinationEdges.iterator;x.next();)y=x.value,z=y.toVertex,y.valid&&z.layer!==b&&(B=et(y),C=y.portFromColOffset,y=y.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+y))+1)*B,q+=(Math.abs(r+C-(z+y))+1)*B,u+=(Math.abs(n+ @@ -2199,60 +2201,60 @@ k=n+a.nodeMinColumnSpace(d[c-1],!1)+k+1,n=d[c+1].column,l=n-a.nodeMinColumnSpace d);a.normalize()}function Lt(a,b){G&&(E(b,Us,"packAux:column"),E(1,Us,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} function Mt(a,b){G&&(E(b,Us,"tightPackAux:column"),E(1,Us,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Da;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Da;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} function Jt(a,b){G&&E(b,Us,"componentPack:direction");for(var c=0;c<=a.Oa;c++)for(;Lt(a,c););a.normalize();for(c=0;cf?gt(a,e):gb)for(c=a.Oa;0<=c;c--)for(e=ft(a),f=it(a),d=f+1;ff?gt(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Qc);a.Qc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(mt(a,b,a.Qc,-1,!0,!0),a.Qc++);var f;b=[];for(f=0;fc)for(g=a.Oa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +function Nt(a,b,c){a.Rc=0;for(var d=a.network.vertexes.iterator;d.next();)d.value.component=-1;if(0c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Rc);a.Rc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(mt(a,b,a.Rc,-1,!0,!0),a.Rc++);var f;b=[];for(f=0;fc)for(g=a.Oa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} Us.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=at(this,!0),b=at(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Au();this.isRouting&&this.commitLinks()};function at(a,b){return 270===a.O?b?md:rd:90===a.O?b?rd:md:180===a.O?b?pd:qd:b?qd:pd} -Us.prototype.commitNodes=function(){this.fe=[];this.Jd=[];this.Hd=[];this.Va=[];for(var a=0;a<=this.Da;a++)this.fe[a]=0,this.Jd[a]=0,this.Hd[a]=0,this.Va[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.fe[c]=Math.max(this.fe[c],this.nodeMinLayerSpace(b,!0));this.Jd[c]=Math.max(this.Jd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ge;for(var d=0;d<=this.Da;d++){var e=c;0>=this.fe[d]+this.Jd[d]&&(e=0);0=this.ge[d]+this.Jd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.l(q++,C,n+J),b.l(q++,C,n),b.l(q++,C,n-B)):(b.l(q++,C,D+J),b.l(q++,C,D),b.l(q++,C,D-B)):270===this.O?D<=n.bounds.y?(n=n.bounds.y,b.l(q++,C,n-B),b.l(q++,C,n),b.l(q++,C,n+J)):(b.l(q++,C,D-B),b.l(q++,C,D),b.l(q++,C,D+J)):0===this.O&&(C>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.l(q++,n+J,D),b.l(q++,n,D),b.l(q++,n-B,D)):(b.l(q++,C+J,D),b.l(q++,C,D),b.l(q++,C-B,D)));else{b.l(q++,y,z);var U=0;if(180===this.O||0===this.O){if(180===this.O?C>=n.bounds.right: -C<=n.bounds.x)U=(0===this.O?-B:J)/2;b.l(q++,y+U,D)}else{if(270===this.O?D>=n.bounds.bottom:D<=n.bounds.y)U=(90===this.O?-B:J)/2;b.l(q++,C,z+U)}b.l(q++,C,D)}}else B=Math.max(10,this.fe[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):90===this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)): +C<=n.bounds.x)U=(0===this.O?-B:J)/2;b.l(q++,y+U,D)}else{if(270===this.O?D>=n.bounds.bottom:D<=n.bounds.y)U=(90===this.O?-B:J)/2;b.l(q++,C,z+U)}b.l(q++,C,D)}}else B=Math.max(10,this.ge[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):90===this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)): 270===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):b.l(q++,C,D)}n=x}if(null===h||l!==Ec||p)if(y=b.i(q-1).x,z=b.i(q-1).y,C=b.i(q).x,D=b.i(q).y,p)u=this.Jd[m.layer],180===this.O||0===this.O?(p=z,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.O?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180=== -this.O?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.O?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.O?-u:u),p=m.bounds.x?(n=m.bounds.x+ -m.bounds.width,b.P(q-2,n,z),b.P(q-1,n+J,z)):90===this.O&&D<=m.bounds.bottom?(n=m.bounds.y,b.P(q-2,y,n),b.P(q-1,y,n-B)):270===this.O&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.P(q-2,y,n),b.P(q-1,y,n+J)):0===this.O&&C<=m.bounds.right&&(n=m.bounds.x,b.P(q-2,n,z),b.P(q-1,n-B,z));else{B=Math.max(10,this.fe[m.layer]);J=Math.max(10,this.Jd[m.layer]);p=0;if(180===this.O||0===this.O){if(180===this.O?C<=m.bounds.x:C>=m.bounds.right)p=(0===this.O?J:-B)/2;b.l(q++,C+p,z)}else{if(270===this.O?D<=m.bounds.y: +this.O?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.O?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.O?-u:u),p=m.bounds.x?(n=m.bounds.x+ +m.bounds.width,b.P(q-2,n,z),b.P(q-1,n+J,z)):90===this.O&&D<=m.bounds.bottom?(n=m.bounds.y,b.P(q-2,y,n),b.P(q-1,y,n-B)):270===this.O&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.P(q-2,y,n),b.P(q-1,y,n+J)):0===this.O&&C<=m.bounds.right&&(n=m.bounds.x,b.P(q-2,n,z),b.P(q-1,n-B,z));else{B=Math.max(10,this.ge[m.layer]);J=Math.max(10,this.Jd[m.layer]);p=0;if(180===this.O||0===this.O){if(180===this.O?C<=m.bounds.x:C>=m.bounds.right)p=(0===this.O?J:-B)/2;b.l(q++,C+p,z)}else{if(270===this.O?D<=m.bounds.y: D>=m.bounds.bottom)p=(90===this.O?J:-B)/2;b.l(q++,y,D+p)}b.l(q++,C,D)}}else{for(;null!==m&&m!==n;){B=x=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(x=y.toVertex,B=y.fromVertex,null!==B.node&&(B=null),null!==x.node)););if(null===x)break;x!==n&&(y=b.i(q-1).x,z=b.i(q-1).y,C=x.centerX,D=x.centerY,p?180===this.O||0===this.O?(null!==B?B.centerY:z)!==D&&(B=this.Va[x.layer]+this.dd.x,q===b.firstPickIndex+1&&(B=0===this.O?Math.max(B,y):Math.min(B,y)),b.l(q++,B,z),b.l(q++,B, -D)):(null!==B?B.centerX:y)!==C&&(B=this.Va[x.layer]+this.dd.y,q===b.firstPickIndex+1&&(B=90===this.O?Math.max(B,z):Math.min(B,z)),b.l(q++,y,B),b.l(q++,C,B)):(B=Math.max(10,this.fe[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):90===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):270=== +D)):(null!==B?B.centerX:y)!==C&&(B=this.Va[x.layer]+this.dd.y,q===b.firstPickIndex+1&&(B=90===this.O?Math.max(B,z):Math.min(B,z)),b.l(q++,y,B),b.l(q++,C,B)):(B=Math.max(10,this.ge[x.layer]),J=Math.max(10,this.Jd[x.layer]),r?180===this.O?(b.l(q++,C+J+u,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C-B-u,D)):90===this.O?(b.l(q++,C,D-B-u),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D+J+u)):270=== this.O?(b.l(q++,C,D+J+u),b.l(q++,C,Math.max(D+J-u/2,D)),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,C,Math.min(D-B+u/2,D)),b.l(q++,C,D-B-u)):(b.l(q++,C-B-u,D),b.l(q++,Math.min(C-B+u/2,C),D),b.l(q++,C,D),b.l(q++,C,D),b.l(q++,Math.max(C+J-u/2,C),D),b.l(q++,C+J+u,D)):180===this.O?(b.l(q++,C+J,D),b.l(q++,C-B,D)):90===this.O?(b.l(q++,C,D-B),b.l(q++,C,D+J)):270===this.O?(b.l(q++,C,D+J),b.l(q++,C,D-B)):(b.l(q++,C-B,D),b.l(q++,C+J,D))));m=x}p&&(y=b.i(q-1).x,z=b.i(q-1).y,C=b.i(q).x,D=b.i(q).y,180===this.O||0===this.O? z!==D&&(B=0===this.O?Math.min(Math.max((C+y)/2,this.Va[n.layer]+this.dd.x),C):Math.max(Math.min((C+y)/2,this.Va[n.layer]+this.dd.x),C),b.l(q++,B,z),b.l(q++,B,D)):y!==C&&(B=90===this.O?Math.min(Math.max((D+z)/2,this.Va[n.layer]+this.dd.y),D):Math.max(Math.min((D+z)/2,this.Va[n.layer]+this.dd.y),D),b.l(q++,y,B),b.l(q++,C,B)))}null!==d&&r&&(null!==g&&(l===Ec&&(l=b.i(0),d=b.i(2),l.D(d)||b.P(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Ec,!0,!1,f,h),l.u()||l.set(e.actualBounds.center),b.P(0,l.x,l.y)), -null!==h&&(k===Ec&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.D(l)||b.P(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Ec,!1,!1,e,g),e.u()||e.set(f.actualBounds.center),b.P(b.pointsCount-1,e.x,e.y)));b.Af();c.commit()}}}this.avoidOrthogonalOverlaps()}; +null!==h&&(k===Ec&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.D(l)||b.P(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Ec,!1,!1,e,g),e.u()||e.set(f.actualBounds.center),b.P(b.pointsCount-1,e.x,e.y)));b.Bf();c.commit()}}}this.avoidOrthogonalOverlaps()}; Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.rdb.rd?1:a.Hcb.Hc?1:0:0};t.Rx=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.jb.j||a.rdb.rd?1:a.Hcb.Hc?1:0:0}; -t.ws=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.lcb.lc||a.jb.j||a.rdb.rd?1:a.Hcb.Hc?1:0:0};t.C=function(a,b){G&&(E(a,Us,"isApprox:a"),E(b,Us,"isApprox:b"));a-=b;return-1a}; +k.x*k.x+k.y;h.lc=l.x*l.x+l.y;h.rd=Math.min(f.x,g.x);h.Ic=Math.max(f.x,g.x);h.index=e;h.link=d;if(e+2f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.rdb.rd?1:a.Icb.Ic?1:0:0};t.Sx=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.jb.j||a.rdb.rd?1:a.Icb.Ic?1:0:0}; +t.ws=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.lcb.lc||a.jb.j||a.rdb.rd?1:a.Icb.Ic?1:0:0};t.C=function(a,b){G&&(E(a,Us,"isApprox:a"),E(b,Us,"isApprox:b"));a-=b;return-1a}; t.Ei=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&v("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.Ge.length){var d=[];for(var e=0;e=a.He.length){var d=[];for(var e=0;ea&&(this.dg=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.sf},set:function(a){this.sf!==a&&(A(a,"boolean",Us,"setsPortSpots"),this.sf=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.vn},set:function(a){this.vn!==a&&(A(a,"number",Us,"linkSpacing"),0<=a&&(this.vn=a,this.F()))}},maxLayer:{configurable:!0, -get:function(){return this.Da}},maxIndex:{configurable:!0,get:function(){return this.Ph}},maxColumn:{configurable:!0,get:function(){return this.Oa}},minIndexLayer:{configurable:!0,get:function(){return this.Ng}},maxIndexLayer:{configurable:!0,get:function(){return this.Ec}}}); +enumerable:!0,get:function(){return this.eg},set:function(a){this.eg!==a&&(A(a,"number",Us,"packOption"),0<=a&&8>a&&(this.eg=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.tf},set:function(a){this.tf!==a&&(A(a,"boolean",Us,"setsPortSpots"),this.tf=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.vn},set:function(a){this.vn!==a&&(A(a,"number",Us,"linkSpacing"),0<=a&&(this.vn=a,this.F()))}},maxLayer:{configurable:!0, +get:function(){return this.Da}},maxIndex:{configurable:!0,get:function(){return this.Ph}},maxColumn:{configurable:!0,get:function(){return this.Oa}},minIndexLayer:{configurable:!0,get:function(){return this.Ng}},maxIndexLayer:{configurable:!0,get:function(){return this.Fc}}}); var Vs=new F(Us,"CycleDepthFirst",0),nt=new F(Us,"CycleGreedy",1),$s=new F(Us,"CycleFromLayers",2),Ws=new F(Us,"LayerOptimalLinkLength",0),st=new F(Us,"LayerLongestPathSink",1),ut=new F(Us,"LayerLongestPathSource",2),Xs=new F(Us,"InitDepthFirstOut",0),At=new F(Us,"InitDepthFirstIn",1),yt=new F(Us,"InitNaive",2),Et=new F(Us,"AggressiveNone",0),Ys=new F(Us,"AggressiveLess",1),Ft=new F(Us,"AggressiveMore",2),Gt=8;Us.className="LayeredDigraphLayout";Us.CycleDepthFirst=Vs;Us.CycleGreedy=nt; -Us.CycleFromLayers=$s;Us.LayerOptimalLinkLength=Ws;Us.LayerLongestPathSink=st;Us.LayerLongestPathSource=ut;Us.InitDepthFirstOut=Xs;Us.InitDepthFirstIn=At;Us.InitNaive=yt;Us.AggressiveNone=Et;Us.AggressiveLess=Ys;Us.AggressiveMore=Ft;Us.PackNone=0;Us.PackExpand=1;Us.PackStraighten=2;Us.PackMedian=4;Us.PackAll=15;function Ot(){this.index=this.Hc=this.rd=this.lc=this.first=this.layer=0;this.link=null;this.j=0}Ot.className="SegInfo";function Zs(a){vq.call(this,a)}na(Zs,vq);Zs.prototype.createVertex=function(){return new Pt(this)}; -Zs.prototype.createEdge=function(){return new Qt(this)};Zs.className="LayeredDigraphNetwork";function Pt(a){Jq.call(this,a);this.bb=this.Cg=this.Mh=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.rg=NaN;this.zf=0;this.ek=this.fk=null}na(Pt,Jq); -Pt.prototype.serializeVertexProperties=function(a,b){Jq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?lb(this.near):null;a.valid=this.valid;a.rg=this.rg;a.finish=this.finish;a.zf=this.zf;a.fk=this.fk;a.ek=this.ek}; -Pt.prototype.deserializeVertexProperties=function(a,b,c,d){Jq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.rg=a.rg;this.finish=a.finish;this.zf=a.zf;this.fk=a.fk;this.ek=a.ek}; -oa.Object.defineProperties(Pt.prototype,{layer:{configurable:!0,get:function(){return this.Mh},set:function(a){this.Mh!==a&&(A(a,"number",Pt,"layer"),this.Mh=a)}},column:{configurable:!0,get:function(){return this.Cg},set:function(a){this.Cg!==a&&(A(a,"number",Pt,"column"),this.Cg=a)}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb!==a&&(A(a,"number",Pt,"index"),this.bb=a)}},component:{configurable:!0,get:function(){return this.v}, -set:function(a){this.v!==a&&(A(a,"number",Pt,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&w(a,Pt,Pt,"near"),this.G=a)}}});Pt.className="LayeredDigraphVertex";function Qt(a){Kq.call(this,a);this.j=this.ma=this.Ma=!1;this.aa=this.v=NaN;this.G=this.o=0}na(Qt,Kq); +Us.CycleFromLayers=$s;Us.LayerOptimalLinkLength=Ws;Us.LayerLongestPathSink=st;Us.LayerLongestPathSource=ut;Us.InitDepthFirstOut=Xs;Us.InitDepthFirstIn=At;Us.InitNaive=yt;Us.AggressiveNone=Et;Us.AggressiveLess=Ys;Us.AggressiveMore=Ft;Us.PackNone=0;Us.PackExpand=1;Us.PackStraighten=2;Us.PackMedian=4;Us.PackAll=15;function Ot(){this.index=this.Ic=this.rd=this.lc=this.first=this.layer=0;this.link=null;this.j=0}Ot.className="SegInfo";function Zs(a){vq.call(this,a)}na(Zs,vq);Zs.prototype.createVertex=function(){return new Pt(this)}; +Zs.prototype.createEdge=function(){return new Qt(this)};Zs.className="LayeredDigraphNetwork";function Pt(a){Jq.call(this,a);this.bb=this.Dg=this.Mh=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.sg=NaN;this.Af=0;this.ek=this.fk=null}na(Pt,Jq); +Pt.prototype.serializeVertexProperties=function(a,b){Jq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?lb(this.near):null;a.valid=this.valid;a.sg=this.sg;a.finish=this.finish;a.Af=this.Af;a.fk=this.fk;a.ek=this.ek}; +Pt.prototype.deserializeVertexProperties=function(a,b,c,d){Jq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.sg=a.sg;this.finish=a.finish;this.Af=a.Af;this.fk=a.fk;this.ek=a.ek}; +oa.Object.defineProperties(Pt.prototype,{layer:{configurable:!0,get:function(){return this.Mh},set:function(a){this.Mh!==a&&(A(a,"number",Pt,"layer"),this.Mh=a)}},column:{configurable:!0,get:function(){return this.Dg},set:function(a){this.Dg!==a&&(A(a,"number",Pt,"column"),this.Dg=a)}},index:{configurable:!0,get:function(){return this.bb},set:function(a){this.bb!==a&&(A(a,"number",Pt,"index"),this.bb=a)}},component:{configurable:!0,get:function(){return this.v}, +set:function(a){this.v!==a&&(A(a,"number",Pt,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&w(a,Pt,Pt,"near"),this.G=a)}}});Pt.className="LayeredDigraphVertex";function Qt(a){Kq.call(this,a);this.j=this.ma=this.Ma=!1;this.$=this.v=NaN;this.G=this.m=0}na(Qt,Kq); Qt.prototype.serializeEdgeProperties=function(a,b){Kq.prototype.serializeEdgeProperties.call(this,a,b);a.valid=this.valid;a.rev=this.rev;a.forest=this.forest;a.portFromPos=this.portFromPos;a.portToPos=this.portToPos;a.portFromColOffset=this.portFromColOffset;a.portToColOffset=this.portToColOffset}; Qt.prototype.deserializeEdgeProperties=function(a,b,c,d){Kq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; oa.Object.defineProperties(Qt.prototype,{fromVertex:{configurable:!0,get:function(){return this.gd},set:function(a){this.gd!==a&&(G&&null!==a&&w(a,Pt,Qt,"fromVertex"),this.gd=a)}},toVertex:{configurable:!0,get:function(){return this.pd},set:function(a){this.pd!==a&&(G&&null!==a&&w(a,Pt,Qt,"toVertex"),this.pd=a)}},valid:{configurable:!0,get:function(){return this.Ma},set:function(a){this.Ma!==a&&(A(a,"boolean",Qt,"valid"),this.Ma=a)}},rev:{configurable:!0, -enumerable:!0,get:function(){return this.ma},set:function(a){this.ma!==a&&(A(a,"boolean",Qt,"rev"),this.ma=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(A(a,"boolean",Qt,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(A(a,"number",Qt,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.aa},set:function(a){this.aa!==a&&(A(a,"number", -Qt,"portToPos"),this.aa=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(A(a,"number",Qt,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(A(a,"number",Qt,"portToColOffset"),this.G=a)}}});Qt.className="LayeredDigraphEdge"; -function Z(a){Di.call(this);this.Wb=new I;this.Qn=Rt;this.wd=St;this.lo=Tt;this.oq=Ut;this.Sv=[];this.ud=!0;this.Tb=Vt;this.Zd=(new Hb(10,10)).freeze();var b=new Wt(this);this.Z=new Xt(b);this.$=new Xt(b);this.ju=[];a&&Object.assign(this,a)}na(Z,Di);Z.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a);a.Qn=this.Qn;a.lo=this.lo;a.oq=this.oq;a.ud=this.ud;a.Tb=this.Tb;a.Zd.assign(this.Zd);a.Z.copyInheritedPropertiesFrom(this.Z);a.$.copyInheritedPropertiesFrom(this.$)}; +enumerable:!0,get:function(){return this.ma},set:function(a){this.ma!==a&&(A(a,"boolean",Qt,"rev"),this.ma=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(A(a,"boolean",Qt,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(A(a,"number",Qt,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.$},set:function(a){this.$!==a&&(A(a,"number", +Qt,"portToPos"),this.$=a)}},portFromColOffset:{configurable:!0,get:function(){return this.m},set:function(a){this.m!==a&&(A(a,"number",Qt,"portFromColOffset"),this.m=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(A(a,"number",Qt,"portToColOffset"),this.G=a)}}});Qt.className="LayeredDigraphEdge"; +function Z(a){Di.call(this);this.Wb=new I;this.Qn=Rt;this.wd=St;this.lo=Tt;this.oq=Ut;this.Sv=[];this.ud=!0;this.Tb=Vt;this.Zd=(new Hb(10,10)).freeze();var b=new Wt(this);this.Z=new Xt(b);this.aa=new Xt(b);this.ju=[];a&&Object.assign(this,a)}na(Z,Di);Z.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a);a.Qn=this.Qn;a.lo=this.lo;a.oq=this.oq;a.ud=this.ud;a.Tb=this.Tb;a.Zd.assign(this.Zd);a.Z.copyInheritedPropertiesFrom(this.Z);a.aa.copyInheritedPropertiesFrom(this.aa)}; Z.prototype.ub=function(a){a.classType===Z?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:v("Unknown enum value: "+a):Di.prototype.ub.call(this,a)};Z.prototype.createNetwork=function(){return new Wt(this)}; -Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof T)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof R){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.pg(a.nodes,!0,b),c.pg(a.links,!0,b)):a instanceof wf?c.pg(a.memberParts,!1,b):c.pg(a.iterator,!1,b);return c}; -Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Yt&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===Rt&&null!==b?this.wd=b.isTreePathToChildren?St:Zt:this.wd=this.path===Rt?St:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&w(a,Xt,Z,"removeChild:p");G&&w(b,Xt,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Hu(a,g,fa,y,z):Iu(a,g,fa,y,z);fa=z.x;y=z.width;z=z.height;break;case tu:for(C=0;Cn&&(aawb&&(Nu(a,-wb,0,la,za-1),Ou(C,-wb,0),Ou(D,-wb,0),wb=0)}Ma.V.h(wb,Y);y=Math.max(y,J);z=Math.max(z,B+(0===W?0:q)+sb.height);aa=J}else{0n&&(Ywb&&(Nu(a,0,-wb,la,za-1),Ou(C,0,-wb),Ou(D,0,-wb),wb=0);Ma.V.h(aa,wb);z=Math.max(z,U);y=Math.max(y,B+(0===W?0:q)+sb.width);Y=U}P++}0e?Hu(a,g,fa,y,z):Iu(a,g,fa,y,z);fa=z.x;y=z.width;z=z.height;break;case tu:for(C=0;Cn&&(aawb&&(Nu(a,-wb,0,la,za-1),Ou(C,-wb,0),Ou(D,-wb,0),wb=0)}Ma.V.h(wb,Y);y=Math.max(y,J);z=Math.max(z,B+(0===W?0:q)+sb.height);aa=J}else{0n&&(Ywb&&(Nu(a,0,-wb,la,za-1),Ou(C,0,-wb),Ou(D,0,-wb),wb=0);Ma.V.h(aa,wb);z=Math.max(z,U);y=Math.max(y,B+(0===W?0:q)+sb.width);Y=U}Q++}0l&&(l=0),135u&&(u=0),k===uu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>y&&(y=Tu(k,d-y,0),g=y.x,h=y.y,y=d,l=0):y=Ru(a,y,l),0>l&&(g-=l,l=0),135z&&(z=Tu(k,0,x-z),g=z.x,h=z.y,z=x,u=0):z=Su(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),W[0].h(0,u+x),W[1].h(d,W[0].y),W[2].xd?Hu(b,e,P,B,C):Iu(b,e,P,B,C);P=C.x;B=C.width;C=C.height;break;case tu:for(a=0;ad?Hu(b,e,Q,B,C):Iu(b,e,Q,B,C);Q=C.x;B=C.width;C=C.height;break;case tu:for(a=0;ap&&(Jp&&(Un&&(n=0),135y&&(y=0));b.qa.h(n,y);b.Ia.h(B,C)}} function Hu(a,b,c,d,e){G&&w(a,Xt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new M(c,0,d,e);if(1===f)return a=b[0],d=a.Ia.width,e=a.Ia.height,new M(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Au(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), @@ -2314,7 +2316,7 @@ function Uu(a,b){var c=b.length,d=a.ju[c];void 0===d&&(d=[],a.ju[c]=d);d.push(b) Z.prototype.arrangeTrees=function(){if(this.Tb===Yt)for(var a=this.Wb.iterator;a.next();){var b=a.value;if(b instanceof Xt){var c=b.node;if(null!==c){var d=c.position;c=d.x;d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);Yu(this,b,c,d)}}}else{a=[];for(b=this.Wb.iterator;b.next();)c=b.value,c instanceof Xt&&a.push(c);switch(this.sorting){case nu:break;case ou:a.reverse();break;case pu:a.sort(this.comparer);break;case qu:a.sort(this.comparer);a.reverse();break;default:v("Unhandled sorting value "+this.sorting.toString())}c= this.arrangementOrigin;b=c.x;c=c.y;for(d=0;d=a&&(this.Z.nodeIndentPastParent=a,this.F()))}},nodeSpacing:{configurable:!0,get:function(){return this.Z.nodeSpacing},set:function(a){this.Z.nodeSpacing!==a&&(A(a,"number",Z,"nodeSpacing"),this.Z.nodeSpacing=a,this.F())}},layerSpacing:{configurable:!0,get:function(){return this.Z.layerSpacing},set:function(a){this.Z.layerSpacing!==a&&(A(a,"number",Z,"layerSpacing"),this.Z.layerSpacing=a,this.F())}},layerSpacingParentOverlap:{configurable:!0, @@ -2333,47 +2335,47 @@ enumerable:!0,get:function(){return this.Z.layerSpacingParentOverlap},set:functi set:function(a){this.Z.breadthLimit!==a&&(A(a,"number",Z,"breadthLimit"),0<=a&&(this.Z.breadthLimit=a,this.F()))}},rowSpacing:{configurable:!0,get:function(){return this.Z.rowSpacing},set:function(a){this.Z.rowSpacing!==a&&(A(a,"number",Z,"rowSpacing"),this.Z.rowSpacing=a,this.F())}},rowIndent:{configurable:!0,get:function(){return this.Z.rowIndent},set:function(a){this.Z.rowIndent!==a&&(A(a,"number",Z,"rowIndent"),0<=a&&(this.Z.rowIndent=a,this.F()))}},commentSpacing:{configurable:!0, enumerable:!0,get:function(){return this.Z.commentSpacing},set:function(a){this.Z.commentSpacing!==a&&(A(a,"number",Z,"commentSpacing"),this.Z.commentSpacing=a,this.F())}},commentMargin:{configurable:!0,get:function(){return this.Z.commentMargin},set:function(a){this.Z.commentMargin!==a&&(A(a,"number",Z,"commentMargin"),this.Z.commentMargin=a,this.F())}},setsPortSpot:{configurable:!0,get:function(){return this.Z.setsPortSpot},set:function(a){this.Z.setsPortSpot!==a&&(A(a, "boolean",Z,"setsPortSpot"),this.Z.setsPortSpot=a,this.F())}},portSpot:{configurable:!0,get:function(){return this.Z.portSpot},set:function(a){w(a,Ib,Z,"portSpot");this.Z.portSpot.D(a)||(this.Z.portSpot=a,this.F())}},setsChildPortSpot:{configurable:!0,get:function(){return this.Z.setsChildPortSpot},set:function(a){this.Z.setsChildPortSpot!==a&&(A(a,"boolean",Z,"setsChildPortSpot"),this.Z.setsChildPortSpot=a,this.F())}},childPortSpot:{configurable:!0,get:function(){return this.Z.childPortSpot}, -set:function(a){w(a,Ib,Z,"childPortSpot");this.Z.childPortSpot.D(a)||(this.Z.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.$.sorting},set:function(a){this.$.sorting!==a&&(ab(a,Z,Z,"alternateSorting"),a===nu||a===ou||a===pu||qu)&&(this.$.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.$.comparer},set:function(a){this.$.comparer!==a&&(A(a,"function",Z,"alternateComparer"),this.$.comparer=a,this.F())}}, -alternateAngle:{configurable:!0,get:function(){return this.$.angle},set:function(a){this.$.angle!==a&&(A(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.$.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.$.alignment},set:function(a){this.$.alignment!==a&&(ab(a,Z,Z,"alternateAlignment"),this.$.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.$.nodeIndent},set:function(a){this.$.nodeIndent!== -a&&(A(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.$.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.$.nodeIndentPastParent},set:function(a){this.$.nodeIndentPastParent!==a&&(A(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.$.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.$.nodeSpacing},set:function(a){this.$.nodeSpacing!==a&&(A(a,"number",Z,"alternateNodeSpacing"), -this.$.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.$.layerSpacing},set:function(a){this.$.layerSpacing!==a&&(A(a,"number",Z,"alternateLayerSpacing"),this.$.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap= -a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&(ab(a,Z,Z,"alternateCompaction"),a===xu||a===zu)&&(this.$.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit},set:function(a){this.$.breadthLimit!==a&&(A(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.$.breadthLimit=a,this.F()))}},alternateRowSpacing:{configurable:!0,get:function(){return this.$.rowSpacing}, -set:function(a){this.$.rowSpacing!==a&&(A(a,"number",Z,"alternateRowSpacing"),this.$.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.$.rowIndent},set:function(a){this.$.rowIndent!==a&&(A(a,"number",Z,"alternateRowIndent"),0<=a&&(this.$.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.$.commentSpacing},set:function(a){this.$.commentSpacing!==a&&(A(a,"number",Z,"alternateCommentSpacing"), -this.$.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.$.commentMargin},set:function(a){this.$.commentMargin!==a&&(A(a,"number",Z,"alternateCommentMargin"),this.$.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.$.setsPortSpot},set:function(a){this.$.setsPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsPortSpot"),this.$.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0, -enumerable:!0,get:function(){return this.$.portSpot},set:function(a){w(a,Ib,Z,"alternatePortSpot");this.$.portSpot.D(a)||(this.$.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.$.setsChildPortSpot},set:function(a){this.$.setsChildPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsChildPortSpot"),this.$.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0,get:function(){return this.$.childPortSpot},set:function(a){w(a, -Ib,Z,"alternateChildPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}}}); +set:function(a){w(a,Ib,Z,"childPortSpot");this.Z.childPortSpot.D(a)||(this.Z.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&(ab(a,Z,Z,"alternateSorting"),a===nu||a===ou||a===pu||qu)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(A(a,"function",Z,"alternateComparer"),this.aa.comparer= +a,this.F())}},alternateAngle:{configurable:!0,get:function(){return this.aa.angle},set:function(a){this.aa.angle!==a&&(A(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.aa.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.aa.alignment},set:function(a){this.aa.alignment!==a&&(ab(a,Z,Z,"alternateAlignment"),this.aa.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.aa.nodeIndent}, +set:function(a){this.aa.nodeIndent!==a&&(A(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.aa.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.aa.nodeIndentPastParent},set:function(a){this.aa.nodeIndentPastParent!==a&&(A(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.aa.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.aa.nodeSpacing},set:function(a){this.aa.nodeSpacing!== +a&&(A(a,"number",Z,"alternateNodeSpacing"),this.aa.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.aa.layerSpacing},set:function(a){this.aa.layerSpacing!==a&&(A(a,"number",Z,"alternateLayerSpacing"),this.aa.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.aa.layerSpacingParentOverlap},set:function(a){this.aa.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"alternateLayerSpacingParentOverlap"), +0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&(ab(a,Z,Z,"alternateCompaction"),a===xu||a===zu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(A(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, +alternateRowSpacing:{configurable:!0,get:function(){return this.aa.rowSpacing},set:function(a){this.aa.rowSpacing!==a&&(A(a,"number",Z,"alternateRowSpacing"),this.aa.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.aa.rowIndent},set:function(a){this.aa.rowIndent!==a&&(A(a,"number",Z,"alternateRowIndent"),0<=a&&(this.aa.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.aa.commentSpacing}, +set:function(a){this.aa.commentSpacing!==a&&(A(a,"number",Z,"alternateCommentSpacing"),this.aa.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.aa.commentMargin},set:function(a){this.aa.commentMargin!==a&&(A(a,"number",Z,"alternateCommentMargin"),this.aa.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.aa.setsPortSpot},set:function(a){this.aa.setsPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsPortSpot"), +this.aa.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0,get:function(){return this.aa.portSpot},set:function(a){w(a,Ib,Z,"alternatePortSpot");this.aa.portSpot.D(a)||(this.aa.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.aa.setsChildPortSpot},set:function(a){this.aa.setsChildPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsChildPortSpot"),this.aa.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0, +enumerable:!0,get:function(){return this.aa.childPortSpot},set:function(a){w(a,Ib,Z,"alternateChildPortSpot");this.aa.childPortSpot.D(a)||(this.aa.childPortSpot=a,this.F())}}}); var Rt=new F(Z,"PathDefault",-1),St=new F(Z,"PathDestination",0),Zt=new F(Z,"PathSource",1),nu=new F(Z,"SortingForwards",10),ou=new F(Z,"SortingReverse",11),pu=new F(Z,"SortingAscending",12),qu=new F(Z,"SortingDescending",13),Pu=new F(Z,"AlignmentCenterSubtrees",20),Qu=new F(Z,"AlignmentCenterChildren",21),Bu=new F(Z,"AlignmentStart",22),Cu=new F(Z,"AlignmentEnd",23),su=new F(Z,"AlignmentBus",24),iu=new F(Z,"AlignmentBusBranching",25),tu=new F(Z,"AlignmentTopLeftBus",26),uu=new F(Z,"AlignmentBottomRightBus", 27),xu=new F(Z,"CompactionNone",30),zu=new F(Z,"CompactionBlock",31),Tt=new F(Z,"StyleLayered",40),mu=new F(Z,"StyleLastParents",41),lu=new F(Z,"StyleAlternating",42),ku=new F(Z,"StyleRootOnly",43),Vt=new F(Z,"ArrangementVertical",50),Zu=new F(Z,"ArrangementHorizontal",51),Yt=new F(Z,"ArrangementFixedRoots",52),Ut=new F(Z,"LayerIndividual",60),gu=new F(Z,"LayerSiblings",61),fu=new F(Z,"LayerUniform",62);Z.className="TreeLayout";Z.PathDefault=Rt;Z.PathDestination=St;Z.PathSource=Zt; Z.SortingForwards=nu;Z.SortingReverse=ou;Z.SortingAscending=pu;Z.SortingDescending=qu;Z.AlignmentCenterSubtrees=Pu;Z.AlignmentCenterChildren=Qu;Z.AlignmentStart=Bu;Z.AlignmentEnd=Cu;Z.AlignmentBus=su;Z.AlignmentBusBranching=iu;Z.AlignmentTopLeftBus=tu;Z.AlignmentBottomRightBus=uu;Z.CompactionNone=xu;Z.CompactionBlock=zu;Z.StyleLayered=Tt;Z.StyleLastParents=mu;Z.StyleAlternating=lu;Z.StyleRootOnly=ku;Z.ArrangementVertical=Vt;Z.ArrangementHorizontal=Zu;Z.ArrangementFixedRoots=Yt;Z.LayerIndividual=Ut; Z.LayerSiblings=gu;Z.LayerUniform=fu;function Wt(a){vq.call(this,a)}na(Wt,vq);Wt.prototype.createVertex=function(){return new Xt(this)};Wt.prototype.createEdge=function(){return new av(this)};Wt.className="TreeNetwork"; -function Xt(a){Jq.call(this,a);this.aa=!1;this.jb=null;this.v=[];this.ob=this.Ma=this.G=this.ma=0;this.ud=null;this.V=new K(0,0);this.Ia=new Hb(0,0);this.qa=new K(0,0);this.dm=this.cm=this.pA=!1;this.$o=this.Oo=null;this.md=nu;this.ed=Qq;this.Lb=0;this.Kb=Qu;this.Hq=this.Gq=0;this.Iq=20;this.ge=50;this.nq=0;this.yp=zu;this.qp=0;this.Zq=25;this.xp=this.Yq=10;this.wp=20;this.gr=!0;this.Pq=hd;this.fr=!0;this.tp=hd}na(Xt,Jq); -Xt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.md=a.sorting,this.ed=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Gq=a.nodeIndent,this.Hq=a.nodeIndentPastParent,this.Iq=a.nodeSpacing,this.ge=a.layerSpacing,this.nq=a.layerSpacingParentOverlap,this.yp=a.compaction,this.qp=a.breadthLimit,this.Zq=a.rowSpacing,this.Yq=a.rowIndent,this.xp=a.commentSpacing,this.wp=a.commentMargin,this.gr=a.setsPortSpot,this.Pq=a.portSpot,this.fr=a.setsChildPortSpot,this.tp=a.childPortSpot)}; -oa.Object.defineProperties(Xt.prototype,{initialized:{configurable:!0,get:function(){return this.aa},set:function(a){this.aa!==a&&(A(a,"boolean",Xt,"initialized"),this.aa=a)}},parent:{configurable:!0,get:function(){return this.jb},set:function(a){this.jb!==a&&(G&&null!==a&&w(a,Xt,Xt,"parent"),this.jb=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",Xt,"children:value");if(null!== +function Xt(a){Jq.call(this,a);this.$=!1;this.jb=null;this.v=[];this.ob=this.Ma=this.G=this.ma=0;this.ud=null;this.V=new K(0,0);this.Ia=new Hb(0,0);this.qa=new K(0,0);this.dm=this.cm=this.pA=!1;this.$o=this.Oo=null;this.md=nu;this.ed=Qq;this.Lb=0;this.Kb=Qu;this.Hq=this.Gq=0;this.Iq=20;this.he=50;this.nq=0;this.yp=zu;this.qp=0;this.Zq=25;this.xp=this.Yq=10;this.wp=20;this.gr=!0;this.Pq=hd;this.fr=!0;this.tp=hd}na(Xt,Jq); +Xt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.md=a.sorting,this.ed=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Gq=a.nodeIndent,this.Hq=a.nodeIndentPastParent,this.Iq=a.nodeSpacing,this.he=a.layerSpacing,this.nq=a.layerSpacingParentOverlap,this.yp=a.compaction,this.qp=a.breadthLimit,this.Zq=a.rowSpacing,this.Yq=a.rowIndent,this.xp=a.commentSpacing,this.wp=a.commentMargin,this.gr=a.setsPortSpot,this.Pq=a.portSpot,this.fr=a.setsChildPortSpot,this.tp=a.childPortSpot)}; +oa.Object.defineProperties(Xt.prototype,{initialized:{configurable:!0,get:function(){return this.$},set:function(a){this.$!==a&&(A(a,"boolean",Xt,"initialized"),this.$=a)}},parent:{configurable:!0,get:function(){return this.jb},set:function(a){this.jb!==a&&(G&&null!==a&&w(a,Xt,Xt,"parent"),this.jb=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",Xt,"children:value");if(null!== a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Gu(c))))):c.alignment===Bu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Gu(c))))):c.alignment===Bu?(e=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Gu(c))))):c.alignment===Bu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Gu(c))))):c.alignment===Bu?(e=d.left+b.x,0===b.x&&m.x * Definitions: https://github.com/NorthwoodsSoftware/GoJS @@ -1674,6 +1674,14 @@ export class Size { * are equal with a tolerance of 0.5, false otherwise. */ equalsApprox(s: Size): boolean; + /** + * Modify this Size so that its width and height are changed by the given distances. + * When the arguments are negative, this operation deflates this Size, but not beyond zero. + * @param {number} w The additional width, which must be a real number; may be negative. + * @param {number} h The additional height, which must be a real number; may be negative. + * @return {Rect} this. + */ + inflate(w: number, h: number): Size; /** * Gets or sets the width value of the Size. * The value must not be negative. @@ -5853,6 +5861,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is allowed and will result in a copy. * This defaults to 'copy'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get copyCursor(): string; @@ -5860,6 +5869,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is allowed and will result in a move. * This defaults to the empty string, which refers to the Diagram#defaultCursor. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get moveCursor(): string; @@ -5867,6 +5877,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is not allowed. * This defaults to 'no-drop'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get nodropCursor(): string; @@ -6190,6 +6201,7 @@ export abstract class LinkingBaseTool extends Tool { /** * Gets or sets the cursor used during the linking or relinking operation. * This defaults to 'pointer'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get linkingCursor(): string; @@ -11485,8 +11497,8 @@ export class Diagram { * To read more about cursor syntax, go to: * CSS cursors (mozilla.org). * - * If the specified cursor is not accepted by the platform, GoJS will append - * `-webkit-` or `-moz-` prefixes. + * If the specified cursor is not accepted by the platform, this property setter will try prepending + * `-webkit-` and `-moz-` prefixes when assigning the "cursor" CSS style property. * * Setting this property does not notify about any changed event. * Setting this value to the empty string ('') returns the Diagram's cursor to the #defaultCursor. @@ -13626,6 +13638,8 @@ export class CommandHandler { * If this command had been called before without any other zooming since then, * the original Diagram scale and position are restored. * This is normally invoked by the `Shift-Z` keyboard shortcut. + * If you do not want the behavior where this command might restore the original diagram scale and position on a subsequent call, + * set #isZoomToFitRestoreEnabled to false. * * As of 2.1, this animates zooming by default. Diagram#zoomToFit does not animate. * @@ -13633,6 +13647,7 @@ export class CommandHandler { * Please read the Introduction page on Extensions for how to override methods and how to call this base method. * @expose * @see #canZoomToFit + * @see #isZoomToFitRestoreEnabled * @since 1.1 */ zoomToFit(): void; @@ -15476,6 +15491,8 @@ export abstract class GraphObject { * Other strings should be valid CSS strings that specify a cursor. * This provides some more information about cursor syntax: * CSS cursors (mozilla.org). + * + * Read more about cursors at Diagram#currentCursor * @see Diagram#defaultCursor * @see Diagram#currentCursor */ @@ -28394,6 +28411,7 @@ export class TreeLayout extends Layout { * * These values are in degrees, where 0 is along the positive X axis, * and where 90 is along the positive Y axis. + * * This sets the #rootDefaults' property of the same name. */ get angle(): number; @@ -28419,6 +28437,7 @@ export class TreeLayout extends Layout { * at the start of the row of children for some reason. * For example, if you want to pretend the parent node is infinitely deep, * you can set this to be the breadth of the parent node. + * * This sets the #rootDefaults' property of the same name. */ get nodeIndent(): number; @@ -28432,6 +28451,7 @@ export class TreeLayout extends Layout { * * This property is only sensible when the #alignment * is TreeLayout.AlignmentStart|AlignmentStart or TreeLayout.AlignmentEnd|AlignmentEnd. + * * This sets the #rootDefaults' property of the same name. */ get nodeIndentPastParent(): number; @@ -28439,9 +28459,12 @@ export class TreeLayout extends Layout { /** * Gets or sets the distance between child nodes. * + * This is the distance between sibling nodes. + * A negative value causes sibling nodes to overlap. * The default value is 20. * - * A negative value causes sibling nodes to overlap. + * The #layerSpacing property determines the distance between a parent node and the layer of its children. + * * This sets the #rootDefaults' property of the same name. */ get nodeSpacing(): number; @@ -28449,13 +28472,14 @@ export class TreeLayout extends Layout { /** * Gets or sets the distance between a parent node and its children. * + * This is the distance between a parent node and the layer of its children. + * Negative values may cause children to overlap with the parent. * The default value is 50. * - * This is the distance between a parent node and its first row - * of children, in case there are multiple rows of its children. + * The #nodeSpacing property determines the distance between siblings. * The #rowSpacing property determines the distance - * between rows of children. - * Negative values may cause children to overlap with the parent. + * between multiple rows or columns of children. + * * This sets the #rootDefaults' property of the same name. */ get layerSpacing(): number; @@ -28470,6 +28494,7 @@ export class TreeLayout extends Layout { * unless the value of #layerSpacing is large enough. * A value of zero might still allow overlap between layers, * if #layerSpacing is negative. + * * This sets the #rootDefaults' property of the same name. */ get layerSpacingParentOverlap(): number; @@ -28505,19 +28530,22 @@ export class TreeLayout extends Layout { * later rows, when the alignment is not a "center" alignment, the * #rowIndent property specifies that space at the * start of each row. + * * This sets the #rootDefaults' property of the same name. */ get breadthLimit(): number; set breadthLimit(value: number); /** - * Gets or sets the distance between rows of children. + * Gets or sets the distance between rows or columns of a parent node's immediate children. * * The default value is 25. * * This property is only used when there is more than one * row of children for a given parent node. - * #layerSpacing determines the distance between - * the parent node and its first row of child nodes. + * The #nodeSpacing property determines the distance between siblings. + * The #layerSpacing property determines the distance between + * the parent node and its first row or column of child nodes. + * * This sets the #rootDefaults' property of the same name. */ get rowSpacing(): number; @@ -28530,6 +28558,7 @@ export class TreeLayout extends Layout { * * This is used to leave room for the links that connect a parent node * with the child nodes that are in additional rows. + * * This sets the #rootDefaults' property of the same name. */ get rowIndent(): number; @@ -28540,6 +28569,7 @@ export class TreeLayout extends Layout { * The default value is 10. * * This is used by #addComments and #layoutComments. + * * This sets the #rootDefaults' property of the same name. */ get commentSpacing(): number; @@ -28550,6 +28580,7 @@ export class TreeLayout extends Layout { * The default value is 20. * * This is used by #addComments and #layoutComments. + * * This sets the #rootDefaults' property of the same name. */ get commentMargin(): number; @@ -28562,6 +28593,7 @@ export class TreeLayout extends Layout { * if the node has only a single port. * * The spot used depends on the value of #portSpot. + * * This sets the #rootDefaults' property of the same name. */ get setsPortSpot(): boolean; @@ -28576,6 +28608,7 @@ export class TreeLayout extends Layout { * If the value is other than NoSpot, it is just assigned. * When #path is TreeLayout.PathSource|PathSource, * the port's ToSpot is set instead of the FromSpot. + * * This sets the #rootDefaults' property of the same name. */ get portSpot(): Spot; @@ -28588,6 +28621,7 @@ export class TreeLayout extends Layout { * if the node has only a single port. * * The spot used depends on the value of #childPortSpot. + * * This sets the #rootDefaults' property of the same name. */ get setsChildPortSpot(): boolean; @@ -28602,6 +28636,7 @@ export class TreeLayout extends Layout { * If the value is other than NoSpot, it is just assigned. * When #path is TreeLayout.PathSource|PathSource, * the port's FromSpot is set instead of the ToSpot. + * * This sets the #rootDefaults' property of the same name. */ get childPortSpot(): Spot; @@ -28665,10 +28700,10 @@ export class TreeLayout extends Layout { get alternateNodeIndent(): number; set alternateNodeIndent(value: number); /** - * Gets or sets the fraction of this node's breadth is added to #nodeIndent + * Gets or sets the fraction of this node's breadth is added to #alternateNodeIndent * to determine any spacing at the start of the children. * - * The default value is 0.0 -- the only indentation is specified by #nodeIndent. + * The default value is 0.0 -- the only indentation is specified by #alternateNodeIndent. * When the value is 1.0, the children will be indented past the breadth of the parent node. * * This property is only sensible when the #alignment @@ -28693,7 +28728,8 @@ export class TreeLayout extends Layout { * * This is the distance between a parent node and its first row * of children, in case there are multiple rows of its children. - * The #rowSpacing property determines the distance + * The #alternateNodeSpacing property determines the distance between siblings. + * The #alternateRowSpacing property determines the distance * between rows of children. * Negative values may cause children to overlap with the parent. * This sets the #alternateDefaults' property of the same name. @@ -28703,13 +28739,13 @@ export class TreeLayout extends Layout { /** * Gets or sets the alternate fraction of the node's depth for which the children's layer starts overlapped with the parent's layer. * - * The default value is 0.0 -- there is overlap between layers only if #layerSpacing is negative. - * A value of 1.0 and a zero #layerSpacing will cause child nodes to completely overlap the parent. + * The default value is 0.0 -- there is overlap between layers only if #alternateLayerSpacing is negative. + * A value of 1.0 and a zero #alternateLayerSpacing will cause child nodes to completely overlap the parent. * * A value greater than zero may still cause overlap between layers, - * unless the value of #layerSpacing is large enough. + * unless the value of #alternateLayerSpacing is large enough. * A value of zero might still allow overlap between layers, - * if #layerSpacing is negative. + * if #alternateLayerSpacing is negative. * This sets the #alternateDefaults' property of the same name. */ get alternateLayerSpacingParentOverlap(): number; @@ -28740,10 +28776,10 @@ export class TreeLayout extends Layout { * does not modify the size or shape of any node, the nodes will * just be laid out in a line, one per row, and the breadth is * determined by the broadest node. - * The distance between rows is specified by #rowSpacing. + * The distance between rows is specified by #alternateRowSpacing. * To make room for the links that go around earlier rows to get to * later rows, when the alignment is not a "center" alignment, the - * #rowIndent property specifies that space at the + * #alternateRowIndent property specifies that space at the * start of each row. * This sets the #alternateDefaults' property of the same name. */ @@ -28756,7 +28792,7 @@ export class TreeLayout extends Layout { * * This property is only used when there is more than one * row of children for a given parent node. - * #layerSpacing determines the distance between + * The #alternateLayerSpacing property determines the distance between * the parent node and its first row of child nodes. * This sets the #alternateDefaults' property of the same name. */ @@ -28801,7 +28837,7 @@ export class TreeLayout extends Layout { * The default value is true -- this may modify the spot of the port of this node, the parent, * if the node has only a single port. * - * The spot used depends on the value of #portSpot. + * The spot used depends on the value of #alternatePortSpot. * This sets the #alternateDefaults' property of the same name. */ get alternateSetsPortSpot(): boolean; @@ -28827,7 +28863,7 @@ export class TreeLayout extends Layout { * The default value is true -- this may modify the spot of the ports of the children nodes, * if the node has only a single port. * - * The spot used depends on the value of #childPortSpot. + * The spot used depends on the value of #alternateChildPortSpot. * This sets the #alternateDefaults' property of the same name. */ get alternateSetsChildPortSpot(): boolean; diff --git a/release/go-module.js b/release/go-module.js index 03d8e7a96..9fe3779aa 100644 --- a/release/go-module.js +++ b/release/go-module.js @@ -1,36 +1,36 @@ /* - * GoJS v2.2.14 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.2.15 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2022 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.14/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.15/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function aa(a){var b=0;return function(){return bc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);cc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c=a.length?a.push(c):a.splice(b,0,c):C("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)}function Da(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):C("Cannot remove an object from an HTMLCollection or NodeList at "+b)} function Ea(){var a=Fa.pop();return void 0===a?[]:a}function Ga(a){a.length=0;Fa.push(a)}function Ha(a){if("function"===typeof a){if(a.className)return a.className;if(a.name)return a.name;var b=a.toString();b=b.substring(9,b.indexOf("(")).trim();if(""!==b)return a._className=b}else if(ya(a)&&a.constructor)return Ha(a.constructor);return typeof a} function Ia(a){var b=a;ya(a)&&(a.text?b=a.text:a.name?b=a.name:void 0!==a.key?b=a.key:void 0!==a.id?b=a.id:a.constructor===Object&&(a.Text?b=a.Text:a.Name?b=a.Name:void 0!==a.Key?b=a.Key:void 0!==a.Id?b=a.Id:void 0!==a.ID&&(b=a.ID)));return void 0===b?"undefined":null===b?"null":b.toString()}function Ja(a,b){if(a.hasOwnProperty(b))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(b))return!0;var c=a.lA;if(c&&c[b])return!0;a=Object.getPrototypeOf(a)}return!1} function Ka(a,b,c){Object.defineProperty(La.prototype,a,{get:b,set:c})} function Ma(a){for(var b=[],c=0;256>c;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gthis.key)return!1;a=a.s;var b=a.length,c=++this.Wa,d=this.bf;if(null!==d)for(;cthis.key)return!1;a=a.s;var b=a.length,c=++this.Wa,d=this.cf;if(null!==d)for(;cthis.key)return!1;var b=--this.Wa;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.Xd();return!1};bb.prototype.ud=function(){return this.next()}; bb.prototype.first=function(){var a=this.xb;this.na=a.Ia;var b=a.s;this.Wa=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};bb.prototype.any=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)if(a(b[c]))return!0;return!1};bb.prototype.all=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)if(!a(b[c]))return!1;return!0}; bb.prototype.each=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)a(b[c]);return this};bb.prototype.map=function(a){var b=this.xb;b.yg=null;var c=[];b=b.s;var d=b.length;this.Wa=d;for(--d;0<=d;d--)c.push(a(b[d]));a=new E;a.s=c;a.sb();return a.iterator};bb.prototype.filter=function(a){var b=this.xb;b.yg=null;var c=[];b=b.s;var d=b.length;this.Wa=d;for(--d;0<=d;d--){var e=b[d];a(e)&&c.push(e)}a=new E;a.s=c;a.sb();return a.iterator}; @@ -47,17 +47,17 @@ t.reverse=function(){this._isFrozen&&va(this);this.s.reverse();this.sb();return ma.Object.defineProperties(E.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new ab(this)}},iteratorBackwards:{ get:function(){if(0>=this.s.length)return Za;var a=this.yg;return null!==a?(a.reset(),a):new bb(this)}}});E.prototype.reverse=E.prototype.reverse;E.prototype.sortRange=E.prototype.ri;E.prototype.sort=E.prototype.sort;E.prototype.toSet=E.prototype.lv;E.prototype.toArray=E.prototype.Ea;E.prototype.removeRange=E.prototype.removeRange;E.prototype.removeAt=E.prototype.mb;E.prototype["delete"]=E.prototype.delete;E.prototype.remove=E.prototype.remove;E.prototype.insertAt=E.prototype.Cb; E.prototype.pop=E.prototype.pop;E.prototype.last=E.prototype.fc;E.prototype.first=E.prototype.first;E.prototype.set=E.prototype.set;E.prototype.setElt=E.prototype.Vc;E.prototype.get=E.prototype.get;E.prototype.elt=E.prototype.K;E.prototype.indexOf=E.prototype.indexOf;E.prototype.has=E.prototype.has;E.prototype.contains=E.prototype.contains;E.prototype.clear=E.prototype.clear;E.prototype.addAll=E.prototype.addAll;E.prototype.push=E.prototype.push;E.prototype.add=E.prototype.add;E.prototype.thaw=E.prototype.ja; -E.prototype.freeze=E.prototype.freeze;E.className="List";function fb(a){this.Wf=a;a.Pa=null;this.na=a.Ia;this.ra=null}fb.prototype.reset=function(){var a=this.Wf;a.Pa=null;this.na=a.Ia;this.ra=null};fb.prototype.next=function(){var a=this.Wf;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=b.value,this.key=b.key,!0;this.Xd();return!1};fb.prototype.ud=function(){return this.next()}; -fb.prototype.first=function(){var a=this.Wf;this.na=a.Ia;a=a.ea;if(null!==a){this.ra=a;var b=a.value;this.key=a.key;return this.value=b}return null};fb.prototype.any=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};fb.prototype.all=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};fb.prototype.each=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this}; -fb.prototype.map=function(a){var b=this.Wf;b.Pa=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator};fb.prototype.filter=function(a){var b=this.Wf;b.Pa=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};fb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.Wf.Pa=this};fb.prototype.toString=function(){return null!==this.ra?"SetIterator@"+this.ra.value:"SetIterator"}; -ma.Object.defineProperties(fb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Wf.Ob}}});fb.prototype.first=fb.prototype.first;fb.prototype.hasNext=fb.prototype.ud;fb.prototype.next=fb.prototype.next;fb.prototype.reset=fb.prototype.reset;fb.className="SetIterator"; -function G(a){Ra(this);this._isFrozen=!1;this.Pb={};this.Ob=0;this.Pa=null;this.Ia=0;this.Xe=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=G.prototype;t.sb=function(){var a=this.Ia;a++;999999999=this.Ob)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new fb(this)}}});G.prototype.toList=G.prototype.kv;G.prototype.toArray=G.prototype.Ea; G.prototype.clear=G.prototype.clear;G.prototype.retainAll=G.prototype.Wz;G.prototype.removeAll=G.prototype.Ko;G.prototype["delete"]=G.prototype.delete;G.prototype.remove=G.prototype.remove;G.prototype.first=G.prototype.first;G.prototype.containsAny=G.prototype.Ay;G.prototype.containsAll=G.prototype.zy;G.prototype.has=G.prototype.has;G.prototype.contains=G.prototype.contains;G.prototype.addAll=G.prototype.addAll;G.prototype.add=G.prototype.add;G.prototype.thaw=G.prototype.ja;G.prototype.freeze=G.prototype.freeze; var kb=1;G.className="Set";G.uniqueHash=Ra;G.hashIdUnique=gb;G.hashId=cb;function lb(a){this.la=a;this.na=a.Ia;this.ra=null}lb.prototype.reset=function(){this.na=this.la.Ia;this.ra=null};lb.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=this.key=a=b.key,!0;this.Xd();return!1};lb.prototype.ud=function(){return this.next()}; @@ -68,72 +68,72 @@ t.toString=function(){return"MapKeySet("+this.la.toString()+")"};t.add=function( mb.prototype.any=function(a){for(var b=this.la.ea;null!==b;){if(a(b.key))return!0;b=b.ta}return!1};mb.prototype.all=function(a){for(var b=this.la.ea;null!==b;){if(!a(b.key))return!1;b=b.ta}return!0};mb.prototype.each=function(a){for(var b=this.la.ea;null!==b;)a(b.key),b=b.ta;return this};mb.prototype.map=function(a){for(var b=new G,c=this.la.ea;null!==c;)b.add(a(c.key)),c=c.ta;return b};mb.prototype.filter=function(a){for(var b=new G,c=this.la.ea;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.ta}return b}; mb.prototype.copy=function(){return new mb(this.la)};mb.prototype.lv=function(){var a=new G,b=this.la.Pb,c;for(c in b)a.add(b[c].key);return a};mb.prototype.Ea=function(){var a=this.la.Pb,b=Array(this.la.Ob),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};mb.prototype.kv=function(){var a=new E,b=this.la.Pb,c;for(c in b)a.add(b[c].key);return a}; ma.Object.defineProperties(mb.prototype,{count:{get:function(){return this.la.Ob}},size:{get:function(){return this.la.Ob}},iterator:{get:function(){return 0>=this.la.Ob?Za:new lb(this.la)}}});mb.prototype.toList=mb.prototype.kv;mb.prototype.toArray=mb.prototype.Ea;mb.prototype.toSet=mb.prototype.lv;mb.prototype.first=mb.prototype.first;mb.prototype.clear=mb.prototype.clear;mb.prototype["delete"]=mb.prototype.delete; -mb.prototype.remove=mb.prototype.remove;mb.prototype.has=mb.prototype.has;mb.prototype.contains=mb.prototype.contains;mb.prototype.add=mb.prototype.add;mb.prototype.thaw=mb.prototype.ja;mb.prototype.freeze=mb.prototype.freeze;mb.className="MapKeySet";function nb(a){this.la=a;a.We=null;this.na=a.Ia;this.ra=null}nb.prototype.reset=function(){var a=this.la;a.We=null;this.na=a.Ia;this.ra=null}; +mb.prototype.remove=mb.prototype.remove;mb.prototype.has=mb.prototype.has;mb.prototype.contains=mb.prototype.contains;mb.prototype.add=mb.prototype.add;mb.prototype.thaw=mb.prototype.ja;mb.prototype.freeze=mb.prototype.freeze;mb.className="MapKeySet";function nb(a){this.la=a;a.Xe=null;this.na=a.Ia;this.ra=null}nb.prototype.reset=function(){var a=this.la;a.Xe=null;this.na=a.Ia;this.ra=null}; nb.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=b.value,this.key=b.key,!0;this.Xd();return!1};nb.prototype.ud=function(){return this.next()};nb.prototype.first=function(){var a=this.la;this.na=a.Ia;a=a.ea;if(null!==a){this.ra=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -nb.prototype.any=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};nb.prototype.all=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};nb.prototype.each=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this};nb.prototype.map=function(a){var b=this.la;this.ra=b.We=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator}; -nb.prototype.filter=function(a){var b=this.la;this.ra=b.We=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};nb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.We=this};nb.prototype.toString=function(){return null!==this.ra?"MapValueSetIterator@"+this.ra.value:"MapValueSetIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}}); +nb.prototype.any=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};nb.prototype.all=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};nb.prototype.each=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this};nb.prototype.map=function(a){var b=this.la;this.ra=b.Xe=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator}; +nb.prototype.filter=function(a){var b=this.la;this.ra=b.Xe=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};nb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.Xe=this};nb.prototype.toString=function(){return null!==this.ra?"MapValueSetIterator@"+this.ra.value:"MapValueSetIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}}); nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.ud;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset;nb.className="MapValueSetIterator";function jb(a,b){this.key=a;this.value=b;this.al=this.ta=null}jb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};jb.className="KeyValuePair";function ob(a){this.la=a;a.Pa=null;this.na=a.Ia;this.ra=null}ob.prototype.reset=function(){var a=this.la;a.Pa=null;this.na=a.Ia;this.ra=null}; ob.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.key=b.key,this.value=b.value,!0;this.Xd();return!1};ob.prototype.ud=function(){return this.next()};ob.prototype.first=function(){var a=this.la;this.na=a.Ia;a=a.ea;return null!==a?(this.ra=a,this.key=a.key,this.value=a.value,a):null};ob.prototype.any=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(a(b))return!0;b=b.ta}return!1}; ob.prototype.all=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(!a(b))return!1;b=b.ta}return!0};ob.prototype.each=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;)a(b),b=b.ta;return this};ob.prototype.map=function(a){var b=this.la;this.ra=b.Pa=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b)),b=b.ta;return c.iterator};ob.prototype.filter=function(a){var b=this.la;this.ra=b.Pa=null;var c=new E;for(b=b.ea;null!==b;)a(b)&&c.add(b),b=b.ta;return c.iterator}; ob.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.Pa=this};ob.prototype.toString=function(){return null!==this.ra?"MapIterator@"+this.ra:"MapIterator"};ma.Object.defineProperties(ob.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}});ob.prototype.first=ob.prototype.first;ob.prototype.hasNext=ob.prototype.ud;ob.prototype.next=ob.prototype.next;ob.prototype.reset=ob.prototype.reset; -ob.className="MapIterator";function pb(a){Ra(this);this._isFrozen=!1;this.Pb={};this.Ob=0;this.We=this.Pa=null;this.Ia=0;this.Xe=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=pb.prototype;t.sb=function(){var a=this.Ia;a++;999999999=this.count)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new ob(this)}},iteratorKeys:{get:function(){return 0>=this.count?Za:new lb(this)}},iteratorValues:{get:function(){if(0>=this.count)return Za; -var a=this.We;return null!==a?(a.reset(),a):new nb(this)}}});pb.prototype.toKeySet=pb.prototype.Bf;pb.prototype.toArray=pb.prototype.Ea;pb.prototype.clear=pb.prototype.clear;pb.prototype["delete"]=pb.prototype.delete;pb.prototype.remove=pb.prototype.remove;pb.prototype.get=pb.prototype.get;pb.prototype.getValue=pb.prototype.I;pb.prototype.has=pb.prototype.has;pb.prototype.contains=pb.prototype.contains;pb.prototype.first=pb.prototype.first;pb.prototype.addAll=pb.prototype.addAll; +var a=this.Xe;return null!==a?(a.reset(),a):new nb(this)}}});pb.prototype.toKeySet=pb.prototype.Cf;pb.prototype.toArray=pb.prototype.Ea;pb.prototype.clear=pb.prototype.clear;pb.prototype["delete"]=pb.prototype.delete;pb.prototype.remove=pb.prototype.remove;pb.prototype.get=pb.prototype.get;pb.prototype.getValue=pb.prototype.I;pb.prototype.has=pb.prototype.has;pb.prototype.contains=pb.prototype.contains;pb.prototype.first=pb.prototype.first;pb.prototype.addAll=pb.prototype.addAll; pb.prototype.set=pb.prototype.set;pb.prototype.add=pb.prototype.add;pb.prototype.thaw=pb.prototype.ja;pb.prototype.freeze=pb.prototype.freeze;pb.className="Map";function I(a,b){void 0===a?this.y=this.x=0:"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):C("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var qb,rb,sb,tb,ub;I.prototype.assign=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.h=function(a,b){this.x=a;this.y=b;return this}; -I.prototype.jg=function(a,b){this.x=a;this.y=b;return this};I.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.copy=function(){var a=new I;a.x=this.x;a.y=this.y;return a};t=I.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; +I.prototype.kg=function(a,b){this.x=a;this.y=b;return this};I.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.copy=function(){var a=new I;a.x=this.x;a.y=this.y;return a};t=I.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function vb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new I(c,e)}return new I}function wb(a){return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.C=function(a){return a instanceof I?this.x===a.x&&this.y===a.y:!1}; -t.bi=function(a,b){return this.x===a&&this.y===b};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)};t.add=function(a){this.x+=a.x;this.y+=a.y;return this};t.ie=function(a){this.x-=a.x;this.y-=a.y;return this};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; -I.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.x=a*b-d*c;this.y=d*b+a*c;return this};t=I.prototype;t.scale=function(a,b){this.x*=a;this.y*=b;return this};t.qf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};t.td=function(a,b){a-=this.x;b-=this.y;return a*a+b*b}; +t.bi=function(a,b){return this.x===a&&this.y===b};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)};t.add=function(a){this.x+=a.x;this.y+=a.y;return this};t.je=function(a){this.x-=a.x;this.y-=a.y;return this};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; +I.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.x=a*b-d*c;this.y=d*b+a*c;return this};t=I.prototype;t.scale=function(a,b){this.x*=a;this.y*=b;return this};t.rf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};t.td=function(a,b){a-=this.x;b-=this.y;return a*a+b*b}; t.normalize=function(){var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}t.yy=function(a,b){return J.sl(a.x,a.y,b.x,b.y,this.x,this.y)}; t.Mz=function(a,b,c,d){J.fh(a,b,c,d,this.x,this.y,this);return this};t.Nz=function(a,b){J.fh(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};t.aA=function(a,b,c,d){J.so(this.x,this.y,a,b,c,d,this);return this};t.bA=function(a,b){J.so(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};t.oi=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};t.pi=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this}; t.transform=function(a){a.Fa(this);return this};function yb(a,b){b.Ld(a);return a}function zb(a,b,c,d,e,f){var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k}function Ab(a,b,c,d){a=c-a;b=d-b;return a*a+b*b}function Bb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d} t.v=function(){return isFinite(this.x)&&isFinite(this.y)};I.alloc=function(){var a=Cb.pop();return void 0===a?new I:a};I.allocAt=function(a,b){var c=Cb.pop();if(void 0===c)return new I(a,b);c.x=a;c.y=b;return c};I.free=function(a){Cb.push(a)};I.prototype.isReal=I.prototype.v;I.prototype.setSpot=I.prototype.pi;I.prototype.setRectSpot=I.prototype.oi;I.prototype.snapToGridPoint=I.prototype.bA;I.prototype.snapToGrid=I.prototype.aA;I.prototype.projectOntoLineSegmentPoint=I.prototype.Nz; -I.prototype.projectOntoLineSegment=I.prototype.Mz;I.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return J.zl(a,b,c,d,e,f,g,h)};I.prototype.compareWithLineSegmentPoint=I.prototype.yy;I.compareWithLineSegment=function(a,b,c,d,e,f){return J.sl(a,b,c,d,e,f)};I.prototype.direction=I.prototype.direction;I.prototype.directionPoint=I.prototype.Ya;I.prototype.normalize=I.prototype.normalize;I.prototype.distanceSquared=I.prototype.td;I.prototype.distanceSquaredPoint=I.prototype.qf;I.prototype.scale=I.prototype.scale; -I.prototype.rotate=I.prototype.rotate;I.prototype.offset=I.prototype.offset;I.prototype.subtract=I.prototype.ie;I.prototype.add=I.prototype.add;I.prototype.equalsApprox=I.prototype.$a;I.prototype.equalTo=I.prototype.bi;I.prototype.equals=I.prototype.C;I.prototype.set=I.prototype.set;I.prototype.setTo=I.prototype.jg;var Cb=[];I.className="Point";I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb;I.Origin=qb=(new I(0,0)).ha(); +I.prototype.projectOntoLineSegment=I.prototype.Mz;I.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return J.zl(a,b,c,d,e,f,g,h)};I.prototype.compareWithLineSegmentPoint=I.prototype.yy;I.compareWithLineSegment=function(a,b,c,d,e,f){return J.sl(a,b,c,d,e,f)};I.prototype.direction=I.prototype.direction;I.prototype.directionPoint=I.prototype.Ya;I.prototype.normalize=I.prototype.normalize;I.prototype.distanceSquared=I.prototype.td;I.prototype.distanceSquaredPoint=I.prototype.rf;I.prototype.scale=I.prototype.scale; +I.prototype.rotate=I.prototype.rotate;I.prototype.offset=I.prototype.offset;I.prototype.subtract=I.prototype.je;I.prototype.add=I.prototype.add;I.prototype.equalsApprox=I.prototype.$a;I.prototype.equalTo=I.prototype.bi;I.prototype.equals=I.prototype.C;I.prototype.set=I.prototype.set;I.prototype.setTo=I.prototype.kg;var Cb=[];I.className="Point";I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb;I.Origin=qb=(new I(0,0)).ha(); I.InfiniteTopLeft=rb=(new I(-Infinity,-Infinity)).ha();I.InfiniteBottomRight=sb=(new I(Infinity,Infinity)).ha();I.SixPoint=tb=(new I(6,6)).ha();I.NoPoint=ub=(new I(NaN,NaN)).ha();I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb; -function K(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):C("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Db,Hb,Ib,Jb,Kb,Lb,Mb;K.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.h=function(a,b){this.width=a;this.height=b;return this};K.prototype.jg=function(a,b){this.width=a;this.height=b;return this}; +function K(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):C("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Db,Eb,Ib,Jb,Kb,Lb,Mb;K.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.h=function(a,b){this.width=a;this.height=b;return this};K.prototype.kg=function(a,b){this.width=a;this.height=b;return this}; K.prototype.set=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.copy=function(){var a=new K;a.width=this.width;a.height=this.height;return a};t=K.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; function Nb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new K(c,e)}return new K}function Ob(a){return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.C=function(a){return a instanceof K?this.width===a.width&&this.height===a.height:!1};t.bi=function(a,b){return this.width===a&&this.height===b}; -t.$a=function(a){return J.B(this.width,a.width)&&J.B(this.height,a.height)};t.v=function(){return isFinite(this.width)&&isFinite(this.height)};K.alloc=function(){var a=Pb.pop();return void 0===a?new K:a};K.free=function(a){Pb.push(a)};K.prototype.isReal=K.prototype.v;K.prototype.equalsApprox=K.prototype.$a;K.prototype.equalTo=K.prototype.bi;K.prototype.equals=K.prototype.C;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.jg;var Pb=[];K.className="Size";K.parse=Nb;K.stringify=Ob; -K.ZeroSize=Db=(new K(0,0)).ha();K.OneSize=Hb=(new K(1,1)).ha();K.SixSize=Ib=(new K(6,6)).ha();K.EightSize=Jb=(new K(8,8)).ha();K.TenSize=Kb=(new K(10,10)).ha();K.InfiniteSize=Lb=(new K(Infinity,Infinity)).ha();K.NoSize=Mb=(new K(NaN,NaN)).ha();K.parse=Nb;K.stringify=Ob; +t.$a=function(a){return J.B(this.width,a.width)&&J.B(this.height,a.height)};t.vc=function(a,b){a=this.width+a;this.width=0<=a?a:0;b=this.height+b;this.height=0<=b?b:0;return this};t.v=function(){return isFinite(this.width)&&isFinite(this.height)};K.alloc=function(){var a=Pb.pop();return void 0===a?new K:a};K.free=function(a){Pb.push(a)};K.prototype.isReal=K.prototype.v;K.prototype.inflate=K.prototype.vc;K.prototype.equalsApprox=K.prototype.$a;K.prototype.equalTo=K.prototype.bi; +K.prototype.equals=K.prototype.C;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.kg;var Pb=[];K.className="Size";K.parse=Nb;K.stringify=Ob;K.ZeroSize=Db=(new K(0,0)).ha();K.OneSize=Eb=(new K(1,1)).ha();K.SixSize=Ib=(new K(6,6)).ha();K.EightSize=Jb=(new K(8,8)).ha();K.TenSize=Kb=(new K(10,10)).ha();K.InfiniteSize=Lb=(new K(Infinity,Infinity)).ha();K.NoSize=Mb=(new K(NaN,NaN)).ha();K.parse=Nb;K.stringify=Ob; function M(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c,this.height=d):a instanceof I?(c=a.x,a=a.y,b instanceof I?(d=b.x,b=b.y,this.x=Math.min(c,d),this.y=Math.min(a,b),this.width=Math.abs(c-d),this.height=Math.abs(a-b)):b instanceof K?(this.x=c,this.y=a,this.width=b.width,this.height=b.height):C("Incorrect second argument supplied to Rect constructor "+ -b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Qb(a,b,c){a.width=b;a.height=c}t.jg=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; +b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Qb(a,b,c){a.width=b;a.height=c}t.kg=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; t.Wc=function(a){this.x=a.x;this.y=a.y;return this};t.$z=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.copy=function(){var a=new M;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};t=M.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function Rb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new M(c,e,f,g)}return new M} function Sb(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.C=function(a){return a instanceof M?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};t.bi=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)&&J.B(this.width,a.width)&&J.B(this.height,a.height)}; -function Vb(a,b){return J.ca(a.x,b.x)&&J.ca(a.y,b.y)&&J.ca(a.width,b.width)&&J.ca(a.height,b.height)}t.ba=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.De=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height}; -t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.Qc=function(a,b){return Wb(this,b,a,b,a)};t.fo=function(a){return Wb(this,a.top,a.right,a.bottom,a.left)};t.jv=function(a){return Wb(this,-a.top,-a.right,-a.bottom,-a.left)};t.oz=function(a,b,c,d){return Wb(this,a,b,c,d)};function Wb(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.hx=function(a){return Xb(this,a.x,a.y,a.width,a.height)}; +function Tb(a,b){return J.ca(a.x,b.x)&&J.ca(a.y,b.y)&&J.ca(a.width,b.width)&&J.ca(a.height,b.height)}t.ba=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Ee=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height}; +t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.vc=function(a,b){return Ub(this,b,a,b,a)};t.fo=function(a){return Ub(this,a.top,a.right,a.bottom,a.left)};t.jv=function(a){return Ub(this,-a.top,-a.right,-a.bottom,-a.left)};t.oz=function(a,b,c,d){return Ub(this,a,b,c,d)};function Ub(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.ix=function(a){return Xb(this,a.x,a.y,a.width,a.height)}; t.Gu=function(a,b,c,d){return Xb(this,a,b,c,d)};function Xb(a,b,c,d,e){var f=Math.max(a.x,b),g=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=g;a.width=Math.max(0,b-f);a.height=Math.max(0,c-g);return a}t.Sc=function(a){return this.Hu(a.x,a.y,a.width,a.height)}; -t.Hu=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function Yb(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Le=function(a){return Zb(this,a.x,a.y,0,0)};t.Xc=function(a){return Zb(this,a.x,a.y,a.width,a.height)}; +t.Hu=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function Yb(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Me=function(a){return Zb(this,a.x,a.y,0,0)};t.Xc=function(a){return Zb(this,a.x,a.y,a.width,a.height)}; t.nv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Zb(this,a,b,c,d)};function Zb(a,b,c,d,e){var f=Math.min(a.x,b),g=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=g;a.width=b-f;a.height=c-g;return a}t.pi=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};function $b(a,b,c,d,e,f,g,h){void 0===g&&(g=0);void 0===h&&(h=0);return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} function ac(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.v=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.vz=function(){return 0===this.width&&0===this.height};M.alloc=function(){var a=bc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=bc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){bc.push(a)}; ma.Object.defineProperties(M.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{ get:function(){return new I(this.x,this.y)},set:function(a){this.x=a.x;this.y=a.y}},size:{get:function(){return new K(this.width,this.height)},set:function(a){this.width=a.width;this.height=a.height}},center:{get:function(){return new I(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2}, -set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});M.prototype.isEmpty=M.prototype.vz;M.prototype.isReal=M.prototype.v;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return J.ix(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.pi;M.prototype.union=M.prototype.nv;M.prototype.unionRect=M.prototype.Xc;M.prototype.unionPoint=M.prototype.Le;M.prototype.intersects=M.prototype.Hu; -M.prototype.intersectsRect=M.prototype.Sc;M.prototype.intersect=M.prototype.Gu;M.prototype.intersectRect=M.prototype.hx;M.prototype.grow=M.prototype.oz;M.prototype.subtractMargin=M.prototype.jv;M.prototype.addMargin=M.prototype.fo;M.prototype.inflate=M.prototype.Qc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains;M.prototype.containsRect=M.prototype.De;M.prototype.containsPoint=M.prototype.ba;M.prototype.equalsApprox=M.prototype.$a;M.prototype.equalTo=M.prototype.bi; -M.prototype.equals=M.prototype.C;M.prototype.setSize=M.prototype.$z;M.prototype.setPoint=M.prototype.Wc;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.jg;var cc=null,dc=null,bc=[];M.className="Rect";M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac;M.ZeroRect=cc=(new M(0,0,0,0)).ha();M.NoRect=dc=(new M(NaN,NaN,NaN,NaN)).ha();M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac; -function ic(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}ic.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; -ic.prototype.jg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};ic.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};ic.prototype.copy=function(){var a=new ic;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=ic.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; +set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});M.prototype.isEmpty=M.prototype.vz;M.prototype.isReal=M.prototype.v;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return J.jx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.pi;M.prototype.union=M.prototype.nv;M.prototype.unionRect=M.prototype.Xc;M.prototype.unionPoint=M.prototype.Me;M.prototype.intersects=M.prototype.Hu; +M.prototype.intersectsRect=M.prototype.Sc;M.prototype.intersect=M.prototype.Gu;M.prototype.intersectRect=M.prototype.ix;M.prototype.grow=M.prototype.oz;M.prototype.subtractMargin=M.prototype.jv;M.prototype.addMargin=M.prototype.fo;M.prototype.inflate=M.prototype.vc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains;M.prototype.containsRect=M.prototype.Ee;M.prototype.containsPoint=M.prototype.ba;M.prototype.equalsApprox=M.prototype.$a;M.prototype.equalTo=M.prototype.bi; +M.prototype.equals=M.prototype.C;M.prototype.setSize=M.prototype.$z;M.prototype.setPoint=M.prototype.Wc;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.kg;var cc=null,dc=null,bc=[];M.className="Rect";M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac;M.ZeroRect=cc=(new M(0,0,0,0)).ha();M.NoRect=dc=(new M(NaN,NaN,NaN,NaN)).ha();M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac; +function ec(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}ec.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; +ec.prototype.kg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};ec.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};ec.prototype.copy=function(){var a=new ec;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=ec.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; -function jc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new ic;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new ic(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new ic(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new ic(c,e):new ic(c,e,f,g)}return new ic} -function kc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.C=function(a){return a instanceof ic?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.bi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.$a=function(a){return J.B(this.top,a.top)&&J.B(this.right,a.right)&&J.B(this.bottom,a.bottom)&&J.B(this.left,a.left)};t.v=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};ic.alloc=function(){var a=pc.pop();return void 0===a?new ic:a};ic.free=function(a){pc.push(a)};ic.prototype.isReal=ic.prototype.v;ic.prototype.equalsApprox=ic.prototype.$a;ic.prototype.equalTo=ic.prototype.bi;ic.prototype.equals=ic.prototype.C;ic.prototype.set=ic.prototype.set; -ic.prototype.setTo=ic.prototype.jg;var qc=null,rc=null,pc=[];ic.className="Margin";ic.parse=jc;ic.stringify=kc;ic.ZeroMargin=qc=(new ic(0,0,0,0)).ha();ic.TwoMargin=rc=(new ic(2,2,2,2)).ha();ic.parse=jc;ic.stringify=kc;function N(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1} -var sc,tc,uc,vc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,dd,ed,fd,gd,hd;N.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};N.prototype.jg=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};N.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; +function jc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new ec;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new ec(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new ec(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new ec(c,e):new ec(c,e,f,g)}return new ec} +function kc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.C=function(a){return a instanceof ec?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.bi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; +t.$a=function(a){return J.B(this.top,a.top)&&J.B(this.right,a.right)&&J.B(this.bottom,a.bottom)&&J.B(this.left,a.left)};t.v=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};ec.alloc=function(){var a=pc.pop();return void 0===a?new ec:a};ec.free=function(a){pc.push(a)};ec.prototype.isReal=ec.prototype.v;ec.prototype.equalsApprox=ec.prototype.$a;ec.prototype.equalTo=ec.prototype.bi;ec.prototype.equals=ec.prototype.C;ec.prototype.set=ec.prototype.set; +ec.prototype.setTo=ec.prototype.kg;var qc=null,rc=null,pc=[];ec.className="Margin";ec.parse=jc;ec.stringify=kc;ec.ZeroMargin=qc=(new ec(0,0,0,0)).ha();ec.TwoMargin=rc=(new ec(2,2,2,2)).ha();ec.parse=jc;ec.stringify=kc;function N(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1} +var sc,tc,uc,vc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,dd,ed,fd,gd,hd;N.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};N.prototype.kg=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};N.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; N.prototype.copy=function(){var a=new N;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};t=N.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function id(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} function jd(a){if("string"===typeof a){a=a.trim();if("None"===a)return sc;if("TopLeft"===a)return tc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return uc;if("TopRight"===a)return vc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return xc;if("Center"===a)return yc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return zc;if("BottomLeft"===a)return Ac;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Bc;if("BottomRight"===a)return Cc;if("TopSide"===a)return Dc;if("LeftSide"=== a)return Ec;if("RightSide"===a)return Gc;if("BottomSide"===a)return Hc;if("TopBottomSides"===a)return Ic;if("LeftRightSides"===a)return Jc;if("TopLeftSides"===a)return Kc;if("TopRightSides"===a)return Lc;if("BottomLeftSides"===a)return Mc;if("BottomRightSides"===a)return Nc;if("NotTopSide"===a)return Oc;if("NotLeftSide"===a)return Pc;if("NotRightSide"===a)return Qc;if("NotBottomSide"===a)return Uc;if("AllSides"===a)return Vc;if("Default"===a)return Wc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=J.yv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);J.yv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=J.yv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);J.yv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Br:function(a,b,c,d,e,f,g,h,k,l,m,n){if(J.Tb(a,b,g,h,n,c,d)&&J.Tb(a,b,g,h,n,e,f))return J.Tb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var w=(d+q)/2,v=(c+u)/2;return J.Br(a, -b,p,r,d,c,w,v,k,l,m,n)||J.Br(w,v,q,u,e,f,g,h,k,l,m,n)},ty:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},sy:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Bb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},ql:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))Zb(l,a,b,0,0),Zb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ -2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.ql(a,b,m,n,d,c,q,u,k,l);J.ql(q,u,p,r,e,f,g,h,k,l)}return l},Ce:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.Ce(a,b,m,n,d,c,q,u,k,l);J.Ce(q,u,p,r,e,f,g,h,k,l)}return l},Tu:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,e,f,l,c,d))return J.Tb(a, +b,p,r,d,c,w,v,k,l,m,n)||J.Br(w,v,q,u,e,f,g,h,k,l,m,n)},Gw:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},ty:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Bb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},ql:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))Zb(l,a,b,0,0),Zb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ +2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.ql(a,b,m,n,d,c,q,u,k,l);J.ql(q,u,p,r,e,f,g,h,k,l)}return l},De:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.De(a,b,m,n,d,c,q,u,k,l);J.De(q,u,p,r,e,f,g,h,k,l)}return l},Tu:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,e,f,l,c,d))return J.Tb(a, b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2;return J.Tu(a,b,m,n,p,r,g,h,k,l)||J.Tu(p,r,c,d,e,f,g,h,k,l)},yA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},Su:function(a,b,c,d,e,f,g,h){if(J.Tb(a,b,e,f,g,c,d))Zb(h,a,b,0,0),Zb(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;J.Su(a,b,k,l,m,n,g,h);J.Su(m,n,c,d,e,f,g,h)}return h},Go:function(a,b,c,d,e,f,g,h){if(J.Tb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;J.Go(a,b,k,l,m,n,g,h);J.Go(m,n,c,d,e,f,g,h)}return h},io:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(J.Tb(a,b,g,h,p,c,d)&&J.Tb(a,b,g,h,p,e,f)){if(!J.zl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+w)/2;c=(u+v)/2;w=(w+e)/ 2;v=(v+f)/2;var z=(d+w)/2,y=(c+v)/2,A=Infinity,B=!1,F=0,L=0;J.io(a,b,q,u,d,c,z,y,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+w)/2;c=(u+v)/2;w=(w+e)/2;v=(v+f)/2;var z=(d+w)/2,y=(c+v)/2;r+=J.jo(a,b,q,u,d,c,z,y,k,l,m,n,p);r+=J.jo(z,y,w,v,e,f,g,h,k,l,m,n,p)}return r},fh:function(a,b,c,d,e,f,g){if(J.ca(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(J.ca(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, -b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(J.ca(h,g))return J.fh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(J.ca(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return J.fh(a,b,c,d,e,g*(e-a)+b,k)},wA:function(a,b,c,d,e){return J.Ie(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},uA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},vf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(J.Ie(a,b,a, -d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},tA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, -h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},Rr:function(a,b,c){return J.ix(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},ix:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):$b(a,b,c,d,e,f)||$b(a,b,c,d,g,h)||J.zl(a,b,k,b,e,f,g,h)||J.zl(k,b,k,l,e,f,g,h)||J.zl(k,l,a,l,e,f,g,h)||J.zl(a,l,a,b,e,f,g,h)?!0:!1},zl:function(a,b,c,d,e,f,g,h){return 0>=J.sl(a,b,c,d,e,f)*J.sl(a,b,c,d,g,h)&&0>=J.sl(e,f,g,h,a,b)*J.sl(e, -f,g,h,c,d)},sl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Eo:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Lw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5a)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, +b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(J.ca(h,g))return J.fh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(J.ca(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return J.fh(a,b,c,d,e,g*(e-a)+b,k)},wA:function(a,b,c,d,e){return J.Je(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},uA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},wf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(J.Je(a,b,a, +d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},tA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, +h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},Rr:function(a,b,c){return J.jx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},jx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):$b(a,b,c,d,e,f)||$b(a,b,c,d,g,h)||J.zl(a,b,k,b,e,f,g,h)||J.zl(k,b,k,l,e,f,g,h)||J.zl(k,l,a,l,e,f,g,h)||J.zl(a,l,a,b,e,f,g,h)?!0:!1},zl:function(a,b,c,d,e,f,g,h){return 0>=J.sl(a,b,c,d,e,f)*J.sl(a,b,c,d,g,h)&&0>=J.sl(e,f,g,h,a,b)*J.sl(e, +f,g,h,c,d)},sl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Eo:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Mw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fc,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case O.u:var b=new M(this.startX,this.startY,0,0);b.nv(this.endX,this.endY,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 O.F:b=new M(this.startX,this.startY,0,0);b.nv(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.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 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case O.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=y.x+b,c=y.y+c);a.h(b,c)}function f(){e(y);return y}function g(){e(z);return z}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?y:new I(2*y.x-z.x,2*y.y-z.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2"); a=a.replace(k,"$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(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;ag&&(g+=360),q.startAngle+=g);0>a&&(q.startAngle=180-q.startAngle,q.sweepAngle=-q.sweepAngle); 0>d&&(q.startAngle=-q.startAngle,q.sweepAngle=-q.sweepAngle);q.radiusX*=Math.sqrt(a*a+c*c);void 0!==q.radiusY&&(q.radiusY*=Math.sqrt(b*b+d*d));break;case Qd:g=q.endX;h=q.endY;q.endX=g*a+h*c+e;q.endY=g*b+h*d+f;if(0===q.radiusX||0===q.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),q.xAxisRotation+=g);0>a&&(q.xAxisRotation=180-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);0>d&&(q.xAxisRotation=-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);q.radiusX*=Math.sqrt(a*a+c*c); q.radiusY*=Math.sqrt(b*b+d*d);break;default:C("Unknown Segment type: "+q.type)}}}}this._isInvalidBounds=!0;return this}; -t.ba=function(a,b){void 0===b&&(b=0);var c=this.gd,d=this.hd,e=this.wc,f=this.xc;switch(this.type){case O.j:return J.Tb(c,d,e,f,b,a.x,a.y);case O.u:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ba(a);M.free(g);return a;case O.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case O.o:return Td(this,a,b,!0,!1);default:return!1}}; +t.ba=function(a,b){void 0===b&&(b=0);var c=this.gd,d=this.hd,e=this.xc,f=this.yc;switch(this.type){case O.j:return J.Tb(c,d,e,f,b,a.x,a.y);case O.u:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ba(a);M.free(g);return a;case O.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case O.m:return Td(this,a,b,!0,!1);default:return!1}}; function Td(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; -t.Xw=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; +t.Yw=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Cu=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Math.abs(e-c)?0<=a-h?90:270:1>Math.abs(a-h)?0<=e-c?0:180:180*Math.atan2(a-h,e-c)/Math.PI,b;g+=m}}return b}; -t.Yw=function(a){if(this.type===O.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=I.alloc();J.fh(b,c,d,e,f,a,h);a=h.x;f=h.y;I.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===O.u){g=this.startX;h=this.startY;var k=this.endX; +t.Zw=function(a){if(this.type===O.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=I.alloc();J.fh(b,c,d,e,f,a,h);a=h.x;f=h.y;I.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===O.u){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=I.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Ae=a,this.Oh=0,this.Ph=Math.max(d,0),this.Gg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ae=d,this.Oh=e,a===Md&&(f=Math.max(f,0)),this.Ph=f,"number"===typeof g?(a=== -Md&&(g=Math.max(g,0)),this.Gg=g):this.Gg=0);this.Ud=null}Yd.prototype.copy=function(){var a=new Yd;a.qa=this.qa;a.m=this.m&-2;a.wc=this.wc;a.xc=this.xc;a.Ae=this.Ae;a.Oh=this.Oh;a.Ph=this.Ph;a.Gg=this.Gg;return a};t=Yd.prototype; +function Yd(a,b,c,d,e,f,g,h){Ra(this);void 0===a&&(a=vd);this.qa=a;this.o=2;void 0!==b?this.xc=b:this.xc=0;void 0!==c?this.yc=c:this.yc=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===Qd?(a=f%360,0>a&&(a+=360),this.Be=a,this.Oh=0,this.Ph=Math.max(d,0),this.Gg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Be=d,this.Oh=e,a===Md&&(f=Math.max(f,0)),this.Ph=f,"number"===typeof g?(a=== +Md&&(g=Math.max(g,0)),this.Gg=g):this.Gg=0);this.Ud=null}Yd.prototype.copy=function(){var a=new Yd;a.qa=this.qa;a.o=this.o&-2;a.xc=this.xc;a.yc=this.yc;a.Be=this.Be;a.Oh=this.Oh;a.Ph=this.Ph;a.Gg=this.Gg;return a};t=Yd.prototype; t.$a=function(a){if(!(a instanceof Yd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Jd:case vd:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY);case Kd:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.point1X,a.point1X)&&J.B(this.point1Y,a.point1Y)&&J.B(this.point2X,a.point2X)&&J.B(this.point2Y,a.point2Y);case Ld:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.point1X,a.point1X)&&J.B(this.point1Y,a.point1Y);case Md:return J.B(this.startAngle, a.startAngle)&&J.B(this.sweepAngle,a.sweepAngle)&&J.B(this.centerX,a.centerX)&&J.B(this.centerY,a.centerY)&&J.B(this.radiusX,a.radiusX)&&J.B(this.radiusY,a.radiusY);case Qd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&J.B(this.xAxisRotation,a.xAxisRotation)&&J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.radiusX,a.radiusX)&&J.B(this.radiusY,a.radiusY);default:return!1}};t.ob=function(a){a.classType===Yd&&(this.type=a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Jd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case vd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Kd:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ld:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Md:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Qd:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function Rd(a,b){if(null!==a.Ud&&!1===b._isInvalidBounds)return a.Ud;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Ud=[],a.Ud;b=a.Ae;var e=a.Oh,f=J.Lw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=J.Lw(0,0,b>f?b:f,m,m+g,!0);f=md.alloc();f.reset();f.translate(c,d);f.rotate(a.Ae,0,0);f.scale(k,r);O.Ga(b,f); +function Rd(a,b){if(null!==a.Ud&&!1===b._isInvalidBounds)return a.Ud;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Ud=[],a.Ud;b=a.Be;var e=a.Oh,f=J.Mw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=J.Mw(0,0,b>f?b:f,m,m+g,!0);f=md.alloc();f.reset();f.translate(c,d);f.rotate(a.Be,0,0);f.scale(k,r);O.Ga(b,f); md.free(f);a.Ud=b;return a.Ud} -ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.m&1)},set:function(a){this.m=a?this.m|1:this.m&-2}},_isInvalidBounds:{get:function(){return 0!==(this.m&2)},set:function(a){this.m=a?this.m|2:this.m&-3}},isClosed:{get:function(){return 0!==(this.m&8)},set:function(a){this.isClosed!==a&&(this.m=a?this.m|8:this.m&-9,this._isInvalidBounds=!0)}},type:{ -get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.wc},set:function(a){this._isFrozen&&va(this,a);this.wc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);this.xc=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ae},set:function(a){this._isFrozen&& -va(this,a);this.Ae=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Ph},set:function(a){this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Gg},set:function(a){this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},centerX:{ -get:function(){return this.Ae},set:function(a){this._isFrozen&&va(this,a);this.Ae=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Ph},set:function(a){0>a&&wa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Gg}, -set:function(a){0>a&&wa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.wc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.wc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.xc=a;this._isInvalidBounds=!0}},isClockwiseArc:{ -get:function(){return 0!==(this.m&4)},set:function(a){this._isFrozen&&va(this,a);this.m=a?this.m|4:this.m&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.m&16)},set:function(a){this._isFrozen&&va(this,a);this.m=a?this.m|16:this.m&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ae},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Ae=a;this._isInvalidBounds= +ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.o&1)},set:function(a){this.o=a?this.o|1:this.o&-2}},_isInvalidBounds:{get:function(){return 0!==(this.o&2)},set:function(a){this.o=a?this.o|2:this.o&-3}},isClosed:{get:function(){return 0!==(this.o&8)},set:function(a){this.isClosed!==a&&(this.o=a?this.o|8:this.o&-9,this._isInvalidBounds=!0)}},type:{ +get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);this.xc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.yc},set:function(a){this._isFrozen&&va(this,a);this.yc=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Be},set:function(a){this._isFrozen&& +va(this,a);this.Be=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Ph},set:function(a){this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Gg},set:function(a){this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},centerX:{ +get:function(){return this.Be},set:function(a){this._isFrozen&&va(this,a);this.Be=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Ph},set:function(a){0>a&&wa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Gg}, +set:function(a){0>a&&wa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.xc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.yc},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.yc=a;this._isInvalidBounds=!0}},isClockwiseArc:{ +get:function(){return 0!==(this.o&4)},set:function(a){this._isFrozen&&va(this,a);this.o=a?this.o|4:this.o&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.o&16)},set:function(a){this._isFrozen&&va(this,a);this.o=a?this.o|16:this.o&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Be},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Be=a;this._isInvalidBounds= !0}}});Yd.prototype.equalsApprox=Yd.prototype.$a;var Jd=new D(Yd,"Move",0),vd=new D(Yd,"Line",1),Kd=new D(Yd,"Bezier",2),Ld=new D(Yd,"QuadraticBezier",3),Md=new D(Yd,"Arc",4),Qd=new D(Yd,"SvgArc",4);Yd.className="PathSegment";Yd.Move=Jd;Yd.Line=vd;Yd.Bezier=Kd;Yd.QuadraticBezier=Ld;Yd.Arc=Md;Yd.SvgArc=Qd; -function $d(){this.H=null;this.cu=(new I(0,0)).freeze();this.Os=(new I(0,0)).freeze();this.ep=this.qq=0;this.fp=1;this.yh="";this.vr=this.xp=!1;this.vp=this.hp=0;this.ng=this.Pp=this.Vp=!1;this.Cp=null;this.qr=0;this.sd=this.lr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; -$d.prototype.clone=function(a){a.H=this.H;a.cu.assign(this.viewPoint);a.Os.assign(this.documentPoint);a.qq=this.qq;a.ep=this.ep;a.fp=this.fp;a.yh=this.yh;a.xp=this.xp;a.vr=this.vr;a.hp=this.hp;a.vp=this.vp;a.Vp=this.Vp;a.Pp=this.Pp;a.ng=this.ng;a.Cp=this.Cp;a.qr=this.qr;a.lr=this.lr;a.sd=this.sd;return a}; +function $d(){this.H=null;this.cu=(new I(0,0)).freeze();this.Os=(new I(0,0)).freeze();this.ep=this.qq=0;this.fp=1;this.yh="";this.vr=this.xp=!1;this.vp=this.hp=0;this.og=this.Pp=this.Vp=!1;this.Cp=null;this.qr=0;this.sd=this.lr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; +$d.prototype.clone=function(a){a.H=this.H;a.cu.assign(this.viewPoint);a.Os.assign(this.documentPoint);a.qq=this.qq;a.ep=this.ep;a.fp=this.fp;a.yh=this.yh;a.xp=this.xp;a.vr=this.vr;a.hp=this.hp;a.vp=this.vp;a.Vp=this.Vp;a.Pp=this.Pp;a.og=this.og;a.Cp=this.Cp;a.qr=this.qr;a.lr=this.lr;a.sd=this.sd;return a}; $d.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};$d.prototype.vo=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,this.event,a,b);return b}; $d.prototype.iz=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,this.event,a,b);b.assign(c.rs(b));return b}; ma.Object.defineProperties($d.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.cu},set:function(a){this.cu.assign(a)}},documentPoint:{get:function(){return this.Os},set:function(a){this.Os.assign(a)}},modifiers:{get:function(){return this.qq},set:function(a){this.qq=a}},button:{get:function(){return this.ep}, set:function(a){this.ep=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.fp},set:function(a){this.fp=a}},key:{get:function(){return this.yh},set:function(a){this.yh=a}},down:{get:function(){return this.xp},set:function(a){this.xp=a}},up:{get:function(){return this.vr},set:function(a){this.vr= -a}},clickCount:{get:function(){return this.hp},set:function(a){this.hp=a}},delta:{get:function(){return this.vp},set:function(a){this.vp=a}},isMultiTouch:{get:function(){return this.Vp},set:function(a){this.Vp=a}},handled:{get:function(){return this.Pp},set:function(a){this.Pp=a}},bubbles:{get:function(){return this.ng},set:function(a){this.ng=a}},event:{ +a}},clickCount:{get:function(){return this.hp},set:function(a){this.hp=a}},delta:{get:function(){return this.vp},set:function(a){this.vp=a}},isMultiTouch:{get:function(){return this.Vp},set:function(a){this.Vp=a}},handled:{get:function(){return this.Pp},set:function(a){this.Pp=a}},bubbles:{get:function(){return this.og},set:function(a){this.og=a}},event:{ get:function(){return this.Cp},set:function(a){this.Cp=a}},isTouchEvent:{get:function(){var a=x.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=x.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{get:function(){return this.qr},set:function(a){this.qr=a}},targetDiagram:{get:function(){return this.lr},set:function(a){this.lr=a}},targetObject:{ get:function(){return this.sd},set:function(a){this.sd=a}},control:{get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers| 2:this.modifiers&-3}},meta:{get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get: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},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get: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},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get: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},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}); $d.prototype.getMultiTouchDocumentPoint=$d.prototype.iz;$d.prototype.getMultiTouchViewPoint=$d.prototype.vo;$d.className="InputEvent";function be(){this.H=null;this.va="";this.zq=this.hr=null}be.prototype.copy=function(){var a=new be;a.H=this.H;a.va=this.va;a.hr=this.hr;a.zq=this.zq;return a};be.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; ma.Object.defineProperties(be.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.va},set:function(a){this.va=a}},subject:{get:function(){return this.hr},set:function(a){this.hr=a}},parameter:{get:function(){return this.zq},set:function(a){this.zq=a}}});be.className="DiagramEvent"; -function ce(){this.nm=de;this.cf=this.pq="";this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}ce.prototype.clear=function(){this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}; -ce.prototype.copy=function(){var a=new ce;a.nm=this.nm;a.pq=this.pq;a.cf=this.cf;a.ac=this.ac;a.H=this.H;a.xn=this.xn;var b=this.zn;a.zn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.yn;a.yn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.tn;a.tn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.sn;a.sn=ya(b)&&"function"===typeof b.J?b.J():b;return a};ce.prototype.ob=function(a){a.classType===ce&&(this.change=a)}; +function ce(){this.nm=de;this.df=this.pq="";this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}ce.prototype.clear=function(){this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}; +ce.prototype.copy=function(){var a=new ce;a.nm=this.nm;a.pq=this.pq;a.df=this.df;a.ac=this.ac;a.H=this.H;a.xn=this.xn;var b=this.zn;a.zn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.yn;a.yn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.tn;a.tn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.sn;a.sn=ya(b)&&"function"===typeof b.J?b.J():b;return a};ce.prototype.ob=function(a){a.classType===ce&&(this.change=a)}; ce.prototype.toString=function(){var a="";a=this.change===ee?a+"* ":this.change===de?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===ee?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ia(this.object)),null!==this.oldValue&&(a+=" old: "+Ia(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ia(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};ce.prototype.I=function(a){return a?this.oldValue:this.newValue};ce.prototype.kz=function(a){return a?this.oldParam:this.newParam};ce.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; ce.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};ce.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};ce.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -ma.Object.defineProperties(ce.prototype,{model:{get:function(){return this.ac},set:function(a){this.ac=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.nm},set:function(a){this.nm=a}},modelChange:{get:function(){return this.pq},set:function(a){this.pq=a}},propertyName:{get:function(){return this.cf}, -set:function(a){this.cf=a}},isTransactionFinished:{get:function(){return this.nm===ee&&("CommittedTransaction"===this.cf||"FinishedUndo"===this.cf||"FinishedRedo"===this.cf)}},object:{get:function(){return this.xn},set:function(a){this.xn=a}},oldValue:{get:function(){return this.zn},set:function(a){this.zn=a}},oldParam:{get:function(){return this.yn},set:function(a){this.yn=a}}, +ma.Object.defineProperties(ce.prototype,{model:{get:function(){return this.ac},set:function(a){this.ac=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.nm},set:function(a){this.nm=a}},modelChange:{get:function(){return this.pq},set:function(a){this.pq=a}},propertyName:{get:function(){return this.df}, +set:function(a){this.df=a}},isTransactionFinished:{get:function(){return this.nm===ee&&("CommittedTransaction"===this.df||"FinishedUndo"===this.df||"FinishedRedo"===this.df)}},object:{get:function(){return this.xn},set:function(a){this.xn=a}},oldValue:{get:function(){return this.zn},set:function(a){this.zn=a}},oldParam:{get:function(){return this.yn},set:function(a){this.yn=a}}, newValue:{get:function(){return this.tn},set:function(a){this.tn=a}},newParam:{get:function(){return this.sn},set:function(a){this.sn=a}}});ce.prototype.redo=ce.prototype.redo;ce.prototype.canRedo=ce.prototype.canRedo;ce.prototype.undo=ce.prototype.undo;ce.prototype.canUndo=ce.prototype.canUndo;ce.prototype.getParam=ce.prototype.kz;ce.prototype.getValue=ce.prototype.I;ce.prototype.clear=ce.prototype.clear; -var ee=new D(ce,"Transaction",-1),de=new D(ce,"Property",0),fe=new D(ce,"Insert",1),ge=new D(ce,"Remove",2);ce.className="ChangedEvent";ce.Transaction=ee;ce.Property=de;ce.Insert=fe;ce.Remove=ge;function he(){this.o=(new E).freeze();this.va="";this.j=!1}he.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.Vc(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.va},set:function(a){this.va=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.Vj;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; -he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.ut=new G;this.Ad=!1;this.u=(new E).freeze();this.re=-1;this.o=999;this.te=!1;this.qp=null;this.Vh=0;this.j=!1;this.we=(new E).freeze();this.Wk=new E;this.Ws=!0;this.ft=this.Tp=this.it=this.ht=!1} +ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.m}},name:{get:function(){return this.va},set:function(a){this.va=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.Vj;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; +he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.ut=new G;this.Ad=!1;this.u=(new E).freeze();this.se=-1;this.m=999;this.ue=!1;this.qp=null;this.Vh=0;this.j=!1;this.xe=(new E).freeze();this.Wk=new E;this.Ws=!0;this.ft=this.Tp=this.it=this.ht=!1} ie.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Kb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.K(d),null!==f&&f.clear(),b.mb(d),a.Tp=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.K(0),null!==f&&f.clear(),b.mb(0),a.re--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.re++);b.freeze()}a.isInternalTransaction||a.Kb("CommittedTransaction",c,e)}else{a.te=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| -a.Kb("RolledBackTransaction",c,e),a.te=!1}null!==e&&e.clear()}a.qp=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.K(e),null!==b&&b.undo(),c.ja(),c.mb(e);c.freeze()}return!1}ie.prototype.canUndo=function(){if(!this.isEnabled||0a.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Kb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.K(d),null!==f&&f.clear(),b.mb(d),a.Tp=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.K(0),null!==f&&f.clear(),b.mb(0),a.se--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.se++);b.freeze()}a.isInternalTransaction||a.Kb("CommittedTransaction",c,e)}else{a.ue=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| +a.Kb("RolledBackTransaction",c,e),a.ue=!1}null!==e&&e.clear()}a.qp=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.K(e),null!==b&&b.undo(),c.ja(),c.mb(e);c.freeze()}return!1}ie.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.Ws&&(a=a.diagram,null!==a&&!1===a.ji||xa("Change not within a transaction: "+c.toString()))}}; ie.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; ma.Object.defineProperties(ie.prototype,{models:{get:function(){return this.ut.iterator}},isEnabled:{get:function(){return this.Ad},set:function(a){this.Ad=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.K(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; ma.Object.defineProperties(ke.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.va},set:function(a){this.va=a}},isEnabled:{get:function(){return this.Ad},set:function(a){this.Ad=a}},isActive:{get:function(){return this.hb},set:function(a){this.hb=a}},transactionResult:{get:function(){return this.xi}, -set:function(a){this.xi=a}}});ke.prototype.startTransaction=ke.prototype.Da;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.cb=new E;this.nb=new E;this.Db=new E;this.F=this.Y=850;this.o=(new K(2,2)).ha();this.Ga=5E3;this.ga=te;this.u=ve;this.pp=this.j=null;this.uj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; +set:function(a){this.xi=a}}});ke.prototype.startTransaction=ke.prototype.Da;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.cb=new E;this.nb=new E;this.Db=new E;this.F=this.W=850;this.m=(new K(2,2)).ha();this.Ga=5E3;this.ga=te;this.u=ve;this.pp=this.j=null;this.uj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof ue&&this.pp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===we&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===xe){b.bubbles=!0;return}if(this.gestureBehavior===we)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Be;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=tf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=tf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.sx&&d.P("LinkRelinked",c,d.sx),c.toPort!==d.tx&&d.P("LinkRelinked",c,d.tx)):uf(e,g,f,k,h):uf(e,null,null,null,null)}}}}Be.prototype.doDragOver=function(){}; +function Ze(a,b,c){var d=!1,e=a.tg.length,f=0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ce;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=tf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=tf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.tx&&d.P("LinkRelinked",c,d.tx),c.toPort!==d.ux&&d.P("LinkRelinked",c,d.ux)):uf(e,g,f,k,h):uf(e,null,null,null,null)}}}}Be.prototype.doDragOver=function(){}; function vf(a,b){var c=a.diagram;a.dragsLink&&pf(a,!0);Ue(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;wf(a,e,f);f=sf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Ee){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Ee){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof V&&xf(c,d,a);M.free(a)}}}function wf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof qf||(c=a.mouseDrop,null!==c&&c(b))}function xf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.De(c)&&(d=!0);a=a.zu(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Md(b)&&c.isAvoiding&&c.ab()} +c.selection.iterator;b.next();)d=b.value,d instanceof V&&xf(c,d,a);M.free(a)}}}function wf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof qf||(c=a.mouseDrop,null!==c&&c(b))}function xf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Ee(c)&&(d=!0);a=a.zu(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Md(b)&&c.isAvoiding&&c.ab()} Be.prototype.doDropOnto=function(){};Be.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(bf(this,!1),He(a,this.copiedParts),df(this,this.copiedParts,!1),Ve(a,this.copiedParts)):this.mayMove()?(Xe(this),df(this,this.draggedParts,!0)):this.mayDragOut()?(bf(this,!1),df(this,this.copiedParts,!1)):Xe(this),ff(this,a.lastInput.documentPoint))}}; Be.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(Xe(this),bf(this,!0),He(a,this.copiedParts),df(this,this.copiedParts,!1),Ve(a,this.copiedParts),null!==this.copiedParts&&(a.P("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,Xe(this),this.mayMove()&&(df(this,this.draggedParts, -!0),ff(this,a.lastInput.documentPoint)));this.Gm=!0;vf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Bf():this.draggedParts.Bf();this.copiedParts=null;b&&yf(this);a.Va();Ve(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.P(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.P("ChangedSelection",a.selection)}}}; -Be.prototype.simulatedMouseMove=function(a,b,c){if(null===Ee)return!1;var d=Ee.diagram;c instanceof Q||(c=null);var e=Ie;c!==e&&(null!==e&&e!==d&&(e.kg(),Ee.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ie=c,null!==c&&c!==d&&($e(),e=c.toolManager.findTool("Dragging"),null!==e&&(De.contains(e)||De.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +!0),ff(this,a.lastInput.documentPoint)));this.Gm=!0;vf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Cf():this.draggedParts.Cf();this.copiedParts=null;b&&yf(this);a.Va();Ve(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.P(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.P("ChangedSelection",a.selection)}}}; +Be.prototype.simulatedMouseMove=function(a,b,c){if(null===Ee)return!1;var d=Ee.diagram;c instanceof Q||(c=null);var e=Ie;c!==e&&(null!==e&&e!==d&&(e.lg(),Ee.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ie=c,null!==c&&c!==d&&($e(),e=c.toolManager.findTool("Dragging"),null!==e&&(De.contains(e)||De.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;M.free(f); -f=a.br;g=new pb;h=I.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,cf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Fd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Za(),g.add(k,a.Fd(h))));I.free(h);a.copiedParts=g;Fe(a,g.Bf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,cf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ +f=a.br;g=new pb;h=I.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,cf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Fd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Za(),g.add(k,a.Fd(h))));I.free(h);a.copiedParts=g;Fe(a,g.Cf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,cf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ 2)));a.doUpdateCursor(null,!0)}}}Be.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.os=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.hn=null};Be.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new I}; ma.Object.defineProperties(Be.prototype,{isCopyEnabled:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ga},set:function(a){this.ga=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= a}},isComplexRoutingRealtime:{get:function(){return this.cb},set:function(a){this.cb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.C(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{ get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.C(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.C(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink= -a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Gc},set:function(a){this.Gc=a}},nodropCursor:{get:function(){return this.Hc},set:function(a){this.Hc=a}},currentPart:{get:function(){return this.Y}, -set:function(a){this.Y=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ga},set:function(a){this.Ga=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Bf():null!==this.draggedParts?this.draggedParts.Bf():this.ke}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= +a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Hc},set:function(a){this.Hc=a}},nodropCursor:{get:function(){return this.Ic},set:function(a){this.Ic=a}},currentPart:{get:function(){return this.W}, +set:function(a){this.W=a}},copiedParts:{get:function(){return this.m},set:function(a){this.m=a}},draggedParts:{get:function(){return this.Ga},set:function(a){this.Ga=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Cf():null!==this.draggedParts?this.draggedParts.Cf():this.le}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= a}},isDragOutStarted:{get:function(){return this.Db},set:function(a){this.Db=a}},startPoint:{get:function(){return this.br},set:function(a){this.br.C(a)||this.br.assign(a)}},delay:{get:function(){return this.wk},set:function(a){this.wk=a}}});Be.prototype.getDraggingSource=Be.prototype.hz;var Ee=null,Ie=null;Be.className="DraggingTool";De=new E; Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==Ee&&Ee.doCancel();ke.prototype.doCancel.call(this)}; -function Bf(){ke.call(this);this.ke=100;this.Ga=!1;this.u="pointer";var a=new T,b=new Cf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Cf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.vi=a;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Hb;a.add(b);a.selectable=!1;a.layerName="Tool";this.ui=a;this.j=b;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= -2;b.desiredSize=Hb;a.add(b);a.selectable=!1;a.layerName="Tool";this.wi=a;this.o=b;this.Hc=this.Gc=this.nb=this.cb=this.Db=null;this.ga=!0;this.Wo=new pb;this.Ef=this.bj=this.Ff=null}la(Bf,ke);Bf.prototype.doStop=function(){this.diagram.kg();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; -Bf.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.tf(),g=K.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;K.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=yc;f=I.alloc();c.location=b.ia(yc,f);I.free(f);d.angle=b.fi();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; -Bf.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Hb,b.fromSpot=sc,b.toSpot=sc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Bf.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; +function Bf(){ke.call(this);this.le=100;this.Ga=!1;this.u="pointer";var a=new T,b=new Cf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Cf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.vi=a;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Eb;a.add(b);a.selectable=!1;a.layerName="Tool";this.ui=a;this.j=b;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= +2;b.desiredSize=Eb;a.add(b);a.selectable=!1;a.layerName="Tool";this.wi=a;this.m=b;this.Ic=this.Hc=this.nb=this.cb=this.Db=null;this.ga=!0;this.Wo=new pb;this.Ff=this.bj=this.Gf=null}la(Bf,ke);Bf.prototype.doStop=function(){this.diagram.lg();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; +Bf.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.uf(),g=K.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;K.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=yc;f=I.alloc();c.location=b.ia(yc,f);I.free(f);d.angle=b.fi();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; +Bf.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Eb,b.fromSpot=sc,b.toSpot=sc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Bf.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; Bf.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;this.targetPort=this.findTargetPort(this.isForwards);if(null!==this.targetPort&&this.targetPort.part instanceof V){var b=this.targetPort.part;this.isForwards?this.copyPortProperties(b,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(b,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort, !0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.Fr(a.lastInput.viewPoint)}};Bf.prototype.findValidLinkablePort=function(a,b){if(null===a)return null;var c=a.part;if(!(c instanceof V))return null;for(;null!==a;){var d=b?a.toLinkable:a.fromLinkable;if(!0===d&&(null!==a.portId||a instanceof V)&&(b?this.isValidTo(c,a):this.isValidFrom(c,a)))return a;if(!1===d)break;a=a.panel}return null}; -Bf.prototype.findTargetPort=function(a){var b=this.diagram,c=b.lastInput.documentPoint,d=this.portGravity;0>=d&&(d=.1);var e=this,f=b.gg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.ia(yc,I.alloc()),l=c.x-k.x,m=c.y-k.y;I.free(k);k=l*l+m*m;k=d&&(d=.1);var e=this,f=b.hg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.ia(yc,I.alloc()),l=c.x-k.x,m=c.y-k.y;I.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.ro(b).count>=c)return!1}return!0}; Bf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Kd(b).count>=c)return!1}return!0}; @@ -385,11 +385,11 @@ function Df(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLab Bf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Ef){if(d===Ff){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Gf(this,a,b,c,!0)}if(d===Hf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== a)return!1;return!Gf(this,a,b,c,!0)}if(d===If)return a===b?a=!0:(d=new G,d.add(b),a=Jf(this,d,a,b,c)),!a;if(d===Kf)return!Gf(this,a,b,c,!1);if(d===Lf)return a===b?a=!0:(d=new G,d.add(b),a=Tf(this,d,a,b,c)),!a}return!0};function Gf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Gf(a,g,c,d,e)))return!0}return!1} function Jf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Jf(a,b,g,d,e)))return!0}return!1}function Tf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Tf(a,b,h,d,e))return!0}}return!1} -ma.Object.defineProperties(Bf.prototype,{portGravity:{get:function(){return this.ke},set:function(a){0<=a&&(this.ke=a)}},isUnconnectedLinkValid:{get:function(){return this.Ga},set:function(a){this.Ga=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.vi},set:function(a){this.vi=a}},temporaryFromNode:{ -get:function(){return this.ui},set:function(a){if(this.ui=a)this.j=a.port}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.R.indexOf(this.j);b.mb(c);b.Cb(c,a)}}this.j=a}},temporaryToNode:{get:function(){return this.wi},set:function(a){if(this.wi=a)this.o=a.port}},temporaryToPort:{get:function(){return this.o},set:function(a){if(null!== -this.o){var b=this.o.panel;if(null!==b){var c=b.R.indexOf(this.o);b.mb(c);b.Cb(c,a)}}this.o=a}},originalLink:{get:function(){return this.Db},set:function(a){this.Db=a}},originalFromNode:{get:function(){return this.cb},set:function(a){this.cb=a}},originalFromPort:{get:function(){return this.nb},set:function(a){this.nb=a}},originalToNode:{get:function(){return this.Gc},set:function(a){this.Gc= -a}},originalToPort:{get:function(){return this.Hc},set:function(a){this.Hc=a}},isForwards:{get:function(){return this.ga},set:function(a){this.ga=a}},validPortsCache:{get:function(){return this.Wo}},targetPort:{get:function(){return this.Ff},set:function(a){this.Ff=a}},linkValidation:{get:function(){return this.bj},set:function(a){this.bj=a}},portTargeted:{ -get:function(){return this.Ef},set:function(a){this.Ef=a}}});Bf.className="LinkingBaseTool";function Uf(){Bf.call(this);this.name="Linking";this.Y={};this.F=null;this.L=Vf;this.Qd=null}la(Uf,Bf);Uf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Vr()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; +ma.Object.defineProperties(Bf.prototype,{portGravity:{get:function(){return this.le},set:function(a){0<=a&&(this.le=a)}},isUnconnectedLinkValid:{get:function(){return this.Ga},set:function(a){this.Ga=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.vi},set:function(a){this.vi=a}},temporaryFromNode:{ +get:function(){return this.ui},set:function(a){if(this.ui=a)this.j=a.port}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.R.indexOf(this.j);b.mb(c);b.Cb(c,a)}}this.j=a}},temporaryToNode:{get:function(){return this.wi},set:function(a){if(this.wi=a)this.m=a.port}},temporaryToPort:{get:function(){return this.m},set:function(a){if(null!== +this.m){var b=this.m.panel;if(null!==b){var c=b.R.indexOf(this.m);b.mb(c);b.Cb(c,a)}}this.m=a}},originalLink:{get:function(){return this.Db},set:function(a){this.Db=a}},originalFromNode:{get:function(){return this.cb},set:function(a){this.cb=a}},originalFromPort:{get:function(){return this.nb},set:function(a){this.nb=a}},originalToNode:{get:function(){return this.Hc},set:function(a){this.Hc= +a}},originalToPort:{get:function(){return this.Ic},set:function(a){this.Ic=a}},isForwards:{get:function(){return this.ga},set:function(a){this.ga=a}},validPortsCache:{get:function(){return this.Wo}},targetPort:{get:function(){return this.Gf},set:function(a){this.Gf=a}},linkValidation:{get:function(){return this.bj},set:function(a){this.bj=a}},portTargeted:{ +get:function(){return this.Ff},set:function(a){this.Ff=a}}});Bf.className="LinkingBaseTool";function Uf(){Bf.call(this);this.name="Linking";this.W={};this.F=null;this.L=Vf;this.Qd=null}la(Uf,Bf);Uf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Vr()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; Uf.prototype.findLinkablePort=function(){var a=this.diagram,b=this.startObject;null===b&&(b=a.ec(a.firstInput.documentPoint,null,null));if(null===b)return null;a=b.part;if(!(a instanceof V))return null;var c=this.direction;if(c===Vf||c===Wf){var d=this.findValidLinkablePort(b,!1);if(null!==d||this.startObject===a&&(d=a.port,this.findValidLinkablePort(d,!1)))return this.isForwards=!0,d}if(c===Vf||c===Xf)if(b=this.findValidLinkablePort(b,!0),null!==b||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b, !0)))return this.isForwards=!1,b;return null}; Uf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.Da(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.v()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof V&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, @@ -400,11 +400,11 @@ Uf.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=this.tr (b=this.originalFromNode,c=this.originalFromPort):null!==this.originalToNode&&this.isUnconnectedLinkValid&&(d=this.originalToNode,e=this.originalToPort);null!==b||null!==d?(f=this.insertLink(b,c,d,e),null!==f?(null===g&&(this.isForwards?f.defaultToPoint=a.lastInput.documentPoint:f.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.P("ChangingSelection",a.selection),a.clearSelection(!0),f.isSelected=!0),this.transactionResult=this.name,a.P("LinkDrawn",f)):this.doNoLink(b,c,d,e)):this.isForwards? this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),f&&a.allowSelect&&a.P("ChangedSelection",a.selection)}}};Uf.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(null===a)return!0;if(a instanceof T)return a.isTreeLink;var b=this.diagram;if(null===b)return!0;a=b.partManager.getLinkCategoryForData(a);b=b.partManager.findLinkTemplateForCategory(a);return null!==b?b.isTreeLink:!0}; Uf.prototype.insertLink=function(a,b,c,d){return this.diagram.partManager.insertLink(a,b,c,d)};Uf.prototype.doNoLink=function(){}; -ma.Object.defineProperties(Uf.prototype,{archetypeLinkData:{get:function(){return this.Y},set:function(a){this.Y=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.L},set:function(a){this.L=a}},startObject:{get:function(){return this.Qd},set:function(a){this.Qd=a}}}); +ma.Object.defineProperties(Uf.prototype,{archetypeLinkData:{get:function(){return this.W},set:function(a){this.W=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.L},set:function(a){this.L=a}},startObject:{get:function(){return this.Qd},set:function(a){this.Qd=a}}}); var Vf=new D(Uf,"Either",0),Wf=new D(Uf,"ForwardsOnly",0),Xf=new D(Uf,"BackwardsOnly",0);Uf.className="LinkingTool";Uf.Either=Vf;Uf.ForwardsOnly=Wf;Uf.BackwardsOnly=Xf; -function Se(){Bf.call(this);this.name="Relinking";var a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.Y=a;a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Qd=a;this.F=null;this.iw=new M}la(Se,Bf); -Se.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.yf()&&(c=a.Hj(b),null===c&&(c=this.makeAdornment(d,!1),a.Tg(b,c)))}null===c&&a.zf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.yf()&& -(c=a.Hj(b),null===c?(c=this.makeAdornment(d,!0),a.Tg(b,c)):c.w()));null===c&&a.zf(b)}};Se.prototype.makeAdornment=function(a,b){var c=new ue;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +function Se(){Bf.call(this);this.name="Relinking";var a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.W=a;a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Qd=a;this.F=null;this.iw=new M}la(Se,Bf); +Se.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.zf()&&(c=a.Hj(b),null===c&&(c=this.makeAdornment(d,!1),a.Tg(b,c)))}null===c&&a.Af(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.zf()&& +(c=a.Hj(b),null===c?(c=this.makeAdornment(d,!0),a.Tg(b,c)):c.w()));null===c&&a.Af(b)}};Se.prototype.makeAdornment=function(a,b){var c=new ue;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; Se.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.Vr()||!a.lastInput.left)return!1;var b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"));return null!==b}; Se.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof ue&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Da(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; this.originalFromPort=this.originalLink.fromPort;this.originalFromNode=this.originalLink.fromNode;this.originalToPort=this.originalLink.toPort;this.originalToNode=this.originalLink.toNode;this.iw.set(this.originalLink.actualBounds);null!==this.originalLink&&0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": +hg.prototype.updateResizeHandles=function(a,b){if(null!==a)if(!a.alignment.Sb()&&("pointer"===a.cursor||0=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};hg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -hg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.vc(),this.Da(this.name),this.wq.set(this.adornedObject.ia(this.handle.alignment.Qu())),this.An.set(this.adornedObject.part.location),this.hw.set(this.adornedObject.desiredSize),this.Ss=this.computeCellSize(),this.Us= -this.computeMinSize(),this.Ts=this.computeMaxSize(),this.isActive=!0))};hg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.le=this.handle=null;this.isActive=a.isMouseCaptured=!1};hg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b}; +hg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.wc(),this.Da(this.name),this.wq.set(this.adornedObject.ia(this.handle.alignment.Qu())),this.An.set(this.adornedObject.part.location),this.hw.set(this.adornedObject.desiredSize),this.Ss=this.computeCellSize(),this.Us= +this.computeMinSize(),this.Ts=this.computeMaxSize(),this.isActive=!0))};hg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.me=this.handle=null;this.isActive=a.isMouseCaptured=!1};hg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b}; hg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};hg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Us,c=this.Ts,d=this.Ss,e=this.adornedObject.Nr(a.lastInput.documentPoint,I.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.nd();I.free(e)}}; hg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Us,c=this.Ts,d=this.Ss,e=this.adornedObject.Nr(a.lastInput.documentPoint,I.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);I.free(e);a.Va();this.transactionResult=this.name;a.P("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -hg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Za();c=c.ia(this.handle.alignment.Qu());if(a instanceof qf){var d=new E;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ce;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ie(c),!0,e)}else a.location=a.location.copy().ie(c).add(this.oppositePoint);b.nd()}}; -hg.prototype.computeResize=function(a,b,c,d,e,f){b.Ec()&&(b=yc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=I.alloc();J.so(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* +hg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Za();c=c.ia(this.handle.alignment.Qu());if(a instanceof qf){var d=new E;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ce;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().je(c),!0,e)}else a.location=a.location.copy().je(c).add(this.oppositePoint);b.nd()}}; +hg.prototype.computeResize=function(a,b,c,d,e,f){b.Fc()&&(b=yc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=I.alloc();J.so(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), a.y=m-a.height)):1<=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width))):(a.width=Math.max(Math.min(p.x-h,d.width),c.width),f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):0>=b.y?(a.y=Math.max(p.y,m-d.height), @@ -456,43 +456,43 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig hg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};hg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ -d,b.y=-d);return a.ia(b)};og.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.le=this.handle=null;this.Jq=new I(NaN,NaN);this.isActive=a.isMouseCaptured=!1};og.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b};og.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.ia(b)};og.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.me=this.handle=null;this.Jq=new I(NaN,NaN);this.isActive=a.isMouseCaptured=!1};og.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b};og.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; og.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};og.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Va();this.transactionResult=this.name;a.P("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; -og.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Za();var c=b.locationObject,d=b.rotateObject;if(c===d||c.ig(d))c=this.An.copy(),b.location=c.ie(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.nd()}}; +og.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Za();var c=b.locationObject,d=b.rotateObject;if(c===d||c.jg(d))c=this.An.copy(),b.location=c.je(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.nd()}}; og.prototype.computeRotate=function(a){a=this.rotationPoint.Ya(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.fi());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -ma.Object.defineProperties(og.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof ue))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.le},set:function(a){if(null!==a&&a.part instanceof ue)throw Error("new handle must not be in an Adornment: "+ -a);this.le=a}},snapAngleMultiple:{get:function(){return this.ga},set:function(a){this.ga=a}},snapAngleEpsilon:{get:function(){return this.Y},set:function(a){this.Y=a}},originalAngle:{get:function(){return this.gw}},rotationPoint:{get:function(){return this.Jq},set:function(a){this.Jq=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= +ma.Object.defineProperties(og.prototype,{handleArchetype:{get:function(){return this.m},set:function(a){this.m=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof ue))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.me},set:function(a){if(null!==a&&a.part instanceof ue)throw Error("new handle must not be in an Adornment: "+ +a);this.me=a}},snapAngleMultiple:{get:function(){return this.ga},set:function(a){this.ga=a}},snapAngleEpsilon:{get:function(){return this.W},set:function(a){this.W=a}},originalAngle:{get:function(){return this.gw}},rotationPoint:{get:function(){return this.Jq},set:function(a){this.Jq=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});og.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function pg(){ke.call(this);this.name="ClickSelecting"}la(pg,ke);pg.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; pg.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};pg.className="ClickSelectingTool";function qg(){ke.call(this);this.name="Action";this.ck=null}la(qg,ke); qg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,b=a.lastInput,c=a.ec(b.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a});if(null!==c){if(!c.isActionable)return!1;this.ck=c;a.qk=a.ec(b.documentPoint,null,null);return!0}return!1};qg.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionDown&&b.actionDown(a,b))}else this.canStart()&&this.doActivate()}; qg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionMove&&b.actionMove(a,b))}};qg.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;if(null===b)return;a.targetObject=b;null!==b.actionUp&&b.actionUp(a,b);this.standardMouseClick(function(a){for(;null!==a.panel&&(!a.isActionable||a!==b);)a=a.panel;return a},function(a){return a===b})}this.stopTool()}; -qg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};qg.prototype.doStop=function(){this.ck=null};qg.className="ActionTool";function rg(){ke.call(this);this.name="ClickCreating";this.Li=null;this.o=!0;this.j=!1;this.Rv=new I(0,0)}la(rg,ke); +qg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};qg.prototype.doStop=function(){this.ck=null};qg.className="ActionTool";function rg(){ke.call(this);this.name="ClickCreating";this.Li=null;this.m=!0;this.j=!1;this.Rv=new I(0,0)}la(rg,ke); rg.prototype.canStart=function(){if(!this.isEnabled||null===this.archetypeNodeData)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(1===a.lastInput.clickCount&&(this.Rv=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.Rv))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.wl(a.lastInput.documentPoint,!0)?!1:!0}; rg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -rg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.P("ChangingSelection",b.selection);this.Da(this.name);if(c instanceof U)c.Tc()&&(kg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);ya(e)&&(b.model.kf(e),d=b.Dc(e))}if(null!==d){var f=I.allocAt(a.x,a.y);this.isGridSnapEnabled&&Ag(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);I.free(f)}b.Va();this.transactionResult= -this.name;b.P("PartCreated",d)}finally{this.stopTransaction(),b.P("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(rg.prototype,{archetypeNodeData:{get:function(){return this.Li},set:function(a){this.Li=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});rg.className="ClickCreatingTool"; -function Bg(){ke.call(this);this.name="DragSelecting";this.wk=175;this.o=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Cf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Bg,ke); +rg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.P("ChangingSelection",b.selection);this.Da(this.name);if(c instanceof U)c.Tc()&&(kg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);ya(e)&&(b.model.lf(e),d=b.Ec(e))}if(null!==d){var f=I.allocAt(a.x,a.y);this.isGridSnapEnabled&&Ag(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);I.free(f)}b.Va();this.transactionResult= +this.name;b.P("PartCreated",d)}finally{this.stopTransaction(),b.P("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(rg.prototype,{archetypeNodeData:{get:function(){return this.Li},set:function(a){this.Li=a}},isDoubleClick:{get:function(){return this.m},set:function(a){this.m=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});rg.className="ClickCreatingTool"; +function Bg(){ke.call(this);this.name="DragSelecting";this.wk=175;this.m=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Cf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Bg,ke); Bg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var b=a.lastInput;return!b.left||a.currentTool!==this&&(!this.isBeyondDragSize()||b.timestamp-a.firstInput.timestampe.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};Pg.prototype.doStart=function(){Zg=this;null!==this.textBlock&&this.doActivate()}; -Pg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ec(a.lastInput.documentPoint));if(null!==b&&b instanceof Qg&&(this.textBlock=b,null!==b.part)){a.animationManager.vc();this.isActive=!0;this.na=Wg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Sh=this.textBlock.copy();var d=new M(this.textBlock.ia(tc),this.textBlock.ia(Cc));a.bv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Pg.prototype.doCancel=function(){this.stopTool()}; +Pg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ec(a.lastInput.documentPoint));if(null!==b&&b instanceof Qg&&(this.textBlock=b,null!==b.part)){a.animationManager.wc();this.isActive=!0;this.na=Wg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Sh=this.textBlock.copy();var d=new M(this.textBlock.ia(tc),this.textBlock.ia(Cc));a.bv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Pg.prototype.doCancel=function(){this.stopTool()}; Pg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Pg.prototype.doMouseDown=function(){this.isActive&&this.acceptText($g)};Pg.prototype.acceptText=function(a){switch(a){case $g:if(this.na===bh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.na===Wg||this.na===Yg||this.na===Xg)this.na=ch,dh(this);break;case eh:case Ug:case Vg:if(Ug!==a||!0!==this.textBlock.isMultiline)if(this.na===Wg||this.na===Yg||this.na===Xg)this.na=ch,dh(this)}}; function dh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Da(a.name),a.na=bh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.P("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.na=Yg,a.doError(e,f))}} Pg.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};Pg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Pg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.na=Sg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Pg.prototype.doStop=function(){Zg=null}; -Pg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Pg.prototype.px=function(a){var b=this.Sh;b.text=a;b.measure(this.textBlock.zh,Infinity);return b}; -ma.Object.defineProperties(Pg.prototype,{textBlock:{get:function(){return this.ga},set:function(a){this.ga=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.Y},set:function(a){this.Y=a}},textValidation:{get:function(){return this.qj}, -set:function(a){this.qj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.na},set:function(a){this.na!==a&&(this.na=a)}}});Pg.prototype.measureTemporaryTextBlock=Pg.prototype.px; +Pg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Pg.prototype.qx=function(a){var b=this.Sh;b.text=a;b.measure(this.textBlock.zh,Infinity);return b}; +ma.Object.defineProperties(Pg.prototype,{textBlock:{get:function(){return this.ga},set:function(a){this.ga=a}},currentTextEditor:{get:function(){return this.m},set:function(a){this.m=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.W},set:function(a){this.W=a}},textValidation:{get:function(){return this.qj}, +set:function(a){this.qj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.na},set:function(a){this.na!==a&&(this.na=a)}}});Pg.prototype.measureTemporaryTextBlock=Pg.prototype.qx; var eh=new D(Pg,"LostFocus",0),$g=new D(Pg,"MouseDown",1),Vg=new D(Pg,"Tab",2),Ug=new D(Pg,"Enter",3),fh=new D(Pg,"SingleClick",0),Rg=new D(Pg,"SingleClickSelected",1),ah=new D(Pg,"DoubleClick",2),Sg=new D(Pg,"StateNone",0),Wg=new D(Pg,"StateActive",1),Xg=new D(Pg,"StateEditing",2),ch=new D(Pg,"StateValidating",3),Yg=new D(Pg,"StateInvalid",4),bh=new D(Pg,"StateValidated",5),Zg=null;Pg.className="TextEditingTool";Pg.LostFocus=eh;Pg.MouseDown=$g;Pg.Tab=Vg;Pg.Enter=Ug;Pg.SingleClick=fh; Pg.SingleClickSelected=Rg;Pg.DoubleClick=ah;Pg.StateNone=Sg;Pg.StateActive=Wg;Pg.StateEditing=Xg;Pg.StateValidating=ch;Pg.StateInvalid=Yg;Pg.StateValidated=bh;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); -function gh(a){hh||(ih(),hh=!0);this.H=le;this.Dk=this.zb=this.Xp=this.$b=!1;this.uw=!0;this.Ek=jh;this.lm=!1;this.wh=this.Ad=!0;this.tg=600;this.Hv=this.sw=!1;this.Sd=new G;this.Wd=new kh;this.Wd.Rd=this;this.yi=new G;this.Vt=new G;this.rr=new G;this.dl=new G;a&&Object.assign(this,a)}gh.prototype.Ke=function(a){this.H=a};gh.prototype.canStart=function(){return!0};function lh(a,b){a.Ad&&a.canStart(b)&&(a.Sd.add(b),a.defaultAnimation.isAnimating&&a.vc(),mh(a.H),a.zb=!0)} -function nh(a){if(a.Ad&&a.zb){var b=a.Wd,c=a.H,d=a.Sd.contains("Model");d&&(a.Dk=!0,a.Ek===jh?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ek===oh&&b.rc.clear(),a.uw=a.Ek===ph&&c.Jt.C(c.pa)?!0:!1,c.P("InitialAnimationStarting",a));d&&!a.wh||0===b.rc.count?(a.Sd.clear(),a.zb=!1,b.rc.clear(),qh(b,c),a.Dk=!1,c.N()):(a.Sd.clear(),c.bg=!1,d=b.rc.get(c),c.autoScale!==rh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.zb||b.$b||(c.Fe("temporaryPixelRatio")&&Ge(c),sh(c),a.zb=!1,b.start(),b.$b&&(th(a),c.Va(),uh(b,0),zf(c,!0),vh(a),c.P("AnimationStarting",a)))}))}}function wh(a){return a.Sd.contains("Trigger")&&1===a.Sd.count}function xh(a,b,c,d){a.isTicking||wh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.Wd.add(b,"position",c,d,!1)}t=gh.prototype;t.es=function(a){return this.Wd.es(a)};t.Ju=function(a){return this.Wd.Ju(a)}; +function gh(a){hh||(ih(),hh=!0);this.H=le;this.Dk=this.zb=this.Xp=this.$b=!1;this.uw=!0;this.Ek=jh;this.lm=!1;this.wh=this.Ad=!0;this.ug=600;this.Hv=this.sw=!1;this.Sd=new G;this.Wd=new kh;this.Wd.Rd=this;this.yi=new G;this.Vt=new G;this.rr=new G;this.dl=new G;a&&Object.assign(this,a)}gh.prototype.Le=function(a){this.H=a};gh.prototype.canStart=function(){return!0};function lh(a,b){a.Ad&&a.canStart(b)&&(a.Sd.add(b),a.defaultAnimation.isAnimating&&a.wc(),mh(a.H),a.zb=!0)} +function nh(a){if(a.Ad&&a.zb){var b=a.Wd,c=a.H,d=a.Sd.contains("Model");d&&(a.Dk=!0,a.Ek===jh?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ek===oh&&b.rc.clear(),a.uw=a.Ek===ph&&c.Jt.C(c.pa)?!0:!1,c.P("InitialAnimationStarting",a));d&&!a.wh||0===b.rc.count?(a.Sd.clear(),a.zb=!1,b.rc.clear(),qh(b,c),a.Dk=!1,c.N()):(a.Sd.clear(),c.cg=!1,d=b.rc.get(c),c.autoScale!==rh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.zb||b.$b||(c.Ge("temporaryPixelRatio")&&Ge(c),sh(c),a.zb=!1,b.start(),b.$b&&(th(a),c.Va(),uh(b,0),zf(c,!0),vh(a),c.P("AnimationStarting",a)))}))}}function wh(a){return a.Sd.contains("Trigger")&&1===a.Sd.count}function xh(a,b,c,d){a.isTicking||wh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.Wd.add(b,"position",c,d,!1)}t=gh.prototype;t.es=function(a){return this.Wd.es(a)};t.Ju=function(a){return this.Wd.Ju(a)}; function yh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function Bh(a,b){for(b=b.findLinksConnected();b.next();){var c=b.value;c.ef=c.points.copy();a.dl.add(c)}}function Oh(a,b,c,d,e){null===a&&(a=[0,0,0,0]);null===b&&(b=[0,0,0,0]);var f=a[0],g=a[1],h=a[2];a=a[3];var k=b[0],l=b[1],m=b[2];b=b[3];if(0===h||100===h)f=k,g=l;else if(0===m||100===m)k=f,l=g;180f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function ih(){function a(a,b,e,f,g,h){a.position=new I(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new pb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&wa(a,">= 1",gh,"duration");this.tg=a}},isAnimating:{get:function(){return this.$b}}, -isTicking:{get:function(){return this.Xp}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a}},defaultAnimation:{get:function(){return this.Wd}},activeAnimations:{get:function(){return this.yi}},initialAnimationStyle:{get:function(){return this.Ek},set:function(a){this.Ek=a}}});gh.prototype.stopAnimation=gh.prototype.vc; +ma.Object.defineProperties(gh.prototype,{animationReasons:{get:function(){return this.Sd}},isEnabled:{get:function(){return this.Ad},set:function(a){(this.Ad=a)&&this.yi.each(function(a){a.isAnimating||Infinity!==a.runCount||a.start()})}},duration:{get:function(){return this.ug},set:function(a){1>a&&wa(a,">= 1",gh,"duration");this.ug=a}},isAnimating:{get:function(){return this.$b}}, +isTicking:{get:function(){return this.Xp}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a}},defaultAnimation:{get:function(){return this.Wd}},activeAnimations:{get:function(){return this.yi}},initialAnimationStyle:{get:function(){return this.Ek},set:function(a){this.Ek=a}}});gh.prototype.stopAnimation=gh.prototype.wc; var Ph=null,hh=!1,jh=new D(gh,"Default",1),ph=new D(gh,"AnimateLocations",2),oh=new D(gh,"None",3);gh.className="AnimationManager";gh.defineAnimationEffect=function(a,b){hh||(ih(),hh=!0);Ph.add(a,b)};gh.Default=jh;gh.AnimateLocations=ph;gh.None=oh; -function kh(a){this.au=this.rw=this.Rd=this.H=null;this.Mk=this.$b=this.j=!1;this.Km=this.Gd=0;this.op=this.Rs=Qh;this.Lk=this.Kn=!1;this.It=1;this.Gt=0;this.yd=this.tg=NaN;this.Lv=0;this.Lm=null;this.o=qb;this.rc=new pb;this.yt=new pb;this.nl=new G;this.zt=new G;this.Iv=Rh;a&&Object.assign(this,a)}kh.prototype.suspend=function(){this.Mk=!0};kh.prototype.advanceTo=function(a,b){b&&(this.Mk=!1);this.Kn&&a>=this.yd&&(this.Lk=!0,a-=this.yd);this.Lv=a;zh(this,!0);th(this.Rd);zf(this.H);vh(this.Rd);this.H.redraw()}; -function qh(a,b){a.yt.clear();a.Lk=!1;a.Gt=0;a.yd=NaN;0=this.yd&&(this.Lk=!0,a-=this.yd);this.Lv=a;zh(this,!0);th(this.Rd);zf(this.H);vh(this.Rd);this.H.redraw()}; +function qh(a,b){a.yt.clear();a.Lk=!1;a.Gt=0;a.yd=NaN;0a.Km?a.yd:d-a.Gd;b&&(e=a.Lv,ea.Km&&(a.Kn&&!a.Lk?(a.Gd=+new Date,a.Km=a.Gd+a.yd,a.Lk=!0):a.ul(!1))}}} function uh(a,b){for(var c=a.yd,d=a.rc.iterator,e=a.Lk;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Ph,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.op,b,c,a)}}}t.stop=function(){if(!this.$b)return this;this.ul(!0);return this}; t.ul=function(a){null!==this.au&&this.au.Mn.remove(this.rw);if(this.$b){var b=this.H,c=this.Rd;this.Mk=this.$b=c.Dk=!1;th(c);for(var d=this.rc,e=this.nl.iterator;e.next();)b.remove(e.value);for(e=this.zt.iterator;e.next();)e.value.w();e=this.Kn;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.uu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.ou||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.ou?k[n]:l[n],this.op,this.yd,this.yd,this)}h.ou&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Wu&&g instanceof U&&g.Ub(!1)}b.Zr.clear();Ye(b,!1);b.Va();b.N();zf(b,!0);if(c.defaultAnimation===this){for(n=c.dl.iterator;n.next();)e=n.value,null!==e.df&&(e.points=e.df,e.df=null);c.dl.clear()}zf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Iv);vh(c);this.Gt++;!a&&this.It>this.Gt?(this.Lk=!1,this.start()):(this.Lm&&this.Lm(this),qh(this,null),c.ul(this),b.Mb())}}; +h.ou?k[n]:l[n],this.op,this.yd,this.yd,this)}h.ou&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Wu&&g instanceof U&&g.Ub(!1)}b.Zr.clear();Ye(b,!1);b.Va();b.N();zf(b,!0);if(c.defaultAnimation===this){for(n=c.dl.iterator;n.next();)e=n.value,null!==e.ef&&(e.points=e.ef,e.ef=null);c.dl.clear()}zf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Iv);vh(c);this.Gt++;!a&&this.It>this.Gt?(this.Lk=!1,this.start()):(this.Lm&&this.Lm(this),qh(this,null),c.ul(this),b.Mb())}}; t.xj=function(a,b){var c=b.actualBounds,d=null;b instanceof qf&&(d=b.placeholder);null!==d?(c=d.ia(tc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new I(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof qf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.xj(d,b)}; t.vj=function(a,b){if(a.isVisible()){var c=null;b instanceof qf&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.rc;c.contains(a)&&(c.I(a).Wu=!0);if(a instanceof qf)for(a=a.memberParts;a.next();)c=a.value,c instanceof V&&this.vj(c,b)}};t.lz=function(a){var b=this.yt.get(a);null===b&&(b={},this.yt.add(a,b));return b}; -ma.Object.defineProperties(kh.prototype,{duration:{get:function(){return this.tg},set:function(a){1>a&&wa(a,">= 1",kh,"duration");this.tg=a}},reversible:{get:function(){return this.Kn},set:function(a){this.Kn=a}},runCount:{get:function(){return this.It},set:function(a){0a&&wa(a,">= 1",kh,"duration");this.ug=a}},reversible:{get:function(){return this.Kn},set:function(a){this.Kn=a}},runCount:{get:function(){return this.It},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}kh.className="Animation";kh.EaseLinear=function(a,b,c,d){return c*a/d+b};kh.EaseInOutQuad=Qh;kh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};kh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};kh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};kh.EaseOutExpo=Sh; -function Yh(a,b,c){this.start=a;this.end=b;this.uu={};this.ou=c;this.Wu=!1}Yh.className="AnimationState";function Zh(a,b,c){this.sd=null;this.cf=a;this.Vn=c||$h;this.hk=null;void 0!==b&&(this.hk=b,void 0===c&&(this.Vn=ai))}Zh.prototype.copy=function(){var a=new Zh(this.cf);a.Vn=this.Vn;var b=this.hk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.hk=c}return a}; -function bi(a,b){a=a.hk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.cf},set:function(a){this.cf=a}},animationSettings:{get:function(){return this.hk},set:function(a){this.hk=a}},startCondition:{get:function(){return this.Vn},set:function(a){this.Vn=a}}}); -var $h=new D(Zh,"Default",1),ai=new D(Zh,"Immediate",2),ci=new D(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Ra(this);this.H=null;this.Ma=new E;this.va="";this.tb=1;this.o=!1;this.j=this.Nh=this.u=this.Ii=this.Hi=this.Gi=this.Fi=this.Di=this.Ei=this.Ci=this.Ki=this.Bi=this.Ji=this.Ai=this.zi=!0;this.Bn=[];a&&Object.assign(this,a)}t=di.prototype;t.clear=function(){this.Ma.clear();this.Bn.length=0};t.Ke=function(a){this.H=a}; +function Yh(a,b,c){this.start=a;this.end=b;this.uu={};this.ou=c;this.Wu=!1}Yh.className="AnimationState";function Zh(a,b,c){this.sd=null;this.df=a;this.Vn=c||$h;this.hk=null;void 0!==b&&(this.hk=b,void 0===c&&(this.Vn=ai))}Zh.prototype.copy=function(){var a=new Zh(this.df);a.Vn=this.Vn;var b=this.hk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.hk=c}return a}; +function bi(a,b){a=a.hk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.df},set:function(a){this.df=a}},animationSettings:{get:function(){return this.hk},set:function(a){this.hk=a}},startCondition:{get:function(){return this.Vn},set:function(a){this.Vn=a}}}); +var $h=new D(Zh,"Default",1),ai=new D(Zh,"Immediate",2),ci=new D(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Ra(this);this.H=null;this.Ma=new E;this.va="";this.tb=1;this.m=!1;this.j=this.Nh=this.u=this.Ii=this.Hi=this.Gi=this.Fi=this.Di=this.Ei=this.Ci=this.Ki=this.Bi=this.Ji=this.Ai=this.zi=!0;this.Bn=[];a&&Object.assign(this,a)}t=di.prototype;t.clear=function(){this.Ma.clear();this.Bn.length=0};t.Le=function(a){this.H=a}; t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ma.iterator;h.next();){var k=h.value;k instanceof qf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof ue?g++:c++}h="";0c.nq||h.height*e>c.nq?b.tc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| +t.$h=function(a,b,c,d,e,f,g){if(!g||ig(b)){if(null!==d&&b instanceof T&&(b.isOrthogonal&&d.push(b),!1===b.xd))return;g=!1;for(d=b.containingGroup;null!==d;)g?null!==d.ib&&f.ix(d.ib):null!==d.ib&&(g=!0,f.assign(d.ib)),d=d.containingGroup;var h=b.actualBounds;d=!1;if(g&&b.isVisible()){if(!f.Sc(h))return;d=!f.Ee(h)}d&&(a.save(),a.beginPath(),a.rect(f.x,f.y,f.width,f.height),a.clip());h.width*e>c.nq||h.height*e>c.nq?b.tc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(gi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(gi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),gi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Ur()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Nc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.bb(de,a,this,b,c,d,e)};t.ii=function(a,b,c){var d=this.Ma;b.Ah=this;if(a>=d.count)a=d.count;else if(d.K(a)===b)return-1;d.Cb(a,b);b.yo(c);d=this.diagram;null!==d&&(c?d.N():d.ii(b));hi(this,a,b);return a}; +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Oc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.bb(de,a,this,b,c,d,e)};t.ii=function(a,b,c){var d=this.Ma;b.Ah=this;if(a>=d.count)a=d.count;else if(d.K(a)===b)return-1;d.Cb(a,b);b.yo(c);d=this.diagram;null!==d&&(c?d.N():d.ii(b));hi(this,a,b);return a}; t.lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.lc(a,b,c);var d=this.Ma;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.K(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.zo(c);d.mb(a);d=this.diagram;null!==d&&(c?d.N():d.lc(b));b.Ah=null;return a}; function hi(a,b,c){b=ii(a,b,c);if(c instanceof qf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ma.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.K(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.mb(b);a.Cb(f,c);return f}for(g=NaN;0<=--f&&(g=a.K(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.mb(b);a.Cb(h,c);return h}for(k=NaN;++h< e&&(k=a.K(h).zOrder,isNaN(k)););}return b} ma.Object.defineProperties(di.prototype,{parts:{get:function(){return this.Ma.iterator}},partsBackwards:{get:function(){return this.Ma.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.va},set:function(a){var b=this.va;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&C("Cannot rename default Layer to: "+a),c=c.layers;c.next();)c.value.name=== -a&&C("Layer.name is already present in this diagram: "+a);this.va=a;this.g("name",b,a);for(a=this.Ma.iterator;a.next();)a.value.layerName=this.va}}},opacity:{get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&((0>a||1a||1=a)return b;for(var c=this.Ua.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; function Ei(a){var b=a.Ha.Sa;b instanceof HTMLCanvasElement&&(a.addEventListener(b,"pointerdown",a.Wj,!1),a.addEventListener(b,"pointermove",a.Xj,!1),a.addEventListener(b,"pointerup",a.Zj,!1),a.addEventListener(b,"pointerout",a.Yj,!1),a.addEventListener(b,"pointerenter",a.Jy,!1),a.addEventListener(b,"pointerleave",a.Ky,!1),a.addEventListener(b,"wheel",a.Sj,!1),a.addEventListener(b,"keydown",a.yz,!1),a.addEventListener(b,"keyup",a.zz,!1),a.addEventListener(b,"blur",a.vy,!1),a.addEventListener(b,"focus", -a.wy,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(x,"resize",a.sv,!1),Qa&&a.addEventListener(b,"touchstart",function(a){a.preventDefault()},!1))}function Ge(a){30q&&(this.position=w.h(-(b.scrollWidth-this.Ba)+v-this.Ba/e+m,this.position.y))),a.$x&&this.allowVerticalScroll&&(hu&&(this.position= +"gray";c.strokeWidth=1;c.interval=10;b.add(c);c=new U;c.add(b);c.layerName="Grid";c.zOrder=0;c.isInDocumentBounds=!1;c.isAnimated=!1;c.pickable=!1;c.locationObjectName="GRID";a.add(c);a.partManager.parts.remove(c);b.visible=!1;return b}function Gi(){this.H.Mt?this.H.Mt=!1:this.H.isEnabled?this.H.Nw(this):Oi(this.H)}function Qi(a){this.H.isEnabled?(this.H.Rt=a.target.scrollTop,this.H.Pt=a.target.scrollLeft):Oi(this.H)} +Q.prototype.Nw=function(a){if(null!==this.Ha){var b=this.Qt,c=this.Nt;this.Nq=!0;var d=this.documentBounds,e=this.viewportBounds,f=this.mj,g=d.x-f.left,h=d.y-f.top,k=d.width+f.left+f.right,l=d.height+f.top+f.bottom,m=d.right+f.right;f=d.bottom+f.bottom;var n=e.x;d=e.y;var p=e.width,r=e.height,q=e.right,u=e.bottom;e=this.scale;var w=a.scrollLeft;if(this.$m)switch(this.Ht){case "negative":w=w+a.scrollWidth-a.clientWidth;break;case "reverse":w=a.scrollWidth-w-a.clientWidth}var v=w;pq&&(this.position=w.h(-(b.scrollWidth-this.Ba)+v-this.Ba/e+m,this.position.y))),a.ay&&this.allowVerticalScroll&&(hu&&(this.position= w.h(this.position.x,-(b.scrollHeight-this.Aa)+a.scrollTop-this.Aa/e+f))),I.free(w),Ri(this),this.Ti=this.Nq=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);mh(this);return Si(this,a)}; function Si(a,b){if(a.fixedBounds.v())return b.assign(a.fixedBounds),b.fo(a.ub),b;for(var c=!0,d=a.Ua.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Zi?(b=k>h?(g-a.Ab)/d:(f-a.Ab)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +function Ui(a,b){var c=a.sp;if(null===a.Ha)return c;a.Za();var d=a.documentBounds;if(!d.v())return c;var e=d.width;d=d.height;var f=a.Ba+(a.Of?a.Ab:0),g=a.Aa+(a.We?a.Ab:0),h=f/e,k=g/d;return b===Yi?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Zi?(b=k>h?(g-a.Ab)/d:(f-a.Ab)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} Q.prototype.zoomToFit=function(){var a=this.nj;this.nj=Rh;this.scale=Ui(this,Yi);a!==Rh&&(Ti(this,!1),Vi(this,this.documentBounds,this.Ba/this.xa,this.Aa/this.xa,this.mk,!1));this.nj=a};t=Q.prototype; -t.kA=function(a,b){void 0===b&&(b=Yi);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Yi||b===Zi)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ba;var f=this.Aa;e=b===Zi?f/d>e/c?(f-(this.Ve?this.Ab:0))/d:(e-(this.Nf?this.Ab:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new I(a.x,a.y)}}; -t.oy=function(a,b){this.Za();var c=this.documentBounds,d=this.viewportBounds;this.position=new I(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))};t.gz=function(a){if(a instanceof Y){this.Hp=a;var b=I.alloc();this.Ip=this.Ro(a.ia(tc,b));I.free(b)}else this.Hp=null,this.Ip=ub}; +t.kA=function(a,b){void 0===b&&(b=Yi);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Yi||b===Zi)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ba;var f=this.Aa;e=b===Zi?f/d>e/c?(f-(this.We?this.Ab:0))/d:(e-(this.Of?this.Ab:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new I(a.x,a.y)}}; +t.py=function(a,b){this.Za();var c=this.documentBounds,d=this.viewportBounds;this.position=new I(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))};t.gz=function(a){if(a instanceof Y){this.Hp=a;var b=I.alloc();this.Ip=this.Ro(a.ia(tc,b));I.free(b)}else this.Hp=null,this.Ip=ub}; function Vi(a,b,c,d,e,f){var g=I.allocAt(a.pa.x,a.pa.y),h=g.x,k=g.y;if(null!==a.Hp){var l=I.alloc();l=a.Hp.ia(tc,l);h=l.x-a.Ip.x/a.scale;k=l.y-a.Ip.y/a.scale;e=sc;I.free(l)}if(f||a.scrollMode===Rh)e.pb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.mj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.$k[0])b=a.$k[c];else return;c=a.Ha;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ba/c.width*c.left,b.clientY-a.Aa/c.height*c.top))}Q.prototype.Va=function(){this.Si||(this.Si=!0,this.Mb(!0))};function hj(a){a.cd||mh(a);a.Za()}Q.prototype.redraw=function(){this.wb||this.cd||(this.N(),Wi(this),this.nd())};t=Q.prototype;t.xz=function(){return this.bg}; -t.Ey=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.vc();b.isEnabled=!1;zf(this);this.Pf=!1;this.Jt=new I(NaN,NaN);b.isEnabled=c;this.cd=!0;var d=this;null!==a&&ta(function(){d.cd=!1;lh(b,"Model");a(d)},1)};t.Mb=function(a){void 0===a&&(a=!1);if(!0!==this.bg&&!(this.wb||!1===a&&this.cd)){this.bg=!0;var b=this;x.requestAnimationFrame(function(){b.bg&&b.nd()})}};t.nd=function(){if(!this.Nm||this.bg)this.Nm&&(this.Nm=!1),zf(this)}; +function ae(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.$k[0])b=a.$k[c];else return;c=a.Ha;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ba/c.width*c.left,b.clientY-a.Aa/c.height*c.top))}Q.prototype.Va=function(){this.Si||(this.Si=!0,this.Mb(!0))};function hj(a){a.cd||mh(a);a.Za()}Q.prototype.redraw=function(){this.wb||this.cd||(this.N(),Wi(this),this.nd())};t=Q.prototype;t.xz=function(){return this.cg}; +t.Ey=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.wc();b.isEnabled=!1;zf(this);this.Qf=!1;this.Jt=new I(NaN,NaN);b.isEnabled=c;this.cd=!0;var d=this;null!==a&&ta(function(){d.cd=!1;lh(b,"Model");a(d)},1)};t.Mb=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.wb||!1===a&&this.cd)){this.cg=!0;var b=this;x.requestAnimationFrame(function(){b.cg&&b.nd()})}};t.nd=function(){if(!this.Nm||this.cg)this.Nm&&(this.Nm=!1),zf(this)}; function Xi(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.wb||!a.Ti||Oi(a)||(b&&mh(a),c&&Ti(a,!1))} -function zf(a,b){if(!a.cd&&(a.bg=!1,null!==a.La||a.Zn.v())){a.cd=!0;var c=a.animationManager,d=a.Fn;if(!c.isAnimating&&0!==d.length){for(var e=d.s,f=e.length,g=0;gb;b++){var c=a.se.iterator;if(null===c||0===a.se.count)break;a.se=new G;a.rv(c,a.se)}a.nodes.each(function(a){a instanceof qf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} +function mh(a){if(0!==a.te.count&&(a.cd||!a.animationManager.isTicking)){for(var b=0;23>b;b++){var c=a.te.iterator;if(null===c||0===a.te.count)break;a.te=new G;a.rv(c,a.te)}a.nodes.each(function(a){a instanceof qf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} t.rv=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Tc()||c instanceof qf||(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof qf&&c.isVisible()&&mj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof ue&&c.isVisible()&&(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function mj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof qf?(nj(f)||oj(f)||pj(f))&&mj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;en&&(z=L.left,y= +Math.floor(k.y),Math.ceil(k.width),Math.ceil(k.height));f.clip();f.setTransform(h,0,0,h,0,0);f.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy);f.Pc();b=this.Ua.s;l=b.length;this.Pd(b,l,this,this.viewportBounds);rj(this,f);f.globalAlpha=this.tb;for(h=0;hn&&(z=L.left,y= L.right),v.height>F&&(A=L.top,B=L.bottom)):(z=L.left,y=L.right,A=L.top,B=L.bottom);L=v.width+z+y;var S=v.height+A+B;z=v.x-z;var R=e.x;y=v.right+y;var P=e.right+r;A=v.y-A;var H=e.y;v=v.bottom+B;B=e.bottom+q;var da="1px",X="1px";e=a.scale;u=L>u/e;w=S>w/e;a.scrollMode===Rh&&(u||w)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1P+1&&(u=Math.max((y-P)*e+a.Ba,u)),n+r+1B+1&&(u=Math.max((v-B)*e+a.Aa,u)),F+q+1P+1&&(r=Math.max((y-P)*e+a.Ba,r)),n+1B+1&&(q=Math.max((v-B)*e+r,q)),F+1P+1&&(b=a.position.x*e));if(a.$m)switch(a.Ht){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(F+1B+1&&(l.scrollTop=a.position.y*e));u=a.Ba;w=a.Aa;l.style.width=u+(a.Nf?a.Ab:0)+"px";l.style.height=w+(a.Ve?a.Ab:0)+"px";return c!==u||d!==w||a.animationManager.zb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; +(u=1,A+1B+1&&(u=Math.max((v-B)*e+a.Aa,u)),F+q+1P+1&&(r=Math.max((y-P)*e+a.Ba,r)),n+1B+1&&(q=Math.max((v-B)*e+r,q)),F+1P+1&&(b=a.position.x*e));if(a.$m)switch(a.Ht){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(F+1B+1&&(l.scrollTop=a.position.y*e));u=a.Ba;w=a.Aa;l.style.width=u+(a.Of?a.Ab:0)+"px";l.style.height=w+(a.We?a.Ab:0)+"px";return c!==u||d!==w||a.animationManager.zb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Ij(a.layerName),null===b&&(b=this.Ij("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.ii(99999999,a,a.diagram===this);0<=c&&this.bb(fe,"parts",b,null,a,null,c);b.isTemporary||this.Va();a.D(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.ii=function(a){this.partManager.ii(a);var b=this;Aj(a,function(a){Bj(b,a)});(a instanceof ue||a instanceof qf&&null!==a.placeholder)&&a.w();null!==a.data&&Aj(a,function(a){Cj(b.partManager,a)});!0!==oj(a)&&!0!==pj(a)||this.se.add(a);Dj(a,!0,this);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()}; -t.lc=function(a){a.zj();this.partManager.lc(a);var b=this;null!==a.data&&Aj(a,function(a){Fj(b.partManager,a,b)});this.se.remove(a);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()};t.remove=function(a){Gj(this,a,!0)}; +t.ii=function(a){this.partManager.ii(a);var b=this;Aj(a,function(a){Bj(b,a)});(a instanceof ue||a instanceof qf&&null!==a.placeholder)&&a.w();null!==a.data&&Aj(a,function(a){Cj(b.partManager,a)});!0!==oj(a)&&!0!==pj(a)||this.te.add(a);Dj(a,!0,this);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()}; +t.lc=function(a){a.zj();this.partManager.lc(a);var b=this;null!==a.data&&Aj(a,function(a){Fj(b.partManager,a,b)});this.te.remove(a);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()};t.remove=function(a){Gj(this,a,!0)}; function Gj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.D(2),c&&b.Fj(),c=d.lc(-1,b,!1),0<=c&&a.bb(ge,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.hs=function(a,b){void 0===b&&(b=!1);if(za(a))for(var c=a.length,d=0;dd&&this.Va();return this}; -t.iy=function(a,b){Mj(this,a,b);a.Ke(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; +t.pl=function(a){Mj(this,a,null);a.Le(this);var b=this.Ua,c=b.count-1;if(!a.isTemporary)for(;0<=c&&b.K(c).isTemporary;)c--;b.Cb(c+1,a);null!==this.ac&&this.bb(fe,"layers",this,null,a,null,c+1);this.N();this.Va();return this}; +t.Aw=function(a,b){Mj(this,a,b);a.Le(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; +t.jy=function(a,b){Mj(this,a,b);a.Le(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; t.Rz=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ua,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ma.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ac&&this.bb(ge,"layers",this,a,null,c,null);this.N();this.Va()}}};t.Ij=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; -t.Cw=function(a){null===this.af&&(this.af=new E);this.af.add(a);this.model.Ug(a);return this};t.Tz=function(a){null!==this.af&&(this.af.remove(a),0===this.af.count&&(this.af=null));this.model.ak(a)};t.Ug=function(a){null===this.pg&&(this.pg=new E);this.pg.add(a);return this};t.ak=function(a){null!==this.pg&&(this.pg.remove(a),0===this.pg.count&&(this.pg=null))}; -t.Cr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Fu(a);a.change!==ee&&(this.isModified=!0);if(null!==this.pg)for(var b=this.pg,c=b.length,d=0;dn.Ma.indexOf(r)&&n.ii(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.lc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof di&&(b?(r.Ke(this),this.Ua.Cb(p,r)):this.Ua.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};Q.prototype.Da=function(a){return this.undoManager.Da(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Af=function(){return this.undoManager.Af()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Da(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.eb(b):this.undoManager.Af(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):Qj(g,h,b?void 0:k));else if(g instanceof di){var m=!0===a.oldParam;"number"===typeof h&&k instanceof U&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Rb(),g.lc(m?h:-1,k,m)):g.ii(h,k,m))}else g instanceof Q?"number"===typeof h&&k instanceof di&&(b?this.Ua.mb(h):(k.Le(this),this.Ua.Cb(h,k))):C("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===ge){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof W)"number"===typeof p&&r instanceof Y?b?n.Cb(p,r):n.lc(p): +"number"===typeof p&&r instanceof Oj&&(r.isRow?Pj(n,p,b?r:void 0):Qj(n,p,b?r:void 0));else if(n instanceof di){var q=!0===a.newParam;"number"===typeof p&&r instanceof U&&(b?0>n.Ma.indexOf(r)&&n.ii(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.lc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof di&&(b?(r.Le(this),this.Ua.Cb(p,r)):this.Ua.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};Q.prototype.Da=function(a){return this.undoManager.Da(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Bf=function(){return this.undoManager.Bf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Da(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.eb(b):this.undoManager.Bf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.Uo=function(){this.partManager.Uo()}; -function Rj(a,b,c){var d=a.animationManager;if(a.wb||a.cd)a.xa=c,Ci(a),d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));else if(null===a.Ha)a.xa=c,Ci(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Ba,g=a.Aa;e.width=a.Ba/b;e.height=a.Aa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.wf(Ec)?h=0:l.wf(Gc)&&(h=f-1):h=l.pb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.wf(Dc)?k=0:l.wf(Hc)&&(k=g-1):k=l.pb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| +function Rj(a,b,c){var d=a.animationManager;if(a.wb||a.cd)a.xa=c,Ci(a),d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));else if(null===a.Ha)a.xa=c,Ci(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Ba,g=a.Aa;e.width=a.Ba/b;e.height=a.Aa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.xf(Ec)?h=0:l.xf(Gc)&&(h=f-1):h=l.pb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.xf(Dc)?k=0:l.xf(Hc)&&(k=g-1):k=l.pb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| (c=a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=I.allocAt(a.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;I.free(f);a.xa=c;Ci(a);a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.wb=!1;Ti(a,!1);d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));a.N();Wi(a)}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.C(b)){void 0===d&&(d=!1);d||Wi(this);Ri(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==rh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.Kk&&e instanceof La&&(this.lastInput.documentPoint=this.rs(this.lastInput.viewPoint),ye(e,this));this.wb||this.invalidateViewport(a,b);jj(this);this.kd.scale=c;this.kd.position.x=a.x;this.kd.position.y=a.y;this.kd.bounds.assign(a);this.kd.Gw.width= -Math.round(a.width*c);this.kd.Gw.height=Math.round(a.height*c);this.kd.qx.width=this.Ba;this.kd.qx.height=this.Aa;this.kd.kx=d;this.P("ViewportBoundsChanged",this.kd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.ab()})}}; -function jj(a,b){var c=a.Yd;if(null!==c&&c.visible){for(var d=K.alloc(),e=1,f=1,g=c.R.s,h=g.length,k=0;km||(Sj(l.figure)?f=f*m/J.Ww(f,m):e=e*m/J.Ww(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.v()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=I.alloc();J.so(a,g,0,0,d.width,d.height, +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.C(b)){void 0===d&&(d=!1);d||Wi(this);Ri(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==rh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.Kk&&e instanceof La&&(this.lastInput.documentPoint=this.rs(this.lastInput.viewPoint),ye(e,this));this.wb||this.invalidateViewport(a,b);jj(this);this.kd.scale=c;this.kd.position.x=a.x;this.kd.position.y=a.y;this.kd.bounds.assign(a);this.kd.Hw.width= +Math.round(a.width*c);this.kd.Hw.height=Math.round(a.height*c);this.kd.sx.width=this.Ba;this.kd.sx.height=this.Aa;this.kd.lx=d;this.P("ViewportBoundsChanged",this.kd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.ab()})}}; +function jj(a,b){var c=a.Zd;if(null!==c&&c.visible){for(var d=K.alloc(),e=1,f=1,g=c.R.s,h=g.length,k=0;km||(Sj(l.figure)?f=f*m/J.Xw(f,m):e=e*m/J.Xw(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.v()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=I.alloc();J.so(a,g,0,0,d.width,d.height, b);b.offset(-d.width,-d.height);K.free(d);c.part.location=b;I.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.P("ChangingSelection",b);for(var c=b.Ea(),d=c.length,e=0;e=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=I.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.$a(qb)||(b=new I(b.x+f.x/e,b.y+f.y/e)); -M.free(d);I.free(f);return b};t=Q.prototype;t.bs=function(){return null};t.Nu=function(){return null};t.my=function(a,b){this.Xx.add(a,b)};t.lu=function(a){(this.tw=a)||this.nodes.each(function(a){a instanceof qf&&(a.Dp=null)})}; -function yk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].Qk){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Fg.iterator;g.next();)if(!g.value[0].Qk){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Dz=function(a){if(!Og)return null;void 0===a&&(a={});a.returnType="Image";return this.nx(a)}; -t.nx=function(a){void 0===a&&(a={});return yk(this,this.Ez,a)}; +M.free(d);I.free(f);return b};t=Q.prototype;t.bs=function(){return null};t.Nu=function(){return null};t.ny=function(a,b){this.Yx.add(a,b)};t.lu=function(a){(this.tw=a)||this.nodes.each(function(a){a instanceof qf&&(a.Dp=null)})}; +function yk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].Qk){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Fg.iterator;g.next();)if(!g.value[0].Qk){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Dz=function(a){if(!Og)return null;void 0===a&&(a={});a.returnType="Image";return this.ox(a)}; +t.ox=function(a){void 0===a&&(a={});return yk(this,this.Ez,a)}; t.Ez=function(a,b,c){var d=zk(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Ak+"data":e=d.getImageData(0,0,c.width,c.height);break;case Ak:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";if("function"===typeof c.msToBlob)return b(c.msToBlob()),"msToBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function zk(a,b,c,d){a.animationManager.vc();a.nd();if(null===a.Ha)return null;"object"!==typeof b&&C("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new K(Infinity,Infinity):new K(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,r=b.elementFinished||null,q=b.showTemporary; -void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new ic(l):l instanceof ic||C("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.Zb.Nc(!0);n=new Bk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.Ba+Math.ceil(l.left+l.right);n.height=a.Aa+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, +function zk(a,b,c,d){a.animationManager.wc();a.nd();if(null===a.Ha)return null;"object"!==typeof b&&C("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new K(Infinity,Infinity):new K(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,r=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new ec(l):l instanceof ec||C("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.Zb.Oc(!0);n=new Bk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.Ba+Math.ceil(l.left+l.right);n.height=a.Aa+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, n.height,n.width,n.height);d.ownerDocument=p;d.po=r;tj(a,d.context,l,new K(n.width,n.height),a.xa,a.pa,k,m,q,b);return d.context}a.Fm=!1;tj(a,u,l,new K(n.width,n.height),a.xa,a.pa,k,m,q,b);a.Fm=!0;return n.context}var w=a.sp,v=a.documentBounds.copy();v.jv(a.ub);if(q)for(var z=a.Ua.s,y=z.length,A=0;Aw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=y):l=new ic(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&&(e=Math.min(e, +(e=B,v=A):isNaN(A)?(e=B,v=v.height*f):(e=v.width*f,v=A)):null!==e?e.v()?(f=Math.min(B/v.width,A/v.height),e=B,v=A):isNaN(A)?(f=B/v.width,e=B,v=v.height*f):(f=A/v.height,e=v.width*f,v=A):null!==f?"NaN"===f&&g.v()?(f=Math.min((g.width-h)/v.width,(g.height-y)/v.height),f>w?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=y):l=new ec(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&&(e=Math.min(e, w)),isFinite(g)&&(v=Math.min(v,g)));n.width=Math.ceil(e);n.height=Math.ceil(v);if("SVG"===c){if(null===d)return null;d.resize(n.width,n.height,n.width,n.height);d.ownerDocument=p;d.po=r;tj(a,d.context,l,new K(Math.ceil(e),Math.ceil(v)),f,z,k,m,q,b);return d.context}a.Fm=!1;tj(a,u,l,new K(Math.ceil(e),Math.ceil(v)),f,z,k,m,q,b);a.Fm=!0;return n.context} -ma.Object.defineProperties(Q.prototype,{div:{get:function(){return this.La},set:function(a){if(this.La!==a){var b=this.La;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Ha&&(b=this.Ha.Sa,this.removeEventListener(b,"pointermove",this.Xj,!1),this.removeEventListener(b,"pointerdown",this.Wj,!1),this.removeEventListener(b,"pointerup",this.Zj,!1),this.removeEventListener(b,"pointerout",this.Yj,!1),this.Ha.Ow()),this.cl&&(this.cl.disconnect(), -this.cl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Ha=null,this.removeEventListener(x,"resize",this.sv,!1),this.removeEventListener(x,"wheel",this.Sj,!0),le===this&&(le=null)):this.Pf=!1;this.La=null;if(null!==a){if(b=a.H)b.div=null;si(this,a);this.redraw()}}}},Ew:{ -get:function(){return this.rq}},ji:{get:function(){return this.Pf}},draggedLink:{get:function(){return this.Ps},set:function(a){this.Ps!==a&&(this.Ps=a,null!==a&&(this.At=a.fromPort,this.Bt=a.toPort))}},sx:{get:function(){return this.At},set:function(a){this.At=a}},tx:{get:function(){return this.Bt},set:function(a){this.Bt=a}},animationManager:{get:function(){return this.Rd}}, +ma.Object.defineProperties(Q.prototype,{div:{get:function(){return this.La},set:function(a){if(this.La!==a){var b=this.La;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Ha&&(b=this.Ha.Sa,this.removeEventListener(b,"pointermove",this.Xj,!1),this.removeEventListener(b,"pointerdown",this.Wj,!1),this.removeEventListener(b,"pointerup",this.Zj,!1),this.removeEventListener(b,"pointerout",this.Yj,!1),this.Ha.Pw()),this.cl&&(this.cl.disconnect(), +this.cl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Ha=null,this.removeEventListener(x,"resize",this.sv,!1),this.removeEventListener(x,"wheel",this.Sj,!0),le===this&&(le=null)):this.Qf=!1;this.La=null;if(null!==a){if(b=a.H)b.div=null;si(this,a);this.redraw()}}}},Ew:{ +get:function(){return this.rq}},ji:{get:function(){return this.Qf}},draggedLink:{get:function(){return this.Ps},set:function(a){this.Ps!==a&&(this.Ps=a,null!==a&&(this.At=a.fromPort,this.Bt=a.toPort))}},tx:{get:function(){return this.At},set:function(a){this.At=a}},ux:{get:function(){return this.Bt},set:function(a){this.Bt=a}},animationManager:{get:function(){return this.Rd}}, undoManager:{get:function(){return this.ac.undoManager}},skipsUndoManager:{get:function(){return this.Mg},set:function(a){this.Mg=a;this.ac.skipsUndoManager=a}},delaysLayout:{get:function(){return this.Ns},set:function(a){this.Ns=a}},opacity:{get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&((0>a||1= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.xt},set:function(a){var b=this.xt;b!==a&&(this.xt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.Zs},set:function(a){var b=this.Zs;b!==a&&(this.Zs=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.nt}, -set:function(a){var b=this.nt;b!==a&&(this.nt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{get:function(){return this.Tv}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Ym&&this.re!==a.historyIndex:this.Ym},set:function(a){if(this.Ym!==a){this.Ym=a;var b=this.undoManager;!a&&b.isEnabled&&(this.re=b.historyIndex);a||Tj(this)}}},model:{ -get:function(){return this.ac},set:function(a){var b=this.ac;if(b!==a){this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&C("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.vc(!0);var c=Ai(this,!0);this.Pf=!1;this.Nm=!0;this.re=-2;this.bg=!1;var d=this.wb;this.wb=!0;lh(this.animationManager,"Model");b&&(null!==this.af&&this.af.each(function(a){b.ak(a)}),b.ak(this.Gc));this.ac=a;this.partManager=Uj(this.ac.type);for(var e= -0;ethis.scale&&(this.scale=a)):wa(a,"> 0",Q,"minScale"))}},maxScale:{get:function(){return this.pt},set:function(a){var b=this.pt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{get:function(){return this.eu},set:function(a){this.eu.C(a)||(this.eu=a=a.J())}},contentAlignment:{get:function(){return this.mk}, -set:function(a){var b=this.mk;b.C(a)||(this.mk=a=a.J(),this.g("contentAlignment",b,a),Ti(this,!1))}},initialContentAlignment:{get:function(){return this.Rp},set:function(a){var b=this.Rp;b.C(a)||(this.Rp=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.Va(),this.g("padding",b,a))}},partManager:{ -get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Ke(null),this.Hc=a,a.Ke(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{ -get:function(){return this.Jc},set:function(a){var b=this.Jc;b!==a&&(this.Jc=a,a.diagram=this,a.group=null,this.mh=!0,this.g("layout",b,a),this.Mb())}},isTreePathToChildren:{get:function(){return this.kt},set:function(a){var b=this.kt;if(b!==a&&(this.kt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ck(a.value)}},treeCollapsePolicy:{get:function(){return this.$t},set:function(a){var b= -this.$t;b!==a&&(a!==vi&&a!==Dk&&a!==Ek&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.$t=a,this.g("treeCollapsePolicy",b,a))}},He:{get:function(){return this.Vv},set:function(a){this.Vv=a}},avoidanceCellSize:{get:function(){return this.Fv},set:function(a){this.Qh=null;this.Fv=new K(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.Gv},set:function(a){this.Gv=Math.max(1, -a)}},autoScrollInterval:{get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(this.Yo=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.$o},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.$o;b.C(a)||(this.$o=a=a.J(),this.Va(),this.g("autoScrollRegion",b,a))}}}); -ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Fk.fc()},set:function(a){Fk.add(a.replace(/\s/g,""))}},version:{get:function(){return Gk}}});Q.prototype.makeImageData=Q.prototype.nx;Q.prototype.makeImage=Q.prototype.Dz;Q.prototype.cacheGroupExternalLinks=Q.prototype.lu;Q.prototype.addRenderer=Q.prototype.my;Q.prototype.makeSVG=Q.prototype.Nu;Q.prototype.makeSvg=Q.prototype.bs;Q.prototype.stopAutoScroll=Q.prototype.kg; +set:function(a){var b=this.mk;b.C(a)||(this.mk=a=a.J(),this.g("contentAlignment",b,a),Ti(this,!1))}},initialContentAlignment:{get:function(){return this.Rp},set:function(a){var b=this.Rp;b.C(a)||(this.Rp=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.Va(),this.g("padding",b,a))}},partManager:{ +get:function(){return this.Ic},set:function(a){var b=this.Ic;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Le(null),this.Ic=a,a.Le(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{ +get:function(){return this.Kc},set:function(a){var b=this.Kc;b!==a&&(this.Kc=a,a.diagram=this,a.group=null,this.mh=!0,this.g("layout",b,a),this.Mb())}},isTreePathToChildren:{get:function(){return this.kt},set:function(a){var b=this.kt;if(b!==a&&(this.kt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ck(a.value)}},treeCollapsePolicy:{get:function(){return this.$t},set:function(a){var b= +this.$t;b!==a&&(a!==vi&&a!==Dk&&a!==Ek&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.$t=a,this.g("treeCollapsePolicy",b,a))}},Ie:{get:function(){return this.Vv},set:function(a){this.Vv=a}},avoidanceCellSize:{get:function(){return this.Fv},set:function(a){this.Qh=null;this.Fv=new K(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.Gv},set:function(a){this.Gv=Math.max(1, +a)}},autoScrollInterval:{get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(this.Yo=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.$o},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.$o;b.C(a)||(this.$o=a=a.J(),this.Va(),this.g("autoScrollRegion",b,a))}}}); +ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Fk.fc()},set:function(a){Fk.add(a.replace(/\s/g,""))}},version:{get:function(){return Gk}}});Q.prototype.makeImageData=Q.prototype.ox;Q.prototype.makeImage=Q.prototype.Dz;Q.prototype.cacheGroupExternalLinks=Q.prototype.lu;Q.prototype.addRenderer=Q.prototype.ny;Q.prototype.makeSVG=Q.prototype.Nu;Q.prototype.makeSvg=Q.prototype.bs;Q.prototype.stopAutoScroll=Q.prototype.lg; Q.prototype.doAutoScroll=Q.prototype.Fr;Q.prototype.isUnoccupied=Q.prototype.Pj;Q.prototype.raiseDiagramEvent=Q.prototype.P;Q.prototype.removeDiagramListener=Q.prototype.Il;Q.prototype.addDiagramListener=Q.prototype.wj;Q.prototype.findTreeRoots=Q.prototype.fz;Q.prototype.layoutDiagram=Q.prototype.Bz;Q.prototype.findTopLevelGroups=Q.prototype.Zy;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.$y;Q.prototype.ensureBounds=Q.prototype.Za;Q.prototype.findLinksByExample=Q.prototype.Ir; -Q.prototype.findNodesByExample=Q.prototype.Jr;Q.prototype.findLinkForData=Q.prototype.Cc;Q.prototype.findNodeForData=Q.prototype.ci;Q.prototype.findPartForData=Q.prototype.Dc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Lb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Od;Q.prototype.transformViewToDoc=Q.prototype.rs;Q.prototype.transformRectDocToView=Q.prototype.gA;Q.prototype.transformDocToView=Q.prototype.Ro; -Q.prototype.centerRect=Q.prototype.Dr;Q.prototype.scrollToRect=Q.prototype.bv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.rz;Q.prototype.highlight=Q.prototype.qz;Q.prototype.selectCollection=Q.prototype.Yz;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Uo;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Af; -Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prototype.Da;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.bb;Q.prototype.removeChangedListener=Q.prototype.ak;Q.prototype.addChangedListener=Q.prototype.Ug;Q.prototype.removeModelChangedListener=Q.prototype.Tz;Q.prototype.addModelChangedListener=Q.prototype.Cw;Q.prototype.findLayer=Q.prototype.Ij;Q.prototype.removeLayer=Q.prototype.Rz;Q.prototype.addLayerAfter=Q.prototype.iy; -Q.prototype.addLayerBefore=Q.prototype.Aw;Q.prototype.addLayer=Q.prototype.pl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Ej;Q.prototype.removeParts=Q.prototype.hs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.mu;Q.prototype.setProperties=Q.prototype.Vl;Q.prototype.attach=Q.prototype.ku;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.yx;Q.prototype.setInputOption=Q.prototype.Zz; -Q.prototype.getInputOption=Q.prototype.yl;Q.prototype.resetRenderingHints=Q.prototype.zx;Q.prototype.setRenderingHint=Q.prototype.Ex;Q.prototype.getRenderingHint=Q.prototype.Fe;Q.prototype.maybeUpdate=Q.prototype.nd;Q.prototype.requestUpdate=Q.prototype.Mb;Q.prototype.delayInitialization=Q.prototype.Ey;Q.prototype.isUpdateRequested=Q.prototype.xz;Q.prototype.invalidateDocumentBounds=Q.prototype.Va;Q.prototype.findObjectsNear=Q.prototype.gg;Q.prototype.findPartsNear=Q.prototype.Vy; -Q.prototype.findObjectsIn=Q.prototype.sf;Q.prototype.findPartsIn=Q.prototype.Vw;Q.prototype.findObjectsAt=Q.prototype.di;Q.prototype.findPartsAt=Q.prototype.Uy;Q.prototype.findObjectAt=Q.prototype.ec;Q.prototype.findPartAt=Q.prototype.wl;Q.prototype.focusObject=Q.prototype.gz;Q.prototype.alignDocument=Q.prototype.oy;Q.prototype.zoomToRect=Q.prototype.kA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Mw;Q.prototype.focus=Q.prototype.focus; +Q.prototype.findNodesByExample=Q.prototype.Jr;Q.prototype.findLinkForData=Q.prototype.Dc;Q.prototype.findNodeForData=Q.prototype.ci;Q.prototype.findPartForData=Q.prototype.Ec;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Lb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Od;Q.prototype.transformViewToDoc=Q.prototype.rs;Q.prototype.transformRectDocToView=Q.prototype.gA;Q.prototype.transformDocToView=Q.prototype.Ro; +Q.prototype.centerRect=Q.prototype.Dr;Q.prototype.scrollToRect=Q.prototype.bv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.rz;Q.prototype.highlight=Q.prototype.qz;Q.prototype.selectCollection=Q.prototype.Yz;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Uo;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Bf; +Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prototype.Da;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.bb;Q.prototype.removeChangedListener=Q.prototype.ak;Q.prototype.addChangedListener=Q.prototype.Ug;Q.prototype.removeModelChangedListener=Q.prototype.Tz;Q.prototype.addModelChangedListener=Q.prototype.Cw;Q.prototype.findLayer=Q.prototype.Ij;Q.prototype.removeLayer=Q.prototype.Rz;Q.prototype.addLayerAfter=Q.prototype.jy; +Q.prototype.addLayerBefore=Q.prototype.Aw;Q.prototype.addLayer=Q.prototype.pl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Ej;Q.prototype.removeParts=Q.prototype.hs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.mu;Q.prototype.setProperties=Q.prototype.Vl;Q.prototype.attach=Q.prototype.ku;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.zx;Q.prototype.setInputOption=Q.prototype.Zz; +Q.prototype.getInputOption=Q.prototype.yl;Q.prototype.resetRenderingHints=Q.prototype.Ax;Q.prototype.setRenderingHint=Q.prototype.Fx;Q.prototype.getRenderingHint=Q.prototype.Ge;Q.prototype.maybeUpdate=Q.prototype.nd;Q.prototype.requestUpdate=Q.prototype.Mb;Q.prototype.delayInitialization=Q.prototype.Ey;Q.prototype.isUpdateRequested=Q.prototype.xz;Q.prototype.invalidateDocumentBounds=Q.prototype.Va;Q.prototype.findObjectsNear=Q.prototype.hg;Q.prototype.findPartsNear=Q.prototype.Vy; +Q.prototype.findObjectsIn=Q.prototype.tf;Q.prototype.findPartsIn=Q.prototype.Ww;Q.prototype.findObjectsAt=Q.prototype.di;Q.prototype.findPartsAt=Q.prototype.Uy;Q.prototype.findObjectAt=Q.prototype.ec;Q.prototype.findPartAt=Q.prototype.wl;Q.prototype.focusObject=Q.prototype.gz;Q.prototype.alignDocument=Q.prototype.py;Q.prototype.zoomToRect=Q.prototype.kA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Nw;Q.prototype.focus=Q.prototype.focus; var li=new pb,Di=null,Og=void 0!==x.document,yi=null,zi="",rh=new D(Q,"None",0),Yi=new D(Q,"Uniform",1),Zi=new D(Q,"UniformToFill",2),Ef=new D(Q,"CycleAll",10),If=new D(Q,"CycleNotDirected",11),Kf=new D(Q,"CycleNotDirectedFast",12),Lf=new D(Q,"CycleNotUndirected",13),Ff=new D(Q,"CycleDestinationTree",14),Hf=new D(Q,"CycleSourceTree",15),Rh=new D(Q,"DocumentScroll",1),Th=new D(Q,"InfiniteScroll",2),vi=new D(Q,"TreeParentCollapsed",21),Dk=new D(Q,"AllParentsCollapsed",22),Ek=new D(Q,"AnyParentsCollapsed", -23),Fk=new E,Gk="2.2.14",Ak="image",Hk=null,ji=!1; +23),Fk=new E,Gk="2.2.15",Ak="image",Hk=null,ji=!1; function ki(){if(Og){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d6038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",md.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",J.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])md.prototype.Ld=md.prototype.Fw; Hk=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){Og=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Og};Q.None=rh;Q.Uniform=Yi; -Q.UniformToFill=Zi;Q.CycleAll=Ef;Q.CycleNotDirected=If;Q.CycleNotDirectedFast=Kf;Q.CycleNotUndirected=Lf;Q.CycleDestinationTree=Ff;Q.CycleSourceTree=Hf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=vi;Q.AllParentsCollapsed=Dk;Q.AnyParentsCollapsed=Ek;function ri(){this.ay=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.pd=this.j=!0:this.pd=null} -function sj(a,b){b.Zb.setTransform(b.kc,0,0,b.kc,0,0);b.Zb.Oc();if(null===a.pd)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")];a.pd=!0;if(Og){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Fk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); +Q.UniformToFill=Zi;Q.CycleAll=Ef;Q.CycleNotDirected=If;Q.CycleNotDirectedFast=Kf;Q.CycleNotUndirected=Lf;Q.CycleDestinationTree=Ff;Q.CycleSourceTree=Hf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=vi;Q.AllParentsCollapsed=Dk;Q.AnyParentsCollapsed=Ek;function ri(){this.by=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.pd=this.j=!0:this.pd=null} +function sj(a,b){b.Zb.setTransform(b.kc,0,0,b.kc,0,0);b.Zb.Pc();if(null===a.pd)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")];a.pd=!0;if(Og){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Fk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); f=Ma(d[2]);if(-1g&&f!==Ma("7da71ca0ad381e90")&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=c[Ma("73a612b6fb191d")](Ma("7baa19a6f76c1988428554")));a.pd=!(0<=g&&gk.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Ma("79a417a0f0181a8946")]=d;if(x.document[Ma("78a712aa")]){x.document[Ma("78a712aa")][Ma("7bb806b6ed32388c4a875b")](g); k=x.getComputedStyle(g).getPropertyValue(Ma("78a704b7e62456904c9b12701b6532a8"));var l=x.getComputedStyle(g).getPropertyValue(Ma("75b817b0ea2202"));x.document[Ma("78a712aa")][Ma("68ad1bbcf533388c4a875b")](g);if(k)if(g=x[Ma("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.pd=!1;break}else if(g&&g(Ma("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& +"none",e.style.touchAction="none");a.Ha=e;a.Zb=e.context;d=a.Zb;a.kc=a.computePixelRatio();a.viewSize.v()||(a.Ba=a.La.clientWidth||1,a.Aa=a.La.clientHeight||1);zj(a,a.Ba,a.Aa);a.La.insertBefore(e.Sa,a.La.firstChild);e=new Bk(null);e.width=1;e.height=1;a.Ov=e;a.Ux=e.context;if(Og){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ba+"px";e.style.height=a.Aa+"px";e.style.zIndex="1";f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.La.appendChild(e); +e.appendChild(f);e.onscroll=Gi;e.addEventListener("pointerdown",Qi);e.H=a;e.$x=!0;e.ay=!0;a.Qt=e;a.Nt=f}a.Jo=sa(function(){a.Rh=null;a.N()},300);a.sv=sa(function(){sh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Sj=function(b){if(a.isEnabled){var c=cj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& (d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0c||Math.abs(e.y-b.screenY)>c)?a.Yp++:a.Yp=1;d.clickCount=a.Yp;a.Zv=b.timeStamp;a.$v.jg(b.screenX,b.screenY); +b;else if(null!==c[1]&&c[1].pointerId===b.pointerId)c[1]=b,d=!0;else if(null===c[0])c[0]=b;else if(null===c[1])c[1]=b,d=!0;else{b.preventDefault();return}if(c="touch"===b.pointerType||"pen"===b.pointerType)a.Wt=!1,a.jt=!0;var e=d;d=fj(a,b,!0,!1,!0,e);dj(a,b,d);d.targetDiagram=ej(b,b.target);d.targetObject=null;e||d.clone(a.Fp);e=a.$v;c=c?25:10;b.timeStamp-a.Zvc||Math.abs(e.y-b.screenY)>c)?a.Yp++:a.Yp=1;d.clickCount=a.Yp;a.Zv=b.timeStamp;a.$v.kg(b.screenX,b.screenY); a.doMouseDown();1===b.button?b.preventDefault():gj(d,b)}};a.Xj=function(b){if(a.isEnabled){a.Kk=!0;var c=a.$k;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}if(c[0].pointerId===b.pointerId){c=fj(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX,b.clientY);null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b; d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;dj(a,f,c);c.targetObject=null;a.doMouseMove();gj(c,b)}}};a.Zj=function(b){if(a.isEnabled){a.Kk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Dt;if(c&&a.Wt)delete d[b.pointerId],b.preventDefault();else if(d=a.$k,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]=null;d=fj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY)); null!==e&&e.H instanceof Q&&e.H!==a&&dj(e.H,b,d);null===e&&(e=b.target);dj(a,b,d);d.clickCount=a.Yp;d.targetDiagram=ej(b,e);d.targetObject=null;a.doMouseUp();gj(d,b);c&&(a.jt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Yj=function(b){if(a.isEnabled){a.Kk=!1;var c=a.Dt;c[b.pointerId]&&delete c[b.pointerId];c=a.$k;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.currentTool, -b.cancelWaitAfter(),b.standardMouseOver())}};a.Qs=d.Z["d"+Ik[1]+Ik[2]+"wI"+Ak.slice(1,5)]["b"+Jk.slice(1,b)](d.Z,Hk,b,b);d.Nc(!0);Ei(a)}}ri.className="DiagramHelper";function Te(a){this.j=void 0===a?new I:a;this.o=new I}ma.Object.defineProperties(Te.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Ik="DraggingInfo";Te.className="DraggingInfo"; +b.cancelWaitAfter(),b.standardMouseOver())}};a.Qs=d.Z["d"+Ik[1]+Ik[2]+"wI"+Ak.slice(1,5)]["b"+Jk.slice(1,b)](d.Z,Hk,b,b);d.Oc(!0);Ei(a)}}ri.className="DiagramHelper";function Te(a){this.j=void 0===a?new I:a;this.m=new I}ma.Object.defineProperties(Te.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.m},set:function(a){this.m=a}}});var Ik="DraggingInfo";Te.className="DraggingInfo"; function Kj(a,b,c){this.node=a;this.info=b;this.Eu=c}Kj.className="DraggingNodeInfoPair";function Ce(){this.reset()}Ce.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new K(NaN,NaN)).freeze();this.gridSnapCellSpot=tc;this.gridSnapOrigin=(new I(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Ce.className="DraggingOptions"; function Kk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;Lk(c);b&&c.Vl(b);return c}la(Kk,Q);function Lk(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=uc;a.layout=new Mk}Kk.prototype.reset=function(){Q.prototype.reset.call(this);Lk(this)};Kk.className="Palette"; -function Nk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.Y=null;c.Tm=!1;c.Um=!1;c.F=!0;c.u=!0;c.ga=0;c.o=!1;c.fl=null;c.Ex("drawShadows",!1);a=new U;var e=new Cf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= -"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new ic(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Ok,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new I(c.x-b.width/2,c.y-b.height/2)}};c.Ff=function(){d.Va();Pk(d)};c.Qd=function(){null!==d.observed&&(d.Va(),d.N())};c.Ga=function(){1>d.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Ef=function(){null!==d.observed&&Pk(d)};c.autoScale=Yi;c.wb=!1;b&&Object.assign(c,b);return c}la(Nk,Q);Nk.prototype.computePixelRatio=function(){return 1}; -Nk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Ha,b=this.Zb;if(null!==a&&null!==b){qj(this);if(null===this.fl){var c=new Bk(null);c.width=a.width;c.height=a.height;this.fl=c}try{this.Ha=this.fl,this.Zb=this.Ha.context,this.Zb.Nc(!0),this.Zb.setTransform(1,0,0,1,0,0),this.Zb.clearRect(0,0,this.Ha.width,this.Ha.height),Qk(this)}finally{this.Ha=a,this.Zb=b}}}Q.prototype.redraw.call(this)}; -Nk.prototype.tc=function(){null===this.La&&C("No div specified");null===this.Ha&&C("No canvas specified");if(!(this.Ha instanceof xj)&&(ei(this.box),this.bd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.ji){qj(this);var b=this.Ha;a=this.Zb;a.Nc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Qk(this):null!==this.fl&&(a.drawImage(this.fl.Sa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +function Nk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.W=null;c.Tm=!1;c.Um=!1;c.F=!0;c.u=!0;c.ga=0;c.m=!1;c.fl=null;c.Fx("drawShadows",!1);a=new U;var e=new Cf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new ec(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Ok,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new I(c.x-b.width/2,c.y-b.height/2)}};c.Gf=function(){d.Va();Pk(d)};c.Qd=function(){null!==d.observed&&(d.Va(),d.N())};c.Ga=function(){1>d.updateDelay?d.N():d.m||(d.m=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Ff=function(){null!==d.observed&&Pk(d)};c.autoScale=Yi;c.wb=!1;b&&Object.assign(c,b);return c}la(Nk,Q);Nk.prototype.computePixelRatio=function(){return 1}; +Nk.prototype.redraw=function(){if(this.m&&1<=this.updateDelay){this.m=!1;var a=this.Ha,b=this.Zb;if(null!==a&&null!==b){qj(this);if(null===this.fl){var c=new Bk(null);c.width=a.width;c.height=a.height;this.fl=c}try{this.Ha=this.fl,this.Zb=this.Ha.context,this.Zb.Oc(!0),this.Zb.setTransform(1,0,0,1,0,0),this.Zb.clearRect(0,0,this.Ha.width,this.Ha.height),Qk(this)}finally{this.Ha=a,this.Zb=b}}}Q.prototype.redraw.call(this)}; +Nk.prototype.tc=function(){null===this.La&&C("No div specified");null===this.Ha&&C("No canvas specified");if(!(this.Ha instanceof xj)&&(ei(this.box),this.bd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.ji){qj(this);var b=this.Ha;a=this.Zb;a.Oc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Qk(this):null!==this.fl&&(a.drawImage(this.fl.Sa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.kc,this.kc),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ua.s;for(var c=b.length,d=0;da&&(a=0);this.ga!==a&&(this.ga=a)}}});Nk.className="Overview";function Ok(){Be.call(this);this.j=null}la(Ok,Be); Ok.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))};Rk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==rh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; Rk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===rh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Rk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==rh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Rk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; Rk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Rk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.vc();a.redraw();var c=a.position,d=a.scale;lh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.fu&&!isNaN(this.mt)&&a.documentBounds.C(this.du)?(a.scale=this.mt,a.position=this.Yv,this.fu=NaN,this.du=cc):(this.mt=d,this.Yv=c.copy(),a.zoomToFit(),this.fu=a.scale,this.du=a.documentBounds.copy());nh(b)};Rk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Rk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Za();if(null===a){try{null!==this.Uf&&(this.Uf.next()?a=this.Uf.value:this.Uf=null)}catch(k){this.Uf=null}null===a&&(0a&&(a+=360));return a}; -t.tf=function(){if(0!==(this.m&4096)===!1)return this.yk;var a=this.xa;return null!==this.panel?a*this.panel.tf():a};t.Nr=function(a,b){void 0===b&&(b=new I);b.assign(a);this.fe.Ld(b);return b};t.Or=function(a,b,c){return this.Kj(a.x,a.y,b.x,b.y,c)}; -t.Kj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,J.vf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=J.vf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +M.free(c);!h&&(J.Rr(a,d,e)||J.Rr(a,e,f)||J.Rr(a,f,g)||J.Rr(a,g,d))&&(h=!0)}I.free(d);I.free(e);I.free(f);I.free(g);return h};t.ia=function(a,b){void 0===b&&(b=new I);if(a instanceof N){var c=this.naturalBounds;b.h(a.x*c.width+a.offsetX,a.y*c.height+a.offsetY)}else b.set(a);this.ge.Fa(b);return b}; +t.gi=function(a){void 0===a&&(a=new M);var b=this.naturalBounds,c=this.ge,d=I.allocAt(0,0).transform(c);a.h(d.x,d.y,0,0);d.h(b.width,0).transform(c);Zb(a,d.x,d.y,0,0);d.h(b.width,b.height).transform(c);Zb(a,d.x,d.y,0,0);d.h(0,b.height).transform(c);Zb(a,d.x,d.y,0,0);I.free(d);return a};t.fi=function(){var a=this.ge;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a}; +t.uf=function(){if(0!==(this.o&4096)===!1)return this.yk;var a=this.xa;return null!==this.panel?a*this.panel.uf():a};t.Nr=function(a,b){void 0===b&&(b=new I);b.assign(a);this.ge.Ld(b);return b};t.Or=function(a,b,c){return this.Kj(a.x,a.y,b.x,b.y,c)}; +t.Kj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,J.wf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=J.wf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; Y.prototype.measure=function(a,b,c,d){if(!1!==nj(this)){var e=this.Ag,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=0;this instanceof Cf&&(g=this.strokeWidth);90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(il(this,!0)){case lg:g=e=0;h&&(b=a=Infinity); break;case td:isFinite(a)&&a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Vk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case Wk:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.yb>a.width)))c=!0;this.m=c?this.m|256:this.m&-257;this.Eb.v()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Eb.toString());this.Fl(f,this.Eb);jl(this,!1);M.free(f)};t=Y.prototype;t.Vg=function(){}; +this.kq>a.height||this.yb>a.width)))c=!0;this.o=c?this.o|256:this.o&-257;this.Eb.v()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Eb.toString());this.Fl(f,this.Eb);jl(this,!1);M.free(f)};t=Y.prototype;t.Vg=function(){}; function kl(a,b,c,d,e){a.Eb.h(b,c,d,e);if(!a.desiredSize.v()){var f=a.qc;c=a.Ag;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=il(a,!0);c===d&&f===e&&(b=lg);switch(b){case lg:if(c>d||f>e)ij(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:ij(a,!0);a.measure(d,e,0,0);break;case Vk:ij(a,!0);a.measure(d,f,0,0);break;case Wk:ij(a,!0),a.measure(c,e,0,0)}}} -t.Fl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ll(c,!0),this.N(),Vb(a,b)||(c.dh(),this.wn(c)))};t.wn=function(a){null!==this.portId&&(ll(a,!0),a instanceof V&&ml(a,this))}; -t.tc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn),e=this.Eb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Eb;d=this.bc;var g=this.areaBackground,h=this.Yb;null===g&&null===h||a.Oc();null!==g&&(gi(this,a,g,!0,!0,d,e),g instanceof nl&&g.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(g)):a.fillRect(e.x,e.y,e.width,e.height)); -null!==h&&(gi(this,a,h,!0,!1,d,e),h instanceof nl&&h.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(h)):a.fillRect(e.x,e.y,e.width,e.height));this.ai(a,b)}else if(!this.Pw(a,b)){this instanceof T&&this.Rj(!1);d=this.transform;g=this.panel;0!==(this.m&4096)===!0&&pl(this);var k=this.part;h=!1;var l=0;if(k&&b.Fe("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.kc}m=this.li();var n;if(!(n=b.Vi||!m)){var p=this.naturalBounds;n=this.lh;var r=n.m11,q= +t.Fl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ll(c,!0),this.N(),Tb(a,b)||(c.dh(),this.wn(c)))};t.wn=function(a){null!==this.portId&&(ll(a,!0),a instanceof V&&ml(a,this))}; +t.tc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn),e=this.Eb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Eb;d=this.bc;var g=this.areaBackground,h=this.Yb;null===g&&null===h||a.Pc();null!==g&&(gi(this,a,g,!0,!0,d,e),g instanceof nl&&g.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(g)):a.fillRect(e.x,e.y,e.width,e.height)); +null!==h&&(gi(this,a,h,!0,!1,d,e),h instanceof nl&&h.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(h)):a.fillRect(e.x,e.y,e.width,e.height));this.ai(a,b)}else if(!this.Qw(a,b)){this instanceof T&&this.Rj(!1);d=this.transform;g=this.panel;0!==(this.o&4096)===!0&&pl(this);var k=this.part;h=!1;var l=0;if(k&&b.Ge("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.kc}m=this.li();var n;if(!(n=b.Vi||!m)){var p=this.naturalBounds;n=this.lh;var r=n.m11,q= n.m21,u=n.dx,w=n.m12,v=n.m22,z=n.dy,y,A=y=0;n=y*r+A*q+u;var B=y*w+A*v+z;y=p.width+l;A=0;var F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);var L=Math.min(B,y);var S=Math.max(n+0,F)-A;var R=Math.max(B+0,y)-L;n=A;B=L;y=p.width+l;A=p.height+l;F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);L=Math.min(B,y);S=Math.max(n+S,F)-A;R=Math.max(B+R,y)-L;n=A;B=L;y=0;A=p.height+l;F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);L=Math.min(B,y);S=Math.max(n+S,F)-A;R=Math.max(B+R,y)-L;n=A;B=L;l=b.viewportBounds;p=l.x;r=l.y;n=!(n>l.width+ -p||p>S+n||B>l.height+r||r>R+B)}if(n){n=0!==(this.m&256);a.clipInsteadOfFill&&(n=!1);this instanceof Qg&&(a.font=this.font);if(n){B=g.je()?g.naturalBounds:g.actualBounds;null!==this.ib?(p=this.ib,S=p.x,R=p.y,l=p.width,p=p.height):(S=Math.max(e.x,B.x),R=Math.max(e.y,B.y),l=Math.min(e.right,B.right)-S,p=Math.min(e.bottom,B.bottom)-R);if(S>e.width+e.x||e.x>B.width+B.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(S,R,l,p);a.clip()}if(m){if(!k.isVisible()){1!==c&&(a.globalAlpha=f);return}h&& -(B=k.shadowOffset,a.iv(B.x*b.scale*b.kc,B.y*b.scale*b.kc,k.shadowBlur),ql(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?ql(a):h&&!1===this.shadowVisible&&rl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Oc(),gi(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof nl&&this.areaBackground.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);h&&(null!== -g&&0!==(g.m&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)&&null===this.shadowVisible&&rl(a);null!==this.Yb&&(a.Oc(),sl(this,a,k,e));h&&(null!==this.Yb||null!==this.areaBackground||null!==g&&0!==(g.m&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)?(tl(this,!0),null===this.shadowVisible&&rl(a)):tl(this,!1);this.ai(a,b);h&&0!==(this.m&512)===!0&&ql(a);m&&h&&rl(a);n&&(a.restore(),a.Nc(this instanceof W));d.Ur()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22* -b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function sl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.Sv();a instanceof Cf&&(e=a.sa.bounds,f=e.x,g=e.y,h=e.width,e=e.height);gi(a,b,a.Yb,!0,!1,c,d);a.Yb instanceof nl&&a.Yb.type===ol?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.rf(a.Yb)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.Pw=function(){return!1};t.ai=function(){}; -function gi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===ul)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Cf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof vl)&&c.ne&&(c.type===wl||c.lk===h&&c.Hs===k))var m=c.ne;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ -c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===xl)m=b.createLinearGradient(n,p,r,q);else if(c.type===ol)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===wl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}if(c.type!==wl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ne=m,null!==m&&(c.lk=h,c.Hs=k),null=== -m&&c.type===wl&&-1!==c.lk)){c.lk=-1;var v=a.diagram;null!==v&&-1===c.lk&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.ig=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.yf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.yf():!0};t.xf=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function pl(a){if(0!==(a.m&2048)===!0){var b=a.Bb;b.reset();if(!a.Eb.v()||!a.qc.v()){yl(a,!1);return}b.translate(a.Eb.x-a.qc.x,a.Eb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.Qn(b,c.x,c.y,c.width,c.height)}yl(a,!1);zl(a,!0)}0!==(a.m&4096)===!0&&(b=a.panel,null===b?(a.lh.set(a.Bb),a.yk=a.scale,zl(a,!1)):null!==b.fe&&(c=a.lh,c.reset(),b.je()?c.multiply(b.lh):null!==b.panel&&c.multiply(b.panel.lh),c.multiply(a.Bb),a.yk=a.scale*b.yk,zl(a,!1)))} -t.Qn=function(a,b,c,d,e){1!==this.xa&&a.scale(this.xa);if(0!==this.Gb){var f=I.alloc();f.pi(b,c,d,e,yc);a.rotate(this.Gb,f.x,f.y);I.free(f)}};t.w=function(a){if(!nj(this)){void 0===a&&(a=!1);ij(this,!0);jl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Mj=function(){nj(this)||(ij(this,!0),jl(this,!0))};function Al(a){if(!oj(a)){var b=a.panel;null!==b?b.w():a.li()&&(b=a.diagram,null!==b&&(b.se.add(a),a instanceof V&&a.vd(),b.Mb()));jl(a,!0)}} -t.Jk=function(){0!==(this.m&2048)===!1&&(yl(this,!0),zl(this,!0))};t.Iu=function(){zl(this,!0)};t.N=function(){var a=this.part;null!==a&&a.N()}; +p||p>S+n||B>l.height+r||r>R+B)}if(n){n=0!==(this.o&256);a.clipInsteadOfFill&&(n=!1);this instanceof Qg&&(a.font=this.font);if(n){B=g.ke()?g.naturalBounds:g.actualBounds;null!==this.ib?(p=this.ib,S=p.x,R=p.y,l=p.width,p=p.height):(S=Math.max(e.x,B.x),R=Math.max(e.y,B.y),l=Math.min(e.right,B.right)-S,p=Math.min(e.bottom,B.bottom)-R);if(S>e.width+e.x||e.x>B.width+B.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(S,R,l,p);a.clip()}if(m){if(!k.isVisible()){1!==c&&(a.globalAlpha=f);return}h&& +(B=k.shadowOffset,a.iv(B.x*b.scale*b.kc,B.y*b.scale*b.kc,k.shadowBlur),ql(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?ql(a):h&&!1===this.shadowVisible&&rl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Pc(),gi(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof nl&&this.areaBackground.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);h&&(null!== +g&&0!==(g.o&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)&&null===this.shadowVisible&&rl(a);null!==this.Yb&&(a.Pc(),sl(this,a,k,e));h&&(null!==this.Yb||null!==this.areaBackground||null!==g&&0!==(g.o&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)?(tl(this,!0),null===this.shadowVisible&&rl(a)):tl(this,!1);this.ai(a,b);h&&0!==(this.o&512)===!0&&ql(a);m&&h&&rl(a);n&&(a.restore(),a.Oc(this instanceof W));d.Ur()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22* +b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function sl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.Sv();a instanceof Cf&&(e=a.sa.bounds,f=e.x,g=e.y,h=e.width,e=e.height);gi(a,b,a.Yb,!0,!1,c,d);a.Yb instanceof nl&&a.Yb.type===ol?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.sf(a.Yb)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.Qw=function(){return!1};t.ai=function(){}; +function gi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===ul)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Cf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof vl)&&c.oe&&(c.type===wl||c.lk===h&&c.Hs===k))var m=c.oe;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===xl)m=b.createLinearGradient(n,p,r,q);else if(c.type===ol)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===wl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}if(c.type!==wl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.oe=m,null!==m&&(c.lk=h,c.Hs=k),null=== +m&&c.type===wl&&-1!==c.lk)){c.lk=-1;var v=a.diagram;null!==v&&-1===c.lk&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.jg=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.zf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.zf():!0};t.yf=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; +function pl(a){if(0!==(a.o&2048)===!0){var b=a.Bb;b.reset();if(!a.Eb.v()||!a.qc.v()){yl(a,!1);return}b.translate(a.Eb.x-a.qc.x,a.Eb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.Qn(b,c.x,c.y,c.width,c.height)}yl(a,!1);zl(a,!0)}0!==(a.o&4096)===!0&&(b=a.panel,null===b?(a.lh.set(a.Bb),a.yk=a.scale,zl(a,!1)):null!==b.ge&&(c=a.lh,c.reset(),b.ke()?c.multiply(b.lh):null!==b.panel&&c.multiply(b.panel.lh),c.multiply(a.Bb),a.yk=a.scale*b.yk,zl(a,!1)))} +t.Qn=function(a,b,c,d,e){1!==this.xa&&a.scale(this.xa);if(0!==this.Gb){var f=I.alloc();f.pi(b,c,d,e,yc);a.rotate(this.Gb,f.x,f.y);I.free(f)}};t.w=function(a){if(!nj(this)){void 0===a&&(a=!1);ij(this,!0);jl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Mj=function(){nj(this)||(ij(this,!0),jl(this,!0))};function Al(a){if(!oj(a)){var b=a.panel;null!==b?b.w():a.li()&&(b=a.diagram,null!==b&&(b.te.add(a),a instanceof V&&a.vd(),b.Mb()));jl(a,!0)}} +t.Jk=function(){0!==(this.o&2048)===!1&&(yl(this,!0),zl(this,!0))};t.Iu=function(){zl(this,!0)};t.N=function(){var a=this.part;null!==a&&a.N()}; function il(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===W.Table)return Bl(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===W.Auto&&d.vb()===a)return Cl(a,td,b);if(c===Xk){if(null!==d){if(d.type===W.Spot&&d.vb()===a)return Cl(a,td,b);c=d.defaultStretch;return c===Xk?Cl(a,lg,b):Cl(a,c,b)}return Cl(a,lg,b)}return Cl(a,c,b)} function Bl(a,b,c,d){var e=a.stretch;if(e!==Xk)return Cl(a,e,d);var f=e=null;switch(b.stretch){case Wk:f=!0;break;case td:f=!0}switch(c.stretch){case Vk:e=!0;break;case td:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===Vk||b===td);null===f&&(f=b===Wk||b===td);return!0===e&&!0===f?Cl(a,td,d):!0===e?Cl(a,Vk,d):!0===f?Cl(a,Wk,d):Cl(a,lg,d)} -function Cl(a,b,c){if(c)return b;if(b===lg)return lg;c=a.desiredSize;if(c.v())return lg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===Vk)return lg;if(b===td)return Wk}else{if(b===Wk)return lg;if(b===td)return Vk}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===Wk)return lg;if(b===td)return Vk}else{if(b===Vk)return lg;if(b===td)return Wk}return b}function tl(a,b){a.m=b?a.m|512:a.m&-513}function el(a){return 0!==(a.m&1024)}function Dl(a,b){a.m=b?a.m|1024:a.m&-1025} -function yl(a,b){a.m=b?a.m|2048:a.m&-2049}function zl(a,b){a.m=b?a.m|4096:a.m&-4097}function nj(a){return 0!==(a.m&8192)}function ij(a,b){a.m=b?a.m|8192:a.m&-8193}function oj(a){return 0!==(a.m&16384)}function jl(a,b){a.m=b?a.m|16384:a.m&-16385}t.ni=function(a){this.Tf=a};t.ns=function(){};t.fv=function(a){this.pa=a;Al(this);return!0};t.Ul=function(a,b){if(this.pa.x!==a||this.pa.y!==b)this.pa.h(a,b),this.Jk()};t.Sv=function(){return 0}; +function Cl(a,b,c){if(c)return b;if(b===lg)return lg;c=a.desiredSize;if(c.v())return lg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===Vk)return lg;if(b===td)return Wk}else{if(b===Wk)return lg;if(b===td)return Vk}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===Wk)return lg;if(b===td)return Vk}else{if(b===Vk)return lg;if(b===td)return Wk}return b}function tl(a,b){a.o=b?a.o|512:a.o&-513}function el(a){return 0!==(a.o&1024)}function Dl(a,b){a.o=b?a.o|1024:a.o&-1025} +function yl(a,b){a.o=b?a.o|2048:a.o&-2049}function zl(a,b){a.o=b?a.o|4096:a.o&-4097}function nj(a){return 0!==(a.o&8192)}function ij(a,b){a.o=b?a.o|8192:a.o&-8193}function oj(a){return 0!==(a.o&16384)}function jl(a,b){a.o=b?a.o|16384:a.o&-16385}t.ni=function(a){this.Uf=a};t.ns=function(){};t.fv=function(a){this.pa=a;Al(this);return!0};t.Ul=function(a,b){if(this.pa.x!==a||this.pa.y!==b)this.pa.h(a,b),this.Jk()};t.Sv=function(){return 0}; function El(a){var b=a.part;if(b instanceof V&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||ml(b,a)}}function Fl(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof W?a instanceof V?a.vd():a.$l(a,function(a){El(a)}):El(a))} t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new wi(a,b,c,d):e=a;e.sd=this;a=this.Yg();null!==a&&Gl(a)&&C("Cannot add a Binding to a template that has already been copied: "+e);null===this.localBindings&&(this.localBindings=new E);this.localBindings.add(e);return this};t.set=function(a){Object.assign(this,a);return this};t.ku=function(a){Hl(this,a);return this};t.apply=function(a){a(this);return this};t.Vl=function(a){uj(this,a);return this};t.Yy=function(){return this.Yg()}; t.Yg=function(){for(var a=this instanceof W?this:this.panel;null!==a;){if(null!==a.allBindings)return a;a=a.panel}return null};t.mv=function(a){a.sd=this;null===this.animationTriggers&&(this.animationTriggers=new pb);this.animationTriggers.add(a.propertyName,a);return this}; function Il(a,b){for(var c=1;ce)&&C("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&C("Must specify non-negative integer column for RowColumnDefinition "+ b+", not: "+e),a.isRow=!1,a.index=e);e=new Wa;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);uj(a,e)}else uj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function Ml(a,b){Jl.add(a,b)}function Nl(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} -ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.bp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new cl),this.A.bp=a)}},localBindings:{get:function(){return null!==this.A?this.A.Ef:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.Ef=a)}},srcBindings:{get:function(){return null!==this.A?this.A.Wo:null},set:function(a){this.srcBindings!== -a&&(null===this.A&&(this.A=new cl),this.A.Wo=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.wi:null},set:function(a){var b=this.shadowVisible;b!==a&&(bl(this),this.A.wi=a,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Gc:null},set:function(a){var b=this.enabledChanged;b!==a&&(bl(this),this.A.Gc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ +ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.bp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new cl),this.A.bp=a)}},localBindings:{get:function(){return null!==this.A?this.A.Ff:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.Ff=a)}},srcBindings:{get:function(){return null!==this.A?this.A.Wo:null},set:function(a){this.srcBindings!== +a&&(null===this.A&&(this.A=new cl),this.A.Wo=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.wi:null},set:function(a){var b=this.shadowVisible;b!==a&&(bl(this),this.A.wi=a,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Hc:null},set:function(a){var b=this.enabledChanged;b!==a&&(bl(this),this.A.Hc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ get:function(){return null!==this.Ra?this.Ra.Oq:$f},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ra&&(this.Ra=new Ol),this.Ra.Oq=a,this.w(),this.g("segmentOrientation",b,a),a===$f&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ra?this.Ra.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ra&&(this.Ra=new Ol),this.Ra.u=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{ -get:function(){return null!==this.Ra?this.Ra.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&C("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.xa=a,this.w(),this.g("scale",b,a))}},angle:{get:function(){return this.Gb},set:function(a){var b=this.Gb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Gb=a,Fl(this),this.w(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.$c},set:function(a){var b=a.width,c=a.height,d=this.$c,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&& isNaN(c))||(this.$c=a=a.J(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",d,a),el(this)&&(a=this.part,null!==a&&(fl(this,a,"width"),fl(this,a,"height"))))}},width:{get:function(){return this.$c.width},set:function(a){var b=this.$c.width;b===a||isNaN(b)&&isNaN(a)||(b=this.$c,this.$c=a=(new K(a,this.$c.height)).freeze(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",b,a),el(this)&&(a=this.part,null!==a&&fl(this,a,"width")))}},height:{ get:function(){return this.$c.height},set:function(a){var b=this.$c.height;b===a||isNaN(b)&&isNaN(a)||(b=this.$c,this.$c=a=(new K(this.$c.width,a)).freeze(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",b,a),el(this)&&(a=this.part,null!==a&&fl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Db},set:function(a){var b=this.minSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), -bl(this),this.A.u=a,this.w(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Lb},set:function(a){var b=this.maxSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),bl(this),this.A.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.bc}},margin:{ -get:function(){return this.Ag},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.Ag;b.C(a)||(this.Ag=a=a.J(),this.w(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.m&2048)===!0&&pl(this);return this.Bb}},fe:{get:function(){0!==(this.m&4096)===!0&&pl(this);return this.lh}},animationTriggers:{get:function(){return null!==this.A?this.A.cb:null},set:function(a){this.animationTriggers!== -a&&(bl(this),this.A.cb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.ui:lg},set:function(a){this.reshapingBehavior!==a&&(bl(this),this.A.ui=a)}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(a.Ec()&&!a.Sb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Fb=a=a.J(),Al(this),this.g("alignment",b,a))}},column:{get:function(){return this.qg}, -set:function(a){a=Math.round(a);var b=this.qg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.qg=a,this.w(),this.g("column",b,a))}},columnSpan:{get:function(){return null!==this.A?this.A.Db:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),bl(this),this.A.Db=a,this.w(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Ln},set:function(a){a=Math.round(a);var b=this.Ln;b!==a&&(0>a&&wa(a,">= 0", +bl(this),this.A.u=a,this.w(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.m:Lb},set:function(a){var b=this.maxSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),bl(this),this.A.m=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.bc}},margin:{ +get:function(){return this.Ag},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.Ag;b.C(a)||(this.Ag=a=a.J(),this.w(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.o&2048)===!0&&pl(this);return this.Bb}},ge:{get:function(){0!==(this.o&4096)===!0&&pl(this);return this.lh}},animationTriggers:{get:function(){return null!==this.A?this.A.cb:null},set:function(a){this.animationTriggers!== +a&&(bl(this),this.A.cb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.ui:lg},set:function(a){this.reshapingBehavior!==a&&(bl(this),this.A.ui=a)}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(a.Fc()&&!a.Sb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Fb=a=a.J(),Al(this),this.g("alignment",b,a))}},column:{get:function(){return this.rg}, +set:function(a){a=Math.round(a);var b=this.rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.rg=a,this.w(),this.g("column",b,a))}},columnSpan:{get:function(){return null!==this.A?this.A.Db:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),bl(this),this.A.Db=a,this.w(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Ln},set:function(a){a=Math.round(a);var b=this.Ln;b!==a&&(0>a&&wa(a,">= 0", Y,"row"),this.Ln=a,this.w(),this.g("row",b,a))}},rowSpan:{get:function(){return null!==this.A?this.A.vi:1},set:function(a){a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),bl(this),this.A.vi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.xi:null},set:function(a){var b=this.spanAllocation;b!==a&&(bl(this),this.A.xi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{ -get:function(){return this.fk},set:function(a){var b=this.fk;b.C(a)||(this.fk=a=a.J(),this.w(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.Gn},set:function(a){var b=this.Gn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&Ql(c,this);this.Gn=a;null!==a&&null!==c&&(c.Ge=!0,Rl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!== +get:function(){return this.fk},set:function(a){var b=this.fk;b.C(a)||(this.fk=a=a.J(),this.w(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.Gn},set:function(a){var b=this.Gn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&Ql(c,this);this.Gn=a;null!==a&&null!==c&&(c.He=!0,Rl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!== this.aa?this.aa.tj:sc},set:function(a){var b=this.toSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.tj=a,this.g("toSpot",b,a),El(this))}},toEndSegmentLength:{get:function(){return null!==this.aa?this.aa.rj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",Y,"toEndSegmentLength"),this.Rc(),this.aa.rj=a,this.g("toEndSegmentLength",b,a),El(this))}},toShortLength:{get:function(){return null!==this.aa?this.aa.sj:0},set:function(a){var b= this.toShortLength;b!==a&&(this.Rc(),this.aa.sj=a,this.g("toShortLength",b,a),El(this))}},toLinkable:{get:function(){return null!==this.aa?this.aa.sr:null},set:function(a){var b=this.toLinkable;b!==a&&(this.Rc(),this.aa.sr=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.aa?this.aa.tr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(0>a&&wa(a,">= 0",Y,"toMaxLinks"),this.Rc(),this.aa.tr=a,this.g("toMaxLinks", b,a))}},fromSpot:{get:function(){return null!==this.aa?this.aa.Qi:sc},set:function(a){var b=this.fromSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.Qi=a,this.g("fromSpot",b,a),El(this))}},fromEndSegmentLength:{get:function(){return null!==this.aa?this.aa.Oi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",Y,"fromEndSegmentLength"),this.Rc(),this.aa.Oi=a,this.g("fromEndSegmentLength",b,a),El(this))}},fromShortLength:{ @@ -968,16 +968,16 @@ this.fromMaxLinks;b!==a&&(0>a&&wa(a,">= 0",Y,"fromMaxLinks"),this.Rc(),this.aa.L get:function(){return null!==this.A?this.A.uh:null},set:function(a){var b=this.doubleClick;b!==a&&(bl(this),this.A.uh=a,this.g("doubleClick",b,a))}},contextClick:{get:function(){return null!==this.A?this.A.qh:null},set:function(a){var b=this.contextClick;b!==a&&(bl(this),this.A.qh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.mouseEnter;b!==a&&(bl(this),this.A.Fh= a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ih:null},set:function(a){var b=this.mouseLeave;b!==a&&(bl(this),this.A.Ih=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Jh:null},set:function(a){var b=this.mouseOver;b!==a&&(bl(this),this.A.Jh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Hh:null},set:function(a){var b= this.mouseHover;b!==a&&(bl(this),this.A.Hh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Gh:null},set:function(a){var b=this.mouseHold;b!==a&&(bl(this),this.A.Gh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Qd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(bl(this),this.A.Qd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{ -get:function(){return null!==this.A?this.A.Ff:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(bl(this),this.A.Ff=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{get:function(){return null!==this.A?this.A.Eh:null},set:function(a){var b=this.mouseDrop;b!==a&&(bl(this),this.A.Eh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.Y:null},set:function(a){var b=this.actionDown;b!==a&&(bl(this),this.A.Y=a,this.g("actionDown", +get:function(){return null!==this.A?this.A.Gf:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(bl(this),this.A.Gf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{get:function(){return null!==this.A?this.A.Eh:null},set:function(a){var b=this.mouseDrop;b!==a&&(bl(this),this.A.Eh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.W:null},set:function(a){var b=this.actionDown;b!==a&&(bl(this),this.A.W=a,this.g("actionDown", b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ga:null},set:function(a){var b=this.actionMove;b!==a&&(bl(this),this.A.ga=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ga:null},set:function(a){var b=this.actionUp;b!==a&&(bl(this),this.A.Ga=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel; b!==a&&(bl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!==this.A?this.A.Th:null},set:function(a){var b=this.toolTip;b!==a&&(bl(this),this.A.Th=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.rh:null},set:function(a){var b=this.contextMenu;b!==a&&(bl(this),this.A.rh=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.mv;Y.prototype.findBindingPanel=Y.prototype.Yg; -Y.prototype.findTemplateBinder=Y.prototype.Yy;Y.prototype.setProperties=Y.prototype.Vl;Y.prototype.apply=Y.prototype.apply;Y.prototype.attach=Y.prototype.ku;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.xf;Y.prototype.isVisibleObject=Y.prototype.yf;Y.prototype.isContainedBy=Y.prototype.ig;Y.prototype.getNearestIntersectionPoint=Y.prototype.Or;Y.prototype.getLocalPoint=Y.prototype.Nr;Y.prototype.getDocumentScale=Y.prototype.tf;Y.prototype.getDocumentAngle=Y.prototype.fi; -Y.prototype.getDocumentBounds=Y.prototype.gi;Y.prototype.getDocumentPoint=Y.prototype.ia;Y.prototype.intersectsRect=Y.prototype.Sc;Y.prototype.containedInRect=Y.prototype.Wg;Y.prototype.containsRect=Y.prototype.De;Y.prototype.containsPoint=Y.prototype.ba;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.bb;Y.prototype.addCopyProperty=Y.prototype.zw;var Jl=null;Y.className="GraphObject";Jl=new pb; +Y.prototype.findTemplateBinder=Y.prototype.Yy;Y.prototype.setProperties=Y.prototype.Vl;Y.prototype.apply=Y.prototype.apply;Y.prototype.attach=Y.prototype.ku;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.yf;Y.prototype.isVisibleObject=Y.prototype.zf;Y.prototype.isContainedBy=Y.prototype.jg;Y.prototype.getNearestIntersectionPoint=Y.prototype.Or;Y.prototype.getLocalPoint=Y.prototype.Nr;Y.prototype.getDocumentScale=Y.prototype.uf;Y.prototype.getDocumentAngle=Y.prototype.fi; +Y.prototype.getDocumentBounds=Y.prototype.gi;Y.prototype.getDocumentPoint=Y.prototype.ia;Y.prototype.intersectsRect=Y.prototype.Sc;Y.prototype.containedInRect=Y.prototype.Wg;Y.prototype.containsRect=Y.prototype.Ee;Y.prototype.containsPoint=Y.prototype.ba;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.bb;Y.prototype.addCopyProperty=Y.prototype.zw;var Jl=null;Y.className="GraphObject";Jl=new pb; Ml("Button",function(){function a(a,b){return null!==a.diagram.ec(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Il(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Il(Cf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new N(0,0,2.76142374915397,2.761423749153969),spot2:new N(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.xf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; -b.mouseLeave=function(a,b){b.xf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.xf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Cf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram, -g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Cf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Il(Cf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new N(0,0,2.76142374915397,2.761423749153969),spot2:new N(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.yf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; +b.mouseLeave=function(a,b){b.yf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.yf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Cf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram, +g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Cf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); Ml("TreeExpanderButton",function(){var a=Il("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Il(Cf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Jb},(new wi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Fo()),{visible:!1},(new wi("visible","isTreeLeaf",function(a){return!a})).Fo());a.click=function(a,c){c=c.part;c instanceof ue&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); @@ -986,85 +986,85 @@ a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};r Ml("ContextMenu",function(){return Il(ue,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new I(0,3),shadowBlur:5},new wi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ml("ContextMenuButton",function(){var a=Il("Button");a.stretch=Vk;var b=a.fb("ButtonBorder");b instanceof Cf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); Ml("PanelExpanderButton",function(a){var b=Nl(a,"COLLAPSIBLE"),c=Il("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Il(Cf,{name:"ButtonIcon",strokeWidth:2},(new wi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Fo(b))); a=c.fb("ButtonBorder");a instanceof Cf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.Yg();null===e&&(e=c.part);null!==e&&(c=e.fb(b),null!==c&&(a.handled=!0,d.Da("Collapse/Expand Panel"),c.visible=!c.visible,d.eb("Collapse/Expand Panel")))}};return c}); -Ml("CheckBoxButton",function(a){var b=Nl(a);a=Il("Button",{desiredSize:new K(14,14)},Il(Cf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:ng,visible:!1},""!==b?(new wi("visible",b)).ox():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.fb("ButtonIcon");c.Da("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +Ml("CheckBoxButton",function(a){var b=Nl(a);a=Il("Button",{desiredSize:new K(14,14)},Il(Cf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:ng,visible:!1},""!==b?(new wi("visible",b)).px():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.fb("ButtonIcon");c.Da("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.eb("checkbox")}}};return a}); -Ml("CheckBox",function(a){a=Nl(a);a=Il("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ic(0,1,0,0)});var b=Il(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, +Ml("CheckBox",function(a){a=Nl(a);a=Il("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ec(0,1,0,0)});var b=Il(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});Y.None=lg=new D(Y,"None",0);Y.Default=Xk=new D(Y,"Default",0);Y.Vertical=Wk=new D(Y,"Vertical",4);Y.Horizontal=Vk=new D(Y,"Horizontal",5);Y.Fill=td=new D(Y,"Fill",3);Y.Uniform=ng=new D(Y,"Uniform",1); Y.UniformToFill=Yk=new D(Y,"UniformToFill",2);Y.FlipVertical=Zk=new D(Y,"FlipVertical",1);Y.FlipHorizontal=$k=new D(Y,"FlipHorizontal",2);Y.FlipBoth=al=new D(Y,"FlipBoth",3);Y.make=Il;Y.getBuilders=function(){var a=new pb,b;for(b in Jl)if(b!==b.toLowerCase()){var c=Jl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=Ml; Y.build=function(a,b){var c=Jl.I(a);if("function"===typeof c&&(c=c(null),c instanceof Y))return b&&c.set(b),c;C('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')};Y.takeBuilderArgument=Nl; -function cl(){this.ic=!1;this.va="";this.bp=-1;this.hb=this.Wo=this.Ef=null;this.j="";this.cb=this.xi=this.Gc=this.rh=this.Th=this.F=this.Ga=this.ga=this.Y=this.Eh=this.Ff=this.Qd=this.Gh=this.Hh=this.Jh=this.Ih=this.Fh=this.qh=this.uh=this.oh=null;this.u=Db;this.o=Lb;this.Zf=Xk;this.Db=this.vi=1;this.ui=lg;this.ke=this.wi=this.nb=null;this.Hc="category"} -cl.prototype.copy=function(){var a=new cl;a.va=this.va;a.bp=this.bp;a.Ef=this.Ef;a.hb=this.hb;a.j=this.j;a.oh=this.oh;a.uh=this.uh;a.qh=this.qh;a.Fh=this.Fh;a.Ih=this.Ih;a.Jh=this.Jh;a.Hh=this.Hh;a.Gh=this.Gh;a.Qd=this.Qd;a.Ff=this.Ff;a.Eh=this.Eh;a.Y=this.Y;a.ga=this.ga;a.Ga=this.Ga;a.F=this.F;a.Th=this.Th;a.rh=this.rh;a.Gc=this.Gc;a.xi=this.xi;a.cb=this.cb;a.u=this.u.J();a.o=this.o.J();a.Zf=this.Zf;a.vi=this.vi;a.Db=this.Db;a.ui=this.ui;a.nb=this.nb;a.wi=this.wi;a.ke=this.ke;a.Hc=this.Hc;return a}; -function Ol(){this.u=-Infinity;this.o=0;this.F=qb;this.Oq=$f;this.j=this.Y="None"}Ol.prototype.copy=function(){var a=new Ol;a.u=this.u;a.o=this.o;a.F=this.F.J();a.Oq=this.Oq;a.Y=this.Y;a.j=this.j;return a};Ol.className="LinkElementSettings";function dl(){this.tj=this.Qi=Wc;this.sj=this.Pi=this.rj=this.Oi=NaN;this.sr=this.Kp=null;this.tr=this.Lp=Infinity} +function cl(){this.ic=!1;this.va="";this.bp=-1;this.hb=this.Wo=this.Ff=null;this.j="";this.cb=this.xi=this.Hc=this.rh=this.Th=this.F=this.Ga=this.ga=this.W=this.Eh=this.Gf=this.Qd=this.Gh=this.Hh=this.Jh=this.Ih=this.Fh=this.qh=this.uh=this.oh=null;this.u=Db;this.m=Lb;this.$f=Xk;this.Db=this.vi=1;this.ui=lg;this.le=this.wi=this.nb=null;this.Ic="category"} +cl.prototype.copy=function(){var a=new cl;a.va=this.va;a.bp=this.bp;a.Ff=this.Ff;a.hb=this.hb;a.j=this.j;a.oh=this.oh;a.uh=this.uh;a.qh=this.qh;a.Fh=this.Fh;a.Ih=this.Ih;a.Jh=this.Jh;a.Hh=this.Hh;a.Gh=this.Gh;a.Qd=this.Qd;a.Gf=this.Gf;a.Eh=this.Eh;a.W=this.W;a.ga=this.ga;a.Ga=this.Ga;a.F=this.F;a.Th=this.Th;a.rh=this.rh;a.Hc=this.Hc;a.xi=this.xi;a.cb=this.cb;a.u=this.u.J();a.m=this.m.J();a.$f=this.$f;a.vi=this.vi;a.Db=this.Db;a.ui=this.ui;a.nb=this.nb;a.wi=this.wi;a.le=this.le;a.Ic=this.Ic;return a}; +function Ol(){this.u=-Infinity;this.m=0;this.F=qb;this.Oq=$f;this.j=this.W="None"}Ol.prototype.copy=function(){var a=new Ol;a.u=this.u;a.m=this.m;a.F=this.F.J();a.Oq=this.Oq;a.W=this.W;a.j=this.j;return a};Ol.className="LinkElementSettings";function dl(){this.tj=this.Qi=Wc;this.sj=this.Pi=this.rj=this.Oi=NaN;this.sr=this.Kp=null;this.tr=this.Lp=Infinity} dl.prototype.copy=function(){var a=new dl;a.Qi=this.Qi.J();a.tj=this.tj.J();a.Oi=this.Oi;a.rj=this.rj;a.Pi=this.Pi;a.sj=this.sj;a.Kp=this.Kp;a.sr=this.sr;a.Lp=this.Lp;a.tr=this.tr;return a};dl.className="LinkSettings";function Sl(){this.Ta=[1,0,0,1,0,0]}Sl.prototype.copy=function(){var a=new Sl;a.Ta[0]=this.Ta[0];a.Ta[1]=this.Ta[1];a.Ta[2]=this.Ta[2];a.Ta[3]=this.Ta[3];a.Ta[4]=this.Ta[4];a.Ta[5]=this.Ta[5];return a}; -Sl.prototype.translate=function(a,b){this.Ta[4]+=this.Ta[0]*a+this.Ta[2]*b;this.Ta[5]+=this.Ta[1]*a+this.Ta[3]*b};Sl.prototype.scale=function(a,b){this.Ta[0]*=a;this.Ta[1]*=a;this.Ta[2]*=b;this.Ta[3]*=b};Sl.className="STransform";function Tl(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Iw=[];this.pattern=null}Tl.prototype.addColorStop=function(a,b){this.Iw.push({offset:a,color:b})};Tl.className="SGradient"; +Sl.prototype.translate=function(a,b){this.Ta[4]+=this.Ta[0]*a+this.Ta[2]*b;this.Ta[5]+=this.Ta[1]*a+this.Ta[3]*b};Sl.prototype.scale=function(a,b){this.Ta[0]*=a;this.Ta[1]*=a;this.Ta[2]*=b;this.Ta[3]*=b};Sl.className="STransform";function Tl(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Jw=[];this.pattern=null}Tl.prototype.addColorStop=function(a,b){this.Jw.push({offset:a,color:b})};Tl.className="SGradient"; function xj(a,b){this.ownerDocument=a=void 0===b?x.document:b;this.Jz="http://www.w3.org/2000/svg";void 0!==a&&(this.Sa=this.Vb("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Sa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Sa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.po=null;this.context=new Ul(this)} xj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.style.width=c+"px",this.style.height=d+"px",this.Sa.setAttributeNS(null,"width",c+"px"),this.Sa.setAttributeNS(null,"height",d+"px"),this.Sa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.bw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.bw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -xj.prototype.Vb=function(a,b,c){a=this.ownerDocument.createElementNS(this.Jz,a);if(ya(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};xj.prototype.getBoundingClientRect=function(){return this.Sa.getBoundingClientRect()};xj.prototype.focus=function(){this.Sa.focus()};xj.prototype.Ow=function(){this.ownerDocument=null}; +xj.prototype.Vb=function(a,b,c){a=this.ownerDocument.createElementNS(this.Jz,a);if(ya(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};xj.prototype.getBoundingClientRect=function(){return this.Sa.getBoundingClientRect()};xj.prototype.focus=function(){this.Sa.focus()};xj.prototype.Pw=function(){this.ownerDocument=null}; ma.Object.defineProperties(xj.prototype,{width:{get:function(){return this.Sa.width.baseVal.value},set:function(a){this.Sa.width=a}},height:{get:function(){return this.Sa.height.baseVal.value},set:function(a){this.Sa.height=a}},style:{get:function(){return this.Sa.style}}});xj.className="SVGSurface"; -function Ul(a){this.qs=a;this.svg=a.Sa;this.stack=[];this.md=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Lg=this.Yq=this.Xq=0;this.Xr=null;this.path=[];this.et=!1;this.Og=null;this.pj=0;this.Ee=new Sl; +function Ul(a){this.qs=a;this.svg=a.Sa;this.stack=[];this.md=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Lg=this.Yq=this.Xq=0;this.Xr=null;this.path=[];this.et=!1;this.Og=null;this.pj=0;this.Fe=new Sl; Vl(this,1,0,0,1,0,0);var b=kb++,c=this.Vb("clipPath",{id:"mainClip"+b});c.appendChild(this.Vb("rect",{x:0,y:0,width:a.width,height:a.height}));this.bw=c;this.qs.Sa.appendChild(c);this.md[0].setAttributeNS(null,"clip-path","url(#mainClip"+b+")");this.Lz={}}t=Ul.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,r=b+n,q=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,q,a-m,b-n]),this.path.push(["A",c,c,0,1,q,p,r])):1E-6=Math.PI),q,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[]};t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){}; -t.clip=function(){this.addPath("clipPath",this.path,this.Ee)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new Tl("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.clip=function(){this.addPath("clipPath",this.path,this.Fe)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new Tl("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.Lz;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+kb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Vb("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Vb(Ak,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; t.createRadialGradient=function(a,b,c,d,e,f){var g=new Tl("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g}; t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width,n=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=n);d=d||0;e=e||0;f=f||0;g=g||0;h=h||0;k=k||0;a={x:0,y:0,width:m||d,height:n||e,href:l};J.ca(d,h)&&J.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(a.preserveAspectRatio= -"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+kb++,g=this.Vb("clipPath",{id:f}),g.appendChild(this.Vb("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";Wl(this,Ak,a,this.Ee,l);this.addElement(Ak,a)};t.fill=function(){this.addPath("fill",this.path,this.Ee)}; -t.rf=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};Wl(this,"fill",a,this.Ee);this.addElement("rect",a)};t.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};Wl(this,"fill",b,this.Ee);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; +"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+kb++,g=this.Vb("clipPath",{id:f}),g.appendChild(this.Vb("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";Wl(this,Ak,a,this.Fe,l);this.addElement(Ak,a)};t.fill=function(){this.addPath("fill",this.path,this.Fe)}; +t.sf=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};Wl(this,"fill",a,this.Fe);this.addElement("rect",a)};t.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};Wl(this,"fill",b,this.Fe);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.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"])}; -t.restore=function(){this.Ee=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.lineDashOffset=a.lineDashOffset;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}; -t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(e=0;eg.width+g.x||g.x> -k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;Vl(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.li()&&!this.isVisible())return!0;a.Ee.Ta=[1,0,0,1,0,0];(this instanceof Qg&&1g.width+g.x||g.x> +k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;Vl(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.li()&&!this.isVisible())return!0;a.Fe.Ta=[1,0,0,1,0,0];(this instanceof Qg&&1b?(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.pm?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.pm?this.clip():this.fill()};t.si=function(){this.pm||this.stroke()};t.iv=function(a,b,c){this.Xq=a;this.Yq=b;this.Lg=c}; -t.Gr=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Er=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(Yl),a.lineDashOffset=0)};t.Nc=function(a){a&&(this.Fs="");this.Es=this.Gs=""}; +t.save=function(){this.Pc();this.Z.save()};vl.prototype.rotate=function(a){this.rl.rotate(57.2958*a,0,0)};t=vl.prototype;t.setTransform=function(a,b,c,d,e,f){this.rl.setTransform(a,b,c,d,e,f)};t.scale=function(a,b){this.rl.scale(a,b)};t.translate=function(a,b){this.rl.translate(a,b)};t.stroke=function(){this.Z.stroke()}; +t.transform=function(a,b,c,d,e,f){if(1!==a||0!==b||0!==c||1!==d||0!==e||0!==f){var g=this.rl,h=g.m11*a+g.m21*b;a=g.m12*a+g.m22*b;b=g.m11*c+g.m21*d;c=g.m12*c+g.m22*d;g.dx=g.m11*e+g.m21*f+g.dx;g.dy=g.m12*e+g.m22*f+g.dy;g.m11=h;g.m12=a;g.m21=b;g.m22=c}};t.Pc=function(){var a=this.rl;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)}; +t.sf=function(a){if(a instanceof nl&&a.type===ol){var b=a.lk;a=a.Hs;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.pm?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.pm?this.clip():this.fill()};t.si=function(){this.pm||this.stroke()};t.iv=function(a,b,c){this.Xq=a;this.Yq=b;this.Lg=c}; +t.Gr=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Er=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(Yl),a.lineDashOffset=0)};t.Oc=function(a){a&&(this.Fs="");this.Es=this.Gs=""}; ma.Object.defineProperties(vl.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.Es!==a&&(this.Es=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.Fs!==a&&(this.Fs=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit= a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY= a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.Gs!==a&&(this.Gs=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},clipInsteadOfFill:{get:function(){return this.pm}, -set:function(a){this.pm=a}}});var Yl=Object.freeze([]);vl.className="CanvasSurfaceContext";function Zl(){this.F=this.o=this.u=this.j=0}Zl.className="ColorNumbers"; -function nl(a,b){$l||(am(),$l=!0);Ra(this);this._isFrozen=!1;void 0===a?(this.qa=ul,this.kk="black"):"string"===typeof a?(this.qa=ul,this.kk=a):(this.qa=a,this.kk="black");a=this.qa;a===xl?(this.Gd=uc,this.zk=Bc):this.zk=a===ol?this.Gd=yc:this.Gd=sc;this.cr=0;this.Ap=NaN;this.ne=this.Bq=this.me=null;this.Hs=this.lk=0;b&&Object.assign(this,b)} -nl.prototype.copy=function(){var a=new nl;a.qa=this.qa;a.kk=this.kk;a.Gd=this.Gd.J();a.zk=this.zk.J();a.cr=this.cr;a.Ap=this.Ap;null!==this.me&&(a.me=this.me.copy());a.Bq=this.Bq;return a};t=nl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.me&&this.me.freeze();return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.me&&this.me.ja();return this};t.ob=function(a){a.classType===nl&&(this.type=a)}; +set:function(a){this.pm=a}}});var Yl=Object.freeze([]);vl.className="CanvasSurfaceContext";function Zl(){this.F=this.m=this.u=this.j=0}Zl.className="ColorNumbers"; +function nl(a,b){$l||(am(),$l=!0);Ra(this);this._isFrozen=!1;void 0===a?(this.qa=ul,this.kk="black"):"string"===typeof a?(this.qa=ul,this.kk=a):(this.qa=a,this.kk="black");a=this.qa;a===xl?(this.Gd=uc,this.zk=Bc):this.zk=a===ol?this.Gd=yc:this.Gd=sc;this.cr=0;this.Ap=NaN;this.oe=this.Bq=this.ne=null;this.Hs=this.lk=0;b&&Object.assign(this,b)} +nl.prototype.copy=function(){var a=new nl;a.qa=this.qa;a.kk=this.kk;a.Gd=this.Gd.J();a.zk=this.zk.J();a.cr=this.cr;a.Ap=this.Ap;null!==this.ne&&(a.ne=this.ne.copy());a.Bq=this.Bq;return a};t=nl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.ne&&this.ne.freeze();return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.ne&&this.ne.ja();return this};t.ob=function(a){a.classType===nl&&(this.type=a)}; t.toString=function(){var a="Brush(";if(this.type===ul)a+=this.color;else if(a=this.type===xl?a+"Linear ":this.type===ol?a+"Radial ":this.type===wl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&wa(a,"0 <= loc <= 1",nl,"addColorStop:loc");null===this.me&&(this.me=new pb);this.me.add(a,b);this.qa===ul&&(this.type=xl);this.ne=null;return this}; +t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&wa(a,"0 <= loc <= 1",nl,"addColorStop:loc");null===this.ne&&(this.ne=new pb);this.ne.add(a,b);this.qa===ul&&(this.type=xl);this.oe=null;return this}; t.Cz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?bm:b;if(this.type===ul)Uh(this.color),this.color=cm(a,b);else if((this.type===xl||this.type===ol)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,cm(a,b));return this};function dm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bm:c;Uh(a);return cm(b,c)} t.Dy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?bm:b;if(this.type===ul)Uh(this.color),this.color=cm(-a,b);else if((this.type===xl||this.type===ol)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,cm(-a,b));return this};function em(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bm:c;Uh(a);return cm(-b,c)} -function fm(a,b,c){Uh(a);a=gm.j;var d=gm.u,e=gm.o,f=gm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((gm.j-a)*c+a)+", "+Math.round((gm.u-d)*c+d)+", "+Math.round((gm.o-e)*c+e)+", "+Math.round((gm.F-f)*c+f)+")"} -t.jx=function(){if(this.type===ul)return hm(this.color);if((this.type===xl||this.type===ol)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ol)return hm(a.first().value);if(null!==a.get(.5))return hm(a.get(.5));if(2===a.count)return a=a.Ea(),hm(fm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return hm(fm(a.get(c),a.get(d),1-f/e))}return!1}; -function hm(a){if(!a)return!1;if(a instanceof nl)return a.jx();Uh(a);return 128>(299*gm.j+587*gm.u+114*gm.o)/1E3} -function cm(a,b){switch(b){case bm:b=100*im(gm.j);var c=100*im(gm.u),d=100*im(gm.o);jm.j=.4124564*b+.3575761*c+.1804375*d;jm.u=.2126729*b+.7151522*c+.072175*d;jm.o=.0193339*b+.119192*c+.9503041*d;jm.F=gm.F;b=km(jm.j/lm[0]);c=km(jm.u/lm[1]);d=km(jm.o/lm[2]);mm.j=116*c-16;mm.u=500*(b-c);mm.o=200*(c-d);mm.F=jm.F;mm.j=Math.min(100,Math.max(0,mm.j+100*a));a=(mm.j+16)/116;b=a-mm.o/200;jm.j=lm[0]*nm(mm.u/500+a);jm.u=lm[1]*(mm.j>om*pm?Math.pow(a,3):mm.j/om);jm.o=lm[2]*nm(b);jm.F=mm.F;a=-.969266*jm.j+1.8760108* -jm.u+.041556*jm.o;b=.0556434*jm.j+-.2040259*jm.u+1.0572252*jm.o;gm.j=255*qm((3.2404542*jm.j+-1.5371385*jm.u+-.4985314*jm.o)/100);gm.u=255*qm(a/100);gm.o=255*qm(b/100);gm.F=jm.F;gm.j=Math.round(gm.j);255gm.j&&(gm.j=0);gm.u=Math.round(gm.u);255gm.u&&(gm.u=0);gm.o=Math.round(gm.o);255gm.o&&(gm.o=0);return"rgba("+gm.j+", "+gm.u+", "+gm.o+", "+gm.F+")";case rm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ -Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){$l||(am(),$l=!0);var b=sm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,gm.j=a[0],gm.u=a[1],gm.o=a[2],gm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,gm.j=0,gm.u=0,gm.o=0,gm.F=1)}} -function Vh(){var a=gm.j/255,b=gm.u/255,c=gm.o/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=gm.F}function im(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function qm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function fm(a,b,c){Uh(a);a=gm.j;var d=gm.u,e=gm.m,f=gm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((gm.j-a)*c+a)+", "+Math.round((gm.u-d)*c+d)+", "+Math.round((gm.m-e)*c+e)+", "+Math.round((gm.F-f)*c+f)+")"} +t.kx=function(){if(this.type===ul)return hm(this.color);if((this.type===xl||this.type===ol)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ol)return hm(a.first().value);if(null!==a.get(.5))return hm(a.get(.5));if(2===a.count)return a=a.Ea(),hm(fm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return hm(fm(a.get(c),a.get(d),1-f/e))}return!1}; +function hm(a){if(!a)return!1;if(a instanceof nl)return a.kx();Uh(a);return 128>(299*gm.j+587*gm.u+114*gm.m)/1E3} +function cm(a,b){switch(b){case bm:b=100*im(gm.j);var c=100*im(gm.u),d=100*im(gm.m);jm.j=.4124564*b+.3575761*c+.1804375*d;jm.u=.2126729*b+.7151522*c+.072175*d;jm.m=.0193339*b+.119192*c+.9503041*d;jm.F=gm.F;b=km(jm.j/lm[0]);c=km(jm.u/lm[1]);d=km(jm.m/lm[2]);mm.j=116*c-16;mm.u=500*(b-c);mm.m=200*(c-d);mm.F=jm.F;mm.j=Math.min(100,Math.max(0,mm.j+100*a));a=(mm.j+16)/116;b=a-mm.m/200;jm.j=lm[0]*nm(mm.u/500+a);jm.u=lm[1]*(mm.j>om*pm?Math.pow(a,3):mm.j/om);jm.m=lm[2]*nm(b);jm.F=mm.F;a=-.969266*jm.j+1.8760108* +jm.u+.041556*jm.m;b=.0556434*jm.j+-.2040259*jm.u+1.0572252*jm.m;gm.j=255*qm((3.2404542*jm.j+-1.5371385*jm.u+-.4985314*jm.m)/100);gm.u=255*qm(a/100);gm.m=255*qm(b/100);gm.F=jm.F;gm.j=Math.round(gm.j);255gm.j&&(gm.j=0);gm.u=Math.round(gm.u);255gm.u&&(gm.u=0);gm.m=Math.round(gm.m);255gm.m&&(gm.m=0);return"rgba("+gm.j+", "+gm.u+", "+gm.m+", "+gm.F+")";case rm:return Vh(),Wh.m=Math.min(100,Math.max(0,Wh.m+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.m+"%, "+ +Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){$l||(am(),$l=!0);var b=sm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,gm.j=a[0],gm.u=a[1],gm.m=a[2],gm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,gm.j=0,gm.u=0,gm.m=0,gm.F=1)}} +function Vh(){var a=gm.j/255,b=gm.u/255,c=gm.m/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.m=Math.round(100*e);Wh.F=gm.F}function im(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function qm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function km(a){return a>pm?Math.pow(a,1/3):(om*a+16)/116}function nm(a){var b=a*a*a;return b>pm?b:(116*a-16)/om}function Pl(a,b){"string"!==typeof a&&(a instanceof nl||C("Value for "+b+" must be a color string or a Brush, not "+a))}function am(){sm=Og?(new Bk(null)).context:null} -ma.Object.defineProperties(nl.prototype,{type:{get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this.start.Ec()&&(a===xl?this.start=uc:a===ol&&(this.start=yc));this.end.Ec()&&(a===xl?this.end=Bc:a===ol&&(this.end=yc));this.ne=null}},color:{get:function(){return this.kk},set:function(a){this._isFrozen&&va(this,a);this.kk=a;this.ne=null}},start:{get:function(){return this.Gd}, -set:function(a){this._isFrozen&&va(this,a);this.Gd=a.J();this.ne=null}},end:{get:function(){return this.zk},set:function(a){this._isFrozen&&va(this,a);this.zk=a.J();this.ne=null}},startRadius:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);0>a&&wa(a,">= zero",nl,"startRadius");this.cr=a;this.ne=null}},endRadius:{get:function(){return this.Ap},set:function(a){this._isFrozen&&va(this, -a);0>a&&wa(a,">= zero",nl,"endRadius");this.Ap=a;this.ne=null}},colorStops:{get:function(){return this.me},set:function(a){this._isFrozen&&va(this,a);this.me=a;this.ne=null}},pattern:{get:function(){return this.Bq},set:function(a){this._isFrozen&&va(this,a);this.Bq=a;this.ne=null}}});nl.prototype.isDark=nl.prototype.jx;nl.prototype.darkenBy=nl.prototype.Dy;nl.prototype.lightenBy=nl.prototype.Cz;nl.prototype.addColorStop=nl.prototype.addColorStop; +ma.Object.defineProperties(nl.prototype,{type:{get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this.start.Fc()&&(a===xl?this.start=uc:a===ol&&(this.start=yc));this.end.Fc()&&(a===xl?this.end=Bc:a===ol&&(this.end=yc));this.oe=null}},color:{get:function(){return this.kk},set:function(a){this._isFrozen&&va(this,a);this.kk=a;this.oe=null}},start:{get:function(){return this.Gd}, +set:function(a){this._isFrozen&&va(this,a);this.Gd=a.J();this.oe=null}},end:{get:function(){return this.zk},set:function(a){this._isFrozen&&va(this,a);this.zk=a.J();this.oe=null}},startRadius:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);0>a&&wa(a,">= zero",nl,"startRadius");this.cr=a;this.oe=null}},endRadius:{get:function(){return this.Ap},set:function(a){this._isFrozen&&va(this, +a);0>a&&wa(a,">= zero",nl,"endRadius");this.Ap=a;this.oe=null}},colorStops:{get:function(){return this.ne},set:function(a){this._isFrozen&&va(this,a);this.ne=a;this.oe=null}},pattern:{get:function(){return this.Bq},set:function(a){this._isFrozen&&va(this,a);this.Bq=a;this.oe=null}}});nl.prototype.isDark=nl.prototype.kx;nl.prototype.darkenBy=nl.prototype.Dy;nl.prototype.lightenBy=nl.prototype.Cz;nl.prototype.addColorStop=nl.prototype.addColorStop; var pm=216/24389,om=24389/27,lm=[95.047,100,108.883],sm=null,gm=new Zl,Wh=new Zl,jm=new Zl,mm=new Zl,$l=!1;nl.className="Brush";var ul;nl.Solid=ul=new D(nl,"Solid",0);var xl;nl.Linear=xl=new D(nl,"Linear",1);var ol;nl.Radial=ol=new D(nl,"Radial",2);var wl;nl.Pattern=wl=new D(nl,"Pattern",4);var bm;nl.Lab=bm=new D(nl,"Lab",5);var rm;nl.HSL=rm=new D(nl,"HSL",6); nl.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a);b=Math.floor(a+Math.random()*c).toString(16);var d=Math.floor(a+Math.random()*c).toString(16);a=Math.floor(a+Math.random()*c).toString(16);2>b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+a}; nl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;$l||(am(),$l=!0);var b=sm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c};nl.lighten=function(a){return dm(a)};nl.lightenBy=dm;nl.darken=function(a){return em(a)};nl.darkenBy=em;nl.mix=fm;nl.isDark=hm;function Ll(){this.va="Base"}Ll.prototype.measure=function(){}; -Ll.prototype.Fz=function(a,b,c,d,e){a.measure(b,c,d,e)};Ll.prototype.arrange=function(){};Ll.prototype.qy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Ll.prototype.Pz=function(a){a.Mj()};Ll.prototype.tc=function(){};ma.Object.defineProperties(Ll.prototype,{name:{get:function(){return this.va},set:function(a){this.va=a}},classType:{get:function(){return W}}});Ll.prototype.remeasureObject=Ll.prototype.Pz;Ll.prototype.arrangeElement=Ll.prototype.qy; +Ll.prototype.Fz=function(a,b,c,d,e){a.measure(b,c,d,e)};Ll.prototype.arrange=function(){};Ll.prototype.sy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Ll.prototype.Pz=function(a){a.Mj()};Ll.prototype.tc=function(){};ma.Object.defineProperties(Ll.prototype,{name:{get:function(){return this.va},set:function(a){this.va=a}},classType:{get:function(){return W}}});Ll.prototype.remeasureObject=Ll.prototype.Pz;Ll.prototype.arrangeElement=Ll.prototype.sy; Ll.prototype.measureElement=Ll.prototype.Fz;Ll.className="PanelLayout";function tm(){this.va="Base"}la(tm,Ll); tm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=um(a);for(var k=0;kS&&(eb=Math.max(S-hf,0));var mk=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;S=Math.max(S-(eb+(mk?hf:0)),0)}if(1===ec.columnSpan&& -(Gb===lg||Gb===Wk)){H=a.getColumnDefinition(Fb);var Ii=H.Pc();eb=Math.max(Mf-H.actual,0);eb+Ii>L&&(eb=Math.max(L-Ii,0));var Kn=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;L=Math.max(L-(eb+(Kn?Ii:0)),0)}gf&&ec.Mj()}}}}}Ga(z);var Nd=0,me=0;f=a.columnCount;for(var tg=0;tg=a.rowCount);Ne++)H=a.getRowDefinition(Na.row+Ne),eb=0,eb=Gb===td||Gb===Wk?Math.max(H.minimum,0===rd[Na.row+Ne]?H.maximum:Math.min(rd[Na.row+Ne],H.maximum)):Math.max(H.minimum,isNaN(H.zc)?H.maximum:Math.min(H.zc,H.maximum)),Ed.height+=eb,oc+=H.minimum;for(var Tc=1;Tc=a.columnCount);Tc++)H=a.getColumnDefinition(Na.column+ -Tc),eb=0,eb=Gb===td||Gb===Vk?Math.max(H.minimum,0===Fc[Na.column+Tc]?H.maximum:Math.min(Fc[Na.column+Tc],H.maximum)):Math.max(H.minimum,isNaN(H.zc)?H.maximum:Math.min(H.zc,H.maximum)),Ed.width+=eb,qk+=H.minimum;ib.width+=Ed.width;ib.height+=Ed.height;var Kh=Na.margin,nf=Kh.right+Kh.left,Ki=Kh.top+Kh.bottom;Na.measure(ib.width,ib.height,qk,oc);for(var Lh=Na.measuredBounds,Fd=Math.max(Lh.width+nf,0),Qf=Math.max(Lh.height+Ki,0),of=0,Mh=0;Mh=a.rowCount);Mh++)H=a.getRowDefinition(Na.row+ -Mh),of+=H.total||0;if(of=Oe)&&!(Na.row+pe>=a.rowCount);pe++){H=a.getRowDefinition(Na.row+pe);var Qe=H.ma||0,Rf=Pe(Na,H,Pd);H.actual=Math.min(H.maximum,Qe+Rf);H.ma!==Qe&&(Oe-=H.ma-Qe)}for(;0sd&&(H.actual=Math.min(H.maximum,sd+Oe),H.ma!==sd&&(Oe-=H.ma-sd));if(0===H.index)break;H=a.getRowDefinition(H.index-1)}}for(var wg=0,Re=0;Re=a.columnCount);Re++)H=a.getColumnDefinition(Na.column+Re),wg+=H.total||0;if(wg=xg)&&!(Na.column+Sf>=a.columnCount);Sf++){H=a.getColumnDefinition(Na.column+Sf);var Li=H.ma||0,Nn=qe(Na,H,Mn);H.actual=Math.min(H.maximum,Li+Nn);H.ma!==Li&&(xg-=H.ma-Li)}for(;0rk&&(H.actual=Math.min(H.maximum,rk+xg),H.ma!==rk&&(xg-=H.ma-rk));if(0=== -H.index)break;H=a.getColumnDefinition(H.index-1)}}}}Ga(y);K.free(Ed);K.free(ib);void 0!==rd&&Ga(rd);void 0!==Fc&&Ga(Fc);var yg=0,zg=0,sk=a.desiredSize,vr=a.maxSize;Gb=il(a,!0);var Mi=me=Nd=0,Ni=0;f=a.columnCount;for(var tk=0;tkS&&(eb=Math.max(S-hf,0));var mk=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;S=Math.max(S-(eb+(mk?hf:0)),0)}if(1===fc.columnSpan&& +(Hb===lg||Hb===Wk)){H=a.getColumnDefinition(Gb);var Ii=H.Qc();eb=Math.max(Mf-H.actual,0);eb+Ii>L&&(eb=Math.max(L-Ii,0));var Kn=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;L=Math.max(L-(eb+(Kn?Ii:0)),0)}gf&&fc.Mj()}}}}}Ga(z);var Nd=0,me=0;f=a.columnCount;for(var tg=0;tg=a.rowCount);Ne++)H=a.getRowDefinition(Oa.row+Ne),eb=0,eb=Hb===td||Hb===Wk?Math.max(H.minimum,0===rd[Oa.row+Ne]?H.maximum:Math.min(rd[Oa.row+Ne],H.maximum)):Math.max(H.minimum,isNaN(H.Ac)?H.maximum:Math.min(H.Ac,H.maximum)),Ed.height+=eb,oc+=H.minimum;for(var Tc=1;Tc=a.columnCount);Tc++)H=a.getColumnDefinition(Oa.column+ +Tc),eb=0,eb=Hb===td||Hb===Vk?Math.max(H.minimum,0===Fc[Oa.column+Tc]?H.maximum:Math.min(Fc[Oa.column+Tc],H.maximum)):Math.max(H.minimum,isNaN(H.Ac)?H.maximum:Math.min(H.Ac,H.maximum)),Ed.width+=eb,qk+=H.minimum;ib.width+=Ed.width;ib.height+=Ed.height;var Kh=Oa.margin,nf=Kh.right+Kh.left,Ki=Kh.top+Kh.bottom;Oa.measure(ib.width,ib.height,qk,oc);for(var Lh=Oa.measuredBounds,Fd=Math.max(Lh.width+nf,0),Qf=Math.max(Lh.height+Ki,0),of=0,Mh=0;Mh=a.rowCount);Mh++)H=a.getRowDefinition(Oa.row+ +Mh),of+=H.total||0;if(of=Oe)&&!(Oa.row+pe>=a.rowCount);pe++){H=a.getRowDefinition(Oa.row+pe);var Qe=H.ma||0,Rf=Pe(Oa,H,Pd);H.actual=Math.min(H.maximum,Qe+Rf);H.ma!==Qe&&(Oe-=H.ma-Qe)}for(;0sd&&(H.actual=Math.min(H.maximum,sd+Oe),H.ma!==sd&&(Oe-=H.ma-sd));if(0===H.index)break;H=a.getRowDefinition(H.index-1)}}for(var wg=0,Re=0;Re=a.columnCount);Re++)H=a.getColumnDefinition(Oa.column+Re),wg+=H.total||0;if(wg=xg)&&!(Oa.column+Sf>=a.columnCount);Sf++){H=a.getColumnDefinition(Oa.column+Sf);var Li=H.ma||0,Nn=qe(Oa,H,Mn);H.actual=Math.min(H.maximum,Li+Nn);H.ma!==Li&&(xg-=H.ma-Li)}for(;0rk&&(H.actual=Math.min(H.maximum,rk+xg),H.ma!==rk&&(xg-=H.ma-rk));if(0=== +H.index)break;H=a.getColumnDefinition(H.index-1)}}}}Ga(y);K.free(Ed);K.free(ib);void 0!==rd&&Ga(rd);void 0!==Fc&&Ga(Fc);var yg=0,zg=0,sk=a.desiredSize,vr=a.maxSize;Hb=il(a,!0);var Mi=me=Nd=0,Ni=0;f=a.columnCount;for(var tk=0;tk=a.rowCount);H++){var da=a.getRowDefinition(z+H);0!==da.ma&&(v.height+=da.total)}for(H=1;H=a.columnCount);H++)da=a.getColumnDefinition(A+H),0!==da.ma&&(v.width+=da.total);var X=B.ma+v.width,na=y.ma+v.height;H=h;da=k;var Ba=X,db=na,hb=h,Eb=k,eb=X,Je=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Je=Math.max(c.height-k,0));var Ta=R.alignment;if(Ta.Sb()){Ta=a.defaultAlignment;Ta.pb()||(Ta=yc);var od=Ta.x;var Fb=Ta.y;var Ke=Ta.offsetX; -Ta=Ta.offsetY;var wc=B.alignment,Rc=y.alignment;wc.pb()&&(od=wc.x,Ke=wc.offsetX);Rc.pb()&&(Fb=Rc.y,Ta=Rc.offsetY)}else od=Ta.x,Fb=Ta.y,Ke=Ta.offsetX,Ta=Ta.offsetY;if(isNaN(od)||isNaN(Fb))Fb=od=.5,Ta=Ke=0;wc=P.width;Rc=P.height;var lc=R.margin,ec=lc.left+lc.right,gf=lc.top+lc.bottom,pd=Bl(R,y,B,!1);!isNaN(R.desiredSize.width)||pd!==td&&pd!==Vk||(wc=Math.max(X-ec,0));!isNaN(R.desiredSize.height)||pd!==td&&pd!==Wk||(Rc=Math.max(na-gf,0));X=R.maxSize;na=R.minSize;wc=Math.min(X.width,wc);Rc=Math.min(X.height, -Rc);wc=Math.max(na.width,wc);Rc=Math.max(na.height,Rc);X=Rc+gf;H+=Ba*od-(wc+ec)*od+Ke+lc.left;da+=db*Fb-X*Fb+Ta+lc.top;R.visible&&($b(hb,Eb,eb,Je,H,da,P.width,P.height)?R.arrange(H,da,wc,Rc):R.arrange(H,da,wc,Rc,new M(hb,Eb,eb,Je)))}}K.free(v);for(a=0;a=a.rowCount);H++){var da=a.getRowDefinition(z+H);0!==da.ma&&(v.height+=da.total)}for(H=1;H=a.columnCount);H++)da=a.getColumnDefinition(A+H),0!==da.ma&&(v.width+=da.total);var X=B.ma+v.width,oa=y.ma+v.height;H=h;da=k;var Ba=X,db=oa,hb=h,Fb=k,eb=X,Je=oa;h+X>c.width&&(eb=Math.max(c.width-h,0));k+oa>c.height&&(Je=Math.max(c.height-k,0));var Ua=R.alignment;if(Ua.Sb()){Ua=a.defaultAlignment; +Ua.pb()||(Ua=yc);var od=Ua.x;var Gb=Ua.y;var Ke=Ua.offsetX;Ua=Ua.offsetY;var wc=B.alignment,Rc=y.alignment;wc.pb()&&(od=wc.x,Ke=wc.offsetX);Rc.pb()&&(Gb=Rc.y,Ua=Rc.offsetY)}else od=Ua.x,Gb=Ua.y,Ke=Ua.offsetX,Ua=Ua.offsetY;if(isNaN(od)||isNaN(Gb))Gb=od=.5,Ua=Ke=0;wc=P.width;Rc=P.height;var lc=R.margin,fc=lc.left+lc.right,gf=lc.top+lc.bottom,pd=Bl(R,y,B,!1);!isNaN(R.desiredSize.width)||pd!==td&&pd!==Vk||(wc=Math.max(X-fc,0));!isNaN(R.desiredSize.height)||pd!==td&&pd!==Wk||(Rc=Math.max(oa-gf,0));X=R.maxSize; +oa=R.minSize;wc=Math.min(X.width,wc);Rc=Math.min(X.height,Rc);wc=Math.max(oa.width,wc);Rc=Math.max(oa.height,Rc);X=Rc+gf;H+=Ba*od-(wc+fc)*od+Ke+lc.left;da+=db*Gb-X*Gb+Ua+lc.top;R.visible&&($b(hb,Fb,eb,Je,H,da,P.width,P.height)?R.arrange(H,da,wc,Rc):R.arrange(H,da,wc,Rc,new M(hb,Fb,eb,Je)))}}K.free(v);for(a=0;a=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.R.s,u=q.length,w=0;wy)){v=Sj(v.figure);for(var A=0;Ay&&z.push(B))}}}}q= +Im.prototype.tc=function(a,b,c){c=a.uf()*c.scale;0>=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.R.s,u=q.length,w=0;wy)){v=Sj(v.figure);for(var A=0;Ay&&z.push(B))}}}}q= a.R.s;u=q.length;for(w=0;we*v*c))){y=F.segmentIndex;if(!isFinite(y)||isNaN(y))y=0;0>y&&(y=v-Math.min(-y,v));y=Math.round(y%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}B=r[w];var L=!1,S=F.strokeDashArray;null!==S&&(L=!0,b.Gr(S,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),y=z.measuredBounds,c.Xc(y),r.push(y);else{var A=z.segmentIndex,B=z.segmentFraction,F=z.alignmentFocus;F.Ec()&&(F=yc);var L=z.segmentOrientation,S=z.segmentOffset;if(isNaN(A)){var R=k.sa;y=Ea();R.Cu(B,y);var P=I.allocAt(y[0],y[1]);P.add(k.i(0));R.type=== -O.j?P.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&P.offset(-R.startX,-R.startY));R=y[2];if(L!==$f){var H=k.computeAngle(z,L,R);z.Gb=H}H=P.x-b.x;var da=P.y-b.y;I.free(P);Ga(y)}else if(A<-n||A>=n)y=I.alloc(),k.lg(),k.computeMidPoint(y),R=k.midAngle,L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H),H=y.x-b.x,da=y.y-b.y,I.free(y);else{H=0;0<=A?(da=m.K(A),y=AX+10?0<=A?R.Ya(da):da.Ya(R):X>P+10?0<=A?y.Ya(H):H.Ya(y):0<=A?R.Ya(H):H.Ya(R)}else R=0<=A?da.Ya(y):y.Ya(da);L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H);H=da.x+(y.x-da.x)*B-b.x;da=da.y+(y.y-da.y)*B-b.y}z.measure(Infinity,Infinity,0,0);y=z.measuredBounds;P=z.naturalBounds;var na=0;z instanceof Cf&&(na=z.strokeWidth);X=P.width+na;var Ba=P.height+na;q.reset();q.translate(-y.x,-y.y);q.scale(z.scale,z.scale);q.rotate(L===$f?z.angle:R,X/2,Ba/2);L!==Mm&&L!==Nm||q.rotate(90, -X/2,Ba/2);L!==Om&&L!==Pm||q.rotate(-90,X/2,Ba/2);L===Qm&&(45R||225R)&&q.rotate(-R,X/2,Ba/2);P=new M(0,0,X,Ba);u.oi(P,F);q.Fa(u);F=-u.x+na/2*z.scale;z=-u.y+na/2*z.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;Ba=Ba/2+3;var hb=45<=R&&135>=R,Eb=225<=R&&315>=R;L===$f&&(hb||Eb)?(w.x=db?X:S.y,w.y=na?Ba:S.x,hb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-Ba):Eb&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-Ba),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-Ba),w.rotate(R))}else w.rotate(R); -H+=w.x;da+=w.y;P.set(y);P.h(H+F,da+z,y.width,y.height);r.push(P);c.Xc(P)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.ag=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);Qb(e,c.width||0,c.height||0);md.free(q);I.free(u);I.free(w)}}}}; -Km.prototype.arrange=function(a,b){var c=b.length;if(a instanceof ue||a instanceof T){var d=a,e=null;a instanceof ue&&(e=a,d=e.adornedPart);var f=a instanceof ue?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=I.alloc(),r=n,w=q,r.lg(),r.computeMidPoint(w),r=n.midAngle,l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,w=q.y, -I.free(q);else{u=0;0<=h?(q=b.s[h],w=hz+10?0<=h?r.Ya(q):q.Ya(r):z>v+10?0<=h?w.Ya(u):u.Ya(w):0<=h?r.Ya(u):u.Ya(r)}else r=0<=h?q.Ya(w):w.Ya(q);l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(w.x-q.x)*k;w=q.y+(w.y-q.y)*k}if(p.Wr())g.location=new I(n,w);else{p.Ec()&&(p=yc);q=md.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, +B)&&b.fillRect(P,0,F,k)}else if("BarH"===F.figure&&null!==F.fill)for(gi(a,b,F.fill,!0,!1,f,g),F=F.height,isNaN(F)&&(F=d),R=S=Math.floor((n-d)/d);R<=S+m;R++)P=R*d+n,0<=P+F&&P<=k&&Jm(R,z,y,B)&&b.fillRect(0,P,h,F);L&&b.Er();1!==v&&(b.globalAlpha=A)}}b.restore();b.Oc(!1)};function Jm(a,b,c,d){if(0>b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),y=z.measuredBounds,c.Xc(y),r.push(y);else{var A=z.segmentIndex,B=z.segmentFraction,F=z.alignmentFocus;F.Fc()&&(F=yc);var L=z.segmentOrientation,S=z.segmentOffset;if(isNaN(A)){var R=k.sa;y=Ea();R.Cu(B,y);var P=I.allocAt(y[0],y[1]);P.add(k.i(0));R.type=== +O.j?P.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&P.offset(-R.startX,-R.startY));R=y[2];if(L!==$f){var H=k.computeAngle(z,L,R);z.Gb=H}H=P.x-b.x;var da=P.y-b.y;I.free(P);Ga(y)}else if(A<-n||A>=n)y=I.alloc(),k.mg(),k.computeMidPoint(y),R=k.midAngle,L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H),H=y.x-b.x,da=y.y-b.y,I.free(y);else{H=0;0<=A?(da=m.K(A),y=AX+10?0<=A?R.Ya(da):da.Ya(R):X>P+10?0<=A?y.Ya(H):H.Ya(y):0<=A?R.Ya(H):H.Ya(R)}else R=0<=A?da.Ya(y):y.Ya(da);L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H);H=da.x+(y.x-da.x)*B-b.x;da=da.y+(y.y-da.y)*B-b.y}z.measure(Infinity,Infinity,0,0);y=z.measuredBounds;P=z.naturalBounds;var oa=0;z instanceof Cf&&(oa=z.strokeWidth);X=P.width+oa;var Ba=P.height+oa;q.reset();q.translate(-y.x,-y.y);q.scale(z.scale,z.scale);q.rotate(L===$f?z.angle:R,X/2,Ba/2);L!==Mm&&L!==Nm||q.rotate(90, +X/2,Ba/2);L!==Om&&L!==Pm||q.rotate(-90,X/2,Ba/2);L===Qm&&(45R||225R)&&q.rotate(-R,X/2,Ba/2);P=new M(0,0,X,Ba);u.oi(P,F);q.Fa(u);F=-u.x+oa/2*z.scale;z=-u.y+oa/2*z.scale;w.assign(S);oa=isNaN(S.x);var db=isNaN(S.y);if(oa||db){X=X/2+3;Ba=Ba/2+3;var hb=45<=R&&135>=R,Fb=225<=R&&315>=R;L===$f&&(hb||Fb)?(w.x=db?X:S.y,w.y=oa?Ba:S.x,hb?0<=A||isNaN(A)&&.5>B||!oa||(w.y=-Ba):Fb&&((0<=A||isNaN(A)&&.5>B)&&oa&&(w.y=-Ba),db&&(w.x=-X))):(oa&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-Ba),w.rotate(R))}else w.rotate(R); +H+=w.x;da+=w.y;P.set(y);P.h(H+F,da+z,y.width,y.height);r.push(P);c.Xc(P)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.bg=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);Qb(e,c.width||0,c.height||0);md.free(q);I.free(u);I.free(w)}}}}; +Km.prototype.arrange=function(a,b){var c=b.length;if(a instanceof ue||a instanceof T){var d=a,e=null;a instanceof ue&&(e=a,d=e.adornedPart);var f=a instanceof ue?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=I.alloc(),r=n,w=q,r.mg(),r.computeMidPoint(w),r=n.midAngle,l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,w=q.y, +I.free(q);else{u=0;0<=h?(q=b.s[h],w=hz+10?0<=h?r.Ya(q):q.Ya(r):z>v+10?0<=h?w.Ya(u):u.Ya(w):0<=h?r.Ya(u):u.Ya(r)}else r=0<=h?q.Ya(w):w.Ya(q);l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(w.x-q.x)*k;w=q.y+(w.y-q.y)*k}if(p.Wr())g.location=new I(n,w);else{p.Fc()&&(p=yc);q=md.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, 0,0);var y=g.naturalBounds;u=M.allocAt(0,0,y.width,y.height);v=I.alloc();v.oi(u,p);q.Fa(v);p=-v.x;z=-v.y;var A=y.width,B=y.height;y=I.alloc();y.assign(m);var F=isNaN(m.x),L=isNaN(m.y);if(F||L){A=A/2+3;B=B/2+3;var S=45<=r&&135>=r,R=225<=r&&315>=r;l===$f&&(S||R)?(y.x=L?A:m.y,y.y=F?B:m.x,S?0<=h||isNaN(h)&&.5>k||!F||(y.y=-B):R&&((0<=h||isNaN(h)&&.5>k)&&F&&(y.y=-B),L&&(y.x=-A))):(F&&(y.x=0<=h||isNaN(h)&&.5>k?A:-A),L&&(y.y=-B),y.rotate(r))}else y.rotate(r);n+=y.x;w+=y.y;q.So(u);p+=u.x;z+=u.y;h=I.allocAt(n+ p,w+z);g.move(h);I.free(h);I.free(y);I.free(v);M.free(u);md.free(q)}}null!==e?e.Rj(!1):d.Rj(!1)}}; -function Lm(a,b,c,d){if(!1!==nj(d)){var e=d.strokeWidth;0===e&&a instanceof ue&&a.type===W.Link&&a.adornedObject instanceof Cf&&(e=a.adornedObject.strokeWidth);e*=d.xa;a instanceof T&&null!==a.sa?(a=a.sa.bounds,d.ue(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof ue&&null!==a.adornedPart.sa?(a=a.adornedPart.sa.bounds,d.ue(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.ue(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.v()||null===d.sa?d.bc.h(0,0,e.width,e.height):d.bc.assign(d.sa.bounds);ij(d,!1)}} +function Lm(a,b,c,d){if(!1!==nj(d)){var e=d.strokeWidth;0===e&&a instanceof ue&&a.type===W.Link&&a.adornedObject instanceof Cf&&(e=a.adornedObject.strokeWidth);e*=d.xa;a instanceof T&&null!==a.sa?(a=a.sa.bounds,d.ve(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof ue&&null!==a.adornedPart.sa?(a=a.adornedPart.sa.bounds,d.ve(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.ve(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.v()||null===d.sa?d.bc.h(0,0,e.width,e.height):d.bc.assign(d.sa.bounds);ij(d,!1)}} function Rm(){this.va="Base"}la(Rm,Ll); Rm.prototype.measure=function(a,b,c,d,e,f,g){var h=a.vb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var r=h.geometry,q=h.strokeWidth,u=r.flattenedSegments,w=r.flattenedLengths,v=r.flattenedTotalLength,z=u.length,y=0,A=0,B=Ea(),F=0;FX&&(X+=360);S.push(X)}y=H;A=da}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],Ba=a.R.s,db=Ba.length,hb=0;hbJe))for(var Ta=0;TaJe&&eb.push(Fb)}}}}a.graduatedIntervals=na}var Ke=a.graduatedIntervals;var wc=a.R.s,Rc=wc.length,lc=0,ec=0,gf=v;a.graduatedMarks=[];for(var pd, -Dh=0;DhHi*Gb*v/a.graduatedRange&&null===mc.graduatedSkip)){var sg=w[0][0],Bd=0,fc=0;ec=v*mc.graduatedStart-1E-4;gf=v*mc.graduatedEnd+1E-4;var Mf=Hi*Gb,nc=a.graduatedTickBase;if(nca.graduatedMin+Mf&&(nc-=Math.floor((nc-a.graduatedMin)/Mf)*Mf);for(var mk=Ke[Dh],Ii=nc,Kn=1E-6*a.graduatedMax,Nd= -1;nc<=a.graduatedMax+Kn;Nd++){a:{for(var me=mk.length,tg=0;tg-Eh){var kf=!1;break a}}kf=!0}if(kf&&(nc>a.graduatedMax&&(nc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Qg&&!mc.graduatedSkip(nc,mc)||mc instanceof Cf&&!mc.graduatedSkip(nc,mc))&&(lc=(nc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),ec<=lc&&lc<=gf)){for(var Od=B[Bd][fc],Le=w[Bd][fc];Bdsg&&fcne&&.4995ne?0ne||.9995ug){var Gh=1-Math.abs(.5-ne);Od=(qd*Gh+Dd*(1-Gh))%360;break a}}}Od=qd}if(mc instanceof Qg){var bd="";null!==mc.graduatedFunction?(bd=mc.graduatedFunction(nc,mc),bd=null!==bd&&void 0!==bd?bd.toString():""):bd=(+nc.toFixed(2)).toString();""!==bd&&pd.push({Hl:Fh,angle:Od,text:bd})}else pd.push({Hl:Fh,angle:Od})}nc=Ii+Nd*Mf}}}a.graduatedMarks.push(pd)}Ga(B); -var ib=a.graduatedMarks;if(null!==ib)for(var Ji=d.length,Tb=0;Tbcd;cd++){switch(cd){case 0:hc.h(Ed,rd);break;case 1:hc.h(Ed+Hh,rd);break;case 2:hc.h(Ed,rd+Pf);break;case 3:hc.h(Ed+Hh,rd+Pf)}hc.rotate(Na+Ua.angle);hc.offset(pk,Jh);0===Ih&&0===cd?Fc.h(hc.x,hc.y,0,0):Fc.Le(hc);hc.offset(-pk,-Jh);hc.rotate(-Na-Ua.angle)}I.free(hc);null!==oe.graduatedBounds&&oe.graduatedBounds.push(Fc);Zb(Me,Fc.x,Fc.y,Fc.width,Fc.height)}else if(Ua instanceof Qg){var Sc=a,qk=e;null===Sc.temporaryTextBlock&&(Sc.temporaryTextBlock=new Qg);var oc=Sc.temporaryTextBlock;Sm(oc,Ua); -var Ne=Ua.alignmentFocus;Ne.Ec()&&(Ne=uc);for(var Tc=Ua.segmentOrientation,Kh=Ua.segmentOffset,nf=new M,Ki=0,Lh=0,Fd=0,Qf=0,of=0,Mh=Ub.length,Oe=0;OeX&&(X+=360);S.push(X)}y=H;A=da}B.push(S)}if(null===a.graduatedIntervals){for(var oa=[],Ba=a.R.s,db=Ba.length,hb=0;hbJe))for(var Ua=0;UaJe&&eb.push(Gb)}}}}a.graduatedIntervals=oa}var Ke=a.graduatedIntervals;var wc=a.R.s,Rc=wc.length,lc=0,fc=0,gf=v;a.graduatedMarks=[];for(var pd, +Dh=0;DhHi*Hb*v/a.graduatedRange&&null===mc.graduatedSkip)){var sg=w[0][0],Bd=0,gc=0;fc=v*mc.graduatedStart-1E-4;gf=v*mc.graduatedEnd+1E-4;var Mf=Hi*Hb,nc=a.graduatedTickBase;if(nca.graduatedMin+Mf&&(nc-=Math.floor((nc-a.graduatedMin)/Mf)*Mf);for(var mk=Ke[Dh],Ii=nc,Kn=1E-6*a.graduatedMax,Nd= +1;nc<=a.graduatedMax+Kn;Nd++){a:{for(var me=mk.length,tg=0;tg-Eh){var kf=!1;break a}}kf=!0}if(kf&&(nc>a.graduatedMax&&(nc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Qg&&!mc.graduatedSkip(nc,mc)||mc instanceof Cf&&!mc.graduatedSkip(nc,mc))&&(lc=(nc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),fc<=lc&&lc<=gf)){for(var Od=B[Bd][gc],Le=w[Bd][gc];Bdsg&&gcne&&.4995ne?0ne||.9995ug){var Gh=1-Math.abs(.5-ne);Od=(qd*Gh+Dd*(1-Gh))%360;break a}}}Od=qd}if(mc instanceof Qg){var bd="";null!==mc.graduatedFunction?(bd=mc.graduatedFunction(nc,mc),bd=null!==bd&&void 0!==bd?bd.toString():""):bd=(+nc.toFixed(2)).toString();""!==bd&&pd.push({Hl:Fh,angle:Od,text:bd})}else pd.push({Hl:Fh,angle:Od})}nc=Ii+Nd*Mf}}}a.graduatedMarks.push(pd)}Ga(B); +var ib=a.graduatedMarks;if(null!==ib)for(var Ji=d.length,Vb=0;Vbcd;cd++){switch(cd){case 0:ic.h(Ed,rd);break;case 1:ic.h(Ed+Hh,rd);break;case 2:ic.h(Ed,rd+Pf);break;case 3:ic.h(Ed+Hh,rd+Pf)}ic.rotate(Oa+Va.angle);ic.offset(pk,Jh);0===Ih&&0===cd?Fc.h(ic.x,ic.y,0,0):Fc.Me(ic);ic.offset(-pk,-Jh);ic.rotate(-Oa-Va.angle)}I.free(ic);null!==oe.graduatedBounds&&oe.graduatedBounds.push(Fc);Zb(Me,Fc.x,Fc.y,Fc.width,Fc.height)}else if(Va instanceof Qg){var Sc=a,qk=e;null===Sc.temporaryTextBlock&&(Sc.temporaryTextBlock=new Qg);var oc=Sc.temporaryTextBlock;Sm(oc,Va); +var Ne=Va.alignmentFocus;Ne.Fc()&&(Ne=uc);for(var Tc=Va.segmentOrientation,Kh=Va.segmentOffset,nf=new M,Ki=0,Lh=0,Fd=0,Qf=0,of=0,Mh=Wb.length,Oe=0;OeFd||225Fd)&&sd.rotate(-Fd,Qe/2,Rf/2);var wg=M.allocAt(0,0,Qe,Rf),Re=I.alloc();Re.oi(wg,Ne);sd.Fa(Re);var xg=-Re.x,Mn=-Re.y,qe=I.alloc();qe.assign(Kh);isNaN(qe.x)&&(qe.x=Qe/2+3);isNaN(qe.y)&&(qe.y=-(Rf/2+3));qe.rotate(Fd);Ki+=qe.x+xg;Lh+=qe.y+Mn;var Sf=new M(Ki,Lh,Pe.width,Pe.height),Li=new M(Pe.x,Pe.y,Pe.width,Pe.height),Nn=new M(pe.x,pe.y,pe.width,pe.height); -Pd.Az=Qf;Pd.lineCount=oc.lineCount;Pd.lines=[oc.yb,oc.zh,oc.Se,oc.ze,oc.Ic,oc.Wb,oc.pe];Pd.actualBounds=Sf;Pd.measuredBounds=Li;Pd.naturalBounds=Nn;0===Oe?nf.assign(Sf):nf.Xc(Sf);I.free(qe);I.free(Re);M.free(wg);md.free(sd)}null!==Sc.graduatedBounds&&Sc.graduatedBounds.push(nf);Zb(qk,nf.x,nf.y,nf.width,nf.height)}ij(Ua,!1)}}}; +Pd.Az=Qf;Pd.lineCount=oc.lineCount;Pd.lines=[oc.yb,oc.zh,oc.Te,oc.Ae,oc.Jc,oc.Wb,oc.qe];Pd.actualBounds=Sf;Pd.measuredBounds=Li;Pd.naturalBounds=Nn;0===Oe?nf.assign(Sf):nf.Xc(Sf);I.free(qe);I.free(Re);M.free(wg);md.free(sd)}null!==Sc.graduatedBounds&&Sc.graduatedBounds.push(nf);Zb(qk,nf.x,nf.y,nf.width,nf.height)}ij(Va,!1)}}}; Rm.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=e&&(e=1);for(var g=f.actualBounds,h=a.R.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* -n.scale,w=n.alignmentFocus;w.Ec()&&(w=uc);for(var v=0;v=e&&(e=1);for(var g=f.actualBounds,h=a.R.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* +n.scale,w=n.alignmentFocus;w.Fc()&&(w=uc);for(var v=0;vf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){gi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.Gr(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-=p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ub;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Er()}}}} -function Vm(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=Xm(a,!0),l=Xm(a,!1),m=0;mp)){var r=n.Pc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= +function Vm(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=Xm(a,!0),l=Xm(a,!1),m=0;mp)){var r=n.Qc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= q;q=n.position+q;r+=n.actual;q+r>p&&(r=p-q);0>=r||(p=a.ub,gi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,q+p.top,g.width-(p.left+p.right),r):b.fillRect(q+p.left,p.top,r,g.height-(p.top+p.bottom)))}}}}function Xm(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(q),I.free(q));I.free(m);f&&e.transform(g);return l}; t.w=function(a){if(!nj(this)){Y.prototype.w.call(this,a);a=null;if(this.qa===W.Auto||this.qa===W.Link)a=this.vb();for(var b=this.R.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.w(!0);this.measure(c+h,d+g,0,0);break;case Vk:this.w(!0);this.measure(c+h,f+g,0,0);break;case Wk:this.w(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.ag)}}; +t.Jk=function(){if(0!==(this.o&2048)===!1){yl(this,!0);zl(this,!0);for(var a=this.R.s,b=a.length,c=0;cc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.w(!0);this.measure(c+h,d+g,0,0);break;case Vk:this.w(!0);this.measure(c+h,f+g,0,0);break;case Wk:this.w(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.bg)}}; t.Xg=function(a){var b=this.naturalBounds,c=um(this);if($b(0,0,b.width,b.height,a.x,a.y)){b=this.R.s;for(var d=b.length,e=I.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(yb(e.set(a),f.transform),f.ba(e))return I.free(e),!0}I.free(e);return null===this.Yb&&null===this.areaBackground?!1:!0}return!1};t.Hr=function(a){if(this.bindingId===a)return this;for(var b=this.R.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=md.alloc();p.set(g); -if(null!==m?m.sf(a,b,c,d,e,p):hl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);md.free(p)}}}void 0===f&&md.free(g);return d}void 0===f&&md.free(g);return!1};function dn(a,b,c,d){for(var e=a.R.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&dn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} -t.gg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.je(),k=h?a:yb(I.allocAt(a.x,a.y),this.transform),l=h?b:yb(I.allocAt(b.x,b.y),this.transform),m=k.qf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(q.je()?(u=q.transform,yb(k.set(a),u),yb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof W?q:null,null!==q?q.gg(k,l,c,d,e,f):u.Uw(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}I.free(k);I.free(l)}return e?n:g}return!1}; +t.tf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=md.alloc(),g.reset());g.multiply(this.transform);if(this.Wg(a,g))return dn(this,b,c,e),void 0===f&&md.free(g),!0;if(this.Sc(a,g)){if(!this.isAtomic)for(var h=um(this),k=this.R.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=md.alloc();p.set(g); +if(null!==m?m.tf(a,b,c,d,e,p):hl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);md.free(p)}}}void 0===f&&md.free(g);return d}void 0===f&&md.free(g);return!1};function dn(a,b,c,d){for(var e=a.R.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&dn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.hg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.ke(),k=h?a:yb(I.allocAt(a.x,a.y),this.transform),l=h?b:yb(I.allocAt(b.x,b.y),this.transform),m=k.rf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(q.ke()?(u=q.transform,yb(k.set(a),u),yb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof W?q:null,null!==q?q.hg(k,l,c,d,e,f):u.Vw(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}I.free(k);I.free(l)}return e?n:g}return!1}; function Am(a){var b=null;a instanceof Cf&&(b=a.spot1,b===Wc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=tc);return b}function Bm(a){var b=null;a instanceof Cf&&(b=a.spot2,b===Wc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Cc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Cb(a,b);if(0===a||b.isPanelMain)this.Qg=null;nj(this)||this.w();b.w(!1);null!==b.portId?this.Ge=!0:b instanceof W&&!0===b.Ge&&(this.Ge=!0);this.graduatedIntervals=null;this.xf()||en(this,b,!1);c=this.part;null!==c&&(c.Kh=null,c.Rf=NaN,this.Ge&&c instanceof V&&(c.Ge=!0),c.Ge&&c instanceof V&&(c.sc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.bb(ge,"elements",this,b,null,d,null),c.bb(fe,"elements",this,null,b,null,a)))};function fn(a,b){a.m=b?a.m|16777216:a.m&-16777217}t.remove=function(a){for(var b=this.R.s,c=b.length,d=-1,e=0;e=e.count&&a>=e.count)return; +e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Cb(a,b);if(0===a||b.isPanelMain)this.Qg=null;nj(this)||this.w();b.w(!1);null!==b.portId?this.He=!0:b instanceof W&&!0===b.He&&(this.He=!0);this.graduatedIntervals=null;this.yf()||en(this,b,!1);c=this.part;null!==c&&(c.Kh=null,c.Sf=NaN,this.He&&c instanceof V&&(c.He=!0),c.He&&c instanceof V&&(c.sc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.bb(ge,"elements",this,b,null,d,null),c.bb(fe,"elements",this,null,b,null,a)))};function fn(a,b){a.o=b?a.o|16777216:a.o&-16777217}t.remove=function(a){for(var b=this.R.s,c=b.length,d=-1,e=0;ea&&wa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Oj;c.ni(this);c.isRow=!0;c.index=a;b[a]=c;this.bb(fe,"rowdefs",this,null,c,null,a)}return b[a]};W.prototype.Vz=function(a){0>a&&wa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.bb(ge,"rowdefs",this,c,null,a,null);this.w()}}}; function Pj(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof Oj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}}W.prototype.getColumnDefinition=function(a){0>a&&wa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Oj;c.ni(this);c.isRow=!1;c.index=a;b[a]=c;this.bb(fe,"coldefs",this,null,c,null,a)}return b[a]};t=W.prototype; t.Qz=function(a){0>a&&wa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.bb(ge,"coldefs",this,c,null,a,null);this.w()}}};function Qj(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof Oj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} t.Wy=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;ea;)this.lc(this.R.length-1,!1);jn(this,this.itemArray)}; -function jn(a,b){var c=bn(a);if(null===b||0===b.length)for(;a.R.length>c;)a.lc(a.R.length-1,!1);else if(a.R.length<=c){c=b.length;for(var d=0;dc)){var e=ln(a,b);e=mn(a,e);if(null!==e){kg(e);e=e.copy();if(0!==(e.m&16777216)){var f=a.Yg();null!==f&&fn(f,!0)}"object"===typeof b&&(null===a.Zd&&(a.Zd=new pb),a.Zd.add(b,e));f=c+bn(a);a.Cb(f,e);d&&(e.qb=b,nn(a,f,c),e.qb=null);e.data=b}}} +function jn(a,b){var c=bn(a);if(null===b||0===b.length)for(;a.R.length>c;)a.lc(a.R.length-1,!1);else if(a.R.length<=c){c=b.length;for(var d=0;dc)){var e=ln(a,b);e=mn(a,e);if(null!==e){kg(e);e=e.copy();if(0!==(e.o&16777216)){var f=a.Yg();null!==f&&fn(f,!0)}"object"===typeof b&&(null===a.$d&&(a.$d=new pb),a.$d.add(b,e));f=c+bn(a);a.Cb(f,e);d&&(e.qb=b,nn(a,f,c),e.qb=null);e.data=b}}} function nn(a,b,c){for(a=a.R;ba&&wa(a,">= 0",W,"padding"), -a=new ic(a)):(0>a.left&&wa(a.left,">= 0",W,"padding:value.left"),0>a.right&&wa(a.right,">= 0",W,"padding:value.right"),0>a.top&&wa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.w(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Bm},set:function(a){var b=this.Bm;b.C(a)||(this.Bm=a=a.J(),this.w(),this.g("defaultAlignment",b,a))}},defaultStretch:{ -get:function(){return this.Jf},set:function(a){var b=this.Jf;b!==a&&(this.Jf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.T?this.T.tp:qc},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.defaultSeparatorPadding;b.C(a)||(a=a.J(),null===this.T&&(this.T=new sn),this.T.tp=a,this.w(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== +a=new ec(a)):(0>a.left&&wa(a.left,">= 0",W,"padding:value.left"),0>a.right&&wa(a.right,">= 0",W,"padding:value.right"),0>a.top&&wa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.w(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Bm},set:function(a){var b=this.Bm;b.C(a)||(this.Bm=a=a.J(),this.w(),this.g("defaultAlignment",b,a))}},defaultStretch:{ +get:function(){return this.Kf},set:function(a){var b=this.Kf;b!==a&&(this.Kf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.T?this.T.tp:qc},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.defaultSeparatorPadding;b.C(a)||(a=a.J(),null===this.T&&(this.T=new sn),this.T.tp=a,this.w(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== this.T?this.T.ga:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof nl)&&(a instanceof nl&&a.freeze(),null===this.T&&(this.T=new sn),this.T.ga=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.T?this.T.Ga:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.T&&(this.T=new sn),this.T.Ga=a,this.w(), -this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.T?this.T.Y:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.T&&(this.T=new sn),this.T.Db=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.T?this.T.cb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ -a),null===this.T&&(this.T=new sn),this.T.cb=a,this.w(),this.g("leftIndex",b,a))}},data:{get:function(){return this.qb},set:function(a){var b=this.qb;if(b!==a){var c=this instanceof U&&!(this instanceof ue);kg(this);this.qb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.Qe.remove(b),null!==a&&c.Qe.add(a,this)):this instanceof U&&(null!==b&&c.Re.remove(b),null!==a&&c.Re.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b), -null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ka()}}},itemIndex:{get:function(){return this.fn},set:function(a){var b=this.fn;b!==a&&(this.fn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.hb=a)}},itemArray:{get:function(){return this.xh}, +a),null===this.T&&(this.T=new sn),this.T.cb=a,this.w(),this.g("leftIndex",b,a))}},data:{get:function(){return this.qb},set:function(a){var b=this.qb;if(b!==a){var c=this instanceof U&&!(this instanceof ue);kg(this);this.qb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.Re.remove(b),null!==a&&c.Re.add(a,this)):this instanceof U&&(null!==b&&c.Se.remove(b),null!==a&&c.Se.add(a,this))):(c=this.panel,null!==c&&null!==c.$d&&(null!==b&&c.$d.remove(b), +null!==a&&c.$d.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ka()}}},itemIndex:{get:function(){return this.fn},set:function(a){var b=this.fn;b!==a&&(this.fn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.hb=a)}},itemArray:{get:function(){return this.xh}, set:function(a){var b=this.xh;if(b!==a||null!==a&&hn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Fj(c.partManager,this,c),this.xh=a,null!==c&&null!==a&&Cj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||jn(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new pb}var b=this.itemTemplateMap.I(""); -b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Vu())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.ke:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););bl(this);this.A.ke=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| -this.Vu()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Hc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(bl(this),this.A.Hc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(this.m^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.m&2097152)}, -set:function(a){var b=0!==(this.m&2097152);b!==a&&(this.m^=2097152,this instanceof qf&&(this.ib=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.m&33554432)},set:function(a){var b=0!==(this.m&33554432);b!==a&&(this.m^=33554432,this.w(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);if(b!==a){var c=null===this.panel||this.panel.xf(); -this.m^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&en(this,this,a)}}},alignmentFocusName:{get:function(){return this.Oe},set:function(a){var b=this.Oe;b!==a&&(this.Oe=a,this.w(),this.g("alignmentFocusName",b,a))}}}); +b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Vu())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.le:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););bl(this);this.A.le=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| +this.Vu()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Ic:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(bl(this),this.A.Ic=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.o&2097152)}, +set:function(a){var b=0!==(this.o&2097152);b!==a&&(this.o^=2097152,this instanceof qf&&(this.ib=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.o&33554432)},set:function(a){var b=0!==(this.o&33554432);b!==a&&(this.o^=33554432,this.w(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);if(b!==a){var c=null===this.panel||this.panel.yf(); +this.o^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&en(this,this,a)}}},alignmentFocusName:{get:function(){return this.Pe},set:function(a){var b=this.Pe;b!==a&&(this.Pe=a,this.w(),this.g("alignmentFocusName",b,a))}}}); ma.Object.defineProperties(W,{Position:{get:function(){return Kl.I("Position")}},Horizontal:{get:function(){return Kl.I("Horizontal")}},Vertical:{get:function(){return Kl.I("Vertical")}},Spot:{get:function(){return Kl.I("Spot")}},Auto:{get:function(){return Kl.I("Auto")}},Table:{get:function(){return Kl.I("Table")}},Viewbox:{ get:function(){return Kl.I("Viewbox")}},TableRow:{get:function(){return Kl.I("TableRow")}},TableColumn:{get:function(){return Kl.I("TableColumn")}},Link:{get:function(){return Kl.I("Link")}},Grid:{get:function(){return Kl.I("Grid")}},Graduated:{get:function(){return Kl.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Vu; -W.prototype.findItemPanelForData=W.prototype.Tw;W.prototype.updateTargetBindings=W.prototype.Ka;W.prototype.copyTemplate=W.prototype.By;W.prototype.graduatedValueForPoint=W.prototype.nz;W.prototype.graduatedPointForValue=W.prototype.mz;W.prototype.findColumnForLocalX=W.prototype.Oy;W.prototype.findRowForLocalY=W.prototype.Wy;W.prototype.removeColumnDefinition=W.prototype.Qz;W.prototype.removeRowDefinition=W.prototype.Vz;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove; +W.prototype.findItemPanelForData=W.prototype.Uw;W.prototype.updateTargetBindings=W.prototype.Ka;W.prototype.copyTemplate=W.prototype.By;W.prototype.graduatedValueForPoint=W.prototype.nz;W.prototype.graduatedPointForValue=W.prototype.mz;W.prototype.findColumnForLocalX=W.prototype.Oy;W.prototype.findRowForLocalY=W.prototype.Wy;W.prototype.removeColumnDefinition=W.prototype.Qz;W.prototype.removeRowDefinition=W.prototype.Vz;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove; W.prototype.insertAt=W.prototype.Cb;W.prototype.elt=W.prototype.K;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.fb;W.prototype.findInVisualTree=W.prototype.vl;W.prototype.walkVisualTreeFrom=W.prototype.$l;W.prototype.findMainElement=W.prototype.vb;var pn=!1,qn=null,Kl=new pb;W.className="Panel";W.definePanelLayout=rn;rn("Position",new tm);rn("Vertical",new wm);rn("Auto",new zm);rn("Link",new Km); -function tn(){this.Np=0;this.F=100;this.ga=10;this.Y=0;this.Sh=this.o=this.j=this.u=null}tn.prototype.copy=function(){var a=new tn;a.Np=this.Np;a.F=this.F;a.ga=this.ga;a.Y=this.Y;a.u=this.u;a.j=this.j;a.o=this.o;a.Sh=this.Sh;return a};tn.className="GradPanelSettings";function sn(){this.Hc=[];this.Gc=[];this.j=this.nb=un;this.cb=this.Db=0;this.tp=qc;this.Ga=1;this.Y=this.ga=null;this.F=1;this.hb=this.o=this.u=null} -sn.prototype.copy=function(a){for(var b=new sn,c=this.Hc,d=c.length,e=b.Hc,f=0;fa&&wa(a,">= 0",Oj,"height"),this.zc=a,this.actual=this.ma,null!==this.panel&&this.panel.w(), -this.Kb("height",b,a))}},width:{get:function(){return this.zc},set:function(a){var b=this.zc;b!==a&&(0>a&&wa(a,">= 0",Oj,"width"),this.zc=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("width",b,a))}},minimum:{get:function(){return this.ej},set:function(a){var b=this.ej;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Oj,"minimum"),this.ej=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("minimum",b,a))}},maximum:{ -get:function(){return this.cj},set:function(a){var b=this.cj;b!==a&&(0>a&&wa(a,">= 0",Oj,"maximum"),this.cj=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("maximum",b,a))}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(this.Fb=a.J(),null!==this.panel&&this.panel.w(),this.Kb("alignment",b,a))}},stretch:{get:function(){return this.Zf},set:function(a){var b=this.Zf;b!==a&&(this.Zf= -a,null!==this.panel&&this.panel.w(),this.Kb("stretch",b,a))}},separatorPadding:{get:function(){return this.Vf},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.Vf;null!==a&&null!==b&&b.C(a)||(null!==a&&(a=a.J()),this.Vf=a,null!==this.panel&&this.panel.w(),this.Kb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.On},set:function(a){var b=this.On;b!==a&&(null!==a&&Pl(a,"RowColumnDefinition.separatorStroke"), +ma.Object.defineProperties(Oj.prototype,{panel:{get:function(){return this.Uf}},isRow:{get:function(){return this.Wp},set:function(a){this.Wp=a}},index:{get:function(){return this.Wa},set:function(a){this.Wa=a}},height:{get:function(){return this.Ac},set:function(a){var b=this.Ac;b!==a&&(0>a&&wa(a,">= 0",Oj,"height"),this.Ac=a,this.actual=this.ma,null!==this.panel&&this.panel.w(), +this.Kb("height",b,a))}},width:{get:function(){return this.Ac},set:function(a){var b=this.Ac;b!==a&&(0>a&&wa(a,">= 0",Oj,"width"),this.Ac=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("width",b,a))}},minimum:{get:function(){return this.ej},set:function(a){var b=this.ej;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Oj,"minimum"),this.ej=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("minimum",b,a))}},maximum:{ +get:function(){return this.cj},set:function(a){var b=this.cj;b!==a&&(0>a&&wa(a,">= 0",Oj,"maximum"),this.cj=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("maximum",b,a))}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(this.Fb=a.J(),null!==this.panel&&this.panel.w(),this.Kb("alignment",b,a))}},stretch:{get:function(){return this.$f},set:function(a){var b=this.$f;b!==a&&(this.$f= +a,null!==this.panel&&this.panel.w(),this.Kb("stretch",b,a))}},separatorPadding:{get:function(){return this.Wf},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.Wf;null!==a&&null!==b&&b.C(a)||(null!==a&&(a=a.J()),this.Wf=a,null!==this.panel&&this.panel.w(),this.Kb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.On},set:function(a){var b=this.On;b!==a&&(null!==a&&Pl(a,"RowColumnDefinition.separatorStroke"), a instanceof nl&&a.freeze(),this.On=a,null!==this.panel&&this.panel.w(),this.Kb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Pn},set:function(a){var b=this.Pn;b!==a&&(this.Pn=a,null!==this.panel&&this.panel.w(),this.Kb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.oj},set:function(a){var b=this.oj;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Ga(w);return}e>q?(z=e-q,e=q):z=0;var y=Math.sqrt(e*e/(1+p*p));0>n&&(y=-y);h+=y;k+=p*y;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.ai(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){v++;if(v===w.length){Ga(w);return}q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Ga(w)}} -t.ai=function(a,b){var c=this.Mc,d=this.Ak;if(null!==c||null!==d){var e=this.sa;if(null!==e){a.Oc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&gi(this,a,d,!0,!1,g,f);var h=this.part,k=this.$f;null===c||0!==k||null===h||!this.isPanelMain&&h.vb()!==this||(k=h.type===W.Link&&h instanceof ue&&"Selection"===h.category&&h.adornedObject instanceof Cf&&h.adornedPart.vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(gi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= -this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Fe("drawShadows")&&(f=h.isShadowed);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.Gr(k,this.strokeDashOffset));if(e.type===O.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.si();else if(e.type===O.u){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n-k);a.beginPath();a.rect(e, -p,l,k);null!==d&&a.rf(d);if(null!==c){h&&f&&rl(a);if(0===l||0===k)a.beginPath(),a.rect(e,p,Math.max(l,.1),Math.max(k,.1));a.si();h&&f&&ql(a)}}else if(e.type===O.F)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+J.mg*e,k-p,l+e,k-J.mg*p,l+e,k),a.bezierCurveTo(l+e,k+J.mg*p,l+J.mg*e,k+p,l,k+p),a.bezierCurveTo(l-J.mg*e,k+p,l-e,k+J.mg*p,l-e,k),a.bezierCurveTo(l-e,k-J.mg*p,l-J.mg*e,k-p,l,k-p), -a.closePath(),null!==d&&a.rf(d),null!==c&&(h&&f?(rl(a),a.si(),ql(a)):a.si());else if(e.type===O.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==r?r.endX:l.startX,null!==r?r.endY:l.startY)}else if(r=Rd(u,l),w=r.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;v(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return J.Tb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== -O.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Qc(-d,-d);if(f.ba(a))return M.free(f),!1;f.Qc(d,d)}null!==this.stroke&&f.Qc(e,e);a=f.ba(a);M.free(f);return a}if(c.type===O.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===O.o)return M.free(f),null===this.fill?Vd(c,a.x,a.y,e):Td(c,a,e,1(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return J.Tb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== +O.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.vc(-d,-d);if(f.ba(a))return M.free(f),!1;f.vc(d,d)}null!==this.stroke&&f.vc(e,e);a=f.ba(a);M.free(f);return a}if(c.type===O.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), +!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===O.m)return M.free(f),null===this.fill?Vd(c,a.x,a.y,e):Td(c,a,e,1=this.strokeWidth)m=J.Ie(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), -d=m*b);b=Ea();a=new I;J.Ie(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* -(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),v-=q,z-= -u;r.contains(v,z);)v-=q,z-=u;e.x=h;e.y=k;for(u=0;u=this.strokeWidth)m=J.Je(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), +d=m*b);b=Ea();a=new I;J.Je(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* +(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),v-=q,z-= +u;r.contains(v,z);)v-=q,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||J.ca(k.y,a))&&(k.yb||J.ca(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} -t.Uw=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Xg(a,!0))return!0;var e=a.qf(b),f=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.Xg(a,!0))return!0;var e=a.rf(b),f=e;1.5=e||Ab(b,f,0,-n)>=e||Ab(b, -f,0,n)>=e||Ab(b,f,m,0)>=e?!1:!0}else if(b.type===O.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&zb(a.x,a.y,f,h,k,h)>e&&zb(a.x,a.y,k,l,f,l)>e&&zb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Vd(b,a.x,a.y,f):Td(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Kd:var p=Ea();J.Ce(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Ld:p=Ea();J.Go(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Md:case Qd:p=n.type===Md?Rd(n,f):Sd(n,f,g,m);var r=p.length;if(0===r){g=n.type===Md?n.centerX:n.endX;m=n.type===Md?n.centerY:n.endY;if(a.td(g,m)>e)return!1; -break}n=null;for(var q=Ea(),u=0;u=e||Ab(b,f,m,0)>=e?!1:!0}else if(b.type===O.m){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&zb(a.x,a.y,f,h,k,h)>e&&zb(a.x,a.y,k,l,f,l)>e&&zb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Vd(b,a.x,a.y,f):Td(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Kd:var p=Ea();J.De(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Ld:p=Ea();J.Go(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Md:case Qd:p=n.type===Md?Rd(n,f):Sd(n,f,g,m);var r=p.length;if(0===r){g=n.type===Md?n.centerX:n.endX;m=n.type===Md?n.centerY:n.endY;if(a.td(g,m)>e)return!1; +break}n=null;for(var q=Ea(),u=0;u= 0",Cf,"strokeWidth:value")}},strokeCap:{ +ma.Object.defineProperties(Cf.prototype,{geometry:{get:function(){return null!==this.sa?this.sa:this.Hd},set:function(a){var b=this.sa,c=this.Hd;if(b!==a){null!==a?this.Hd=this.sa=a.freeze():this.Hd=this.sa=null;var d=this.part;null!==d&&(d.Sf=NaN);this.w();this.g("geometry",b||c,a);el(this)&&(a=this.part,null!==a&&fl(this,a,"geometryString"))}}},geometryString:{get:function(){return null===this.geometry?"":this.geometry.toString()},set:function(a){a= +O.parse(a);var b=a.normalize();this.geometry=a;this.position=a=I.allocAt(-b.x,-b.y);I.free(a)}},isGeometryPositioned:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{get:function(){return this.Ak},set:function(a){var b=this.Ak;b!==a&&(null!==a&&Pl(a,"Shape.fill"),a instanceof nl&&a.freeze(),this.Ak=a,this.N(),this.g("fill", +b,a))}},stroke:{get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(null!==a&&Pl(a,"Shape.stroke"),a instanceof nl&&a.freeze(),this.Nc=a,this.N(),this.g("stroke",b,a))}},strokeWidth:{get:function(){return this.ag},set:function(a){var b=this.ag;if(b!==a)if(0<=a){this.ag=a;this.w();var c=this.part;null!==c&&(c.Sf=NaN);this.g("strokeWidth",b,a)}else wa(a,"value >= 0",Cf,"strokeWidth:value")}},strokeCap:{ get:function(){return null!==this.Na?this.Na.dr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?wa(a,'"butt", "round", or "square"',Cf,"strokeCap"):(wn(this),this.Na.dr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.er:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?wa(a,'"miter", "bevel", or "round"', -Cf,"strokeJoin"):(wn(this),this.Na.er=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.fr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){wn(this);this.Na.fr=a;this.N();var c=this.part;null!==c&&(c.Rf=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Og},set:function(a){var b=this.Og;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.Zb!==a&&(c=!1);!1===b.Fe("textGreeking")&& -(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case $k:a.translate(e,0);a.scale(-1,1);break;case Zk:a.translate(0,f);a.scale(1,-1);break;case al:a.translate(e,f),a.scale(-1,-1)}a.Oc();m=this.dd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.pe)n=this.yb,n>e&&(n=e),this.$h(this.pe,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Ic&&null!==this.Wb)for(p=0;pe&&(r=e);d+=b;this.$h(this.Wb[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case $k:a.scale(-1, +function Sm(a,b){a.o=b.o|6144;a.tb=b.opacity;a.Yb=b.background;a.areaBackground=b.areaBackground;a.$c=b.desiredSize.J();a.minSize=b.minSize.J();a.maxSize=b.maxSize.J();null!==b.Ib?a.Ib=b.Ib.copy():a.Ib=null;a.xa=b.scale;a.Gb=b.angle;a.stretch=b.stretch;a.Ag=b.margin.J();a.Fb=b.alignment.J();a.fk=b.alignmentFocus.J();a.segmentFraction=b.segmentFraction;a.segmentOffset=b.segmentOffset.J();a.segmentOrientation=b.segmentOrientation;null!==b.ib&&(a.ib=b.ib.copy());a.shadowVisible=b.shadowVisible;a.cc= +b.cc;a.Nc=b.Nc;a.re=b.re;null!==a.fa&&(a.fa=b.fa.copy());null!==b.da&&(a.da=b.da.ic?b.da:b.da.copy());a.zh=b.zh}t.ob=function(a){a.classType===Qg?this.wrap=a:Y.prototype.ob.call(this,a)};t.toString=function(){return 22(n*n+m*m)*p*p&&(c=!0);b.Zb!==a&&(c=!1);!1===b.Ge("textGreeking")&& +(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case $k:a.translate(e,0);a.scale(-1,1);break;case Zk:a.translate(0,f);a.scale(1,-1);break;case al:a.translate(e,f),a.scale(-1,-1)}a.Pc();m=this.dd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.qe)n=this.yb,n>e&&(n=e),this.$h(this.qe,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Jc&&null!==this.Wb)for(p=0;pe&&(r=e);d+=b;this.$h(this.Wb[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case $k:a.scale(-1, 1);a.translate(-e,0);break;case Zk:a.scale(1,-1);a.translate(0,-f);break;case al:a.scale(-1,-1),a.translate(-e,-f)}}}; t.$h=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==Tn?Tn(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==Un?Un(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ n+g,d),b.stroke()))}; -t.El=function(a,b,c,d){this.zh=a;var e=this.qe;null!==In&&Vn!==e&&(Vn=In.font=e);this.yb=this.ze=0;this.pe=this.Wb=this.Ic=this.Se=null;var f;if(isNaN(this.desiredSize.width)){e=this.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===Wn&&(g=g.trim());f=Math.max(f,Xn(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=Xn(e);e=Math.min(e, -a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=Yn(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.yb&&null!==this.Ic&&null!==this.Wb&&this.overflow===Zn&&(b=this.qe,b=this.overflow===Zn?$n(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,Sn(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.Wb.length))){k=this.Wb[h];for(b=Math.max(1, -a-b);Xn(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===fo){a.ze=1;var l=Xn(b);if(0===k||l<=c)a.yb=Math.max(a.yb,l),co(a,b,a.yb),null!==d&&d.h(l,h);else{f=go(a,g);g=g.substr(f.length);b=go(a,g);for(l=Xn(f+b);0 +t.El=function(a,b,c,d){this.zh=a;var e=this.re;null!==In&&Vn!==e&&(Vn=In.font=e);this.yb=this.Ae=0;this.qe=this.Wb=this.Jc=this.Te=null;var f;if(isNaN(this.desiredSize.width)){e=this.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===Wn&&(g=g.trim());f=Math.max(f,Xn(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=Xn(e);e=Math.min(e, +a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=Yn(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.yb&&null!==this.Jc&&null!==this.Wb&&this.overflow===Zn&&(b=this.re,b=this.overflow===Zn?$n(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,Sn(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.Wb.length))){k=this.Wb[h];for(b=Math.max(1, +a-b);Xn(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===fo){a.Ae=1;var l=Xn(b);if(0===k||l<=c)a.yb=Math.max(a.yb,l),co(a,b,a.yb),null!==d&&d.h(l,h);else{f=go(a,g);g=g.substr(f.length);b=go(a,g);for(l=Xn(f+b);0 c&&1c;){var n=1;l=Xn(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Xn(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);co(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.dd+k>a.maxLines)break}m=go(a,g);for(l=Xn(b+m);0a.maxLines))break}a.ze=Math.min(a.maxLines,k);a.yb=Math.max(a.yb,f);null!==d&&d.h(a.yb,h*a.ze)}} -function go(a,b){if(a.wrap===ho)return b.substr(0,1);for(var c=b.length,d=0,e=io;d=b.length?b:b.substr(0,d)}function Xn(a){return null===In?8*a.length:In.measureText(a).width}function Sn(a){if(null!==a.Se)return a.Se;var b=a.qe;if(null===In){var c=16;return a.Se=c}void 0!==ko[b]&&5E3>lo?c=ko[b]:(c=1.3*In.measureText("M").width,ko[b]=c,lo++);return a.Se=c} +l=Xn(l);e&&(b=b.trim());if(""!==b&&("\u00ad"===b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=Xn(b),f=Math.max(f,m)),co(a,b,n),k++,a.dd+k>a.maxLines))break}a.Ae=Math.min(a.maxLines,k);a.yb=Math.max(a.yb,f);null!==d&&d.h(a.yb,h*a.Ae)}} +function go(a,b){if(a.wrap===ho)return b.substr(0,1);for(var c=b.length,d=0,e=io;d=b.length?b:b.substr(0,d)}function Xn(a){return null===In?8*a.length:In.measureText(a).width}function Sn(a){if(null!==a.Te)return a.Te;var b=a.re;if(null===In){var c=16;return a.Te=c}void 0!==ko[b]&&5E3>lo?c=ko[b]:(c=1.3*In.measureText("M").width,ko[b]=c,lo++);return a.Te=c} function $n(a){if(null===In)return 6;if(void 0!==mo[a]&&5E3>no)var b=mo[a];else b=In.measureText(ao).width,mo[a]=b,no++;return b} -function Yn(a,b){var c=a.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Sn(a)+d);if(0===c.length)return a.yb=0,a.dd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.dd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==fo){a.ze=0;var k=K.alloc();eo(a,f,b,k);e+=k.height;K.free(k);a.dd+=a.ze}else eo(a,f,b,null),e+=d,a.dd++;a.dd===a.maxLines&&(h=!0)}f=g+1}return a.kq=e} -ma.Object.defineProperties(Qg.prototype,{font:{get:function(){return this.qe},set:function(a){var b=this.qe;b!==a&&(this.qe=a,this.Se=null,this.w(),this.g("font",b,a))}},text:{get:function(){return this.cc},set:function(a){var b=this.cc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.cc=a,this.w(),this.g("text",b,a))}},textAlign:{get:function(){return null!==this.da?this.da.mr:"start"},set:function(a){var b= -this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(Jn(this),this.da.mr=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Mf:lg},set:function(a){var b=this.flip;b!==a&&(Jn(this),this.da.Mf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.xr:Zc},set:function(a){var b=this.verticalAlignment;b.C(a)||(a=a.J(),Jn(this),this.da.xr= -a,Al(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.bc.v()){var a=K.alloc();eo(this,this.cc,999999,a);var b=a.width;K.free(a);a=Yn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Qb(this.bc,b,a)}return this.bc}},isMultiline:{get:function(){return 0!==(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(this.m^=2097152,this.w(),this.g("isMultiline",b, -a))}},isUnderline:{get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);b!==a&&(this.m^=4194304,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.m&8388608)},set:function(a){var b=0!==(this.m&8388608);b!==a&&(this.m^=8388608,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.Ar:oo},set:function(a){var b= -this.wrap;b!==a&&(Jn(this),this.da.Ar=a,this.w(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.yq:po},set:function(a){var b=this.overflow;b!==a&&(Jn(this),this.da.yq=a,this.w(),this.g("overflow",b,a))}},stroke:{get:function(){return this.Mc},set:function(a){var b=this.Mc;b!==a&&(null!==a&&Pl(a,"TextBlock.stroke"),a instanceof nl&&a.freeze(),this.Mc=a,this.N(),this.g("stroke",b,a))}},lineCount:{ -get:function(){return this.dd}},lineHeight:{get:function(){return Sn(this)}},editable:{get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(this.m^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.pr:null},set:function(a){var b=this.textEditor;b!==a&&(Jn(this),this.da.pr=a,this.g("textEditor",b,a))}},errorFunction:{ +function Yn(a,b){var c=a.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Sn(a)+d);if(0===c.length)return a.yb=0,a.dd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.dd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==fo){a.Ae=0;var k=K.alloc();eo(a,f,b,k);e+=k.height;K.free(k);a.dd+=a.Ae}else eo(a,f,b,null),e+=d,a.dd++;a.dd===a.maxLines&&(h=!0)}f=g+1}return a.kq=e} +ma.Object.defineProperties(Qg.prototype,{font:{get:function(){return this.re},set:function(a){var b=this.re;b!==a&&(this.re=a,this.Te=null,this.w(),this.g("font",b,a))}},text:{get:function(){return this.cc},set:function(a){var b=this.cc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.cc=a,this.w(),this.g("text",b,a))}},textAlign:{get:function(){return null!==this.da?this.da.mr:"start"},set:function(a){var b= +this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(Jn(this),this.da.mr=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Nf:lg},set:function(a){var b=this.flip;b!==a&&(Jn(this),this.da.Nf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.xr:Zc},set:function(a){var b=this.verticalAlignment;b.C(a)||(a=a.J(),Jn(this),this.da.xr= +a,Al(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.bc.v()){var a=K.alloc();eo(this,this.cc,999999,a);var b=a.width;K.free(a);a=Yn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Qb(this.bc,b,a)}return this.bc}},isMultiline:{get:function(){return 0!==(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(this.o^=2097152,this.w(),this.g("isMultiline",b, +a))}},isUnderline:{get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);b!==a&&(this.o^=4194304,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.o&8388608)},set:function(a){var b=0!==(this.o&8388608);b!==a&&(this.o^=8388608,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.Ar:oo},set:function(a){var b= +this.wrap;b!==a&&(Jn(this),this.da.Ar=a,this.w(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.yq:po},set:function(a){var b=this.overflow;b!==a&&(Jn(this),this.da.yq=a,this.w(),this.g("overflow",b,a))}},stroke:{get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(null!==a&&Pl(a,"TextBlock.stroke"),a instanceof nl&&a.freeze(),this.Nc=a,this.N(),this.g("stroke",b,a))}},lineCount:{ +get:function(){return this.dd}},lineHeight:{get:function(){return Sn(this)}},editable:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.pr:null},set:function(a){var b=this.textEditor;b!==a&&(Jn(this),this.da.pr=a,this.g("textEditor",b,a))}},errorFunction:{ get:function(){return null!==this.da?this.da.zd:null},set:function(a){var b=this.errorFunction;b!==a&&(Jn(this),this.da.zd=a,this.g("errorFunction",b,a))}},interval:{get:function(){return null!==this.fa?this.fa.Ik:1},set:function(a){var b=this.interval;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.fa&&(this.fa=new Gn);this.fa.Ik=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{ get:function(){return null!==this.fa?this.fa.u:0},set:function(a){var b=this.graduatedStart;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Qg,"maxLines"),Jn(this),this.da.iq=a,this.w(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Ic?this.Ic:[this.yb],arrText:null!==this.Wb?this.Wb:[this.pe],maxLineWidth:this.yb,fontHeight:this.Se}}},choices:{get:function(){return this.om},set:function(a){var b=this.om;b!==a&&(this.om=a,this.g("choices",b,a))}}}); +set:function(a){var b=this.maxLines;b!==a&&(a=Math.floor(a),0>=a&&wa(a,"> 0",Qg,"maxLines"),Jn(this),this.da.iq=a,this.w(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Jc?this.Jc:[this.yb],arrText:null!==this.Wb?this.Wb:[this.qe],maxLineWidth:this.yb,fontHeight:this.Te}}},choices:{get:function(){return this.om},set:function(a){var b=this.om;b!==a&&(this.om=a,this.g("choices",b,a))}}}); var Tn=null,Un=null,fo=new D(Qg,"None",0),bo=new D(Qg,"WrapFit",1),oo=new D(Qg,"WrapDesiredSize",2),ho=new D(Qg,"WrapBreakAll",3),po=new D(Qg,"OverflowClip",0),Zn=new D(Qg,"OverflowEllipsis",1),Wn=new D(Qg,"FormatTrim",0),jo=new D(Qg,"FormatNone",0),io=/[ \u200b\u00ad]/,ko=new Wa,lo=0,mo=new Wa,no=0,ao="...",Vn="",In=null,Hn=!1;Qg.className="TextBlock"; -function Rn(){this.ic=!1;this.zd=null;this.Mf=lg;this.Jp=Wn;this.iq=Infinity;this.yq=po;this.ar=this.$q=0;this.mr="start";this.qj=this.pr=this.nr=null;this.xr=Zc;this.Ar=oo}Rn.prototype.copy=function(){var a=new Rn;a.zd=this.zd;a.Mf=this.Mf;a.Jp=this.Jp;a.iq=this.iq;a.yq=this.yq;a.$q=this.$q;a.ar=this.ar;a.mr=this.mr;a.nr=this.nr;a.pr=this.pr;a.qj=this.qj;a.xr=this.xr;a.Ar=this.Ar;return a};Qg.getEllipsis=function(){return ao};Qg.setEllipsis=function(a){ao=a;mo=new Wa;no=0};Qg.getBaseline=function(){return Tn}; +function Rn(){this.ic=!1;this.zd=null;this.Nf=lg;this.Jp=Wn;this.iq=Infinity;this.yq=po;this.ar=this.$q=0;this.mr="start";this.qj=this.pr=this.nr=null;this.xr=Zc;this.Ar=oo}Rn.prototype.copy=function(){var a=new Rn;a.zd=this.zd;a.Nf=this.Nf;a.Jp=this.Jp;a.iq=this.iq;a.yq=this.yq;a.$q=this.$q;a.ar=this.ar;a.mr=this.mr;a.nr=this.nr;a.pr=this.pr;a.qj=this.qj;a.xr=this.xr;a.Ar=this.Ar;return a};Qg.getEllipsis=function(){return ao};Qg.setEllipsis=function(a){ao=a;mo=new Wa;no=0};Qg.getBaseline=function(){return Tn}; Qg.setBaseline=function(a){Tn=a};Qg.getUnderline=function(){return Un};Qg.setUnderline=function(a){Un=a};Qg.isValidFont=function(a){Hn||(In=Og?(new Bk(null)).context:null,Hn=!0);if(null===In)return!0;var b=In.font;if(a===b||"10px sans-serif"===a)return!0;In.font="10px sans-serif";In.font=a;var c=In.font;if("10px sans-serif"!==c)return In.font=b,!0;In.font="19px serif";var d=In.font;In.font=a;c=In.font;In.font=b;return c!==d};Qg.FormatNone=jo;Qg.FormatTrim=Wn;Qg.None=fo;Qg.OverflowClip=po; -Qg.OverflowEllipsis=Zn;Qg.WrapBreakAll=ho;Qg.WrapDesiredSize=oo;Qg.WrapFit=bo;function Gn(){this.Ik=1;this.u=0;this.j=1;this.o=this.F=null}Gn.prototype.copy=function(){var a=new Gn;a.Ik=this.Ik;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};Gn.className="GradElementSettings"; -function Wj(a,b){Y.call(this);this.ug=null;this.Tn="";this.Ng=dc;this.Ck=td;this.Pg=this.zd=null;this.Bk=yc;this.Mf=lg;this.kl=null;this.Xm=!1;this.Mm=!0;this.Qk=!1;this.gl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var qo;la(Wj,Y);Wj.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.ug;a.Tn=this.Tn;a.Ng=this.Ng.J();a.Ck=this.Ck;a.Mf=this.Mf;a.zd=this.zd;a.Pg=this.Pg;a.Bk=this.Bk.J();a.Mm=this.Mm;a.gl=this.gl}; +Qg.OverflowEllipsis=Zn;Qg.WrapBreakAll=ho;Qg.WrapDesiredSize=oo;Qg.WrapFit=bo;function Gn(){this.Ik=1;this.u=0;this.j=1;this.m=this.F=null}Gn.prototype.copy=function(){var a=new Gn;a.Ik=this.Ik;a.u=this.u;a.j=this.j;a.F=this.F;a.m=this.m;return a};Gn.className="GradElementSettings"; +function Wj(a,b){Y.call(this);this.vg=null;this.Tn="";this.Ng=dc;this.Ck=td;this.Pg=this.zd=null;this.Bk=yc;this.Nf=lg;this.kl=null;this.Xm=!1;this.Mm=!0;this.Qk=!1;this.gl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var qo;la(Wj,Y);Wj.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.vg;a.Tn=this.Tn;a.Ng=this.Ng.J();a.Ck=this.Ck;a.Nf=this.Nf;a.zd=this.zd;a.Pg=this.Pg;a.Bk=this.Bk.J();a.Mm=this.Mm;a.gl=this.gl}; Wj.prototype.ob=function(a){a===lg||a===ng||a===Yk?this.imageStretch=a:Y.prototype.ob.call(this,a)};Wj.prototype.toString=function(){return"Picture("+this.source+")#"+cb(this)};function Bi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new Wa,ro=0)} -function so(a,b){b.Vx||(b.fq=function(c){b.Up=!0;b.Sm=!1;var d=b.rg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src")||"";var g=e.Fg.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case ng:case Yk:p===ng?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===Yk&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ -d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.tf()*b.scale;var q=m*p*n*p,u=h*g/q,w=c.__goCache;p=null;var v=to;if(c.Up&&void 0!==w&&4v*v)for(null===w.Zh&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.Zh,l=k.length,q=0;qv*v)for(null===w.Zh&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.Zh,l=k.length,q=0;qa)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=J.Cf[d];if(void 0!==e)return e;var f=a*J.mg;e=(new O).add((new Xd(a,0,!0)).add(new Yd(vd,b-a,0)).add(new Yd(Kd,b,a,b-f,0,b,f)).add(new Yd(vd,b,c-a)).add(new Yd(Kd,b-a,c,b,c-f,b-f,c)).add(new Yd(vd,a,c)).add(new Yd(Kd,0,c-a,f,c,0,c-f)).add(new Yd(vd,0,a)).add((new Yd(Kd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=J.Df[d];if(void 0!==e)return e;var f=a*J.ng;e=(new O).add((new Xd(a,0,!0)).add(new Yd(vd,b-a,0)).add(new Yd(Kd,b,a,b-f,0,b,f)).add(new Yd(vd,b,c-a)).add(new Yd(Kd,b-a,c,b,c-f,b-f,c)).add(new Yd(vd,a,c)).add(new Yd(Kd,0,c-a,f,c,0,c-f)).add(new Yd(vd,0,a)).add((new Yd(Kd,a,0,0,f,f,0)).close()));1e.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righte.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.He){b.He=!0;var c=new G;c.add(this);fp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.He=!1}};function fp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ie){b.Ie=!0;var c=new G;c.add(this);fp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.Ie=!1}};function fp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.He){b.He=!0;var c=new G;c.add(this);hp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.He=!1}}; +V.prototype.expandTree=function(a){void 0===a&&(a=2);2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ie){b.Ie=!0;var c=new G;c.add(this);hp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.Ie=!1}}; function hp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.ro():a.Kd();k.next();){var l=k.value;l.isTreeLink&&(h||l.xd||l.ab(),l=l.wo(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ub(!0),l.dh(),g&&e.xj(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, -a.h(b.x,b.y,0,0));return a};ma.Object.defineProperties(jg.prototype,{padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.g("padding",b,a),this.w())}}});jg.className="Placeholder"; -function T(a){U.call(this,W.Link);this.Oa=8;this.Te=null;this.Ue="";this.gf=this.Om=null;this.hf="";this.Xn=null;this.dk=$f;this.wm=0;this.ym=$f;this.zm=NaN;this.kj=mp;this.Sn=.5;this.rd=null;this.Jb=(new E).freeze();this.df=this.Eg=null;this.bl=new M;this.sa=new O;this.u=this.o=this.Hf=this.Lf=null;this.Yt=new I;this.Gp=this.qw=this.pw=null;this.Ys=NaN;this.aa=null;this.j=[];a&&Object.assign(this,a)}la(T,U); -T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Oa=this.Oa&-113;a.Ue=this.Ue;a.Om=this.Om;a.hf=this.hf;a.Xn=this.Xn;a.dk=this.dk;a.wm=this.wm;a.ym=this.ym;a.zm=this.zm;a.kj=this.kj;a.Sn=this.Sn;null!==this.aa&&(a.aa=this.aa.copy())};t=T.prototype;t.pf=function(a){U.prototype.pf.call(this,a);this.Ue=a.Ue;this.hf=a.hf;a.Eg=null;a.ab();a.Hf=this.Hf;var b=a.fromPort;null!==b&&Zo(b);a=a.toPort;null!==a&&Zo(a)}; +a.h(b.x,b.y,0,0));return a};ma.Object.defineProperties(jg.prototype,{padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.g("padding",b,a),this.w())}}});jg.className="Placeholder"; +function T(a){U.call(this,W.Link);this.Oa=8;this.Ue=null;this.Ve="";this.hf=this.Om=null;this.jf="";this.Xn=null;this.dk=$f;this.wm=0;this.ym=$f;this.zm=NaN;this.kj=mp;this.Sn=.5;this.rd=null;this.Jb=(new E).freeze();this.ef=this.Eg=null;this.bl=new M;this.sa=new O;this.u=this.m=this.If=this.Mf=null;this.Yt=new I;this.Gp=this.qw=this.pw=null;this.Ys=NaN;this.aa=null;this.j=[];a&&Object.assign(this,a)}la(T,U); +T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Oa=this.Oa&-113;a.Ve=this.Ve;a.Om=this.Om;a.jf=this.jf;a.Xn=this.Xn;a.dk=this.dk;a.wm=this.wm;a.ym=this.ym;a.zm=this.zm;a.kj=this.kj;a.Sn=this.Sn;null!==this.aa&&(a.aa=this.aa.copy())};t=T.prototype;t.qf=function(a){U.prototype.qf.call(this,a);this.Ve=a.Ve;this.jf=a.jf;a.Eg=null;a.ab();a.If=this.If;var b=a.fromPort;null!==b&&Zo(b);a=a.toPort;null!==a&&Zo(a)}; t.ob=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===cg||a===Zf||a===Yf?this.curve=a:a===np||a===op||a===pp?this.adjusting=a:a!==mp&&a!==$f&&C("Unknown Link enum value for a Link property: "+a):U.prototype.ob.call(this,a)};t.Rc=function(){null===this.aa&&(this.aa=new dl)};t.mi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(oj(a)||pj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),oj(a)||pj(a))?!1:!0};t.fv=function(){return!1}; t.ns=function(){};t.Tc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case $f:a=0;break;case Tm:a=b;break;case Mm:a=b+90;break;case Om:a=b-90;break;case qp:a=b+180;break;case Um:a=J.Eo(b);90a&&(a-=180);break;case Nm:a=J.Eo(b+90);90a&&(a-=180);break;case Pm:a=J.Eo(b-90);90a&&(a-=180);break;case Qm:a=J.Eo(b);if(45a||225a)return 0;90a&&(a-=180)}return J.Eo(a)}; -function To(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Rw(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.ph;if(c!==b){null!==c&&Oo(c,a);a.ph=b;null!==b&&No(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.$,g.$=!0);e(a,c,b);null!==g&&(g.$=f)}!a.xd||a.pw!==c&&a.qw!==c||a.ab()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; +function To(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Sw(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.ph;if(c!==b){null!==c&&Oo(c,a);a.ph=b;null!==b&&No(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.$,g.$=!0);e(a,c,b);null!==g&&(g.$=f)}!a.xd||a.pw!==c&&a.qw!==c||a.ab()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; t.dh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.dh.call(this)};t.wo=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.jz=function(a){var b=this.fromPort;return a===b?this.toPort:b};function cp(a,b){null===a.rd&&(a.rd=new G);a.rd.add(b);a.w()} -t.yo=function(a){U.prototype.yo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Te;var b=null;null!==a&&(b=this.fromPort,ap(a,this,b));var c=this.gf;if(null!==c){var d=this.toPort;c===a&&d===b||ap(c,this,d)}sp(this)}};t.zo=function(a){U.prototype.zo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Te;var b=null;null!==a&&(b=this.fromPort,bp(a,this,b));var c=this.gf;if(null!==c){var d=this.toPort;c===a&&d===b||bp(c,this,d)}tp(this)}}; +t.yo=function(a){U.prototype.yo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Ue;var b=null;null!==a&&(b=this.fromPort,ap(a,this,b));var c=this.hf;if(null!==c){var d=this.toPort;c===a&&d===b||ap(c,this,d)}sp(this)}};t.zo=function(a){U.prototype.zo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Ue;var b=null;null!==a&&(b=this.fromPort,bp(a,this,b));var c=this.hf;if(null!==c){var d=this.toPort;c===a&&d===b||bp(c,this,d)}tp(this)}}; t.Fj=function(){this.xd=!0;if(null!==this.rd){var a=this.diagram;if(null!==a)for(var b=this.rd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};T.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; T.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?U.prototype.move.call(this,a,!1):(a=I.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),I.free(a));cf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; T.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};T.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; -T.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(ub),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Bu(.5,a),a.add(this.i(0)),c=this.sa.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===cg){if(3===b)return this.i(1);d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);var e=this.i(c+1), -f=this.i(c+2);c=this.i(c+3);J.ty(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a}; -T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Ya(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Xw(.5);if(this.computeCurve()===cg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return J.sy(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0c/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- +b.y)));return a}; +T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Ya(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Yw(.5);if(this.computeCurve()===cg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return J.ty(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.Ya(d)};t=T.prototype;t.i=function(a){return this.Jb.s[a]};t.Wc=function(a,b){this.Jb.Vc(a,b)};t.M=function(a,b,c){this.Jb.Vc(a,new I(b,c))};t.sz=function(a,b){this.Jb.Cb(a,b)}; -t.l=function(a,b,c){this.Jb.Cb(a,new I(b,c))};t.ee=function(a){this.Jb.add(a)};t.lf=function(a,b){this.Jb.add(new I(a,b))};t.Yu=function(a){this.Jb.mb(a)};t.Aj=function(){this.Jb.clear()}; -function cf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.xd,e=new E,f=a.Jb.iterator;f.next();){var g=f.value;e.add((new I(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Jb;a.Jb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.zb?a.w():(a.ce.h(a.ce.x+b,a.ce.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Al(a));d?up(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= -a.i(a.pointsCount-1)));null!==g&&g.animationManager.zb&&(b=g.animationManager,a.df=e,b.dl.add(a));a.g("points",f,e)}}t.jh=function(){null===this.Eg&&(this.Eg=this.Jb,this.Jb=this.Jb.copy())}; -t.nf=function(){if(null!==this.Eg){for(var a=this.Eg,b=this.Jb,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= -(0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,z=q;J.B(k,0)?z=0k?-1:1)*n+r,z=m*(v-r)+q);this.Aj();this.ee(f);this.lf(u,w);this.lf(v,z);this.ee(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,J.B(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ee(d),this.lf(f,h),this.ee(e);else{this.ee(d);this.ee(e);h=M.alloc();b.gi(h);k=h.ba(e);p.gi(h);l=h.ba(d);if(k||l)g=b.ia(zp(g),new I),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ia(zp(c),new I),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Aj();var y=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r= -this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>y&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(w+=Math.abs(y)*(m?1:2)),0===r?q=w:90===r?u=w:180===r?q=-w:270===r?u=-w:(q=w*Math.cos(r*Math.PI/180),u=w*Math.sin(r*Math.PI/180)),g.Ec()&&l&&(w=b.ia(yc,I.alloc()),v=I.allocAt(w.x+1E3*q,w.y+1E3*u),this.getLinkPointFromPoint(a,b,w,v,!0,n),I.free(w),I.free(v));w=this.getLinkPoint(d,e,c,!1,m,a,b);var A=z=v=0;if(m||!k||l){var B=this.computeEndSegmentLength(d,e, -c,!1);A=this.getLinkDirection(d,e,w,c,!1,m,a,b);l&&(k||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(A+=m?0:30,0>y&&(A+=180));0>A?A+=360:360<=A&&(A-=360);l&&(B+=Math.abs(y)*(m?1:2));0===A?v=B:90===A?z=B:180===A?v=-B:270===A?z=-B:(v=B*Math.cos(A*Math.PI/180),z=B*Math.sin(A*Math.PI/180));c.Ec()&&l&&(c=e.ia(yc,I.alloc()),g=I.allocAt(c.x+1E3*v,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,w),I.free(c),I.free(g))}c=n;if(m||!h||l)c=new I(n.x+q,n.y+u);g=w;if(m||!k||l)g=new I(w.x+v,w.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} -T.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new I);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.je()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.fe;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Kj(e,d,g,c,f);null!== +(0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,z=q;J.B(k,0)?z=0k?-1:1)*n+r,z=m*(v-r)+q);this.Aj();this.fe(f);this.mf(u,w);this.mf(v,z);this.fe(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,J.B(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.fe(d),this.mf(f,h),this.fe(e);else{this.fe(d);this.fe(e);h=M.alloc();b.gi(h);k=h.ba(e);p.gi(h);l=h.ba(d);if(k||l)g=b.ia(zp(g),new I),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ia(zp(c),new I),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Aj();var y=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r= +this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>y&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(w+=Math.abs(y)*(m?1:2)),0===r?q=w:90===r?u=w:180===r?q=-w:270===r?u=-w:(q=w*Math.cos(r*Math.PI/180),u=w*Math.sin(r*Math.PI/180)),g.Fc()&&l&&(w=b.ia(yc,I.alloc()),v=I.allocAt(w.x+1E3*q,w.y+1E3*u),this.getLinkPointFromPoint(a,b,w,v,!0,n),I.free(w),I.free(v));w=this.getLinkPoint(d,e,c,!1,m,a,b);var A=z=v=0;if(m||!k||l){var B=this.computeEndSegmentLength(d,e, +c,!1);A=this.getLinkDirection(d,e,w,c,!1,m,a,b);l&&(k||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(A+=m?0:30,0>y&&(A+=180));0>A?A+=360:360<=A&&(A-=360);l&&(B+=Math.abs(y)*(m?1:2));0===A?v=B:90===A?z=B:180===A?v=-B:270===A?z=-B:(v=B*Math.cos(A*Math.PI/180),z=B*Math.sin(A*Math.PI/180));c.Fc()&&l&&(c=e.ia(yc,I.alloc()),g=I.allocAt(c.x+1E3*v,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,w),I.free(c),I.free(g))}c=n;if(m||!h||l)c=new I(n.x+q,n.y+u);g=w;if(m||!k||l)g=new I(w.x+v,w.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +T.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new I);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.ke()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.ge;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Kj(e,d,g,c,f);null!== a&&f.transform(a);return f};function Bp(a,b){var c=b.Hn;null===c&&(c=new Cp,c.port=b,c.node=b.part,b.Hn=c);return Dp(c,a)} -T.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new I);if(c.pb()&&!yp(c))return b.ia(c,h),h;if(c.Uc()){var k=Bp(this,b);if(null!==k){h.assign(k.Co);if(e&&this.routing===Ep){var l=Bp(this,g);if(null!==l&&k.tl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.wf(Dc)||c.wf(Hc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);I.free(k);I.free(l)}}return h}}c= +T.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new I);if(c.pb()&&!yp(c))return b.ia(c,h),h;if(c.Uc()){var k=Bp(this,b);if(null!==k){h.assign(k.Co);if(e&&this.routing===Ep){var l=Bp(this,g);if(null!==l&&k.tl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.xf(Dc)||c.xf(Hc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);I.free(k);I.free(l)}}return h}}c= b.ia(zp(c),I.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=Ap(c,g.copy()))):(k=this.computeSpot(!d,g),f=I.alloc(),g=g.ia(zp(k),f),e&&(g=Ap(c,g)),I.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);I.free(c);return h}; -T.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.pb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Ap(k,h.copy()):c):(c=I.alloc(),h=h.ia(yc,c),I.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= -k.x?0:180:h.y>=k.y?90:270;I.free(k);k=c}d.Ec()&&g.Md(a)&&(k+=180,360<=k&&(k-=360));if(yp(d))return k;a=b.fi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Uc()&&(a=Bp(this,b),null!==a))return a.tu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; +T.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.pb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Ap(k,h.copy()):c):(c=I.alloc(),h=h.ia(yc,c),I.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +k.x?0:180:h.y>=k.y?90:270;I.free(k);k=c}d.Fc()&&g.Md(a)&&(k+=180,360<=k&&(k-=360));if(yp(d))return k;a=b.fi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Uc()&&(a=Bp(this,b),null!==a))return a.tu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; T.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=yc:(b=this.fromSpot,b.Sb()&&(b=a.fromSpot),a=b===Wc?sc:b)):(a=b?b:this.toPort,null===a?a=yc:(b=this.toSpot,b.Sb()&&(b=a.toSpot),a=b===Wc?sc:b));return a};function yp(a){return a===sc||.5===a.x&&.5===a.y}function zp(a){return.5===a.x&&.5===a.y?a:yc} T.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==$f&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=md.alloc();n.set(g); -if(m instanceof W)h=m.sf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Cf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.Wg(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.De(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var w=I.alloc(),v=I.alloc(),z=I.alloc(),y=md.alloc();y.set(q);y.Ou(m.transform);y.Tr();v.x=p;v.y=u;v.transform(y);w.x=h;w.y=u;w.transform(y);q=!1;Cn(m,w,v,z)?q=!0:(w.x=p,w.y=r,w.transform(y),Cn(m,w,v,z)?q=!0:(v.x= +T.prototype.tf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=md.alloc(),g.reset());g.multiply(this.transform);if(this.Wg(a,g))return dn(this,b,c,e),void 0===f&&md.free(g),!0;if(this.Sc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.R.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=md.alloc();n.set(g); +if(m instanceof W)h=m.tf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Cf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.Wg(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Ee(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var w=I.alloc(),v=I.alloc(),z=I.alloc(),y=md.alloc();y.set(q);y.Ou(m.transform);y.Tr();v.x=p;v.y=u;v.transform(y);w.x=h;w.y=u;w.transform(y);q=!1;Cn(m,w,v,z)?q=!0:(w.x=p,w.y=r,w.transform(y),Cn(m,w,v,z)?q=!0:(v.x= h,v.y=r,v.transform(y),Cn(m,w,v,z)?q=!0:(w.x=h,w.y=u,w.transform(y),Cn(m,w,v,z)&&(q=!0))));md.free(y);I.free(w);I.free(v);I.free(z);h=q}}else h=m.Wg(h,n)}else h=hl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));md.free(n)}}}void 0===f&&md.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&md.free(g);return!1}; -T.prototype.computeCurve=function(){if(null===this.Lf){var a=this.fromPort,b=this.isOrthogonal;this.Lf=null!==a&&a===this.toPort&&!b}return this.Lf?cg:this.curve};T.prototype.computeCorner=function(){if(this.curve===cg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; +T.prototype.computeCurve=function(){if(null===this.Mf){var a=this.fromPort,b=this.isOrthogonal;this.Mf=null!==a&&a===this.toPort&&!b}return this.Mf?cg:this.curve};T.prototype.computeCorner=function(){if(this.curve===cg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; T.prototype.findMidLabel=function(){for(var a=this.path,b=this.R.s,c=b.length,d=0;dk?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);J.ca(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.Wc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.M(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Wc(c,d)}}return!0;case pp:f=this.i(a);n=this.i(c);if(!f.$a(b)||!n.$a(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Wc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.v()&&k.v()){h.Qc(Hp,Hp);k.Qc(Hp,Hp);h.Le(a);k.Le(c);var l=I.alloc(),m=I.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +T.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.v()&&k.v()){h.vc(Hp,Hp);k.vc(Hp,Hp);h.Me(a);k.Me(c);var l=I.alloc(),m=I.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ba(a)||h.ba(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left,m.x=l.x, @@ -1581,17 +1583,17 @@ a.y,c.x,c.y,!1):c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ba(a)||h.ba(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=Kp&&(ik(r),h.Qc(r.lo*r.lx,r.ko*r.mx),Ip(r,a,b,n,d,h,!1),k=Jp(r, +Math.min(a.y,l.y),Math.abs(a.x-l.x),Math.abs(a.y-l.y))&&r.Pj(Math.min(l.x,m.x),Math.min(l.y,m.y),Math.abs(l.x-m.x),Math.abs(l.y-m.y))&&r.Pj(Math.min(m.x,n.x),Math.min(m.y,n.y),Math.abs(m.x-n.x),Math.abs(m.y-n.y)))b=!1;else{e=a;f=n;var q=c=null;if(p.isVirtualized){p=r.bounds.copy();p.vc(-r.lo,-r.ko);var u=I.alloc();jk(r,a.x,a.y)||(J.wf(p.x,p.y,p.x+p.width,p.y+p.height,a.x,a.y,l.x,l.y,u)?(c=a=u.copy(),b=u.Ya(l)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,l.x,l.y,m.x,m.y,u)?(c=a=u.copy(),b=u.Ya(m)):J.wf(p.x, +p.y,p.x+p.width,p.y+p.height,m.x,m.y,n.x,n.y,u)&&(c=a=u.copy(),b=u.Ya(n)));jk(r,n.x,n.y)||(J.wf(p.x,p.y,p.x+p.width,p.y+p.height,n.x,n.y,m.x,m.y,u)?(q=n=u.copy(),d=m.Ya(u)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,m.x,m.y,l.x,l.y,u)?(q=n=u.copy(),d=l.Ya(u)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,l.x,l.y,a.x,a.y,u)&&(q=n=u.copy(),d=a.Ya(u)));I.free(u)}h=h.copy().Xc(k);h.vc(r.lo*r.ps,r.ko*r.ps);Ip(r,a,b,n,d,h,!0);k=Jp(r,n.x,n.y);!r.abort&&k>=Kp&&(ik(r),h.vc(r.lo*r.mx,r.ko*r.nx),Ip(r,a,b,n,d,h,!1),k=Jp(r, n.x,n.y));if(!r.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.M(2,h.x,h.y),this.l(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)J.B(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.M(2,h,a.y),this.M(3,h,g.y)):J.B(h.y,g.y)?(Math.abs(a.y-h.y)<=r.ko/2&&(this.M(2,h.x,a.y),this.M(3,g.x,a.y)),this.l(2,h.x,a.y)):this.M(2,a.x,h.y);else if(90===b||270===b)J.B(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): -Math.min(h.y,a.y),this.M(2,a.x,h),this.M(3,g.x,h)):J.B(h.x,g.x)?(Math.abs(a.x-h.x)<=r.lo/2&&(this.M(2,a.x,h.y),this.M(3,a.x,g.y)),this.l(2,a.x,h.y)):this.M(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.lf(f.x,q.y):this.lf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ee(l.copy()),this.ee(m.copy()));I.free(l);I.free(m)}}; +Math.min(h.y,a.y),this.M(2,a.x,h),this.M(3,g.x,h)):J.B(h.x,g.x)?(Math.abs(a.x-h.x)<=r.lo/2&&(this.M(2,a.x,h.y),this.M(3,a.x,g.y)),this.l(2,a.x,h.y)):this.M(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.mf(f.x,q.y):this.mf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.fe(l.copy()),this.fe(m.copy()));I.free(l);I.free(m)}}; T.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Uc()||this.computeSpot(!1,this.toPort).Uc()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function Lj(a){if(null===a.diagram||!a.isAvoiding||!dk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=ek(a.diagram,!0,a.containingGroup,null);for(var d=1;dMp&&Jp(b,m,n)!==l-1&&(Jp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Jp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Jp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Jp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>Mp&&Jp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>Mp)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ -k)*k+k/2;l>Mp&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Jp(b,g,m)===l-1?Lp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Jp(b,g,m)===l-1&&Lp(a,b,g,m,f,!1,f)));a.lf(c,d)}T.prototype.Ny=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=zb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gMp&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Jp(b,g,m)===l-1?Lp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Jp(b,g,m)===l-1&&Lp(a,b,g,m,f,!1,f)));a.mf(c,d)}T.prototype.Ny=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=zb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=O.j,this.Zl=!0,a;var c=!1,d=this.diagram;null!==d&&rp(this)&&d.th.contains(this)&&(0!==this.bl.width||0!==this.bl.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Jb.s;var g=this.computeCurve();if(g===cg&&3<=b&&!J.ca(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kw?q>r?(f.x= v-y,f.y=r-y,e.x=v+u,e.y=r+u):(f.x=v-y,f.y=r+y,e.x=v+u,e.y=r-u):q>r?(f.x=v+y,f.y=r-y,e.x=v-u,e.y=r+u):(f.x=v+y,f.y=r+y,e.x=v-u,e.y=r-u));J.ca(w,v)&&J.ca(r,q)&&(r>p?(z>v?(f.x=v-y,f.y=r-y,e.x=v+u):(f.x=v+y,f.y=r-y,e.x=v-u),e.y=r+u):(z>v?(f.x=v-y,f.y=r+y,e.x=v+u):(f.x=v+y,f.y=r+y,e.x=v-u),e.y=r-u));if(J.ca(w,v)&&J.ca(v,z)||J.ca(p,r)&&J.ca(r,q))w=.5*(w+z),p=.5*(p+q),f.x=w,f.y=p,e.x=w,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&J.ca(g.x,this.i(0).x)&&J.ca(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x), c.y=.5*(g.y+l.y));yd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=Np(this,m.copy(),!1,qb));l=.5*(l+m.x);g=.5*(g+m.y);yd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);I.free(b);I.free(c);I.free(f);I.free(e)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=Np(this,g.copy(),!1,qb)),yd(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=I.alloc();f.assign(this.i(0)); @@ -1603,42 +1605,42 @@ function Op(a,b,c,d){for(var e=a.pointsCount,f=b;J.ca(b.x,f.x)&&J.ca(b.y,f.y);){ function Qp(a,b,c,d,e,f,g){if(!g&&rp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=Rp(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===Zf?xd(b,n,r,!1):yd(b,p,m,n,m,n,r)}else if(J.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===Zf?xd(b,r,m,!1):yd(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function Rp(a,b,c,d){var e=a.diagram;if(null===e||b.C(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ma.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,w)n&&!J.B(g,w)){h.x=q;h.y=n;m=!0;break a}}else if(!J.B(n,r)&& J.B(g,w)&&Math.min(n,r)g&&Math.min(q,u)m&&!J.B(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}I.free(h)}function rp(a){a=a.curve;return a===Yf||a===Zf}function vp(a,b){if(b||rp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.th.contains(a)||0===a.bl.width&&0===a.bl.height||b.th.add(a,a.bl.copy())} T.prototype.Ao=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ma.s;for(var g=e.length,h=0;ha&&wa(a,">= 0",T,"fromEndSegmentLength"),this.Rc(),this.aa.Oi=a,this.g("fromEndSegmentLength", b,a),this.ab())}},fromShortLength:{get:function(){return null!==this.aa?this.aa.Pi:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(this.Rc(),this.aa.Pi=a,this.mc(!0),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.aa?this.aa.tj:Wc},set:function(a){var b=this.toSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.tj=a,this.g("toSpot",b,a),(b.Uc()||a.Uc())&&null!==this.toNode&&Zo(this.toPort),this.ab())}},toEndSegmentLength:{ get:function(){return null!==this.aa?this.aa.rj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",T,"toEndSegmentLength"),this.Rc(),this.aa.rj=a,this.g("toEndSegmentLength",b,a),this.ab())}},toShortLength:{get:function(){return null!==this.aa?this.aa.sj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(this.Rc(),this.aa.sj=a,this.mc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{get:function(){return null=== this.rd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);J.ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Le(f),e=2;ed&&(d=-d)):J.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.qf(e));a.push(d)}}return this.Gp}},flattenedTotalLength:{get:function(){var a=this.Ys;if(isNaN(a)){for(var b= +get:function(){this.mg();var a=this.bl,b=Infinity,c=Infinity,d=this.pointsCount;if(0===d)a.h(NaN,NaN,0,0);else{if(1===d)d=this.i(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.h(d.x,d.y,0,0);else if(2===d){d=this.i(0);var e=this.i(1);b=Math.min(d.x,e.x);c=Math.min(d.y,e.y);a.h(d.x,d.y,0,0);a.Me(e)}else if(this.computeCurve()===cg&&3<=d&&!this.isOrthogonal)if(e=this.i(0),b=e.x,c=e.y,a.h(b,c,0,0),3===d){d=this.i(1);b=Math.min(d.x,b);c=Math.min(d.y,c);var f=this.i(2);b=Math.min(f.x,b);c=Math.min(f.y, +c);J.ql(e.x,e.y,d.x,d.y,d.x,d.y,f.x,f.y,.5,a)}else for(f=3;f=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);J.ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Me(f),e=2;ed&&(d=-d)):J.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.rf(e));a.push(d)}}return this.Gp}},flattenedTotalLength:{get:function(){var a=this.Ys;if(isNaN(a)){for(var b= this.flattenedLengths,c=b.length,d=a=0;d=this.pointsCount?0:this.isOrthogonal||!yp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!yp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.dk},set:function(a){var b=this.dk;b!== +get:function(){return this.m},set:function(a){this.m=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return 2===(this.kj.value&2)}},isAvoiding:{get:function(){return 4===(this.kj.value&4)}},Zl:{get:function(){return 0!==(this.Oa&128)},set:function(a){0!==(this.Oa&128)!==a&&(this.Oa^=128)}},geometry:{ +get:function(){this.Zl||(this.mg(),this.sa=this.makeGeometry());return this.sa}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!yp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!yp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.dk},set:function(a){var b=this.dk;b!== a&&(this.dk=a,this.g("adjusting",b,a))}},corner:{get:function(){return this.wm},set:function(a){var b=this.wm;b!==a&&(this.wm=a,this.mc(!0),this.g("corner",b,a))}},curve:{get:function(){return this.ym},set:function(a){var b=this.ym;b!==a&&(this.ym=a,this.ab(),this.mc(!0),vp(this,b===Zf||b===Yf||a===Zf||a===Yf),this.g("curve",b,a))}},curviness:{get:function(){return this.zm},set:function(a){var b=this.zm;b!== -a&&(this.zm=a,this.ab(),this.mc(!1),this.g("curviness",b,a))}},routing:{get:function(){return this.kj},set:function(a){var b=this.kj;b!==a&&(this.kj=a,this.Lf=null,this.ab(),vp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.mc(!0),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram; -if(null!==a&&a.model.ki())return a.model.uc(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Ao;T.prototype.findClosestSegment=T.prototype.Ny;T.prototype.updateRoute=T.prototype.lg;T.prototype.invalidateRoute=T.prototype.ab;T.prototype.rollbackRoute=T.prototype.$u;T.prototype.commitRoute=T.prototype.nf;T.prototype.startRoute=T.prototype.jh;T.prototype.clearPoints=T.prototype.Aj;T.prototype.removePoint=T.prototype.Yu;T.prototype.addPointAt=T.prototype.lf;T.prototype.addPoint=T.prototype.ee; +a&&(this.zm=a,this.ab(),this.mc(!1),this.g("curviness",b,a))}},routing:{get:function(){return this.kj},set:function(a){var b=this.kj;b!==a&&(this.kj=a,this.Mf=null,this.ab(),vp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.mc(!0),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram; +if(null!==a&&a.model.ki())return a.model.uc(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Ao;T.prototype.findClosestSegment=T.prototype.Ny;T.prototype.updateRoute=T.prototype.mg;T.prototype.invalidateRoute=T.prototype.ab;T.prototype.rollbackRoute=T.prototype.$u;T.prototype.commitRoute=T.prototype.pf;T.prototype.startRoute=T.prototype.jh;T.prototype.clearPoints=T.prototype.Aj;T.prototype.removePoint=T.prototype.Yu;T.prototype.addPointAt=T.prototype.mf;T.prototype.addPoint=T.prototype.fe; T.prototype.insertPointAt=T.prototype.l;T.prototype.insertPoint=T.prototype.sz;T.prototype.setPointAt=T.prototype.M;T.prototype.setPoint=T.prototype.Wc;T.prototype.getPoint=T.prototype.i;T.prototype.getOtherPort=T.prototype.jz;T.prototype.getOtherNode=T.prototype.wo; var wp=null,xp=null,mp=new D(T,"Normal",1),Vp=new D(T,"Orthogonal",2),Wp=new D(T,"AvoidsNodes",6),Ep=new D(T,"AvoidsNodesStraight",7),$f=new D(T,"None",0),cg=new D(T,"Bezier",9),Zf=new D(T,"JumpGap",10),Yf=new D(T,"JumpOver",11),np=new D(T,"End",17),op=new D(T,"Scale",18),pp=new D(T,"Stretch",19),Tm=new D(T,"OrientAlong",21),Mm=new D(T,"OrientPlus90",22),Om=new D(T,"OrientMinus90",23),qp=new D(T,"OrientOpposite",24),Um=new D(T,"OrientUpright",25),Nm=new D(T,"OrientPlus90Upright",26),Pm=new D(T,"OrientMinus90Upright", 27),Qm=new D(T,"OrientUpright45",28),Gp=16,Fp=14,Hp=8;T.className="Link";T.Normal=mp;T.Orthogonal=Vp;T.AvoidsNodes=Wp;T.AvoidsNodesStraight=Ep;T.None=$f;T.Bezier=cg;T.JumpGap=Zf;T.JumpOver=Yf;T.End=np;T.Scale=op;T.Stretch=pp;T.OrientAlong=Tm;T.OrientPlus90=Mm;T.OrientMinus90=Om;T.OrientOpposite=qp;T.OrientUpright=Um;T.OrientPlus90Upright=Nm;T.OrientMinus90Upright=Pm;T.OrientUpright45=Qm;T.EndSegmentStep=8;T.CurvinessStart=Gp;T.SpacingMin=Fp;T.OrthoShortCut=Hp; -function Up(a,b,c,d){Ra(this);this.te=this.Sp=!1;this.cs=a;this.ux=b;this.Pu=c;this.vx=d;this.links=[]}Up.prototype.Al=function(){if(!this.Sp){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Dd=Math.floor((a.x-this.nc)/this.nc)*this.nc;this.Ed=Math.floor((b-this.oc)/this.oc)*this.oc;this.ln=Math.ceil((c+2*this.nc)/this.nc)*this.nc;this.mn=Math.ceil((d+2*this.oc)/this.oc)*this.oc;a=1+(Math.ceil((this.ln-this.Dd)/this.nc)|0);b=1+(Math.ceil((this.mn-this.Ed)/this.oc)|0);if(null===this.Xb||this.Wh=Mp&&(c[d]=Xp)} fk.prototype.Pj=function(a,b,c,d){if(a>this.ln||a+cthis.mn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Wh)|0;for(c=Math.min(b+e-1,this.Xh)|0;a<=d;a++){e=this.Xb[a];for(var f=b;f<=c;f++)if(e[f]===kk)return!1}return!0}; @@ -1650,79 +1652,79 @@ a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:be)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===bq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==bq){g.push(k);g.push(l);if(aq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=bq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} ma.Object.defineProperties(fk.prototype,{bounds:{get:function(){return new M(this.Dd,this.Ed,this.ln-this.Dd,this.mn-this.Ed)}},lo:{get:function(){return this.nc},set:function(a){0=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> -a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Cp.prototype.Al=function(){this.ge.length=0}; -function Dp(a,b){var c=a.ge;if(0===c.length){a:if(!a.Do){c=a.Do;a.Do=!0;var d=null,e=a.node,f=e instanceof qf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Sw();else{if(!f.actualBounds.v()){a.Do=c;break a}d=f;g=d.vu()}f=a.ge.length=0;var h=a.port.ia(tc,I.alloc()),k=a.port.ia(Cc,I.alloc());e=M.allocAt(h.x,h.y,0,0);e.Le(k);I.free(h);I.free(k);h=I.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.fi();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& -l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Md(d),n=l.computeSpot(m,a.port);if(n.Uc()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.Ya(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=cq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.ge[f];void 0===r?(r=new dq(l,p,n),a.ge[f]=r):(r.link=l,r.angle=p,r.Fc= -n);r.Ru.set(m);f++}}}}I.free(h);a.ge.sort(Cp.prototype.j);k=a.ge.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(y)?(z=Math.abs(y)/r,r=Math.abs(y)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(y)?(z=Math.abs(y)/ -m,m=Math.abs(y)):z=1}v=0}var F=A.Co;if(d===jp){A=A.link.computeThickness();A*=z;F.set(B);switch(q){case 8:F.x=B.x+u/2+p/2-v-A/2;break;case 2:F.y=B.y+y/2+r/2-v-A/2;break;case 1:F.x=B.x+u/2-n/2+v+A/2;break;default:case 4:F.y=B.y+y/2-m/2+v+A/2}v+=A}else{var L=.5;d===Vo&&(L=(A.xo+1)/(A.tl+1));F.x=B.x+u*L;F.y=B.y+y*L}}}I.free(h);I.free(k);I.free(g);I.free(l);B=a.ge;for(f=0;fb.Fc?1:a.angleb.angle?1:0}; -Cp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.xo;if(0>d)return c;var e=a.tl;if(1>=e||!b.isOrthogonal)return c;b=a.Ru;var f=a.Co;if(2===a.Fc||8===a.Fc)d=e-1-d;return((a=2===a.Fc||4===a.Fc)?b.y180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Cp.prototype.Al=function(){this.he.length=0}; +function Dp(a,b){var c=a.he;if(0===c.length){a:if(!a.Do){c=a.Do;a.Do=!0;var d=null,e=a.node,f=e instanceof qf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Tw();else{if(!f.actualBounds.v()){a.Do=c;break a}d=f;g=d.vu()}f=a.he.length=0;var h=a.port.ia(tc,I.alloc()),k=a.port.ia(Cc,I.alloc());e=M.allocAt(h.x,h.y,0,0);e.Me(k);I.free(h);I.free(k);h=I.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.fi();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Md(d),n=l.computeSpot(m,a.port);if(n.Uc()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.Ya(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=cq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.he[f];void 0===r?(r=new dq(l,p,n),a.he[f]=r):(r.link=l,r.angle=p,r.Gc= +n);r.Ru.set(m);f++}}}}I.free(h);a.he.sort(Cp.prototype.j);k=a.he.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(y)?(z=Math.abs(y)/r,r=Math.abs(y)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(y)?(z=Math.abs(y)/ +m,m=Math.abs(y)):z=1}v=0}var F=A.Co;if(d===jp){A=A.link.computeThickness();A*=z;F.set(B);switch(q){case 8:F.x=B.x+u/2+p/2-v-A/2;break;case 2:F.y=B.y+y/2+r/2-v-A/2;break;case 1:F.x=B.x+u/2-n/2+v+A/2;break;default:case 4:F.y=B.y+y/2-m/2+v+A/2}v+=A}else{var L=.5;d===Vo&&(L=(A.xo+1)/(A.tl+1));F.x=B.x+u*L;F.y=B.y+y*L}}}I.free(h);I.free(k);I.free(g);I.free(l);B=a.he;for(f=0;fb.Gc?1:a.angleb.angle?1:0}; +Cp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.xo;if(0>d)return c;var e=a.tl;if(1>=e||!b.isOrthogonal)return c;b=a.Ru;var f=a.Co;if(2===a.Gc||8===a.Gc)d=e-1-d;return((a=2===a.Gc||4===a.Gc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; qi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof T)&&(gq(h),this.gh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof qf&&(h.gh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= 0,c=b,d+=f+20,f=0):e++}}};qi.prototype.gh=function(a){return!a.location.v()||a instanceof qf&&a.gh?!0:!1};function fq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof qf?null===k.layout?fq(a,b,k.memberParts,!1,e,f,g,h):(gq(k),b.add(k)):(gq(k),b.add(k))):g&&k instanceof T?b.add(k):!h||!k.Tc()||k instanceof V||(gq(k),b.add(k)))}} function gq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Za()}qi.prototype.hi=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -qi.prototype.Hw=function(a){var b=new G;a instanceof Q?(fq(this,b,a.nodes,!0,null,!0,!0,!0),fq(this,b,a.links,!0,null,!0,!0,!0),fq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof qf?fq(this,b,a.memberParts,!1,null,!0,!0,!0):fq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +qi.prototype.Iw=function(a){var b=new G;a instanceof Q?(fq(this,b,a.nodes,!0,null,!0,!0,!0),fq(this,b,a.links,!0,null,!0,!0,!0),fq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof qf?fq(this,b,a.memberParts,!1,null,!0,!0,!0):fq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; qi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ia(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};qi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};qi.prototype.workerLayout=function(){return!1}; -function hq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.lj&&(c.running=iq(a.lj));null!==a.cg&&(c.waiting=iq(a.cg));a.workerStateChanged(c,a)}}function iq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}qi.prototype.uy=function(){var a=jq(this.constructor);a&&(null!==a.Me&&a.Me.terminate(),a.Me=null,a.Cl.iteratorValues.each(function(a){a.zr=!1;a.lj=null;a.cg=null;a.ir=!1;hq(a)}),a.Cl.clear())}; -function kq(a,b){var c=jq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function jq(a){var b=null;if("function"===typeof a){if(b=lq.get(a),!b){var c=Ha(a);b=lq.get(c);b||(b=new mq,b.pu=a,b.name=c,b.j=a.name,b.gx=nq,lq.set(c,b),lq.set(a,b),lq.set(a.name,b))}}else"string"===typeof a&&(b=lq.get(a));return b} -qi.prototype.qv=function(){if("undefined"===typeof Worker||!oq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.zr&&(this.ir=!0,this.cg=this.lj=null,hq(this)),!1;var a=jq(this.constructor);if(null===a)return!1;null===a.Me&&(a.Me=new Worker(oq),a.Me.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Me.j=function(a){xa("Worker serialization error: "+a)},a.Me.onmessage= -function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)xa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Cl.get(c.id)){a.Cl.remove(c.id);b.zr=!1;b.lj=null;if(b.ir)b.ir=!1,b.cg=null;else{var d=pq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}hq(b,c.time);c=b.cg;if(null!==c)b.cg=null;else for(d=a.Cl.iteratorValues;d.next();){var e=d.value;c=e.cg;if(null!==c){e.cg=null;break}}null!==c&&qq(b,c)}},a.Me.postMessage({_GoJS:"_GoJS", -url:a.gx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Me.postMessage({_GoJS:"_GoJS",url:b})}),a.Me.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.lj?this.cg=this.network:qq(this,this.network);hq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function qq(a,b){a.zr=!0;var c=jq(a.constructor),d=rq(a,b,!0);d._GoJS="_GoJS";c.Me.postMessage(d);c.Cl.set(cb(a),a);a.lj=b} +function hq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.lj&&(c.running=iq(a.lj));null!==a.dg&&(c.waiting=iq(a.dg));a.workerStateChanged(c,a)}}function iq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}qi.prototype.uy=function(){var a=jq(this.constructor);a&&(null!==a.Ne&&a.Ne.terminate(),a.Ne=null,a.Cl.iteratorValues.each(function(a){a.zr=!1;a.lj=null;a.dg=null;a.ir=!1;hq(a)}),a.Cl.clear())}; +function kq(a,b){var c=jq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function jq(a){var b=null;if("function"===typeof a){if(b=lq.get(a),!b){var c=Ha(a);b=lq.get(c);b||(b=new mq,b.pu=a,b.name=c,b.j=a.name,b.hx=nq,lq.set(c,b),lq.set(a,b),lq.set(a.name,b))}}else"string"===typeof a&&(b=lq.get(a));return b} +qi.prototype.qv=function(){if("undefined"===typeof Worker||!oq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.zr&&(this.ir=!0,this.dg=this.lj=null,hq(this)),!1;var a=jq(this.constructor);if(null===a)return!1;null===a.Ne&&(a.Ne=new Worker(oq),a.Ne.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Ne.j=function(a){xa("Worker serialization error: "+a)},a.Ne.onmessage= +function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)xa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Cl.get(c.id)){a.Cl.remove(c.id);b.zr=!1;b.lj=null;if(b.ir)b.ir=!1,b.dg=null;else{var d=pq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}hq(b,c.time);c=b.dg;if(null!==c)b.dg=null;else for(d=a.Cl.iteratorValues;d.next();){var e=d.value;c=e.dg;if(null!==c){e.dg=null;break}}null!==c&&qq(b,c)}},a.Ne.postMessage({_GoJS:"_GoJS", +url:a.hx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Ne.postMessage({_GoJS:"_GoJS",url:b})}),a.Ne.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.lj?this.dg=this.network:qq(this,this.network);hq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function qq(a,b){a.zr=!0;var c=jq(a.constructor),d=rq(a,b,!0);d._GoJS="_GoJS";c.Ne.postMessage(d);c.Cl.set(cb(a),a);a.lj=b} function rq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?cb(a):a.id,layout:Ha(a.constructor),p:d,hA:e,Ly:f};a.onNetworkSerialization(2,c,b,d);return d} -function pq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.hA,g=new pb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Lb(a.key));null!==b?b=e.yj(b):(b=e.createVertex(),e.eg(b));c&&null!==a.key&&(b.data={yh:a.key});g.set(a.id,b)});var h=b.Ly,k=new pb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.ol(f);f.link=b;c&&null!==a.key&&(f.data={yh:a.key});k.set(a.id, +function pq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.hA,g=new pb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Lb(a.key));null!==b?b=e.yj(b):(b=e.createVertex(),e.fg(b));c&&null!==a.key&&(b.data={yh:a.key});g.set(a.id,b)});var h=b.Ly,k=new pb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.ol(f);f.link=b;c&&null!==a.key&&(f.data={yh:a.key});k.set(a.id, f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.deserializeVertexProperties(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}qi.prototype.onNetworkSerialization=function(){}; -ma.Object.defineProperties(qi.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.Zm},set:function(a){this.Zm!==a&&(this.Zm=a)}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a;a||(this.dn=!0)}}, +ma.Object.defineProperties(qi.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.m},set:function(a){this.m!==a&&(this.m=a,null!==a&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.Zm},set:function(a){this.Zm!==a&&(this.Zm=a)}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a;a||(this.dn=!0)}}, isViewportSized:{get:function(){return this.en},set:function(a){this.en!==a&&(this.en=a)&&this.D()}},isRouting:{get:function(){return this.bn},set:function(a){this.bn!==a&&(this.bn=a)}},isRealtime:{get:function(){return this.an},set:function(a){this.an!==a&&(this.an=a)}},isValidLayout:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a,a||(a=this.diagram,null!== a&&(a.mh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.mm},set:function(a){this.mm!==a&&(this.mm=a,this.D())}},arrangementOrigin:{get:function(){return this.im},set:function(a){this.im.C(a)||(this.im.assign(a),this.D())}},id:{get:function(){return this.u},set:function(a){this.u= -a}},mayUseWorkerFunction:{get:function(){return this.nn},set:function(a){this.nn!==a&&(this.nn=a)}},workerStateChanged:{get:function(){return this.ao},set:function(a){this.ao!==a&&(this.ao=a)}}});qi.prototype.useWorker=qi.prototype.qv;qi.declareWorkerLayout=kq;qi.prototype.cancelWorker=qi.prototype.uy;qi.prototype.collectParts=qi.prototype.Hw;qi.prototype.getLayoutBounds=qi.prototype.hi;qi.prototype.invalidateLayout=qi.prototype.D; +a}},mayUseWorkerFunction:{get:function(){return this.nn},set:function(a){this.nn!==a&&(this.nn=a)}},workerStateChanged:{get:function(){return this.ao},set:function(a){this.ao!==a&&(this.ao=a)}}});qi.prototype.useWorker=qi.prototype.qv;qi.declareWorkerLayout=kq;qi.prototype.cancelWorker=qi.prototype.uy;qi.prototype.collectParts=qi.prototype.Iw;qi.prototype.getLayoutBounds=qi.prototype.hi;qi.prototype.invalidateLayout=qi.prototype.D; var lq=new pb,nq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",oq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";qi.className="Layout";qi.GoJSScriptURL=nq;qi.declareWorkerLayout=kq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:Q.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=jq(a.layout));var d=null;c&&c.pu&&(d=new c.pu);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=pq(d,a,!0); -d.workerLayout=function(){var a=rq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new E)}});function mq(){this.pu=null;this.gx=this.j=this.name="";this.scripts=[];this.Me=null;this.Cl=new pb}function eq(a){Ra(this);this.Jc=a;this.jf=new G;this.oe=new G;this.ds=new pb;this.Yr=new pb} -eq.prototype.clear=function(){if(this.jf)for(var a=this.jf.iterator;a.next();)a.value.clear();if(this.oe)for(a=this.oe.iterator;a.next();)a.value.clear();this.jf=new G;this.oe=new G;this.ds=new pb;this.Yr=new pb}; -eq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.jf.count+" edges: "+this.oe.count;if(1=a)return b;b+=" vertexes: "+this.kf.count+" edges: "+this.pe.count;if(1b?1:0):1:null!==b?-1:0} -ma.Object.defineProperties(sq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.wd._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Jd._dataArray}},data:{get:function(){return this.qb},set:function(a){this.qb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{get:function(){return this.Lh}, -set:function(a){if(this.Lh!==a){this.Lh=a;a.Za();var b=this.network.layout,c=M.alloc(),d=b.hi(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof qf)&&(a=a.locationObject.ia(yc),a.v())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.C(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.C(a)|| -this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(b.ja(),b.x=a-this.o.x,b.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(b.ja(),b.y=a-this.o.y,b.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},focusY:{ -get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},x:{get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},y:{get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},width:{get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.ja(),b.width= +ma.Object.defineProperties(sq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.wd._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Jd._dataArray}},data:{get:function(){return this.qb},set:function(a){this.qb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.m.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{get:function(){return this.Lh}, +set:function(a){if(this.Lh!==a){this.Lh=a;a.Za();var b=this.network.layout,c=M.alloc(),d=b.hi(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof qf)&&(a=a.locationObject.ia(yc),a.v())){this.m.h(a.x-b,a.y-e);return}this.m.h(f/2,d/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.C(a)||this.j.assign(a)}},focus:{get:function(){return this.m},set:function(a){this.m.C(a)|| +this.m.assign(a)}},centerX:{get:function(){return this.j.x+this.m.x},set:function(a){var b=this.j;b.x+this.m.x!==a&&(b.ja(),b.x=a-this.m.x,b.freeze())}},centerY:{get:function(){return this.j.y+this.m.y},set:function(a){var b=this.j;b.y+this.m.y!==a&&(b.ja(),b.y=a-this.m.y,b.freeze())}},focusX:{get:function(){return this.m.x},set:function(a){var b=this.m;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},focusY:{ +get:function(){return this.m.y},set:function(a){var b=this.m;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},x:{get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},y:{get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},width:{get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.ja(),b.width= a,b.freeze())}},height:{get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.ja(),b.height=a,b.freeze())}},network:{get:function(){return this.nb},set:function(a){this.nb=a}},sourceVertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new G,b= this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.wd.iterator}},destinationEdges:{get:function(){return this.Jd.iterator}},edges:{get:function(){for(var a= new E,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{get:function(){return this.wd.count+this.Jd.count}}});sq.prototype.deleteDestinationEdge=sq.prototype.qu;sq.prototype.addDestinationEdge=sq.prototype.gu;sq.prototype.deleteSourceEdge=sq.prototype.ru;sq.prototype.addSourceEdge=sq.prototype.iu;sq.className="LayoutVertex";sq.standardComparer=zq; sq.smartComparer=function(a,b){if(null!==a){if(null!==b){a=a.Lh;var c=b.Lh;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Da("Layout");d=[];switch(this.alignment){case Iq:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0g)d.push(new M(0,u,g+h,v)),w=0,q=r,u+=v,v=0;v=Math.max(v,F);switch(p){case Hq:A=-A.width;break;default:A= 0}y.moveTo(q+A,u);switch(p){case Hq:q-=B;break;default:q+=B}w++}d.push(new M(0,u,g+h,v));M.free(l);break;case Aq:k=g;m=f;n=b;p=c;g=M.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=I.alloc();for(q=0;q=l&&(k-=l);l=y=0;B=Math.max(this.cellSize.height,1);A=f=0;F=!0;w=I.alloc() m&&u>m-1||0k){d.push(new M(0,F?z-f:z,k+n,A+f+p));for(S=0;Sl&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -ma.Object.defineProperties(Mk.prototype,{wrappingWidth:{get:function(){return this.co},set:function(a){this.co!==a&&(0n)){var u=n+bn(q);q.lc(u,!0);nn(q,u,n)}}b.isModified=!0}}finally{b.$=!0}}}}};mi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ka(a);for(b=this.nodes.iterator;b.next();)b.value.Ka(a);for(b=this.links.iterator;b.next();)b.value.Ka(a)}; -mi.prototype.Uo=function(){for(var a=this.H.model,b=new G,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new Va;e.add("[");c&&1=d)return"[]";var e=new Ta;e.add("[");c&&1d)return;Da(a.Lc,d)}ur(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.To(b)}t.Uz=function(a){if(za(a))for(var b=a.length,c=0;cd)return;Da(a.Mc,d)}ur(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.To(b)}t.Uz=function(a){if(za(a))for(var b=a.length,c=0;cb&&(b=a.length);Ca(a,b,c);ur(this,"",fe,"",a,null,c,null,b)};t.Xu=function(a,b){void 0===b&&(b=-1);a===this.Lc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",ge,"",a,c,null,b,null)}; +t.ho=function(a,b){if(b){var c=this.lb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.iy=function(a,b){this.Qr(a,-1,b)};t.Qr=function(a,b,c){0>b&&(b=a.length);Ca(a,b,c);ur(this,"",fe,"",a,null,c,null,b)};t.Xu=function(a,b){void 0===b&&(b=-1);a===this.Mc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",ge,"",a,c,null,b,null)}; t.uo=function(a){if(null===a)return"";var b=this.gj;if(""===b)return"";b=on(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.Rl=function(a,b){if(null!==a){var c=this.gj;if(""!==c)if(this.lb(a)){var d=on(a,c);void 0===d&&(d="");d!==b&&(Nj(a,c,b),ur(this,"nodeCategory",de,c,a,d,b))}else Nj(a,c,b)}};t.Tl=function(a,b){this.Rl(b,this.uo(a))};t.Bl=function(){return!1};t.Nj=function(){return!1};t.ki=function(){return!1}; t.Vr=function(){return!1};t.Oj=function(){return!1};function oi(){return new Z}function pr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return pr(a,b.constructor);return typeof b}function tr(a){return yr[a]?yr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} function on(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c}function Nj(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){}} ma.Object.defineProperties(Z.prototype,{name:{get:function(){return this.va},set:function(a){var b=this.va;b!==a&&(this.va=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Am},set:function(a){var b=this.Am;b!==a&&(this.Am=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.xg},set:function(a){var b=this.xg;b!==a&&(this.xg=a,this.g("isReadOnly",b,a))}},modelData:{ -get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(this.j=a,this.g("modelData",b,a),this.Ka(a))}},undoManager:{get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(null!==b&&b.xx(this),this.o=a,null!==a&&a.Bw(this))}},skipsUndoManager:{get:function(){return this.Mg},set:function(a){this.Mg=a}},nodeKeyProperty:{get:function(){return this.Mh},set:function(a){var b=this.Mh; -b!==a&&(""===a&&C("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;ya(a)&&"number"===typeof c&&(d=this.uc(a),b?(this.Qf.add(a),this.ed[c]!==a&&this.ed.splice(c,0,a),void 0!==d&&this.rb.add(d,a)):(this.Qf.remove(a),this.ed[c]=== -a&&this.ed.splice(c,1),void 0!==d&&this.rb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.uf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=Ar.prototype;t.Dl=function(a){if(void 0!==a){var b=this.Li;if(null!==b){var c=this.dc(a);null===c&&(c=this.copyNodeData(b),Nj(c,this.nodeKeyProperty,a),this.kf(c))}return a}}; -t.Zw=function(a){return Wq(this,a,!0)};t.cv=function(a,b){dr(this,a,b,!0)};t.bx=function(a){return Wq(this,a,!1)};t.gv=function(a,b){dr(this,a,b,!1)};function Wq(a,b,c){if(null!==b&&(a=c?a.Ye:a.Ze,""!==a&&(a=on(b,a),void 0!==a))){if(Yq(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function dr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.Ye:a.Ze;if(""!==e)if(c=a.Dl(c),a.Bc(b)){var f=on(b,e);f!==c&&(br(a,f,b),Nj(b,e,c),null===a.dc(c)&&cr(a,c,b),ur(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.$w=function(a){return Vq(this,a,!0)};t.dv=function(a,b){er(this,a,b,!0)};t.ex=function(a){return Vq(this,a,!1)};t.hv=function(a,b){er(this,a,b,!1)}; -function Vq(a,b,c){if(null===b)return"";a=c?a.$i:a.aj;if(""===a)return"";b=on(b,a);return void 0===b?"":b}function er(a,b,c,d){if(null!==b){var e=d?a.$i:a.aj;if(""!==e)if(a.Bc(b)){var f=on(b,e);void 0===f&&(f="");f!==c&&(Nj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.uf=function(a){if(null===a)return Dr;var b=this.be;if(""===b)return Dr;a=on(a,b);return void 0===a?Dr:a}; -t.ls=function(a,b){if(null!==a){var c=this.be;if(""!==c)if(this.Bc(a)){var d=on(a,c);void 0===d&&(d=Dr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Bc(a)&&(br(this,b,a),ur(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.uc=function(a){if(null!==a){var b=this.Bh;if(""!==b&&(b=on(a,b),void 0!==b)){if(Yq(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.ks=function(a,b){if(null!==a){var c=this.Bh;if(""!==c)if(this.Bc(a)){var d=on(a,c);d!==b&&null===this.Zg(b)&&(Nj(a,c,b),void 0!==d&&this.rb.remove(d),this.rb.add(b,a),ur(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.Ka(a,c))}else Nj(a,c,b)}};t.Zg=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Yq(a)?this.rb.I(a):null}; -t.$r=function(a){if(null!==a){var b=this.Bh;if(""!==b){var c=this.uc(a);if(void 0===c||this.rb.contains(c)){var d=this.Sk;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.rb.contains(c))){Nj(a,b,c);return}if("string"===typeof c){for(d=2;this.rb.contains(c+d);)d++;Nj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.rb.count-1;this.rb.contains(c);)c--;Nj(a,b,c)}}}}};t.Bc=function(a){return null===a?!1:this.Qf.contains(a)};t.Yh=function(a){null!==a&&(gb(a),this.Bc(a)||$q(this,a,!0))}; -function $q(a,b,c){if(""!==a.linkKeyProperty){var d=a.uc(b);if(void 0!==d&&a.rb.I(d)===b)return;a.$r(b);d=a.uc(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.rb.add(d,b)}a.Qf.add(b);d=null;c&&(d=a.ed.length,a.ed.splice(d,0,b));ur(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Er(a,b)}t.ky=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ed.splice(d,1)}ur(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=Wq(a,b,!0);br(a,c,b);c=Wq(a,b,!1);br(a,c,b);d=a.uf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;ya(a)&&"number"===typeof c&&(d=this.uc(a),b?(this.Rf.add(a),this.ed[c]!==a&&this.ed.splice(c,0,a),void 0!==d&&this.rb.add(d,a)):(this.Rf.remove(a),this.ed[c]=== +a&&this.ed.splice(c,1),void 0!==d&&this.rb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.vf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=Ar.prototype;t.Dl=function(a){if(void 0!==a){var b=this.Li;if(null!==b){var c=this.dc(a);null===c&&(c=this.copyNodeData(b),Nj(c,this.nodeKeyProperty,a),this.lf(c))}return a}}; +t.$w=function(a){return Wq(this,a,!0)};t.cv=function(a,b){dr(this,a,b,!0)};t.ex=function(a){return Wq(this,a,!1)};t.gv=function(a,b){dr(this,a,b,!1)};function Wq(a,b,c){if(null!==b&&(a=c?a.Ze:a.$e,""!==a&&(a=on(b,a),void 0!==a))){if(Yq(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function dr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.Ze:a.$e;if(""!==e)if(c=a.Dl(c),a.Cc(b)){var f=on(b,e);f!==c&&(br(a,f,b),Nj(b,e,c),null===a.dc(c)&&cr(a,c,b),ur(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.ax=function(a){return Vq(this,a,!0)};t.dv=function(a,b){er(this,a,b,!0)};t.gx=function(a){return Vq(this,a,!1)};t.hv=function(a,b){er(this,a,b,!1)}; +function Vq(a,b,c){if(null===b)return"";a=c?a.$i:a.aj;if(""===a)return"";b=on(b,a);return void 0===b?"":b}function er(a,b,c,d){if(null!==b){var e=d?a.$i:a.aj;if(""!==e)if(a.Cc(b)){var f=on(b,e);void 0===f&&(f="");f!==c&&(Nj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.vf=function(a){if(null===a)return Dr;var b=this.ce;if(""===b)return Dr;a=on(a,b);return void 0===a?Dr:a}; +t.ls=function(a,b){if(null!==a){var c=this.ce;if(""!==c)if(this.Cc(a)){var d=on(a,c);void 0===d&&(d=Dr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Cc(a)&&(br(this,b,a),ur(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.uc=function(a){if(null!==a){var b=this.Bh;if(""!==b&&(b=on(a,b),void 0!==b)){if(Yq(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; +t.ks=function(a,b){if(null!==a){var c=this.Bh;if(""!==c)if(this.Cc(a)){var d=on(a,c);d!==b&&null===this.Zg(b)&&(Nj(a,c,b),void 0!==d&&this.rb.remove(d),this.rb.add(b,a),ur(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.Ka(a,c))}else Nj(a,c,b)}};t.Zg=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Yq(a)?this.rb.I(a):null}; +t.$r=function(a){if(null!==a){var b=this.Bh;if(""!==b){var c=this.uc(a);if(void 0===c||this.rb.contains(c)){var d=this.Sk;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.rb.contains(c))){Nj(a,b,c);return}if("string"===typeof c){for(d=2;this.rb.contains(c+d);)d++;Nj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.rb.count-1;this.rb.contains(c);)c--;Nj(a,b,c)}}}}};t.Cc=function(a){return null===a?!1:this.Rf.contains(a)};t.Yh=function(a){null!==a&&(gb(a),this.Cc(a)||$q(this,a,!0))}; +function $q(a,b,c){if(""!==a.linkKeyProperty){var d=a.uc(b);if(void 0!==d&&a.rb.I(d)===b)return;a.$r(b);d=a.uc(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.rb.add(d,b)}a.Rf.add(b);d=null;c&&(d=a.ed.length,a.ed.splice(d,0,b));ur(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Er(a,b)}t.ly=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ed.splice(d,1)}ur(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=Wq(a,b,!0);br(a,c,b);c=Wq(a,b,!1);br(a,c,b);d=a.vf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new E;b.addAll(a.iterator);a=new E;var c=new E;var d=this.sort(b);var e,f,g=this.mp;var h=this.arrangement;var k=this.nodeDiameterFormula;var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle; isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===Vr&&k===Wr?h=Hr:h===Vr&&k!==Wr&&(h=this.arrangement);if((this.direction===Qr||this.direction===Rr)&&this.sorting!==Kr){for(k=0;!(k>=d.length);k+=2){a.add(d.K(k));if(k+1>=d.length)break;c.add(d.K(k+1))}this.direction===Qr?(this.arrangement===Vr&&a.reverse(),d=new E,d.addAll(a),d.addAll(c)):(this.arrangement===Vr&&c.reverse(),d=new E,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;r< d.length;r++){var q=n+p*f*(this.direction===Jr?1:-1)/k,u=d.K(r).diameter;isNaN(u)&&(u=Yr(d.K(r),q));360>p&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===Vr){isNaN(b)&&(b=6);if(h!==Hr&&h!==Vr){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g= -r/(360<=p?k:k-1)}this.Pv=h;this.hc=l;this.Hm=m;this.Qv=n;this.zp=p;this.Ni=b;this.de=f;this.mp=g;b=d;d=this.Pv;h=this.hc;l=this.Qv;m=this.zp;n=this.Ni;p=this.de;k=this.mp;if(this.direction!==Qr&&this.direction!==Rr||d!==Vr)if(this.direction===Qr||this.direction===Rr){g=0;switch(d){case Ur:g=180*as(this,h,p,l,k)/Math.PI;break;case Hr:k=b=0;g=a.first();null!==g&&(b=Yr(g,Math.PI/2));g=c.first();null!==g&&(k=Yr(g,Math.PI/2));g=180*as(this,h,p,l,n+(b+k)/2)/Math.PI;break;case Tr:g=m/b.length}if(this.direction=== +r/(360<=p?k:k-1)}this.Pv=h;this.hc=l;this.Hm=m;this.Qv=n;this.zp=p;this.Ni=b;this.ee=f;this.mp=g;b=d;d=this.Pv;h=this.hc;l=this.Qv;m=this.zp;n=this.Ni;p=this.ee;k=this.mp;if(this.direction!==Qr&&this.direction!==Rr||d!==Vr)if(this.direction===Qr||this.direction===Rr){g=0;switch(d){case Ur:g=180*as(this,h,p,l,k)/Math.PI;break;case Hr:k=b=0;g=a.first();null!==g&&(b=Yr(g,Math.PI/2));g=c.first();null!==g&&(k=Yr(g,Math.PI/2));g=180*as(this,h,p,l,n+(b+k)/2)/Math.PI;break;case Tr:g=m/b.length}if(this.direction=== Qr){switch(d){case Ur:bs(this,a,l,Sr);break;case Hr:cs(this,a,l,Sr);break;case Tr:ds(this,a,m/2,l,Sr)}switch(d){case Ur:bs(this,c,l+g,Jr);break;case Hr:cs(this,c,l+g,Jr);break;case Tr:ds(this,c,m/2,l+g,Jr)}}else{switch(d){case Ur:bs(this,c,l,Sr);break;case Hr:cs(this,c,l,Sr);break;case Tr:ds(this,c,m/2,l,Sr)}switch(d){case Ur:bs(this,a,l+g,Jr);break;case Hr:cs(this,a,l+g,Jr);break;case Tr:ds(this,a,m/2,l+g,Jr)}}}else switch(d){case Ur:bs(this,b,l,this.direction);break;case Hr:cs(this,b,l,this.direction); -break;case Tr:ds(this,b,m,l,this.direction);break;case Vr:es(this,b,m,l,this.direction)}else es(this,b,m,l-m/2,Jr)}this.updateParts();this.network=null;this.isValidLayout=!0};function ds(a,b,c,d,e){var f=a.zp,g=a.hc;a=a.de;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===Jr?f:-f);0>f;)f+=360;f%=360;180c){for(f=d+(e===Jr?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;hs(a,k,l,m,n,e,f)||is(a,k,l,m,n,e,f);k=f.x;l=f.y}I.free(f);a.hj++;if(!(23Math.abs(r)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.hj?a.hc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;hs(a,k,l,n,p,e,m)||is(a,k,l,n,p,e,m);k=m.x;l=m.y}I.free(m);a.hj++;if(!(23a.hj?a.hc-f/(2*Math.PI):a.hc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function is(a,b,c,d,e,f,g){var h=a.hc,k=a.de,l=0;a=(d[e].height+d[e+1].height)/2+a.Ni;d=!1;if(0<=b!==(f===Jr)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Gr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -Gr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new I(0,0):(c.x=this.arrangementOrigin.x+this.hc,c.y=this.arrangementOrigin.y+this.de);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.Za(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ie(c.ie(a)),this.group.move(b),this.Dv=b.ie(a))}; -Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function $r(a,b,c,d,e){var f=a.Yx;if(.001>Math.abs(a.Hm-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.hj?a.hc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;hs(a,k,l,n,p,e,m)||is(a,k,l,n,p,e,m);k=m.x;l=m.y}I.free(m);a.hj++;if(!(23a.hj?a.hc-f/(2*Math.PI):a.hc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function is(a,b,c,d,e,f,g){var h=a.hc,k=a.ee,l=0;a=(d[e].height+d[e+1].height)/2+a.Ni;d=!1;if(0<=b!==(f===Jr)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Gr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +Gr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new I(0,0):(c.x=this.arrangementOrigin.x+this.hc,c.y=this.arrangementOrigin.y+this.ee);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.Za(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.je(c.je(a)),this.group.move(b),this.Dv=b.je(a))}; +Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function $r(a,b,c,d,e){var f=a.Zx;if(.001>Math.abs(a.Hm-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} function Zr(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?$r(a,1,c,d,e):$r(a,1,c))}function as(a,b,c,d,e){if(.001>Math.abs(a.Hm-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} Gr.prototype.sort=function(a){switch(this.sorting){case Or:break;case Pr:a.reverse();break;case Mr:a.sort(this.comparer);break;case Nr:a.sort(this.comparer);a.reverse();break;case Kr:return this.Vj(js(a));default:C("Invalid sorting type.")}return a}; function js(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.K(f));b[f]=-1;f=a.K(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} @@ -1956,36 +1958,36 @@ c.indexOf(b[l][z]),0<=B&&(B=Math.abs(u-(B>=u?B+1:B)),v+=Br||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.jl=a:this.jl=360,this.D())}},arrangement:{get:function(){return this.Nb},set:function(a){this.Nb===a||a!==Vr&&a!==Hr&&a!==Ur&&a!==Tr||(this.Nb=a,this.D())}},direction:{get:function(){return this.L},set:function(a){this.L===a||a!==Jr&&a!==Sr&&a!==Qr&&a!==Rr||(this.L=a,this.D())}},sorting:{get:function(){return this.fd},set:function(a){this.fd===a||a!==Or&&a!==Pr&& -a!==Mr&&!Nr&&a!==Kr||(this.fd=a,this.D())}},comparer:{get:function(){return this.Zc},set:function(a){this.Zc!==a&&(this.Zc=a,this.D())}},spacing:{get:function(){return this.ff},set:function(a){this.ff!==a&&(this.ff=a,this.D())}},nodeDiameterFormula:{get:function(){return this.un},set:function(a){this.un===a||a!==Lr&&a!==Wr||(this.un=a,this.D())}},actualXRadius:{get:function(){return this.hc}}, -actualYRadius:{get:function(){return this.de}},actualSpacing:{get:function(){return this.Ni}},actualCenter:{get:function(){return this.Dv}}}); +a!==Mr&&!Nr&&a!==Kr||(this.fd=a,this.D())}},comparer:{get:function(){return this.Zc},set:function(a){this.Zc!==a&&(this.Zc=a,this.D())}},spacing:{get:function(){return this.gf},set:function(a){this.gf!==a&&(this.gf=a,this.D())}},nodeDiameterFormula:{get:function(){return this.un},set:function(a){this.un===a||a!==Lr&&a!==Wr||(this.un=a,this.D())}},actualXRadius:{get:function(){return this.hc}}, +actualYRadius:{get:function(){return this.ee}},actualSpacing:{get:function(){return this.Ni}},actualCenter:{get:function(){return this.Dv}}}); var Hr=new D(Gr,"ConstantSpacing",0),Ur=new D(Gr,"ConstantDistance",1),Tr=new D(Gr,"ConstantAngle",2),Vr=new D(Gr,"Packed",3),Jr=new D(Gr,"Clockwise",4),Sr=new D(Gr,"Counterclockwise",5),Qr=new D(Gr,"BidirectionalLeft",6),Rr=new D(Gr,"BidirectionalRight",7),Or=new D(Gr,"Forwards",8),Pr=new D(Gr,"Reverse",9),Mr=new D(Gr,"Ascending",10),Nr=new D(Gr,"Descending",11),Kr=new D(Gr,"Optimized",12),Lr=new D(Gr,"Pythagorean",13),Wr=new D(Gr,"Circular",14);Gr.className="CircularLayout";Gr.ConstantSpacing=Hr; Gr.ConstantDistance=Ur;Gr.ConstantAngle=Tr;Gr.Packed=Vr;Gr.Clockwise=Jr;Gr.Counterclockwise=Sr;Gr.BidirectionalLeft=Qr;Gr.BidirectionalRight=Rr;Gr.Forwards=Or;Gr.Reverse=Pr;Gr.Ascending=Mr;Gr.Descending=Nr;Gr.Optimized=Kr;Gr.Pythagorean=Lr;Gr.Circular=Wr;function Ir(){this.xl=-Infinity;this.cm=this.bk=null} Ir.prototype.compare=function(a,b){if(0this.xl||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+p.height/2,l[0]=new I(p.x+p.width+d.width,p.y),l[1]=new I(p.x,p.y+p.height+d.height),h=2):(k=ps(l,h,e,f,p.width,p.height,d),n=l[k],r=new I(n.x+ -p.width+d.width,n.y),p=new I(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.Sc(c)&&(a++,2a.network.vertexes.count)return!1;a.Sg=a.network.vertexes.Ea();a=a.Sg;a.sort(function(a,b){return null===a||null===b||a===b?0:b.Nd-a.Nd});for(b=a.length-1;0<=b&&1>=a[b].Nd;)b--;return 1=g))){for(var l=h=0,m=k.count-g;mr&& -(r=1);h=J.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new I(p.x+g,p.y+h)}}a.network=d;return c}function ts(a,b){for(var c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.Je){var e=d.Je.K(d.av);d.Nd=e.ts;var f=e.wv,g=e.xv;d.bounds=new M(d.centerX-f,d.centerY-g,e.us,e.ss);d.focus=new I(f,g);d.av--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function us(a,b){var c=b.Bj;if(null!==c&&0!==c.count){var d=b.centerX,e=b.centerY,f=b.width,g=b.height;null!==b.Je&&0=n.Nd?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=g))){for(var l=h=0,m=k.count-g;mr&& +(r=1);h=J.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new I(p.x+g,p.y+h)}}a.network=d;return c}function ts(a,b){for(var c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.Ke){var e=d.Ke.K(d.av);d.Nd=e.ts;var f=e.wv,g=e.xv;d.bounds=new M(d.centerX-f,d.centerY-g,e.us,e.ss);d.focus=new I(f,g);d.av--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} +function us(a,b){var c=b.Bj;if(null!==c&&0!==c.count){var d=b.centerX,e=b.centerY,f=b.width,g=b.height;null!==b.Ke&&0=n.Nd?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=d+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} function ps(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,J.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,J.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.Of;var l=d=h=0;for(f= +function xs(a){null===a.Sg&&(a.Sg=a.network.vertexes.Ea());var b=a.Sg;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.Pf;var l=d=h=0;for(f= 0;fc||l-k>c){if(e)break}else if(m-r>c||r-m>c){if(!e)break}else{var q=ws(g,p);1>q?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new ys),q=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*q):kr?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new ys),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;eu&&0u&&0a[this.yc]&&(this.Dh=a[c]-1,this.yc=c),a[c]u&&0u&&0a[this.zc]&&(this.Dh=a[c]-1,this.zc=c),a[c]g)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.mf===l.mf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lg)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.nf===l.nf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lu||n===u&&r>q)&&h++;wn||u===n&&q>r)&&h++}}}if(0>=c)for(k=d[g].destinationEdgesArrayAccess,l=0;lu||n===u&&m>w)&&h++,qn||u===n&&w>m)&&h++);f[g*e+g]=h;for(k=g+ 1;k=c)for(h=d[g].destinationEdgesArrayAccess,y=d[k].destinationEdgesArrayAccess,l=0;l>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}Ls(a,b,d);return f}function Ts(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&Ts(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&Ts(a,k,c,d,e,f)}} function Us(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)Us(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)Us(a,b.value.fromVertex,c,d,e,f)}} Bs.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.rk){default:case Vs:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==Ws(a);){for(e=Xs(a);null!==e;)d[c]=e,c--,e.valid=!1,e=Xs(a);for(e=Ys(a);null!==e;)d[b]=e,b++,e.valid=!1,e=Ys(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& -k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.Ol(b),b.rev=!0);break;case Cs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.fg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Cg=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -Zs(this,b);for(d.reset();d.next();)b=d.value,-1===b.fg&&Zs(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.fgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cb.toVertex.index&&(a.Ol(b),b.rev=!0);break;case Cs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.gg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Cg=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +Zs(this,b);for(d.reset();d.next();)b=d.value,-1===b.gg&&Zs(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.ggd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cf+1&&(p+=4*(z-f),r+=4*(z-(f+1)))}A=d[f].destinationEdges.iterator;for(A.reset();A.next();)if(z=A.value,y=z.toVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;z===f+1&&(r+=1)}A=d[f+1].sourceEdges.iterator;for(A.reset();A.next();)if(z=A.value,y=z.fromVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;zf+1&&(p+=4*(z-(f+1)),r+=4*(z-f))}A=d[f+1].destinationEdges.iterator; for(A.reset();A.next();)if(z=A.value,y=z.toVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;z===f&&(p+=1)}z=y=0;A=g[d[f].index];var B=h[d[f].index],F=g[d[f+1].index],L=h[d[f+1].index];-1!==A&&(y+=Math.abs(A-q),z+=Math.abs(A-v));-1!==B&&(y+=Math.abs(B-q),z+=Math.abs(B-v));-1!==F&&(y+=Math.abs(F-u),z+=Math.abs(F-w));-1!==L&&(y+=Math.abs(L-u),z+=Math.abs(L-w));if(r>1)+8*d;this.Ja*=8}if(0!==(this.Sf&2))for(c=!0;c;){c=!1;for(b=this.yc+1;b<=this.wa;b++)c=ot(this,b,1)|| -c;for(b=this.yc-1;0<=b;b--)c=ot(this,b,-1)||c;c=ot(this,this.yc,0)||c}if(0!==(this.Sf&4)){for(b=this.yc+1;b<=this.wa;b++)pt(this,b,1);for(b=this.yc-1;0<=b;b--)pt(this,b,-1);pt(this,this.yc,0)}a&&(qt(this,-1),qt(this,1));if(0!==(this.Sf&2))for(c=!0;c;){c=!1;c=ot(this,this.yc,0)||c;for(b=this.yc+1;b<=this.wa;b++)c=ot(this,b,0)||c;for(b=this.yc-1;0<=b;b--)c=ot(this,b,0)||c}};function ot(a,b,c){for(var d=!1;rt(a,b,c);)d=!0;return d} +Bs.prototype.straightenAndPack=function(){var a=0!==(this.Tf&1);var b=0!==(this.Tf&nt);1E3>1)+8*d;this.Ja*=8}if(0!==(this.Tf&2))for(c=!0;c;){c=!1;for(b=this.zc+1;b<=this.wa;b++)c=ot(this,b,1)|| +c;for(b=this.zc-1;0<=b;b--)c=ot(this,b,-1)||c;c=ot(this,this.zc,0)||c}if(0!==(this.Tf&4)){for(b=this.zc+1;b<=this.wa;b++)pt(this,b,1);for(b=this.zc-1;0<=b;b--)pt(this,b,-1);pt(this,this.zc,0)}a&&(qt(this,-1),qt(this,1));if(0!==(this.Tf&2))for(c=!0;c;){c=!1;c=ot(this,this.zc,0)||c;for(b=this.zc+1;b<=this.wa;b++)c=ot(this,b,0)||c;for(b=this.zc-1;0<=b;b--)c=ot(this,b,0)||c}};function ot(a,b,c){for(var d=!1;rt(a,b,c);)d=!0;return d} function rt(a,b,c){var d,e=Ks(a,b),f=a.Hb[b],g=Rs(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?r=m-1:r=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var q=p=0,u=0;if(0>=c)for(var w=e[d].sourceEdges.iterator;w.next();){var v=w.value;var z=v.fromVertex; if(v.valid&&z.layer!==b){var y=Ms(v);var A=v.portFromColOffset;v=v.portToColOffset;z=z.column;p+=(Math.abs(m+v-(z+A))+1)*y;q+=(Math.abs(r+v-(z+A))+1)*y;u+=(Math.abs(n+v-(z+A))+1)*y}}if(0<=c)for(w=e[d].destinationEdges.iterator;w.next();)v=w.value,z=v.toVertex,v.valid&&z.layer!==b&&(y=Ms(v),A=v.portFromColOffset,v=v.portToColOffset,z=z.column,p+=(Math.abs(m+A-(z+v))+1)*y,q+=(Math.abs(r+A-(z+v))+1)*y,u+=(Math.abs(n+A-(z+v))+1)*y);v=A=y=0;w=g[e[d].index];z=h[e[d].index];-1!==w&&(y+=Math.abs(w-m),A+= Math.abs(w-r),v+=Math.abs(w-n));-1!==z&&(y+=Math.abs(z-m),A+=Math.abs(z-r),v+=Math.abs(z-n));if(q=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} function tt(a,b){var c=b+1;var d,e=[],f=[];for(d=0;d<=a.wa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.wa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} function qt(a,b){for(var c=0;c<=a.Ja;c++)for(;st(a,c););a.normalize();for(c=0;cf?Os(a,e):gb)for(c=a.Ja;0<=c;c--)for(e=Ns(a),f=Qs(a),d=f+1;ff?Os(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Kc);a.Kc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Us(a,b,a.Kc,-1,!0,!0),a.Kc++);var f;b=[];for(f=0;fc)for(g=a.Ja;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +function ut(a,b,c){a.Lc=0;for(var d=a.network.vertexes.iterator;d.next();)d.value.component=-1;if(0c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Lc);a.Lc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Us(a,b,a.Lc,-1,!0,!0),a.Lc++);var f;b=[];for(f=0;fc)for(g=a.Ja;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} Bs.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Is(this,!0),b=Is(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.nu();this.isRouting&&this.commitLinks()};function Is(a,b){return 270===a.L?b?ad:fd:90===a.L?b?fd:ad:180===a.L?b?dd:ed:b?ed:dd} -Bs.prototype.commitNodes=function(){this.$d=[];this.Cd=[];this.Bd=[];this.Qa=[];for(var a=0;a<=this.wa;a++)this.$d[a]=0,this.Cd[a]=0,this.Bd[a]=0,this.Qa[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.$d[c]=Math.max(this.$d[c],this.nodeMinLayerSpace(b,!0));this.Cd[c]=Math.max(this.Cd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ae;for(var d=0;d<=this.wa;d++){var e=c;0>=this.$d[d]+this.Cd[d]&&(e=0);0=this.ae[d]+this.Cd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.l(q++,A,n+F),b.l(q++,A,n),b.l(q++,A,n-y)):(b.l(q++,A,B+F),b.l(q++,A,B),b.l(q++,A,B-y)):270===this.L?B<=n.bounds.y?(n=n.bounds.y,b.l(q++,A,n-y),b.l(q++,A,n),b.l(q++,A,n+F)):(b.l(q++,A,B-y),b.l(q++,A,B),b.l(q++,A,B+F)):0===this.L&&(A>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.l(q++,n+F,B),b.l(q++,n,B),b.l(q++,n-y,B)):(b.l(q++,A+F,B),b.l(q++,A,B),b.l(q++,A-y,B)));else{b.l(q++,v,z);var L=0;if(180===this.L||0===this.L){if(180===this.L?A>=n.bounds.right: -A<=n.bounds.x)L=(0===this.L?-y:F)/2;b.l(q++,v+L,B)}else{if(270===this.L?B>=n.bounds.bottom:B<=n.bounds.y)L=(90===this.L?-y:F)/2;b.l(q++,A,z+L)}b.l(q++,A,B)}}else y=Math.max(10,this.$d[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):90===this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)): +A<=n.bounds.x)L=(0===this.L?-y:F)/2;b.l(q++,v+L,B)}else{if(270===this.L?B>=n.bounds.bottom:B<=n.bounds.y)L=(90===this.L?-y:F)/2;b.l(q++,A,z+L)}b.l(q++,A,B)}}else y=Math.max(10,this.ae[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):90===this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)): 270===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):b.l(q++,A,B)}n=w}if(null===h||l!==sc||p)if(v=b.i(q-1).x,z=b.i(q-1).y,A=b.i(q).x,B=b.i(q).y,p)u=this.Cd[m.layer],180===this.L||0===this.L?(p=z,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.L?A>=m.bounds.x:A<=m.bounds.right)&&(n=m.centerX+(180=== -this.L?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.L?B>=m.bounds.y:B<=m.bounds.bottom)&&(n=m.centerY+(270===this.L?-u:u),p=m.bounds.x?(n=m.bounds.x+ -m.bounds.width,b.M(q-2,n,z),b.M(q-1,n+F,z)):90===this.L&&B<=m.bounds.bottom?(n=m.bounds.y,b.M(q-2,v,n),b.M(q-1,v,n-y)):270===this.L&&B>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.M(q-2,v,n),b.M(q-1,v,n+F)):0===this.L&&A<=m.bounds.right&&(n=m.bounds.x,b.M(q-2,n,z),b.M(q-1,n-y,z));else{y=Math.max(10,this.$d[m.layer]);F=Math.max(10,this.Cd[m.layer]);p=0;if(180===this.L||0===this.L){if(180===this.L?A<=m.bounds.x:A>=m.bounds.right)p=(0===this.L?F:-y)/2;b.l(q++,A+p,z)}else{if(270===this.L?B<=m.bounds.y: +this.L?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.L?B>=m.bounds.y:B<=m.bounds.bottom)&&(n=m.centerY+(270===this.L?-u:u),p=m.bounds.x?(n=m.bounds.x+ +m.bounds.width,b.M(q-2,n,z),b.M(q-1,n+F,z)):90===this.L&&B<=m.bounds.bottom?(n=m.bounds.y,b.M(q-2,v,n),b.M(q-1,v,n-y)):270===this.L&&B>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.M(q-2,v,n),b.M(q-1,v,n+F)):0===this.L&&A<=m.bounds.right&&(n=m.bounds.x,b.M(q-2,n,z),b.M(q-1,n-y,z));else{y=Math.max(10,this.ae[m.layer]);F=Math.max(10,this.Cd[m.layer]);p=0;if(180===this.L||0===this.L){if(180===this.L?A<=m.bounds.x:A>=m.bounds.right)p=(0===this.L?F:-y)/2;b.l(q++,A+p,z)}else{if(270===this.L?B<=m.bounds.y: B>=m.bounds.bottom)p=(90===this.L?F:-y)/2;b.l(q++,v,B+p)}b.l(q++,A,B)}}else{for(;null!==m&&m!==n;){y=w=null;for(m=m.destinationEdges.iterator;m.next()&&(v=m.value,v.link!==c.link||(w=v.toVertex,y=v.fromVertex,null!==y.node&&(y=null),null!==w.node)););if(null===w)break;w!==n&&(v=b.i(q-1).x,z=b.i(q-1).y,A=w.centerX,B=w.centerY,p?180===this.L||0===this.L?(null!==y?y.centerY:z)!==B&&(y=this.Qa[w.layer]+this.Yc.x,q===b.firstPickIndex+1&&(y=0===this.L?Math.max(y,v):Math.min(y,v)),b.l(q++,y,z),b.l(q++,y, -B)):(null!==y?y.centerX:v)!==A&&(y=this.Qa[w.layer]+this.Yc.y,q===b.firstPickIndex+1&&(y=90===this.L?Math.max(y,z):Math.min(y,z)),b.l(q++,v,y),b.l(q++,A,y)):(y=Math.max(10,this.$d[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):90===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):270=== +B)):(null!==y?y.centerX:v)!==A&&(y=this.Qa[w.layer]+this.Yc.y,q===b.firstPickIndex+1&&(y=90===this.L?Math.max(y,z):Math.min(y,z)),b.l(q++,v,y),b.l(q++,A,y)):(y=Math.max(10,this.ae[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):90===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):270=== this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)):(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):180===this.L?(b.l(q++,A+F,B),b.l(q++,A-y,B)):90===this.L?(b.l(q++,A,B-y),b.l(q++,A,B+F)):270===this.L?(b.l(q++,A,B+F),b.l(q++,A,B-y)):(b.l(q++,A-y,B),b.l(q++,A+F,B))));m=w}p&&(v=b.i(q-1).x,z=b.i(q-1).y,A=b.i(q).x,B=b.i(q).y,180===this.L||0===this.L? z!==B&&(y=0===this.L?Math.min(Math.max((A+v)/2,this.Qa[n.layer]+this.Yc.x),A):Math.max(Math.min((A+v)/2,this.Qa[n.layer]+this.Yc.x),A),b.l(q++,y,z),b.l(q++,y,B)):v!==A&&(y=90===this.L?Math.min(Math.max((B+z)/2,this.Qa[n.layer]+this.Yc.y),B):Math.max(Math.min((B+z)/2,this.Qa[n.layer]+this.Yc.y),B),b.l(q++,v,y),b.l(q++,A,y)))}null!==d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.C(d)||b.M(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.v()||l.set(e.actualBounds.center),b.M(0,l.x,l.y)), -null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.C(l)||b.M(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.v()||e.set(f.actualBounds.center),b.M(b.pointsCount-1,e.x,e.y)));b.nf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.C(l)||b.M(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.v()||e.set(f.actualBounds.center),b.M(b.pointsCount-1,e.x,e.y)));b.pf();c.commit()}}}this.avoidOrthogonalOverlaps()}; Bs.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new E,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.ldb.ld?1:a.Acb.Ac?1:0:0};t.Ax=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.firstb.first||a.jb.j||a.ldb.ld?1:a.Acb.Ac?1:0:0}; -t.js=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.fcb.fc||a.jb.j||a.ldb.ld?1:a.Acb.Ac?1:0:0};t.B=function(a,b){a-=b;return-1a}; +k.x*k.x+k.y;h.fc=l.x*l.x+l.y;h.ld=Math.min(f.x,g.x);h.Bc=Math.max(f.x,g.x);h.index=e;h.link=d;if(e+2f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.ldb.ld?1:a.Bcb.Bc?1:0:0};t.Bx=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.firstb.first||a.jb.j||a.ldb.ld?1:a.Bcb.Bc?1:0:0}; +t.js=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.fcb.fc||a.jb.j||a.ldb.ld?1:a.Bcb.Bc?1:0:0};t.B=function(a,b){a-=b;return-1a}; t.ri=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&C("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.ve.length){var d=[];for(var e=0;e=a.we.length){var d=[];for(var e=0;ea&&(this.Sf=a,this.D())}},setsPortSpots:{get:function(){return this.ef},set:function(a){this.ef!==a&&(this.ef=a,this.D())}}, -linkSpacing:{get:function(){return this.jn},set:function(a){this.jn!==a&&0<=a&&(this.jn=a,this.D())}},maxLayer:{get:function(){return this.wa}},maxIndex:{get:function(){return this.Dh}},maxColumn:{get:function(){return this.Ja}},minIndexLayer:{get:function(){return this.Bg}},maxIndexLayer:{get:function(){return this.yc}}}); +get:function(){return this.Xi},set:function(a){this.Xi!==a&&0<=a&&(this.Xi=a,this.D())}},aggressiveOption:{get:function(){return this.ek},set:function(a){this.ek===a||a!==lt&&a!==Fs&&a!==mt||(this.ek=a,this.D())}},packOption:{get:function(){return this.Tf},set:function(a){this.Tf!==a&&0<=a&&8>a&&(this.Tf=a,this.D())}},setsPortSpots:{get:function(){return this.ff},set:function(a){this.ff!==a&&(this.ff=a,this.D())}}, +linkSpacing:{get:function(){return this.jn},set:function(a){this.jn!==a&&0<=a&&(this.jn=a,this.D())}},maxLayer:{get:function(){return this.wa}},maxIndex:{get:function(){return this.Dh}},maxColumn:{get:function(){return this.Ja}},minIndexLayer:{get:function(){return this.Bg}},maxIndexLayer:{get:function(){return this.zc}}}); var Cs=new D(Bs,"CycleDepthFirst",0),Vs=new D(Bs,"CycleGreedy",1),Hs=new D(Bs,"CycleFromLayers",2),Ds=new D(Bs,"LayerOptimalLinkLength",0),$s=new D(Bs,"LayerLongestPathSink",1),bt=new D(Bs,"LayerLongestPathSource",2),Es=new D(Bs,"InitDepthFirstOut",0),ht=new D(Bs,"InitDepthFirstIn",1),ft=new D(Bs,"InitNaive",2),lt=new D(Bs,"AggressiveNone",0),Fs=new D(Bs,"AggressiveLess",1),mt=new D(Bs,"AggressiveMore",2),nt=8;Bs.className="LayeredDigraphLayout";Bs.CycleDepthFirst=Cs;Bs.CycleGreedy=Vs; -Bs.CycleFromLayers=Hs;Bs.LayerOptimalLinkLength=Ds;Bs.LayerLongestPathSink=$s;Bs.LayerLongestPathSource=bt;Bs.InitDepthFirstOut=Es;Bs.InitDepthFirstIn=ht;Bs.InitNaive=ft;Bs.AggressiveNone=lt;Bs.AggressiveLess=Fs;Bs.AggressiveMore=mt;Bs.PackNone=0;Bs.PackExpand=1;Bs.PackStraighten=2;Bs.PackMedian=4;Bs.PackAll=15;function vt(){this.index=this.Ac=this.ld=this.fc=this.first=this.layer=0;this.link=null;this.j=0}vt.className="SegInfo";function Gs(a){eq.call(this,a)}la(Gs,eq);Gs.prototype.createVertex=function(){return new wt(this)}; -Gs.prototype.createEdge=function(){return new xt(this)};Gs.className="LayeredDigraphNetwork";function wt(a){sq.call(this,a);this.Wa=this.qg=this.Ah=-1;this.u=NaN;this.F=null;this.valid=!1;this.finish=this.fg=NaN;this.mf=0;this.Tj=this.Uj=null}la(wt,sq); -wt.prototype.serializeVertexProperties=function(a,b){sq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?cb(this.near):null;a.valid=this.valid;a.fg=this.fg;a.finish=this.finish;a.mf=this.mf;a.Uj=this.Uj;a.Tj=this.Tj}; -wt.prototype.deserializeVertexProperties=function(a,b,c,d){sq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.fg=a.fg;this.finish=a.finish;this.mf=a.mf;this.Uj=a.Uj;this.Tj=a.Tj}; -ma.Object.defineProperties(wt.prototype,{layer:{get:function(){return this.Ah},set:function(a){this.Ah!==a&&(this.Ah=a)}},column:{get:function(){return this.qg},set:function(a){this.qg!==a&&(this.qg=a)}},index:{get:function(){return this.Wa},set:function(a){this.Wa!==a&&(this.Wa=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{ -get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}});wt.className="LayeredDigraphVertex";function xt(a){tq.call(this,a);this.j=this.ga=this.Ga=!1;this.Y=this.u=NaN;this.F=this.o=0}la(xt,tq); +Bs.CycleFromLayers=Hs;Bs.LayerOptimalLinkLength=Ds;Bs.LayerLongestPathSink=$s;Bs.LayerLongestPathSource=bt;Bs.InitDepthFirstOut=Es;Bs.InitDepthFirstIn=ht;Bs.InitNaive=ft;Bs.AggressiveNone=lt;Bs.AggressiveLess=Fs;Bs.AggressiveMore=mt;Bs.PackNone=0;Bs.PackExpand=1;Bs.PackStraighten=2;Bs.PackMedian=4;Bs.PackAll=15;function vt(){this.index=this.Bc=this.ld=this.fc=this.first=this.layer=0;this.link=null;this.j=0}vt.className="SegInfo";function Gs(a){eq.call(this,a)}la(Gs,eq);Gs.prototype.createVertex=function(){return new wt(this)}; +Gs.prototype.createEdge=function(){return new xt(this)};Gs.className="LayeredDigraphNetwork";function wt(a){sq.call(this,a);this.Wa=this.rg=this.Ah=-1;this.u=NaN;this.F=null;this.valid=!1;this.finish=this.gg=NaN;this.nf=0;this.Tj=this.Uj=null}la(wt,sq); +wt.prototype.serializeVertexProperties=function(a,b){sq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?cb(this.near):null;a.valid=this.valid;a.gg=this.gg;a.finish=this.finish;a.nf=this.nf;a.Uj=this.Uj;a.Tj=this.Tj}; +wt.prototype.deserializeVertexProperties=function(a,b,c,d){sq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.gg=a.gg;this.finish=a.finish;this.nf=a.nf;this.Uj=a.Uj;this.Tj=a.Tj}; +ma.Object.defineProperties(wt.prototype,{layer:{get:function(){return this.Ah},set:function(a){this.Ah!==a&&(this.Ah=a)}},column:{get:function(){return this.rg},set:function(a){this.rg!==a&&(this.rg=a)}},index:{get:function(){return this.Wa},set:function(a){this.Wa!==a&&(this.Wa=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{ +get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}});wt.className="LayeredDigraphVertex";function xt(a){tq.call(this,a);this.j=this.ga=this.Ga=!1;this.W=this.u=NaN;this.F=this.m=0}la(xt,tq); xt.prototype.serializeEdgeProperties=function(a,b){tq.prototype.serializeEdgeProperties.call(this,a,b);a.valid=this.valid;a.rev=this.rev;a.forest=this.forest;a.portFromPos=this.portFromPos;a.portToPos=this.portToPos;a.portFromColOffset=this.portFromColOffset;a.portToColOffset=this.portToColOffset}; xt.prototype.deserializeEdgeProperties=function(a,b,c,d){tq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; ma.Object.defineProperties(xt.prototype,{fromVertex:{get:function(){return this.ad},set:function(a){this.ad!==a&&(this.ad=a)}},toVertex:{get:function(){return this.jd},set:function(a){this.jd!==a&&(this.jd=a)}},valid:{get:function(){return this.Ga},set:function(a){this.Ga!==a&&(this.Ga=a)}},rev:{get:function(){return this.ga},set:function(a){this.ga!==a&&(this.ga=a)}},forest:{ -get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F}, -set:function(a){this.F!==a&&(this.F=a)}}});xt.className="LayeredDigraphEdge";function yt(a){qi.call(this);this.Qb=new G;this.En=zt;this.qd=At;this.Yn=Bt;this.aq=Ct;this.Ev=[];this.od=!0;this.Nb=Dt;this.Td=(new K(10,10)).freeze();var b=new Et(this);this.V=new Ft(b);this.W=new Ft(b);this.Xt=[];a&&Object.assign(this,a)}la(yt,qi); -yt.prototype.cloneProtected=function(a){qi.prototype.cloneProtected.call(this,a);a.En=this.En;a.Yn=this.Yn;a.aq=this.aq;a.od=this.od;a.Nb=this.Nb;a.Td.assign(this.Td);a.V.copyInheritedPropertiesFrom(this.V);a.W.copyInheritedPropertiesFrom(this.W)}; +get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a)}},portFromColOffset:{get:function(){return this.m},set:function(a){this.m!==a&&(this.m=a)}},portToColOffset:{get:function(){return this.F}, +set:function(a){this.F!==a&&(this.F=a)}}});xt.className="LayeredDigraphEdge";function yt(a){qi.call(this);this.Qb=new G;this.En=zt;this.qd=At;this.Yn=Bt;this.aq=Ct;this.Ev=[];this.od=!0;this.Nb=Dt;this.Td=(new K(10,10)).freeze();var b=new Et(this);this.V=new Ft(b);this.Y=new Ft(b);this.Xt=[];a&&Object.assign(this,a)}la(yt,qi); +yt.prototype.cloneProtected=function(a){qi.prototype.cloneProtected.call(this,a);a.En=this.En;a.Yn=this.Yn;a.aq=this.aq;a.od=this.od;a.Nb=this.Nb;a.Td.assign(this.Td);a.V.copyInheritedPropertiesFrom(this.V);a.Y.copyInheritedPropertiesFrom(this.Y)}; yt.prototype.ob=function(a){a.classType===yt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:C("Unknown enum value: "+a):qi.prototype.ob.call(this,a)};yt.prototype.createNetwork=function(){return new Et(this)}; -yt.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof T){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.dg(a.nodes,!0,b),c.dg(a.links,!0,b)):a instanceof qf?c.dg(a.memberParts,!1,b):c.dg(a.iterator,!1,b);return c}; +yt.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof T){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.eg(a.nodes,!0,b),c.eg(a.links,!0,b)):a instanceof qf?c.eg(a.memberParts,!1,b):c.eg(a.iterator,!1,b);return c}; yt.prototype.doLayout=function(a){null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Gt&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===zt&&null!==b?this.qd=b.isTreePathToChildren?At:Ht:this.qd=this.path===zt?At:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0}yt.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ee?pu(a,g,X,v,z):qu(a,g,X,v,z);X=z.x;v=z.width;z=z.height;break;case bu:for(A=0;An&&(Shb&&(vu(a,-hb,0,da,na-1),wu(A,-hb,0),wu(B,-hb,0),hb=0)}Ba.S.h(hb,R);v=Math.max(v,F);z=Math.max(z,y+(0===P?0:q)+db.height);S=F}else{0n&&(Rhb&&(vu(a,0,-hb,da,na-1),wu(A,0,-hb),wu(B,0,-hb),hb=0);Ba.S.h(S,hb);z=Math.max(z,L);v=Math.max(v,y+(0===P?0:q)+db.width);R=L}H++}0e?pu(a,g,X,v,z):qu(a,g,X,v,z);X=z.x;v=z.width;z=z.height;break;case bu:for(A=0;An&&(Shb&&(vu(a,-hb,0,da,oa-1),wu(A,-hb,0),wu(B,-hb,0),hb=0)}Ba.S.h(hb,R);v=Math.max(v,F);z=Math.max(z,y+(0===P?0:q)+db.height);S=F}else{0n&&(Rhb&&(vu(a,0,-hb,da,oa-1),wu(A,0,-hb),wu(B,0,-hb),hb=0);Ba.S.h(S,hb);z=Math.max(z,L);v=Math.max(v,y+(0===P?0:q)+db.width);R=L}H++}0l&&(l=0),135u&&(u=0), k===cu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Bu(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=zu(a,v,l),0>l&&(g-=l,l=0),135z&&(z=Bu(k,0,w-z),g=z.x,h=z.y,z=w,u=0):z=Au(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(l+d,0),P[1].h(P[0].x,w),P[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?pu(b,e,H,y,A): +lu;h=$t(l);var p=Math.max(0,b.breadthLimit);k=mu(b);var r=b.nodeSpacing,q=nu(b),u=m||n?0:q/2,w=b.rowSpacing,v=0;if(m||n||b.Pl||b.Ql&&1===b.maxGenerationCount)v=Math.max(0,b.rowIndent);m=b.width;var z=b.height,y=0,A=0,B=0,F=0,L=0,S=0,R=0,P=0,H=0;h&&!du(l)&&135d?pu(b,e,H,y,A): qu(b,e,H,y,A);H=A.x;y=A.width;A=A.height;break;case bu:for(a=0;ap&&(Fp&&(Lp&&(Fp&&(Ln&&(n=0),135v&&(v=0));b.ka.h(n,v);b.Ca.h(y,A)}} @@ -2177,7 +2179,7 @@ function Cu(a,b){var c=b.length,d=a.Xt[c];void 0===d&&(d=[],a.Xt[c]=d);d.push(b) yt.prototype.arrangeTrees=function(){if(this.Nb===Gt)for(var a=this.Qb.iterator;a.next();){var b=a.value;if(b instanceof Ft){var c=b.node;if(null!==c){var d=c.position;c=d.x;d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);Fu(this,b,c,d)}}}else{a=[];for(b=this.Qb.iterator;b.next();)c=b.value,c instanceof Ft&&a.push(c);switch(this.sorting){case Wt:break;case Xt:a.reverse();break;case Yt:a.sort(this.comparer);break;case Zt:a.sort(this.comparer);a.reverse();break;default:C("Unhandled sorting value "+this.sorting.toString())}c= this.arrangementOrigin;b=c.x;c=c.y;for(d=0;d=a?0:135>=a?90:225>=a?180:315>=a?270:0}function mu(a){var b=ku(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.V.nodeIndentPastParent=a,this.D())}},nodeSpacing:{get:function(){return this.V.nodeSpacing},set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.D())}},layerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!== a&&(this.V.layerSpacing=a,this.D())}},layerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.D())}},compaction:{get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==fu&&a!==hu||(this.V.compaction=a,this.D())}},breadthLimit:{get:function(){return this.V.breadthLimit}, set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.D())}},rowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.D())}},rowIndent:{get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.D())}},commentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!== a&&(this.V.commentSpacing=a,this.D())}},commentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.D())}},setsPortSpot:{get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.D())}},portSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.C(a)||(this.V.portSpot= -a,this.D())}},setsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.D())}},childPortSpot:{get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.C(a)||(this.V.childPortSpot=a,this.D())}},alternateSorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Wt&&a!==Xt&& -a!==Yt&&!Zt||(this.W.sorting=a,this.D())}},alternateComparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.D())}},alternateAngle:{get:function(){return this.W.angle},set:function(a){this.W.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.W.angle=a,this.D())}},alternateAlignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!== -a&&(this.W.alignment=a,this.D())}},alternateNodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.D())}},alternateNodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.D())}},alternateNodeSpacing:{get:function(){return this.W.nodeSpacing}, -set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.D())}},alternateLayerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.D())}},alternateLayerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.D())}},alternateCompaction:{ -get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==fu&&a!==hu||(this.W.compaction=a,this.D())}},alternateBreadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.D())}},alternateRowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.D())}},alternateRowIndent:{ -get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.D())}},alternateCommentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.D())}},alternateCommentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.D())}},alternateSetsPortSpot:{ -get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.D())}},alternatePortSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.C(a)||(this.W.portSpot=a,this.D())}},alternateSetsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.D())}},alternateChildPortSpot:{ -get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.C(a)||(this.W.childPortSpot=a,this.D())}}}); +a,this.D())}},setsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.D())}},childPortSpot:{get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.C(a)||(this.V.childPortSpot=a,this.D())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Wt&&a!==Xt&& +a!==Yt&&!Zt||(this.Y.sorting=a,this.D())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.D())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.Y.angle=a,this.D())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!== +a&&(this.Y.alignment=a,this.D())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.D())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.D())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing}, +set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.D())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.D())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.D())}},alternateCompaction:{ +get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==fu&&a!==hu||(this.Y.compaction=a,this.D())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.D())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.D())}},alternateRowIndent:{ +get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.D())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.D())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.D())}},alternateSetsPortSpot:{ +get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.D())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.C(a)||(this.Y.portSpot=a,this.D())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.D())}},alternateChildPortSpot:{ +get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.C(a)||(this.Y.childPortSpot=a,this.D())}}}); var zt=new D(yt,"PathDefault",-1),At=new D(yt,"PathDestination",0),Ht=new D(yt,"PathSource",1),Wt=new D(yt,"SortingForwards",10),Xt=new D(yt,"SortingReverse",11),Yt=new D(yt,"SortingAscending",12),Zt=new D(yt,"SortingDescending",13),xu=new D(yt,"AlignmentCenterSubtrees",20),yu=new D(yt,"AlignmentCenterChildren",21),ou=new D(yt,"AlignmentStart",22),lu=new D(yt,"AlignmentEnd",23),au=new D(yt,"AlignmentBus",24),Rt=new D(yt,"AlignmentBusBranching",25),bu=new D(yt,"AlignmentTopLeftBus",26),cu=new D(yt, "AlignmentBottomRightBus",27),fu=new D(yt,"CompactionNone",30),hu=new D(yt,"CompactionBlock",31),Bt=new D(yt,"StyleLayered",40),Vt=new D(yt,"StyleLastParents",41),Ut=new D(yt,"StyleAlternating",42),Tt=new D(yt,"StyleRootOnly",43),Dt=new D(yt,"ArrangementVertical",50),Gu=new D(yt,"ArrangementHorizontal",51),Gt=new D(yt,"ArrangementFixedRoots",52),Ct=new D(yt,"LayerIndividual",60),Pt=new D(yt,"LayerSiblings",61),Ot=new D(yt,"LayerUniform",62);yt.className="TreeLayout";yt.PathDefault=zt; yt.PathDestination=At;yt.PathSource=Ht;yt.SortingForwards=Wt;yt.SortingReverse=Xt;yt.SortingAscending=Yt;yt.SortingDescending=Zt;yt.AlignmentCenterSubtrees=xu;yt.AlignmentCenterChildren=yu;yt.AlignmentStart=ou;yt.AlignmentEnd=lu;yt.AlignmentBus=au;yt.AlignmentBusBranching=Rt;yt.AlignmentTopLeftBus=bu;yt.AlignmentBottomRightBus=cu;yt.CompactionNone=fu;yt.CompactionBlock=hu;yt.StyleLayered=Bt;yt.StyleLastParents=Vt;yt.StyleAlternating=Ut;yt.StyleRootOnly=Tt;yt.ArrangementVertical=Dt; yt.ArrangementHorizontal=Gu;yt.ArrangementFixedRoots=Gt;yt.LayerIndividual=Ct;yt.LayerSiblings=Pt;yt.LayerUniform=Ot;function Et(a){eq.call(this,a)}la(Et,eq);Et.prototype.createVertex=function(){return new Ft(this)};Et.prototype.createEdge=function(){return new Iu(this)};Et.className="TreeNetwork"; -function Ft(a){sq.call(this,a);this.Y=!1;this.cb=null;this.u=[];this.hb=this.Ga=this.F=this.ga=0;this.od=null;this.S=new I(0,0);this.Ca=new K(0,0);this.ka=new I(0,0);this.Ql=this.Pl=this.Xz=!1;this.No=this.Bo=null;this.fd=Wt;this.Zc=zq;this.Gb=0;this.Fb=yu;this.uq=this.tq=0;this.vq=20;this.ae=50;this.$p=0;this.kp=hu;this.cp=0;this.Mq=25;this.jp=this.Lq=10;this.ip=20;this.Uq=!0;this.Cq=Wc;this.Tq=!0;this.gp=Wc}la(Ft,sq); -Ft.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.fd=a.sorting,this.Zc=a.comparer,this.Gb=a.angle,this.Fb=a.alignment,this.tq=a.nodeIndent,this.uq=a.nodeIndentPastParent,this.vq=a.nodeSpacing,this.ae=a.layerSpacing,this.$p=a.layerSpacingParentOverlap,this.kp=a.compaction,this.cp=a.breadthLimit,this.Mq=a.rowSpacing,this.Lq=a.rowIndent,this.jp=a.commentSpacing,this.ip=a.commentMargin,this.Uq=a.setsPortSpot,this.Cq=a.portSpot,this.Tq=a.setsChildPortSpot,this.gp=a.childPortSpot)}; -ma.Object.defineProperties(Ft.prototype,{initialized:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a)}},parent:{get:function(){return this.cb},set:function(a){this.cb!==a&&(this.cb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(null!==a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-nu(c))))):c.alignment===ou?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-nu(c))))):c.alignment===ou?(e=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-nu(c))))):c.alignment===ou?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-nu(c))))):c.alignment===ou?(e=d.left+b.x,0===b.x&&m.x * Definitions: https://github.com/NorthwoodsSoftware/GoJS @@ -1674,6 +1674,14 @@ export class Size { * are equal with a tolerance of 0.5, false otherwise. */ equalsApprox(s: Size): boolean; + /** + * Modify this Size so that its width and height are changed by the given distances. + * When the arguments are negative, this operation deflates this Size, but not beyond zero. + * @param {number} w The additional width, which must be a real number; may be negative. + * @param {number} h The additional height, which must be a real number; may be negative. + * @return {Rect} this. + */ + inflate(w: number, h: number): Size; /** * Gets or sets the width value of the Size. * The value must not be negative. @@ -5853,6 +5861,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is allowed and will result in a copy. * This defaults to 'copy'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get copyCursor(): string; @@ -5860,6 +5869,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is allowed and will result in a move. * This defaults to the empty string, which refers to the Diagram#defaultCursor. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get moveCursor(): string; @@ -5867,6 +5877,7 @@ export class DraggingTool extends Tool { /** * The cursor to show when a drop is not allowed. * This defaults to 'no-drop'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get nodropCursor(): string; @@ -6190,6 +6201,7 @@ export abstract class LinkingBaseTool extends Tool { /** * Gets or sets the cursor used during the linking or relinking operation. * This defaults to 'pointer'. + * Read more about cursors at Diagram#currentCursor * @since 2.2 */ get linkingCursor(): string; @@ -11485,8 +11497,8 @@ export class Diagram { * To read more about cursor syntax, go to: * CSS cursors (mozilla.org). * - * If the specified cursor is not accepted by the platform, GoJS will append - * `-webkit-` or `-moz-` prefixes. + * If the specified cursor is not accepted by the platform, this property setter will try prepending + * `-webkit-` and `-moz-` prefixes when assigning the "cursor" CSS style property. * * Setting this property does not notify about any changed event. * Setting this value to the empty string ('') returns the Diagram's cursor to the #defaultCursor. @@ -13626,6 +13638,8 @@ export class CommandHandler { * If this command had been called before without any other zooming since then, * the original Diagram scale and position are restored. * This is normally invoked by the `Shift-Z` keyboard shortcut. + * If you do not want the behavior where this command might restore the original diagram scale and position on a subsequent call, + * set #isZoomToFitRestoreEnabled to false. * * As of 2.1, this animates zooming by default. Diagram#zoomToFit does not animate. * @@ -13633,6 +13647,7 @@ export class CommandHandler { * Please read the Introduction page on Extensions for how to override methods and how to call this base method. * @expose * @see #canZoomToFit + * @see #isZoomToFitRestoreEnabled * @since 1.1 */ zoomToFit(): void; @@ -15476,6 +15491,8 @@ export abstract class GraphObject { * Other strings should be valid CSS strings that specify a cursor. * This provides some more information about cursor syntax: * CSS cursors (mozilla.org). + * + * Read more about cursors at Diagram#currentCursor * @see Diagram#defaultCursor * @see Diagram#currentCursor */ @@ -28394,6 +28411,7 @@ export class TreeLayout extends Layout { * * These values are in degrees, where 0 is along the positive X axis, * and where 90 is along the positive Y axis. + * * This sets the #rootDefaults' property of the same name. */ get angle(): number; @@ -28419,6 +28437,7 @@ export class TreeLayout extends Layout { * at the start of the row of children for some reason. * For example, if you want to pretend the parent node is infinitely deep, * you can set this to be the breadth of the parent node. + * * This sets the #rootDefaults' property of the same name. */ get nodeIndent(): number; @@ -28432,6 +28451,7 @@ export class TreeLayout extends Layout { * * This property is only sensible when the #alignment * is TreeLayout.AlignmentStart|AlignmentStart or TreeLayout.AlignmentEnd|AlignmentEnd. + * * This sets the #rootDefaults' property of the same name. */ get nodeIndentPastParent(): number; @@ -28439,9 +28459,12 @@ export class TreeLayout extends Layout { /** * Gets or sets the distance between child nodes. * + * This is the distance between sibling nodes. + * A negative value causes sibling nodes to overlap. * The default value is 20. * - * A negative value causes sibling nodes to overlap. + * The #layerSpacing property determines the distance between a parent node and the layer of its children. + * * This sets the #rootDefaults' property of the same name. */ get nodeSpacing(): number; @@ -28449,13 +28472,14 @@ export class TreeLayout extends Layout { /** * Gets or sets the distance between a parent node and its children. * + * This is the distance between a parent node and the layer of its children. + * Negative values may cause children to overlap with the parent. * The default value is 50. * - * This is the distance between a parent node and its first row - * of children, in case there are multiple rows of its children. + * The #nodeSpacing property determines the distance between siblings. * The #rowSpacing property determines the distance - * between rows of children. - * Negative values may cause children to overlap with the parent. + * between multiple rows or columns of children. + * * This sets the #rootDefaults' property of the same name. */ get layerSpacing(): number; @@ -28470,6 +28494,7 @@ export class TreeLayout extends Layout { * unless the value of #layerSpacing is large enough. * A value of zero might still allow overlap between layers, * if #layerSpacing is negative. + * * This sets the #rootDefaults' property of the same name. */ get layerSpacingParentOverlap(): number; @@ -28505,19 +28530,22 @@ export class TreeLayout extends Layout { * later rows, when the alignment is not a "center" alignment, the * #rowIndent property specifies that space at the * start of each row. + * * This sets the #rootDefaults' property of the same name. */ get breadthLimit(): number; set breadthLimit(value: number); /** - * Gets or sets the distance between rows of children. + * Gets or sets the distance between rows or columns of a parent node's immediate children. * * The default value is 25. * * This property is only used when there is more than one * row of children for a given parent node. - * #layerSpacing determines the distance between - * the parent node and its first row of child nodes. + * The #nodeSpacing property determines the distance between siblings. + * The #layerSpacing property determines the distance between + * the parent node and its first row or column of child nodes. + * * This sets the #rootDefaults' property of the same name. */ get rowSpacing(): number; @@ -28530,6 +28558,7 @@ export class TreeLayout extends Layout { * * This is used to leave room for the links that connect a parent node * with the child nodes that are in additional rows. + * * This sets the #rootDefaults' property of the same name. */ get rowIndent(): number; @@ -28540,6 +28569,7 @@ export class TreeLayout extends Layout { * The default value is 10. * * This is used by #addComments and #layoutComments. + * * This sets the #rootDefaults' property of the same name. */ get commentSpacing(): number; @@ -28550,6 +28580,7 @@ export class TreeLayout extends Layout { * The default value is 20. * * This is used by #addComments and #layoutComments. + * * This sets the #rootDefaults' property of the same name. */ get commentMargin(): number; @@ -28562,6 +28593,7 @@ export class TreeLayout extends Layout { * if the node has only a single port. * * The spot used depends on the value of #portSpot. + * * This sets the #rootDefaults' property of the same name. */ get setsPortSpot(): boolean; @@ -28576,6 +28608,7 @@ export class TreeLayout extends Layout { * If the value is other than NoSpot, it is just assigned. * When #path is TreeLayout.PathSource|PathSource, * the port's ToSpot is set instead of the FromSpot. + * * This sets the #rootDefaults' property of the same name. */ get portSpot(): Spot; @@ -28588,6 +28621,7 @@ export class TreeLayout extends Layout { * if the node has only a single port. * * The spot used depends on the value of #childPortSpot. + * * This sets the #rootDefaults' property of the same name. */ get setsChildPortSpot(): boolean; @@ -28602,6 +28636,7 @@ export class TreeLayout extends Layout { * If the value is other than NoSpot, it is just assigned. * When #path is TreeLayout.PathSource|PathSource, * the port's FromSpot is set instead of the ToSpot. + * * This sets the #rootDefaults' property of the same name. */ get childPortSpot(): Spot; @@ -28665,10 +28700,10 @@ export class TreeLayout extends Layout { get alternateNodeIndent(): number; set alternateNodeIndent(value: number); /** - * Gets or sets the fraction of this node's breadth is added to #nodeIndent + * Gets or sets the fraction of this node's breadth is added to #alternateNodeIndent * to determine any spacing at the start of the children. * - * The default value is 0.0 -- the only indentation is specified by #nodeIndent. + * The default value is 0.0 -- the only indentation is specified by #alternateNodeIndent. * When the value is 1.0, the children will be indented past the breadth of the parent node. * * This property is only sensible when the #alignment @@ -28693,7 +28728,8 @@ export class TreeLayout extends Layout { * * This is the distance between a parent node and its first row * of children, in case there are multiple rows of its children. - * The #rowSpacing property determines the distance + * The #alternateNodeSpacing property determines the distance between siblings. + * The #alternateRowSpacing property determines the distance * between rows of children. * Negative values may cause children to overlap with the parent. * This sets the #alternateDefaults' property of the same name. @@ -28703,13 +28739,13 @@ export class TreeLayout extends Layout { /** * Gets or sets the alternate fraction of the node's depth for which the children's layer starts overlapped with the parent's layer. * - * The default value is 0.0 -- there is overlap between layers only if #layerSpacing is negative. - * A value of 1.0 and a zero #layerSpacing will cause child nodes to completely overlap the parent. + * The default value is 0.0 -- there is overlap between layers only if #alternateLayerSpacing is negative. + * A value of 1.0 and a zero #alternateLayerSpacing will cause child nodes to completely overlap the parent. * * A value greater than zero may still cause overlap between layers, - * unless the value of #layerSpacing is large enough. + * unless the value of #alternateLayerSpacing is large enough. * A value of zero might still allow overlap between layers, - * if #layerSpacing is negative. + * if #alternateLayerSpacing is negative. * This sets the #alternateDefaults' property of the same name. */ get alternateLayerSpacingParentOverlap(): number; @@ -28740,10 +28776,10 @@ export class TreeLayout extends Layout { * does not modify the size or shape of any node, the nodes will * just be laid out in a line, one per row, and the breadth is * determined by the broadest node. - * The distance between rows is specified by #rowSpacing. + * The distance between rows is specified by #alternateRowSpacing. * To make room for the links that go around earlier rows to get to * later rows, when the alignment is not a "center" alignment, the - * #rowIndent property specifies that space at the + * #alternateRowIndent property specifies that space at the * start of each row. * This sets the #alternateDefaults' property of the same name. */ @@ -28756,7 +28792,7 @@ export class TreeLayout extends Layout { * * This property is only used when there is more than one * row of children for a given parent node. - * #layerSpacing determines the distance between + * The #alternateLayerSpacing property determines the distance between * the parent node and its first row of child nodes. * This sets the #alternateDefaults' property of the same name. */ @@ -28801,7 +28837,7 @@ export class TreeLayout extends Layout { * The default value is true -- this may modify the spot of the port of this node, the parent, * if the node has only a single port. * - * The spot used depends on the value of #portSpot. + * The spot used depends on the value of #alternatePortSpot. * This sets the #alternateDefaults' property of the same name. */ get alternateSetsPortSpot(): boolean; @@ -28827,7 +28863,7 @@ export class TreeLayout extends Layout { * The default value is true -- this may modify the spot of the ports of the children nodes, * if the node has only a single port. * - * The spot used depends on the value of #childPortSpot. + * The spot used depends on the value of #alternateChildPortSpot. * This sets the #alternateDefaults' property of the same name. */ get alternateSetsChildPortSpot(): boolean; diff --git a/release/go.js b/release/go.js index 234b37d9e..1831ca362 100644 --- a/release/go.js +++ b/release/go.js @@ -1,36 +1,36 @@ /* - * GoJS v2.2.14 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.2.15 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2022 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.14/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.15/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function aa(a){var b=0;return function(){return bc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);cc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c=a.length?a.push(c):a.splice(b,0,c):C("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)}function Da(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):C("Cannot remove an object from an HTMLCollection or NodeList at "+b)} function Ea(){var a=Fa.pop();return void 0===a?[]:a}function Ga(a){a.length=0;Fa.push(a)}function Ha(a){if("function"===typeof a){if(a.className)return a.className;if(a.name)return a.name;var b=a.toString();b=b.substring(9,b.indexOf("(")).trim();if(""!==b)return a._className=b}else if(ya(a)&&a.constructor)return Ha(a.constructor);return typeof a} function Ia(a){var b=a;ya(a)&&(a.text?b=a.text:a.name?b=a.name:void 0!==a.key?b=a.key:void 0!==a.id?b=a.id:a.constructor===Object&&(a.Text?b=a.Text:a.Name?b=a.Name:void 0!==a.Key?b=a.Key:void 0!==a.Id?b=a.Id:void 0!==a.ID&&(b=a.ID)));return void 0===b?"undefined":null===b?"null":b.toString()}function Ja(a,b){if(a.hasOwnProperty(b))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(b))return!0;var c=a.lA;if(c&&c[b])return!0;a=Object.getPrototypeOf(a)}return!1} function Ka(a,b,c){Object.defineProperty(La.prototype,a,{get:b,set:c})} function Ma(a){for(var b=[],c=0;256>c;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gthis.key)return!1;a=a.s;var b=a.length,c=++this.Wa,d=this.bf;if(null!==d)for(;cthis.key)return!1;a=a.s;var b=a.length,c=++this.Wa,d=this.cf;if(null!==d)for(;cthis.key)return!1;var b=--this.Wa;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.Xd();return!1};bb.prototype.ud=function(){return this.next()}; bb.prototype.first=function(){var a=this.xb;this.na=a.Ia;var b=a.s;this.Wa=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};bb.prototype.any=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)if(a(b[c]))return!0;return!1};bb.prototype.all=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)if(!a(b[c]))return!1;return!0}; bb.prototype.each=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)a(b[c]);return this};bb.prototype.map=function(a){var b=this.xb;b.yg=null;var c=[];b=b.s;var d=b.length;this.Wa=d;for(--d;0<=d;d--)c.push(a(b[d]));a=new E;a.s=c;a.sb();return a.iterator};bb.prototype.filter=function(a){var b=this.xb;b.yg=null;var c=[];b=b.s;var d=b.length;this.Wa=d;for(--d;0<=d;d--){var e=b[d];a(e)&&c.push(e)}a=new E;a.s=c;a.sb();return a.iterator}; @@ -47,17 +47,17 @@ t.reverse=function(){this._isFrozen&&va(this);this.s.reverse();this.sb();return ma.Object.defineProperties(E.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new ab(this)}},iteratorBackwards:{ get:function(){if(0>=this.s.length)return Za;var a=this.yg;return null!==a?(a.reset(),a):new bb(this)}}});E.prototype.reverse=E.prototype.reverse;E.prototype.sortRange=E.prototype.ri;E.prototype.sort=E.prototype.sort;E.prototype.toSet=E.prototype.lv;E.prototype.toArray=E.prototype.Ea;E.prototype.removeRange=E.prototype.removeRange;E.prototype.removeAt=E.prototype.mb;E.prototype["delete"]=E.prototype.delete;E.prototype.remove=E.prototype.remove;E.prototype.insertAt=E.prototype.Cb; E.prototype.pop=E.prototype.pop;E.prototype.last=E.prototype.fc;E.prototype.first=E.prototype.first;E.prototype.set=E.prototype.set;E.prototype.setElt=E.prototype.Vc;E.prototype.get=E.prototype.get;E.prototype.elt=E.prototype.K;E.prototype.indexOf=E.prototype.indexOf;E.prototype.has=E.prototype.has;E.prototype.contains=E.prototype.contains;E.prototype.clear=E.prototype.clear;E.prototype.addAll=E.prototype.addAll;E.prototype.push=E.prototype.push;E.prototype.add=E.prototype.add;E.prototype.thaw=E.prototype.ja; -E.prototype.freeze=E.prototype.freeze;E.className="List";function fb(a){this.Wf=a;a.Pa=null;this.na=a.Ia;this.ra=null}fb.prototype.reset=function(){var a=this.Wf;a.Pa=null;this.na=a.Ia;this.ra=null};fb.prototype.next=function(){var a=this.Wf;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=b.value,this.key=b.key,!0;this.Xd();return!1};fb.prototype.ud=function(){return this.next()}; -fb.prototype.first=function(){var a=this.Wf;this.na=a.Ia;a=a.ea;if(null!==a){this.ra=a;var b=a.value;this.key=a.key;return this.value=b}return null};fb.prototype.any=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};fb.prototype.all=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};fb.prototype.each=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this}; -fb.prototype.map=function(a){var b=this.Wf;b.Pa=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator};fb.prototype.filter=function(a){var b=this.Wf;b.Pa=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};fb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.Wf.Pa=this};fb.prototype.toString=function(){return null!==this.ra?"SetIterator@"+this.ra.value:"SetIterator"}; -ma.Object.defineProperties(fb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Wf.Ob}}});fb.prototype.first=fb.prototype.first;fb.prototype.hasNext=fb.prototype.ud;fb.prototype.next=fb.prototype.next;fb.prototype.reset=fb.prototype.reset;fb.className="SetIterator"; -function G(a){Ra(this);this._isFrozen=!1;this.Pb={};this.Ob=0;this.Pa=null;this.Ia=0;this.Xe=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=G.prototype;t.sb=function(){var a=this.Ia;a++;999999999=this.Ob)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new fb(this)}}});G.prototype.toList=G.prototype.kv;G.prototype.toArray=G.prototype.Ea; G.prototype.clear=G.prototype.clear;G.prototype.retainAll=G.prototype.Wz;G.prototype.removeAll=G.prototype.Ko;G.prototype["delete"]=G.prototype.delete;G.prototype.remove=G.prototype.remove;G.prototype.first=G.prototype.first;G.prototype.containsAny=G.prototype.Ay;G.prototype.containsAll=G.prototype.zy;G.prototype.has=G.prototype.has;G.prototype.contains=G.prototype.contains;G.prototype.addAll=G.prototype.addAll;G.prototype.add=G.prototype.add;G.prototype.thaw=G.prototype.ja;G.prototype.freeze=G.prototype.freeze; var kb=1;G.className="Set";G.uniqueHash=Ra;G.hashIdUnique=gb;G.hashId=cb;function lb(a){this.la=a;this.na=a.Ia;this.ra=null}lb.prototype.reset=function(){this.na=this.la.Ia;this.ra=null};lb.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=this.key=a=b.key,!0;this.Xd();return!1};lb.prototype.ud=function(){return this.next()}; @@ -68,72 +68,72 @@ t.toString=function(){return"MapKeySet("+this.la.toString()+")"};t.add=function( mb.prototype.any=function(a){for(var b=this.la.ea;null!==b;){if(a(b.key))return!0;b=b.ta}return!1};mb.prototype.all=function(a){for(var b=this.la.ea;null!==b;){if(!a(b.key))return!1;b=b.ta}return!0};mb.prototype.each=function(a){for(var b=this.la.ea;null!==b;)a(b.key),b=b.ta;return this};mb.prototype.map=function(a){for(var b=new G,c=this.la.ea;null!==c;)b.add(a(c.key)),c=c.ta;return b};mb.prototype.filter=function(a){for(var b=new G,c=this.la.ea;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.ta}return b}; mb.prototype.copy=function(){return new mb(this.la)};mb.prototype.lv=function(){var a=new G,b=this.la.Pb,c;for(c in b)a.add(b[c].key);return a};mb.prototype.Ea=function(){var a=this.la.Pb,b=Array(this.la.Ob),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};mb.prototype.kv=function(){var a=new E,b=this.la.Pb,c;for(c in b)a.add(b[c].key);return a}; ma.Object.defineProperties(mb.prototype,{count:{get:function(){return this.la.Ob}},size:{get:function(){return this.la.Ob}},iterator:{get:function(){return 0>=this.la.Ob?Za:new lb(this.la)}}});mb.prototype.toList=mb.prototype.kv;mb.prototype.toArray=mb.prototype.Ea;mb.prototype.toSet=mb.prototype.lv;mb.prototype.first=mb.prototype.first;mb.prototype.clear=mb.prototype.clear;mb.prototype["delete"]=mb.prototype.delete; -mb.prototype.remove=mb.prototype.remove;mb.prototype.has=mb.prototype.has;mb.prototype.contains=mb.prototype.contains;mb.prototype.add=mb.prototype.add;mb.prototype.thaw=mb.prototype.ja;mb.prototype.freeze=mb.prototype.freeze;mb.className="MapKeySet";function nb(a){this.la=a;a.We=null;this.na=a.Ia;this.ra=null}nb.prototype.reset=function(){var a=this.la;a.We=null;this.na=a.Ia;this.ra=null}; +mb.prototype.remove=mb.prototype.remove;mb.prototype.has=mb.prototype.has;mb.prototype.contains=mb.prototype.contains;mb.prototype.add=mb.prototype.add;mb.prototype.thaw=mb.prototype.ja;mb.prototype.freeze=mb.prototype.freeze;mb.className="MapKeySet";function nb(a){this.la=a;a.Xe=null;this.na=a.Ia;this.ra=null}nb.prototype.reset=function(){var a=this.la;a.Xe=null;this.na=a.Ia;this.ra=null}; nb.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=b.value,this.key=b.key,!0;this.Xd();return!1};nb.prototype.ud=function(){return this.next()};nb.prototype.first=function(){var a=this.la;this.na=a.Ia;a=a.ea;if(null!==a){this.ra=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -nb.prototype.any=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};nb.prototype.all=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};nb.prototype.each=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this};nb.prototype.map=function(a){var b=this.la;this.ra=b.We=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator}; -nb.prototype.filter=function(a){var b=this.la;this.ra=b.We=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};nb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.We=this};nb.prototype.toString=function(){return null!==this.ra?"MapValueSetIterator@"+this.ra.value:"MapValueSetIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}}); +nb.prototype.any=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};nb.prototype.all=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};nb.prototype.each=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this};nb.prototype.map=function(a){var b=this.la;this.ra=b.Xe=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator}; +nb.prototype.filter=function(a){var b=this.la;this.ra=b.Xe=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};nb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.Xe=this};nb.prototype.toString=function(){return null!==this.ra?"MapValueSetIterator@"+this.ra.value:"MapValueSetIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}}); nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.ud;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset;nb.className="MapValueSetIterator";function jb(a,b){this.key=a;this.value=b;this.al=this.ta=null}jb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};jb.className="KeyValuePair";function ob(a){this.la=a;a.Pa=null;this.na=a.Ia;this.ra=null}ob.prototype.reset=function(){var a=this.la;a.Pa=null;this.na=a.Ia;this.ra=null}; ob.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.key=b.key,this.value=b.value,!0;this.Xd();return!1};ob.prototype.ud=function(){return this.next()};ob.prototype.first=function(){var a=this.la;this.na=a.Ia;a=a.ea;return null!==a?(this.ra=a,this.key=a.key,this.value=a.value,a):null};ob.prototype.any=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(a(b))return!0;b=b.ta}return!1}; ob.prototype.all=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(!a(b))return!1;b=b.ta}return!0};ob.prototype.each=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;)a(b),b=b.ta;return this};ob.prototype.map=function(a){var b=this.la;this.ra=b.Pa=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b)),b=b.ta;return c.iterator};ob.prototype.filter=function(a){var b=this.la;this.ra=b.Pa=null;var c=new E;for(b=b.ea;null!==b;)a(b)&&c.add(b),b=b.ta;return c.iterator}; ob.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.Pa=this};ob.prototype.toString=function(){return null!==this.ra?"MapIterator@"+this.ra:"MapIterator"};ma.Object.defineProperties(ob.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}});ob.prototype.first=ob.prototype.first;ob.prototype.hasNext=ob.prototype.ud;ob.prototype.next=ob.prototype.next;ob.prototype.reset=ob.prototype.reset; -ob.className="MapIterator";function pb(a){Ra(this);this._isFrozen=!1;this.Pb={};this.Ob=0;this.We=this.Pa=null;this.Ia=0;this.Xe=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=pb.prototype;t.sb=function(){var a=this.Ia;a++;999999999=this.count)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new ob(this)}},iteratorKeys:{get:function(){return 0>=this.count?Za:new lb(this)}},iteratorValues:{get:function(){if(0>=this.count)return Za; -var a=this.We;return null!==a?(a.reset(),a):new nb(this)}}});pb.prototype.toKeySet=pb.prototype.Bf;pb.prototype.toArray=pb.prototype.Ea;pb.prototype.clear=pb.prototype.clear;pb.prototype["delete"]=pb.prototype.delete;pb.prototype.remove=pb.prototype.remove;pb.prototype.get=pb.prototype.get;pb.prototype.getValue=pb.prototype.I;pb.prototype.has=pb.prototype.has;pb.prototype.contains=pb.prototype.contains;pb.prototype.first=pb.prototype.first;pb.prototype.addAll=pb.prototype.addAll; +var a=this.Xe;return null!==a?(a.reset(),a):new nb(this)}}});pb.prototype.toKeySet=pb.prototype.Cf;pb.prototype.toArray=pb.prototype.Ea;pb.prototype.clear=pb.prototype.clear;pb.prototype["delete"]=pb.prototype.delete;pb.prototype.remove=pb.prototype.remove;pb.prototype.get=pb.prototype.get;pb.prototype.getValue=pb.prototype.I;pb.prototype.has=pb.prototype.has;pb.prototype.contains=pb.prototype.contains;pb.prototype.first=pb.prototype.first;pb.prototype.addAll=pb.prototype.addAll; pb.prototype.set=pb.prototype.set;pb.prototype.add=pb.prototype.add;pb.prototype.thaw=pb.prototype.ja;pb.prototype.freeze=pb.prototype.freeze;pb.className="Map";function I(a,b){void 0===a?this.y=this.x=0:"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):C("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var qb,rb,sb,tb,ub;I.prototype.assign=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.h=function(a,b){this.x=a;this.y=b;return this}; -I.prototype.jg=function(a,b){this.x=a;this.y=b;return this};I.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.copy=function(){var a=new I;a.x=this.x;a.y=this.y;return a};t=I.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; +I.prototype.kg=function(a,b){this.x=a;this.y=b;return this};I.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.copy=function(){var a=new I;a.x=this.x;a.y=this.y;return a};t=I.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function vb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new I(c,e)}return new I}function wb(a){return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.C=function(a){return a instanceof I?this.x===a.x&&this.y===a.y:!1}; -t.bi=function(a,b){return this.x===a&&this.y===b};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)};t.add=function(a){this.x+=a.x;this.y+=a.y;return this};t.ie=function(a){this.x-=a.x;this.y-=a.y;return this};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; -I.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.x=a*b-d*c;this.y=d*b+a*c;return this};t=I.prototype;t.scale=function(a,b){this.x*=a;this.y*=b;return this};t.qf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};t.td=function(a,b){a-=this.x;b-=this.y;return a*a+b*b}; +t.bi=function(a,b){return this.x===a&&this.y===b};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)};t.add=function(a){this.x+=a.x;this.y+=a.y;return this};t.je=function(a){this.x-=a.x;this.y-=a.y;return this};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; +I.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.x=a*b-d*c;this.y=d*b+a*c;return this};t=I.prototype;t.scale=function(a,b){this.x*=a;this.y*=b;return this};t.rf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};t.td=function(a,b){a-=this.x;b-=this.y;return a*a+b*b}; t.normalize=function(){var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}t.yy=function(a,b){return J.sl(a.x,a.y,b.x,b.y,this.x,this.y)}; t.Mz=function(a,b,c,d){J.fh(a,b,c,d,this.x,this.y,this);return this};t.Nz=function(a,b){J.fh(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};t.aA=function(a,b,c,d){J.so(this.x,this.y,a,b,c,d,this);return this};t.bA=function(a,b){J.so(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};t.oi=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};t.pi=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this}; t.transform=function(a){a.Fa(this);return this};function yb(a,b){b.Ld(a);return a}function zb(a,b,c,d,e,f){var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k}function Ab(a,b,c,d){a=c-a;b=d-b;return a*a+b*b}function Bb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d} t.v=function(){return isFinite(this.x)&&isFinite(this.y)};I.alloc=function(){var a=Cb.pop();return void 0===a?new I:a};I.allocAt=function(a,b){var c=Cb.pop();if(void 0===c)return new I(a,b);c.x=a;c.y=b;return c};I.free=function(a){Cb.push(a)};I.prototype.isReal=I.prototype.v;I.prototype.setSpot=I.prototype.pi;I.prototype.setRectSpot=I.prototype.oi;I.prototype.snapToGridPoint=I.prototype.bA;I.prototype.snapToGrid=I.prototype.aA;I.prototype.projectOntoLineSegmentPoint=I.prototype.Nz; -I.prototype.projectOntoLineSegment=I.prototype.Mz;I.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return J.zl(a,b,c,d,e,f,g,h)};I.prototype.compareWithLineSegmentPoint=I.prototype.yy;I.compareWithLineSegment=function(a,b,c,d,e,f){return J.sl(a,b,c,d,e,f)};I.prototype.direction=I.prototype.direction;I.prototype.directionPoint=I.prototype.Ya;I.prototype.normalize=I.prototype.normalize;I.prototype.distanceSquared=I.prototype.td;I.prototype.distanceSquaredPoint=I.prototype.qf;I.prototype.scale=I.prototype.scale; -I.prototype.rotate=I.prototype.rotate;I.prototype.offset=I.prototype.offset;I.prototype.subtract=I.prototype.ie;I.prototype.add=I.prototype.add;I.prototype.equalsApprox=I.prototype.$a;I.prototype.equalTo=I.prototype.bi;I.prototype.equals=I.prototype.C;I.prototype.set=I.prototype.set;I.prototype.setTo=I.prototype.jg;var Cb=[];I.className="Point";I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb;I.Origin=qb=(new I(0,0)).ha(); +I.prototype.projectOntoLineSegment=I.prototype.Mz;I.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return J.zl(a,b,c,d,e,f,g,h)};I.prototype.compareWithLineSegmentPoint=I.prototype.yy;I.compareWithLineSegment=function(a,b,c,d,e,f){return J.sl(a,b,c,d,e,f)};I.prototype.direction=I.prototype.direction;I.prototype.directionPoint=I.prototype.Ya;I.prototype.normalize=I.prototype.normalize;I.prototype.distanceSquared=I.prototype.td;I.prototype.distanceSquaredPoint=I.prototype.rf;I.prototype.scale=I.prototype.scale; +I.prototype.rotate=I.prototype.rotate;I.prototype.offset=I.prototype.offset;I.prototype.subtract=I.prototype.je;I.prototype.add=I.prototype.add;I.prototype.equalsApprox=I.prototype.$a;I.prototype.equalTo=I.prototype.bi;I.prototype.equals=I.prototype.C;I.prototype.set=I.prototype.set;I.prototype.setTo=I.prototype.kg;var Cb=[];I.className="Point";I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb;I.Origin=qb=(new I(0,0)).ha(); I.InfiniteTopLeft=rb=(new I(-Infinity,-Infinity)).ha();I.InfiniteBottomRight=sb=(new I(Infinity,Infinity)).ha();I.SixPoint=tb=(new I(6,6)).ha();I.NoPoint=ub=(new I(NaN,NaN)).ha();I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb; -function K(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):C("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Db,Hb,Ib,Jb,Kb,Lb,Mb;K.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.h=function(a,b){this.width=a;this.height=b;return this};K.prototype.jg=function(a,b){this.width=a;this.height=b;return this}; +function K(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):C("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Db,Eb,Ib,Jb,Kb,Lb,Mb;K.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.h=function(a,b){this.width=a;this.height=b;return this};K.prototype.kg=function(a,b){this.width=a;this.height=b;return this}; K.prototype.set=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.copy=function(){var a=new K;a.width=this.width;a.height=this.height;return a};t=K.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; function Nb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new K(c,e)}return new K}function Ob(a){return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.C=function(a){return a instanceof K?this.width===a.width&&this.height===a.height:!1};t.bi=function(a,b){return this.width===a&&this.height===b}; -t.$a=function(a){return J.B(this.width,a.width)&&J.B(this.height,a.height)};t.v=function(){return isFinite(this.width)&&isFinite(this.height)};K.alloc=function(){var a=Pb.pop();return void 0===a?new K:a};K.free=function(a){Pb.push(a)};K.prototype.isReal=K.prototype.v;K.prototype.equalsApprox=K.prototype.$a;K.prototype.equalTo=K.prototype.bi;K.prototype.equals=K.prototype.C;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.jg;var Pb=[];K.className="Size";K.parse=Nb;K.stringify=Ob; -K.ZeroSize=Db=(new K(0,0)).ha();K.OneSize=Hb=(new K(1,1)).ha();K.SixSize=Ib=(new K(6,6)).ha();K.EightSize=Jb=(new K(8,8)).ha();K.TenSize=Kb=(new K(10,10)).ha();K.InfiniteSize=Lb=(new K(Infinity,Infinity)).ha();K.NoSize=Mb=(new K(NaN,NaN)).ha();K.parse=Nb;K.stringify=Ob; +t.$a=function(a){return J.B(this.width,a.width)&&J.B(this.height,a.height)};t.vc=function(a,b){a=this.width+a;this.width=0<=a?a:0;b=this.height+b;this.height=0<=b?b:0;return this};t.v=function(){return isFinite(this.width)&&isFinite(this.height)};K.alloc=function(){var a=Pb.pop();return void 0===a?new K:a};K.free=function(a){Pb.push(a)};K.prototype.isReal=K.prototype.v;K.prototype.inflate=K.prototype.vc;K.prototype.equalsApprox=K.prototype.$a;K.prototype.equalTo=K.prototype.bi; +K.prototype.equals=K.prototype.C;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.kg;var Pb=[];K.className="Size";K.parse=Nb;K.stringify=Ob;K.ZeroSize=Db=(new K(0,0)).ha();K.OneSize=Eb=(new K(1,1)).ha();K.SixSize=Ib=(new K(6,6)).ha();K.EightSize=Jb=(new K(8,8)).ha();K.TenSize=Kb=(new K(10,10)).ha();K.InfiniteSize=Lb=(new K(Infinity,Infinity)).ha();K.NoSize=Mb=(new K(NaN,NaN)).ha();K.parse=Nb;K.stringify=Ob; function M(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c,this.height=d):a instanceof I?(c=a.x,a=a.y,b instanceof I?(d=b.x,b=b.y,this.x=Math.min(c,d),this.y=Math.min(a,b),this.width=Math.abs(c-d),this.height=Math.abs(a-b)):b instanceof K?(this.x=c,this.y=a,this.width=b.width,this.height=b.height):C("Incorrect second argument supplied to Rect constructor "+ -b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Qb(a,b,c){a.width=b;a.height=c}t.jg=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; +b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Qb(a,b,c){a.width=b;a.height=c}t.kg=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; t.Wc=function(a){this.x=a.x;this.y=a.y;return this};t.$z=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.copy=function(){var a=new M;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};t=M.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function Rb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new M(c,e,f,g)}return new M} function Sb(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.C=function(a){return a instanceof M?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};t.bi=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)&&J.B(this.width,a.width)&&J.B(this.height,a.height)}; -function Vb(a,b){return J.ca(a.x,b.x)&&J.ca(a.y,b.y)&&J.ca(a.width,b.width)&&J.ca(a.height,b.height)}t.ba=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.De=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height}; -t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.Qc=function(a,b){return Wb(this,b,a,b,a)};t.fo=function(a){return Wb(this,a.top,a.right,a.bottom,a.left)};t.jv=function(a){return Wb(this,-a.top,-a.right,-a.bottom,-a.left)};t.oz=function(a,b,c,d){return Wb(this,a,b,c,d)};function Wb(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.hx=function(a){return Xb(this,a.x,a.y,a.width,a.height)}; +function Tb(a,b){return J.ca(a.x,b.x)&&J.ca(a.y,b.y)&&J.ca(a.width,b.width)&&J.ca(a.height,b.height)}t.ba=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Ee=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height}; +t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.vc=function(a,b){return Ub(this,b,a,b,a)};t.fo=function(a){return Ub(this,a.top,a.right,a.bottom,a.left)};t.jv=function(a){return Ub(this,-a.top,-a.right,-a.bottom,-a.left)};t.oz=function(a,b,c,d){return Ub(this,a,b,c,d)};function Ub(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.ix=function(a){return Xb(this,a.x,a.y,a.width,a.height)}; t.Gu=function(a,b,c,d){return Xb(this,a,b,c,d)};function Xb(a,b,c,d,e){var f=Math.max(a.x,b),g=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=g;a.width=Math.max(0,b-f);a.height=Math.max(0,c-g);return a}t.Sc=function(a){return this.Hu(a.x,a.y,a.width,a.height)}; -t.Hu=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function Yb(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Le=function(a){return Zb(this,a.x,a.y,0,0)};t.Xc=function(a){return Zb(this,a.x,a.y,a.width,a.height)}; +t.Hu=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function Yb(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Me=function(a){return Zb(this,a.x,a.y,0,0)};t.Xc=function(a){return Zb(this,a.x,a.y,a.width,a.height)}; t.nv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Zb(this,a,b,c,d)};function Zb(a,b,c,d,e){var f=Math.min(a.x,b),g=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=g;a.width=b-f;a.height=c-g;return a}t.pi=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};function $b(a,b,c,d,e,f,g,h){void 0===g&&(g=0);void 0===h&&(h=0);return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} function ac(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.v=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.vz=function(){return 0===this.width&&0===this.height};M.alloc=function(){var a=bc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=bc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){bc.push(a)}; ma.Object.defineProperties(M.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{ get:function(){return new I(this.x,this.y)},set:function(a){this.x=a.x;this.y=a.y}},size:{get:function(){return new K(this.width,this.height)},set:function(a){this.width=a.width;this.height=a.height}},center:{get:function(){return new I(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2}, -set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});M.prototype.isEmpty=M.prototype.vz;M.prototype.isReal=M.prototype.v;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return J.ix(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.pi;M.prototype.union=M.prototype.nv;M.prototype.unionRect=M.prototype.Xc;M.prototype.unionPoint=M.prototype.Le;M.prototype.intersects=M.prototype.Hu; -M.prototype.intersectsRect=M.prototype.Sc;M.prototype.intersect=M.prototype.Gu;M.prototype.intersectRect=M.prototype.hx;M.prototype.grow=M.prototype.oz;M.prototype.subtractMargin=M.prototype.jv;M.prototype.addMargin=M.prototype.fo;M.prototype.inflate=M.prototype.Qc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains;M.prototype.containsRect=M.prototype.De;M.prototype.containsPoint=M.prototype.ba;M.prototype.equalsApprox=M.prototype.$a;M.prototype.equalTo=M.prototype.bi; -M.prototype.equals=M.prototype.C;M.prototype.setSize=M.prototype.$z;M.prototype.setPoint=M.prototype.Wc;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.jg;var cc=null,dc=null,bc=[];M.className="Rect";M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac;M.ZeroRect=cc=(new M(0,0,0,0)).ha();M.NoRect=dc=(new M(NaN,NaN,NaN,NaN)).ha();M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac; -function ic(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}ic.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; -ic.prototype.jg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};ic.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};ic.prototype.copy=function(){var a=new ic;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=ic.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; +set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});M.prototype.isEmpty=M.prototype.vz;M.prototype.isReal=M.prototype.v;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return J.jx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.pi;M.prototype.union=M.prototype.nv;M.prototype.unionRect=M.prototype.Xc;M.prototype.unionPoint=M.prototype.Me;M.prototype.intersects=M.prototype.Hu; +M.prototype.intersectsRect=M.prototype.Sc;M.prototype.intersect=M.prototype.Gu;M.prototype.intersectRect=M.prototype.ix;M.prototype.grow=M.prototype.oz;M.prototype.subtractMargin=M.prototype.jv;M.prototype.addMargin=M.prototype.fo;M.prototype.inflate=M.prototype.vc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains;M.prototype.containsRect=M.prototype.Ee;M.prototype.containsPoint=M.prototype.ba;M.prototype.equalsApprox=M.prototype.$a;M.prototype.equalTo=M.prototype.bi; +M.prototype.equals=M.prototype.C;M.prototype.setSize=M.prototype.$z;M.prototype.setPoint=M.prototype.Wc;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.kg;var cc=null,dc=null,bc=[];M.className="Rect";M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac;M.ZeroRect=cc=(new M(0,0,0,0)).ha();M.NoRect=dc=(new M(NaN,NaN,NaN,NaN)).ha();M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac; +function ec(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}ec.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; +ec.prototype.kg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};ec.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};ec.prototype.copy=function(){var a=new ec;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=ec.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; -function jc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new ic;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new ic(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new ic(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new ic(c,e):new ic(c,e,f,g)}return new ic} -function kc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.C=function(a){return a instanceof ic?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.bi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.$a=function(a){return J.B(this.top,a.top)&&J.B(this.right,a.right)&&J.B(this.bottom,a.bottom)&&J.B(this.left,a.left)};t.v=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};ic.alloc=function(){var a=pc.pop();return void 0===a?new ic:a};ic.free=function(a){pc.push(a)};ic.prototype.isReal=ic.prototype.v;ic.prototype.equalsApprox=ic.prototype.$a;ic.prototype.equalTo=ic.prototype.bi;ic.prototype.equals=ic.prototype.C;ic.prototype.set=ic.prototype.set; -ic.prototype.setTo=ic.prototype.jg;var qc=null,rc=null,pc=[];ic.className="Margin";ic.parse=jc;ic.stringify=kc;ic.ZeroMargin=qc=(new ic(0,0,0,0)).ha();ic.TwoMargin=rc=(new ic(2,2,2,2)).ha();ic.parse=jc;ic.stringify=kc;function N(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1} -var sc,tc,uc,vc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,dd,ed,fd,gd,hd;N.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};N.prototype.jg=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};N.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; +function jc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new ec;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new ec(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new ec(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new ec(c,e):new ec(c,e,f,g)}return new ec} +function kc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.C=function(a){return a instanceof ec?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.bi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; +t.$a=function(a){return J.B(this.top,a.top)&&J.B(this.right,a.right)&&J.B(this.bottom,a.bottom)&&J.B(this.left,a.left)};t.v=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};ec.alloc=function(){var a=pc.pop();return void 0===a?new ec:a};ec.free=function(a){pc.push(a)};ec.prototype.isReal=ec.prototype.v;ec.prototype.equalsApprox=ec.prototype.$a;ec.prototype.equalTo=ec.prototype.bi;ec.prototype.equals=ec.prototype.C;ec.prototype.set=ec.prototype.set; +ec.prototype.setTo=ec.prototype.kg;var qc=null,rc=null,pc=[];ec.className="Margin";ec.parse=jc;ec.stringify=kc;ec.ZeroMargin=qc=(new ec(0,0,0,0)).ha();ec.TwoMargin=rc=(new ec(2,2,2,2)).ha();ec.parse=jc;ec.stringify=kc;function N(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1} +var sc,tc,uc,vc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,dd,ed,fd,gd,hd;N.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};N.prototype.kg=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};N.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; N.prototype.copy=function(){var a=new N;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};t=N.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function id(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} function jd(a){if("string"===typeof a){a=a.trim();if("None"===a)return sc;if("TopLeft"===a)return tc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return uc;if("TopRight"===a)return vc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return xc;if("Center"===a)return yc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return zc;if("BottomLeft"===a)return Ac;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Bc;if("BottomRight"===a)return Cc;if("TopSide"===a)return Dc;if("LeftSide"=== a)return Ec;if("RightSide"===a)return Gc;if("BottomSide"===a)return Hc;if("TopBottomSides"===a)return Ic;if("LeftRightSides"===a)return Jc;if("TopLeftSides"===a)return Kc;if("TopRightSides"===a)return Lc;if("BottomLeftSides"===a)return Mc;if("BottomRightSides"===a)return Nc;if("NotTopSide"===a)return Oc;if("NotLeftSide"===a)return Pc;if("NotRightSide"===a)return Qc;if("NotBottomSide"===a)return Uc;if("AllSides"===a)return Vc;if("Default"===a)return Wc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=J.yv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);J.yv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=J.yv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);J.yv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Br:function(a,b,c,d,e,f,g,h,k,l,m,n){if(J.Tb(a,b,g,h,n,c,d)&&J.Tb(a,b,g,h,n,e,f))return J.Tb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var w=(d+q)/2,v=(c+u)/2;return J.Br(a, -b,p,r,d,c,w,v,k,l,m,n)||J.Br(w,v,q,u,e,f,g,h,k,l,m,n)},ty:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},sy:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Bb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},ql:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))Zb(l,a,b,0,0),Zb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ -2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.ql(a,b,m,n,d,c,q,u,k,l);J.ql(q,u,p,r,e,f,g,h,k,l)}return l},Ce:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.Ce(a,b,m,n,d,c,q,u,k,l);J.Ce(q,u,p,r,e,f,g,h,k,l)}return l},Tu:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,e,f,l,c,d))return J.Tb(a, +b,p,r,d,c,w,v,k,l,m,n)||J.Br(w,v,q,u,e,f,g,h,k,l,m,n)},Gw:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},ty:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Bb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},ql:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))Zb(l,a,b,0,0),Zb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ +2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.ql(a,b,m,n,d,c,q,u,k,l);J.ql(q,u,p,r,e,f,g,h,k,l)}return l},De:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.De(a,b,m,n,d,c,q,u,k,l);J.De(q,u,p,r,e,f,g,h,k,l)}return l},Tu:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,e,f,l,c,d))return J.Tb(a, b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2;return J.Tu(a,b,m,n,p,r,g,h,k,l)||J.Tu(p,r,c,d,e,f,g,h,k,l)},yA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},Su:function(a,b,c,d,e,f,g,h){if(J.Tb(a,b,e,f,g,c,d))Zb(h,a,b,0,0),Zb(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;J.Su(a,b,k,l,m,n,g,h);J.Su(m,n,c,d,e,f,g,h)}return h},Go:function(a,b,c,d,e,f,g,h){if(J.Tb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;J.Go(a,b,k,l,m,n,g,h);J.Go(m,n,c,d,e,f,g,h)}return h},io:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(J.Tb(a,b,g,h,p,c,d)&&J.Tb(a,b,g,h,p,e,f)){if(!J.zl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+w)/2;c=(u+v)/2;w=(w+e)/ 2;v=(v+f)/2;var z=(d+w)/2,y=(c+v)/2,A=Infinity,B=!1,F=0,L=0;J.io(a,b,q,u,d,c,z,y,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+w)/2;c=(u+v)/2;w=(w+e)/2;v=(v+f)/2;var z=(d+w)/2,y=(c+v)/2;r+=J.jo(a,b,q,u,d,c,z,y,k,l,m,n,p);r+=J.jo(z,y,w,v,e,f,g,h,k,l,m,n,p)}return r},fh:function(a,b,c,d,e,f,g){if(J.ca(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(J.ca(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, -b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(J.ca(h,g))return J.fh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(J.ca(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return J.fh(a,b,c,d,e,g*(e-a)+b,k)},wA:function(a,b,c,d,e){return J.Ie(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},uA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},vf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(J.Ie(a,b,a, -d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},tA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, -h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},Rr:function(a,b,c){return J.ix(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},ix:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):$b(a,b,c,d,e,f)||$b(a,b,c,d,g,h)||J.zl(a,b,k,b,e,f,g,h)||J.zl(k,b,k,l,e,f,g,h)||J.zl(k,l,a,l,e,f,g,h)||J.zl(a,l,a,b,e,f,g,h)?!0:!1},zl:function(a,b,c,d,e,f,g,h){return 0>=J.sl(a,b,c,d,e,f)*J.sl(a,b,c,d,g,h)&&0>=J.sl(e,f,g,h,a,b)*J.sl(e, -f,g,h,c,d)},sl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Eo:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Lw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5a)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, +b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(J.ca(h,g))return J.fh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(J.ca(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return J.fh(a,b,c,d,e,g*(e-a)+b,k)},wA:function(a,b,c,d,e){return J.Je(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},uA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},wf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(J.Je(a,b,a, +d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},tA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, +h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},Rr:function(a,b,c){return J.jx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},jx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):$b(a,b,c,d,e,f)||$b(a,b,c,d,g,h)||J.zl(a,b,k,b,e,f,g,h)||J.zl(k,b,k,l,e,f,g,h)||J.zl(k,l,a,l,e,f,g,h)||J.zl(a,l,a,b,e,f,g,h)?!0:!1},zl:function(a,b,c,d,e,f,g,h){return 0>=J.sl(a,b,c,d,e,f)*J.sl(a,b,c,d,g,h)&&0>=J.sl(e,f,g,h,a,b)*J.sl(e, +f,g,h,c,d)},sl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Eo:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Mw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fc,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case O.u:var b=new M(this.startX,this.startY,0,0);b.nv(this.endX,this.endY,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 O.F:b=new M(this.startX,this.startY,0,0);b.nv(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.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 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case O.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=y.x+b,c=y.y+c);a.h(b,c)}function f(){e(y);return y}function g(){e(z);return z}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?y:new I(2*y.x-z.x,2*y.y-z.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2"); a=a.replace(k,"$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(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;ag&&(g+=360),q.startAngle+=g);0>a&&(q.startAngle=180-q.startAngle,q.sweepAngle=-q.sweepAngle); 0>d&&(q.startAngle=-q.startAngle,q.sweepAngle=-q.sweepAngle);q.radiusX*=Math.sqrt(a*a+c*c);void 0!==q.radiusY&&(q.radiusY*=Math.sqrt(b*b+d*d));break;case Qd:g=q.endX;h=q.endY;q.endX=g*a+h*c+e;q.endY=g*b+h*d+f;if(0===q.radiusX||0===q.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),q.xAxisRotation+=g);0>a&&(q.xAxisRotation=180-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);0>d&&(q.xAxisRotation=-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);q.radiusX*=Math.sqrt(a*a+c*c); q.radiusY*=Math.sqrt(b*b+d*d);break;default:C("Unknown Segment type: "+q.type)}}}}this._isInvalidBounds=!0;return this}; -t.ba=function(a,b){void 0===b&&(b=0);var c=this.gd,d=this.hd,e=this.wc,f=this.xc;switch(this.type){case O.j:return J.Tb(c,d,e,f,b,a.x,a.y);case O.u:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ba(a);M.free(g);return a;case O.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case O.o:return Td(this,a,b,!0,!1);default:return!1}}; +t.ba=function(a,b){void 0===b&&(b=0);var c=this.gd,d=this.hd,e=this.xc,f=this.yc;switch(this.type){case O.j:return J.Tb(c,d,e,f,b,a.x,a.y);case O.u:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ba(a);M.free(g);return a;case O.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case O.m:return Td(this,a,b,!0,!1);default:return!1}}; function Td(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; -t.Xw=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; +t.Yw=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Cu=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Math.abs(e-c)?0<=a-h?90:270:1>Math.abs(a-h)?0<=e-c?0:180:180*Math.atan2(a-h,e-c)/Math.PI,b;g+=m}}return b}; -t.Yw=function(a){if(this.type===O.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=I.alloc();J.fh(b,c,d,e,f,a,h);a=h.x;f=h.y;I.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===O.u){g=this.startX;h=this.startY;var k=this.endX; +t.Zw=function(a){if(this.type===O.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=I.alloc();J.fh(b,c,d,e,f,a,h);a=h.x;f=h.y;I.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===O.u){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=I.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Ae=a,this.Oh=0,this.Ph=Math.max(d,0),this.Gg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ae=d,this.Oh=e,a===Md&&(f=Math.max(f,0)),this.Ph=f,"number"===typeof g?(a=== -Md&&(g=Math.max(g,0)),this.Gg=g):this.Gg=0);this.Ud=null}Yd.prototype.copy=function(){var a=new Yd;a.qa=this.qa;a.m=this.m&-2;a.wc=this.wc;a.xc=this.xc;a.Ae=this.Ae;a.Oh=this.Oh;a.Ph=this.Ph;a.Gg=this.Gg;return a};t=Yd.prototype; +function Yd(a,b,c,d,e,f,g,h){Ra(this);void 0===a&&(a=vd);this.qa=a;this.o=2;void 0!==b?this.xc=b:this.xc=0;void 0!==c?this.yc=c:this.yc=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===Qd?(a=f%360,0>a&&(a+=360),this.Be=a,this.Oh=0,this.Ph=Math.max(d,0),this.Gg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Be=d,this.Oh=e,a===Md&&(f=Math.max(f,0)),this.Ph=f,"number"===typeof g?(a=== +Md&&(g=Math.max(g,0)),this.Gg=g):this.Gg=0);this.Ud=null}Yd.prototype.copy=function(){var a=new Yd;a.qa=this.qa;a.o=this.o&-2;a.xc=this.xc;a.yc=this.yc;a.Be=this.Be;a.Oh=this.Oh;a.Ph=this.Ph;a.Gg=this.Gg;return a};t=Yd.prototype; t.$a=function(a){if(!(a instanceof Yd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Jd:case vd:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY);case Kd:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.point1X,a.point1X)&&J.B(this.point1Y,a.point1Y)&&J.B(this.point2X,a.point2X)&&J.B(this.point2Y,a.point2Y);case Ld:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.point1X,a.point1X)&&J.B(this.point1Y,a.point1Y);case Md:return J.B(this.startAngle, a.startAngle)&&J.B(this.sweepAngle,a.sweepAngle)&&J.B(this.centerX,a.centerX)&&J.B(this.centerY,a.centerY)&&J.B(this.radiusX,a.radiusX)&&J.B(this.radiusY,a.radiusY);case Qd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&J.B(this.xAxisRotation,a.xAxisRotation)&&J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.radiusX,a.radiusX)&&J.B(this.radiusY,a.radiusY);default:return!1}};t.ob=function(a){a.classType===Yd&&(this.type=a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Jd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case vd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Kd:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ld:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Md:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Qd:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function Rd(a,b){if(null!==a.Ud&&!1===b._isInvalidBounds)return a.Ud;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Ud=[],a.Ud;b=a.Ae;var e=a.Oh,f=J.Lw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=J.Lw(0,0,b>f?b:f,m,m+g,!0);f=md.alloc();f.reset();f.translate(c,d);f.rotate(a.Ae,0,0);f.scale(k,r);O.Ga(b,f); +function Rd(a,b){if(null!==a.Ud&&!1===b._isInvalidBounds)return a.Ud;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Ud=[],a.Ud;b=a.Be;var e=a.Oh,f=J.Mw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=J.Mw(0,0,b>f?b:f,m,m+g,!0);f=md.alloc();f.reset();f.translate(c,d);f.rotate(a.Be,0,0);f.scale(k,r);O.Ga(b,f); md.free(f);a.Ud=b;return a.Ud} -ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.m&1)},set:function(a){this.m=a?this.m|1:this.m&-2}},_isInvalidBounds:{get:function(){return 0!==(this.m&2)},set:function(a){this.m=a?this.m|2:this.m&-3}},isClosed:{get:function(){return 0!==(this.m&8)},set:function(a){this.isClosed!==a&&(this.m=a?this.m|8:this.m&-9,this._isInvalidBounds=!0)}},type:{ -get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.wc},set:function(a){this._isFrozen&&va(this,a);this.wc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);this.xc=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ae},set:function(a){this._isFrozen&& -va(this,a);this.Ae=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Ph},set:function(a){this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Gg},set:function(a){this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},centerX:{ -get:function(){return this.Ae},set:function(a){this._isFrozen&&va(this,a);this.Ae=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Ph},set:function(a){0>a&&wa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Gg}, -set:function(a){0>a&&wa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.wc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.wc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.xc=a;this._isInvalidBounds=!0}},isClockwiseArc:{ -get:function(){return 0!==(this.m&4)},set:function(a){this._isFrozen&&va(this,a);this.m=a?this.m|4:this.m&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.m&16)},set:function(a){this._isFrozen&&va(this,a);this.m=a?this.m|16:this.m&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ae},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Ae=a;this._isInvalidBounds= +ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.o&1)},set:function(a){this.o=a?this.o|1:this.o&-2}},_isInvalidBounds:{get:function(){return 0!==(this.o&2)},set:function(a){this.o=a?this.o|2:this.o&-3}},isClosed:{get:function(){return 0!==(this.o&8)},set:function(a){this.isClosed!==a&&(this.o=a?this.o|8:this.o&-9,this._isInvalidBounds=!0)}},type:{ +get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);this.xc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.yc},set:function(a){this._isFrozen&&va(this,a);this.yc=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Be},set:function(a){this._isFrozen&& +va(this,a);this.Be=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Ph},set:function(a){this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Gg},set:function(a){this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},centerX:{ +get:function(){return this.Be},set:function(a){this._isFrozen&&va(this,a);this.Be=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Ph},set:function(a){0>a&&wa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Gg}, +set:function(a){0>a&&wa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.xc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.yc},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.yc=a;this._isInvalidBounds=!0}},isClockwiseArc:{ +get:function(){return 0!==(this.o&4)},set:function(a){this._isFrozen&&va(this,a);this.o=a?this.o|4:this.o&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.o&16)},set:function(a){this._isFrozen&&va(this,a);this.o=a?this.o|16:this.o&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Be},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Be=a;this._isInvalidBounds= !0}}});Yd.prototype.equalsApprox=Yd.prototype.$a;var Jd=new D(Yd,"Move",0),vd=new D(Yd,"Line",1),Kd=new D(Yd,"Bezier",2),Ld=new D(Yd,"QuadraticBezier",3),Md=new D(Yd,"Arc",4),Qd=new D(Yd,"SvgArc",4);Yd.className="PathSegment";Yd.Move=Jd;Yd.Line=vd;Yd.Bezier=Kd;Yd.QuadraticBezier=Ld;Yd.Arc=Md;Yd.SvgArc=Qd; -function $d(){this.H=null;this.cu=(new I(0,0)).freeze();this.Os=(new I(0,0)).freeze();this.ep=this.qq=0;this.fp=1;this.yh="";this.vr=this.xp=!1;this.vp=this.hp=0;this.ng=this.Pp=this.Vp=!1;this.Cp=null;this.qr=0;this.sd=this.lr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; -$d.prototype.clone=function(a){a.H=this.H;a.cu.assign(this.viewPoint);a.Os.assign(this.documentPoint);a.qq=this.qq;a.ep=this.ep;a.fp=this.fp;a.yh=this.yh;a.xp=this.xp;a.vr=this.vr;a.hp=this.hp;a.vp=this.vp;a.Vp=this.Vp;a.Pp=this.Pp;a.ng=this.ng;a.Cp=this.Cp;a.qr=this.qr;a.lr=this.lr;a.sd=this.sd;return a}; +function $d(){this.H=null;this.cu=(new I(0,0)).freeze();this.Os=(new I(0,0)).freeze();this.ep=this.qq=0;this.fp=1;this.yh="";this.vr=this.xp=!1;this.vp=this.hp=0;this.og=this.Pp=this.Vp=!1;this.Cp=null;this.qr=0;this.sd=this.lr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; +$d.prototype.clone=function(a){a.H=this.H;a.cu.assign(this.viewPoint);a.Os.assign(this.documentPoint);a.qq=this.qq;a.ep=this.ep;a.fp=this.fp;a.yh=this.yh;a.xp=this.xp;a.vr=this.vr;a.hp=this.hp;a.vp=this.vp;a.Vp=this.Vp;a.Pp=this.Pp;a.og=this.og;a.Cp=this.Cp;a.qr=this.qr;a.lr=this.lr;a.sd=this.sd;return a}; $d.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};$d.prototype.vo=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,this.event,a,b);return b}; $d.prototype.iz=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,this.event,a,b);b.assign(c.rs(b));return b}; ma.Object.defineProperties($d.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.cu},set:function(a){this.cu.assign(a)}},documentPoint:{get:function(){return this.Os},set:function(a){this.Os.assign(a)}},modifiers:{get:function(){return this.qq},set:function(a){this.qq=a}},button:{get:function(){return this.ep}, set:function(a){this.ep=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.fp},set:function(a){this.fp=a}},key:{get:function(){return this.yh},set:function(a){this.yh=a}},down:{get:function(){return this.xp},set:function(a){this.xp=a}},up:{get:function(){return this.vr},set:function(a){this.vr= -a}},clickCount:{get:function(){return this.hp},set:function(a){this.hp=a}},delta:{get:function(){return this.vp},set:function(a){this.vp=a}},isMultiTouch:{get:function(){return this.Vp},set:function(a){this.Vp=a}},handled:{get:function(){return this.Pp},set:function(a){this.Pp=a}},bubbles:{get:function(){return this.ng},set:function(a){this.ng=a}},event:{ +a}},clickCount:{get:function(){return this.hp},set:function(a){this.hp=a}},delta:{get:function(){return this.vp},set:function(a){this.vp=a}},isMultiTouch:{get:function(){return this.Vp},set:function(a){this.Vp=a}},handled:{get:function(){return this.Pp},set:function(a){this.Pp=a}},bubbles:{get:function(){return this.og},set:function(a){this.og=a}},event:{ get:function(){return this.Cp},set:function(a){this.Cp=a}},isTouchEvent:{get:function(){var a=x.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=x.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{get:function(){return this.qr},set:function(a){this.qr=a}},targetDiagram:{get:function(){return this.lr},set:function(a){this.lr=a}},targetObject:{ get:function(){return this.sd},set:function(a){this.sd=a}},control:{get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers| 2:this.modifiers&-3}},meta:{get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get: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},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get: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},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get: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},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}); $d.prototype.getMultiTouchDocumentPoint=$d.prototype.iz;$d.prototype.getMultiTouchViewPoint=$d.prototype.vo;$d.className="InputEvent";function be(){this.H=null;this.va="";this.zq=this.hr=null}be.prototype.copy=function(){var a=new be;a.H=this.H;a.va=this.va;a.hr=this.hr;a.zq=this.zq;return a};be.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; ma.Object.defineProperties(be.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.va},set:function(a){this.va=a}},subject:{get:function(){return this.hr},set:function(a){this.hr=a}},parameter:{get:function(){return this.zq},set:function(a){this.zq=a}}});be.className="DiagramEvent"; -function ce(){this.nm=de;this.cf=this.pq="";this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}ce.prototype.clear=function(){this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}; -ce.prototype.copy=function(){var a=new ce;a.nm=this.nm;a.pq=this.pq;a.cf=this.cf;a.ac=this.ac;a.H=this.H;a.xn=this.xn;var b=this.zn;a.zn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.yn;a.yn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.tn;a.tn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.sn;a.sn=ya(b)&&"function"===typeof b.J?b.J():b;return a};ce.prototype.ob=function(a){a.classType===ce&&(this.change=a)}; +function ce(){this.nm=de;this.df=this.pq="";this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}ce.prototype.clear=function(){this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}; +ce.prototype.copy=function(){var a=new ce;a.nm=this.nm;a.pq=this.pq;a.df=this.df;a.ac=this.ac;a.H=this.H;a.xn=this.xn;var b=this.zn;a.zn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.yn;a.yn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.tn;a.tn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.sn;a.sn=ya(b)&&"function"===typeof b.J?b.J():b;return a};ce.prototype.ob=function(a){a.classType===ce&&(this.change=a)}; ce.prototype.toString=function(){var a="";a=this.change===ee?a+"* ":this.change===de?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===ee?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ia(this.object)),null!==this.oldValue&&(a+=" old: "+Ia(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ia(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};ce.prototype.I=function(a){return a?this.oldValue:this.newValue};ce.prototype.kz=function(a){return a?this.oldParam:this.newParam};ce.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; ce.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};ce.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};ce.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -ma.Object.defineProperties(ce.prototype,{model:{get:function(){return this.ac},set:function(a){this.ac=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.nm},set:function(a){this.nm=a}},modelChange:{get:function(){return this.pq},set:function(a){this.pq=a}},propertyName:{get:function(){return this.cf}, -set:function(a){this.cf=a}},isTransactionFinished:{get:function(){return this.nm===ee&&("CommittedTransaction"===this.cf||"FinishedUndo"===this.cf||"FinishedRedo"===this.cf)}},object:{get:function(){return this.xn},set:function(a){this.xn=a}},oldValue:{get:function(){return this.zn},set:function(a){this.zn=a}},oldParam:{get:function(){return this.yn},set:function(a){this.yn=a}}, +ma.Object.defineProperties(ce.prototype,{model:{get:function(){return this.ac},set:function(a){this.ac=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.nm},set:function(a){this.nm=a}},modelChange:{get:function(){return this.pq},set:function(a){this.pq=a}},propertyName:{get:function(){return this.df}, +set:function(a){this.df=a}},isTransactionFinished:{get:function(){return this.nm===ee&&("CommittedTransaction"===this.df||"FinishedUndo"===this.df||"FinishedRedo"===this.df)}},object:{get:function(){return this.xn},set:function(a){this.xn=a}},oldValue:{get:function(){return this.zn},set:function(a){this.zn=a}},oldParam:{get:function(){return this.yn},set:function(a){this.yn=a}}, newValue:{get:function(){return this.tn},set:function(a){this.tn=a}},newParam:{get:function(){return this.sn},set:function(a){this.sn=a}}});ce.prototype.redo=ce.prototype.redo;ce.prototype.canRedo=ce.prototype.canRedo;ce.prototype.undo=ce.prototype.undo;ce.prototype.canUndo=ce.prototype.canUndo;ce.prototype.getParam=ce.prototype.kz;ce.prototype.getValue=ce.prototype.I;ce.prototype.clear=ce.prototype.clear; -var ee=new D(ce,"Transaction",-1),de=new D(ce,"Property",0),fe=new D(ce,"Insert",1),ge=new D(ce,"Remove",2);ce.className="ChangedEvent";ce.Transaction=ee;ce.Property=de;ce.Insert=fe;ce.Remove=ge;function he(){this.o=(new E).freeze();this.va="";this.j=!1}he.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.Vc(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.va},set:function(a){this.va=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.Vj;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; -he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.ut=new G;this.Ad=!1;this.u=(new E).freeze();this.re=-1;this.o=999;this.te=!1;this.qp=null;this.Vh=0;this.j=!1;this.we=(new E).freeze();this.Wk=new E;this.Ws=!0;this.ft=this.Tp=this.it=this.ht=!1} +ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.m}},name:{get:function(){return this.va},set:function(a){this.va=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.Vj;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; +he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.ut=new G;this.Ad=!1;this.u=(new E).freeze();this.se=-1;this.m=999;this.ue=!1;this.qp=null;this.Vh=0;this.j=!1;this.xe=(new E).freeze();this.Wk=new E;this.Ws=!0;this.ft=this.Tp=this.it=this.ht=!1} ie.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Kb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.K(d),null!==f&&f.clear(),b.mb(d),a.Tp=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.K(0),null!==f&&f.clear(),b.mb(0),a.re--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.re++);b.freeze()}a.isInternalTransaction||a.Kb("CommittedTransaction",c,e)}else{a.te=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| -a.Kb("RolledBackTransaction",c,e),a.te=!1}null!==e&&e.clear()}a.qp=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.K(e),null!==b&&b.undo(),c.ja(),c.mb(e);c.freeze()}return!1}ie.prototype.canUndo=function(){if(!this.isEnabled||0a.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Kb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.K(d),null!==f&&f.clear(),b.mb(d),a.Tp=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.K(0),null!==f&&f.clear(),b.mb(0),a.se--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.se++);b.freeze()}a.isInternalTransaction||a.Kb("CommittedTransaction",c,e)}else{a.ue=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| +a.Kb("RolledBackTransaction",c,e),a.ue=!1}null!==e&&e.clear()}a.qp=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.K(e),null!==b&&b.undo(),c.ja(),c.mb(e);c.freeze()}return!1}ie.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.Ws&&(a=a.diagram,null!==a&&!1===a.ji||xa("Change not within a transaction: "+c.toString()))}}; ie.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; ma.Object.defineProperties(ie.prototype,{models:{get:function(){return this.ut.iterator}},isEnabled:{get:function(){return this.Ad},set:function(a){this.Ad=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.K(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; ma.Object.defineProperties(ke.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.va},set:function(a){this.va=a}},isEnabled:{get:function(){return this.Ad},set:function(a){this.Ad=a}},isActive:{get:function(){return this.hb},set:function(a){this.hb=a}},transactionResult:{get:function(){return this.xi}, -set:function(a){this.xi=a}}});ke.prototype.startTransaction=ke.prototype.Da;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.cb=new E;this.nb=new E;this.Db=new E;this.F=this.Y=850;this.o=(new K(2,2)).ha();this.Ga=5E3;this.ga=te;this.u=ve;this.pp=this.j=null;this.uj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; +set:function(a){this.xi=a}}});ke.prototype.startTransaction=ke.prototype.Da;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.cb=new E;this.nb=new E;this.Db=new E;this.F=this.W=850;this.m=(new K(2,2)).ha();this.Ga=5E3;this.ga=te;this.u=ve;this.pp=this.j=null;this.uj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof ue&&this.pp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===we&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===xe){b.bubbles=!0;return}if(this.gestureBehavior===we)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Be;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=tf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=tf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.sx&&d.P("LinkRelinked",c,d.sx),c.toPort!==d.tx&&d.P("LinkRelinked",c,d.tx)):uf(e,g,f,k,h):uf(e,null,null,null,null)}}}}Be.prototype.doDragOver=function(){}; +function Ze(a,b,c){var d=!1,e=a.tg.length,f=0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ce;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=tf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=tf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.tx&&d.P("LinkRelinked",c,d.tx),c.toPort!==d.ux&&d.P("LinkRelinked",c,d.ux)):uf(e,g,f,k,h):uf(e,null,null,null,null)}}}}Be.prototype.doDragOver=function(){}; function vf(a,b){var c=a.diagram;a.dragsLink&&pf(a,!0);Ue(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;wf(a,e,f);f=sf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Ee){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Ee){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof V&&xf(c,d,a);M.free(a)}}}function wf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof qf||(c=a.mouseDrop,null!==c&&c(b))}function xf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.De(c)&&(d=!0);a=a.zu(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Md(b)&&c.isAvoiding&&c.ab()} +c.selection.iterator;b.next();)d=b.value,d instanceof V&&xf(c,d,a);M.free(a)}}}function wf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof qf||(c=a.mouseDrop,null!==c&&c(b))}function xf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Ee(c)&&(d=!0);a=a.zu(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Md(b)&&c.isAvoiding&&c.ab()} Be.prototype.doDropOnto=function(){};Be.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(bf(this,!1),He(a,this.copiedParts),df(this,this.copiedParts,!1),Ve(a,this.copiedParts)):this.mayMove()?(Xe(this),df(this,this.draggedParts,!0)):this.mayDragOut()?(bf(this,!1),df(this,this.copiedParts,!1)):Xe(this),ff(this,a.lastInput.documentPoint))}}; Be.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(Xe(this),bf(this,!0),He(a,this.copiedParts),df(this,this.copiedParts,!1),Ve(a,this.copiedParts),null!==this.copiedParts&&(a.P("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,Xe(this),this.mayMove()&&(df(this,this.draggedParts, -!0),ff(this,a.lastInput.documentPoint)));this.Gm=!0;vf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Bf():this.draggedParts.Bf();this.copiedParts=null;b&&yf(this);a.Va();Ve(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.P(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.P("ChangedSelection",a.selection)}}}; -Be.prototype.simulatedMouseMove=function(a,b,c){if(null===Ee)return!1;var d=Ee.diagram;c instanceof Q||(c=null);var e=Ie;c!==e&&(null!==e&&e!==d&&(e.kg(),Ee.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ie=c,null!==c&&c!==d&&($e(),e=c.toolManager.findTool("Dragging"),null!==e&&(De.contains(e)||De.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +!0),ff(this,a.lastInput.documentPoint)));this.Gm=!0;vf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Cf():this.draggedParts.Cf();this.copiedParts=null;b&&yf(this);a.Va();Ve(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.P(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.P("ChangedSelection",a.selection)}}}; +Be.prototype.simulatedMouseMove=function(a,b,c){if(null===Ee)return!1;var d=Ee.diagram;c instanceof Q||(c=null);var e=Ie;c!==e&&(null!==e&&e!==d&&(e.lg(),Ee.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ie=c,null!==c&&c!==d&&($e(),e=c.toolManager.findTool("Dragging"),null!==e&&(De.contains(e)||De.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;M.free(f); -f=a.br;g=new pb;h=I.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,cf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Fd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Za(),g.add(k,a.Fd(h))));I.free(h);a.copiedParts=g;Fe(a,g.Bf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,cf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ +f=a.br;g=new pb;h=I.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,cf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Fd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Za(),g.add(k,a.Fd(h))));I.free(h);a.copiedParts=g;Fe(a,g.Cf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,cf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ 2)));a.doUpdateCursor(null,!0)}}}Be.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.os=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.hn=null};Be.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new I}; ma.Object.defineProperties(Be.prototype,{isCopyEnabled:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ga},set:function(a){this.ga=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= a}},isComplexRoutingRealtime:{get:function(){return this.cb},set:function(a){this.cb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.C(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{ get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.C(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.C(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink= -a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Gc},set:function(a){this.Gc=a}},nodropCursor:{get:function(){return this.Hc},set:function(a){this.Hc=a}},currentPart:{get:function(){return this.Y}, -set:function(a){this.Y=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ga},set:function(a){this.Ga=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Bf():null!==this.draggedParts?this.draggedParts.Bf():this.ke}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= +a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Hc},set:function(a){this.Hc=a}},nodropCursor:{get:function(){return this.Ic},set:function(a){this.Ic=a}},currentPart:{get:function(){return this.W}, +set:function(a){this.W=a}},copiedParts:{get:function(){return this.m},set:function(a){this.m=a}},draggedParts:{get:function(){return this.Ga},set:function(a){this.Ga=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Cf():null!==this.draggedParts?this.draggedParts.Cf():this.le}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= a}},isDragOutStarted:{get:function(){return this.Db},set:function(a){this.Db=a}},startPoint:{get:function(){return this.br},set:function(a){this.br.C(a)||this.br.assign(a)}},delay:{get:function(){return this.wk},set:function(a){this.wk=a}}});Be.prototype.getDraggingSource=Be.prototype.hz;var Ee=null,Ie=null;Be.className="DraggingTool";De=new E; Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==Ee&&Ee.doCancel();ke.prototype.doCancel.call(this)}; -function Bf(){ke.call(this);this.ke=100;this.Ga=!1;this.u="pointer";var a=new T,b=new Cf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Cf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.vi=a;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Hb;a.add(b);a.selectable=!1;a.layerName="Tool";this.ui=a;this.j=b;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= -2;b.desiredSize=Hb;a.add(b);a.selectable=!1;a.layerName="Tool";this.wi=a;this.o=b;this.Hc=this.Gc=this.nb=this.cb=this.Db=null;this.ga=!0;this.Wo=new pb;this.Ef=this.bj=this.Ff=null}la(Bf,ke);Bf.prototype.doStop=function(){this.diagram.kg();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; -Bf.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.tf(),g=K.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;K.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=yc;f=I.alloc();c.location=b.ia(yc,f);I.free(f);d.angle=b.fi();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; -Bf.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Hb,b.fromSpot=sc,b.toSpot=sc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Bf.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; +function Bf(){ke.call(this);this.le=100;this.Ga=!1;this.u="pointer";var a=new T,b=new Cf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Cf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.vi=a;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Eb;a.add(b);a.selectable=!1;a.layerName="Tool";this.ui=a;this.j=b;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= +2;b.desiredSize=Eb;a.add(b);a.selectable=!1;a.layerName="Tool";this.wi=a;this.m=b;this.Ic=this.Hc=this.nb=this.cb=this.Db=null;this.ga=!0;this.Wo=new pb;this.Ff=this.bj=this.Gf=null}la(Bf,ke);Bf.prototype.doStop=function(){this.diagram.lg();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; +Bf.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.uf(),g=K.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;K.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=yc;f=I.alloc();c.location=b.ia(yc,f);I.free(f);d.angle=b.fi();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; +Bf.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Eb,b.fromSpot=sc,b.toSpot=sc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Bf.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; Bf.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;this.targetPort=this.findTargetPort(this.isForwards);if(null!==this.targetPort&&this.targetPort.part instanceof V){var b=this.targetPort.part;this.isForwards?this.copyPortProperties(b,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(b,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort, !0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.Fr(a.lastInput.viewPoint)}};Bf.prototype.findValidLinkablePort=function(a,b){if(null===a)return null;var c=a.part;if(!(c instanceof V))return null;for(;null!==a;){var d=b?a.toLinkable:a.fromLinkable;if(!0===d&&(null!==a.portId||a instanceof V)&&(b?this.isValidTo(c,a):this.isValidFrom(c,a)))return a;if(!1===d)break;a=a.panel}return null}; -Bf.prototype.findTargetPort=function(a){var b=this.diagram,c=b.lastInput.documentPoint,d=this.portGravity;0>=d&&(d=.1);var e=this,f=b.gg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.ia(yc,I.alloc()),l=c.x-k.x,m=c.y-k.y;I.free(k);k=l*l+m*m;k=d&&(d=.1);var e=this,f=b.hg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.ia(yc,I.alloc()),l=c.x-k.x,m=c.y-k.y;I.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.ro(b).count>=c)return!1}return!0}; Bf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Kd(b).count>=c)return!1}return!0}; @@ -385,11 +385,11 @@ function Df(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLab Bf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Ef){if(d===Ff){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Gf(this,a,b,c,!0)}if(d===Hf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== a)return!1;return!Gf(this,a,b,c,!0)}if(d===If)return a===b?a=!0:(d=new G,d.add(b),a=Jf(this,d,a,b,c)),!a;if(d===Kf)return!Gf(this,a,b,c,!1);if(d===Lf)return a===b?a=!0:(d=new G,d.add(b),a=Tf(this,d,a,b,c)),!a}return!0};function Gf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Gf(a,g,c,d,e)))return!0}return!1} function Jf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Jf(a,b,g,d,e)))return!0}return!1}function Tf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Tf(a,b,h,d,e))return!0}}return!1} -ma.Object.defineProperties(Bf.prototype,{portGravity:{get:function(){return this.ke},set:function(a){0<=a&&(this.ke=a)}},isUnconnectedLinkValid:{get:function(){return this.Ga},set:function(a){this.Ga=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.vi},set:function(a){this.vi=a}},temporaryFromNode:{ -get:function(){return this.ui},set:function(a){if(this.ui=a)this.j=a.port}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.R.indexOf(this.j);b.mb(c);b.Cb(c,a)}}this.j=a}},temporaryToNode:{get:function(){return this.wi},set:function(a){if(this.wi=a)this.o=a.port}},temporaryToPort:{get:function(){return this.o},set:function(a){if(null!== -this.o){var b=this.o.panel;if(null!==b){var c=b.R.indexOf(this.o);b.mb(c);b.Cb(c,a)}}this.o=a}},originalLink:{get:function(){return this.Db},set:function(a){this.Db=a}},originalFromNode:{get:function(){return this.cb},set:function(a){this.cb=a}},originalFromPort:{get:function(){return this.nb},set:function(a){this.nb=a}},originalToNode:{get:function(){return this.Gc},set:function(a){this.Gc= -a}},originalToPort:{get:function(){return this.Hc},set:function(a){this.Hc=a}},isForwards:{get:function(){return this.ga},set:function(a){this.ga=a}},validPortsCache:{get:function(){return this.Wo}},targetPort:{get:function(){return this.Ff},set:function(a){this.Ff=a}},linkValidation:{get:function(){return this.bj},set:function(a){this.bj=a}},portTargeted:{ -get:function(){return this.Ef},set:function(a){this.Ef=a}}});Bf.className="LinkingBaseTool";function Uf(){Bf.call(this);this.name="Linking";this.Y={};this.F=null;this.L=Vf;this.Qd=null}la(Uf,Bf);Uf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Vr()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; +ma.Object.defineProperties(Bf.prototype,{portGravity:{get:function(){return this.le},set:function(a){0<=a&&(this.le=a)}},isUnconnectedLinkValid:{get:function(){return this.Ga},set:function(a){this.Ga=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.vi},set:function(a){this.vi=a}},temporaryFromNode:{ +get:function(){return this.ui},set:function(a){if(this.ui=a)this.j=a.port}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.R.indexOf(this.j);b.mb(c);b.Cb(c,a)}}this.j=a}},temporaryToNode:{get:function(){return this.wi},set:function(a){if(this.wi=a)this.m=a.port}},temporaryToPort:{get:function(){return this.m},set:function(a){if(null!== +this.m){var b=this.m.panel;if(null!==b){var c=b.R.indexOf(this.m);b.mb(c);b.Cb(c,a)}}this.m=a}},originalLink:{get:function(){return this.Db},set:function(a){this.Db=a}},originalFromNode:{get:function(){return this.cb},set:function(a){this.cb=a}},originalFromPort:{get:function(){return this.nb},set:function(a){this.nb=a}},originalToNode:{get:function(){return this.Hc},set:function(a){this.Hc= +a}},originalToPort:{get:function(){return this.Ic},set:function(a){this.Ic=a}},isForwards:{get:function(){return this.ga},set:function(a){this.ga=a}},validPortsCache:{get:function(){return this.Wo}},targetPort:{get:function(){return this.Gf},set:function(a){this.Gf=a}},linkValidation:{get:function(){return this.bj},set:function(a){this.bj=a}},portTargeted:{ +get:function(){return this.Ff},set:function(a){this.Ff=a}}});Bf.className="LinkingBaseTool";function Uf(){Bf.call(this);this.name="Linking";this.W={};this.F=null;this.L=Vf;this.Qd=null}la(Uf,Bf);Uf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Vr()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; Uf.prototype.findLinkablePort=function(){var a=this.diagram,b=this.startObject;null===b&&(b=a.ec(a.firstInput.documentPoint,null,null));if(null===b)return null;a=b.part;if(!(a instanceof V))return null;var c=this.direction;if(c===Vf||c===Wf){var d=this.findValidLinkablePort(b,!1);if(null!==d||this.startObject===a&&(d=a.port,this.findValidLinkablePort(d,!1)))return this.isForwards=!0,d}if(c===Vf||c===Xf)if(b=this.findValidLinkablePort(b,!0),null!==b||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b, !0)))return this.isForwards=!1,b;return null}; Uf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.Da(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.v()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof V&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, @@ -400,11 +400,11 @@ Uf.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=this.tr (b=this.originalFromNode,c=this.originalFromPort):null!==this.originalToNode&&this.isUnconnectedLinkValid&&(d=this.originalToNode,e=this.originalToPort);null!==b||null!==d?(f=this.insertLink(b,c,d,e),null!==f?(null===g&&(this.isForwards?f.defaultToPoint=a.lastInput.documentPoint:f.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.P("ChangingSelection",a.selection),a.clearSelection(!0),f.isSelected=!0),this.transactionResult=this.name,a.P("LinkDrawn",f)):this.doNoLink(b,c,d,e)):this.isForwards? this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),f&&a.allowSelect&&a.P("ChangedSelection",a.selection)}}};Uf.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(null===a)return!0;if(a instanceof T)return a.isTreeLink;var b=this.diagram;if(null===b)return!0;a=b.partManager.getLinkCategoryForData(a);b=b.partManager.findLinkTemplateForCategory(a);return null!==b?b.isTreeLink:!0}; Uf.prototype.insertLink=function(a,b,c,d){return this.diagram.partManager.insertLink(a,b,c,d)};Uf.prototype.doNoLink=function(){}; -ma.Object.defineProperties(Uf.prototype,{archetypeLinkData:{get:function(){return this.Y},set:function(a){this.Y=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.L},set:function(a){this.L=a}},startObject:{get:function(){return this.Qd},set:function(a){this.Qd=a}}}); +ma.Object.defineProperties(Uf.prototype,{archetypeLinkData:{get:function(){return this.W},set:function(a){this.W=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.L},set:function(a){this.L=a}},startObject:{get:function(){return this.Qd},set:function(a){this.Qd=a}}}); var Vf=new D(Uf,"Either",0),Wf=new D(Uf,"ForwardsOnly",0),Xf=new D(Uf,"BackwardsOnly",0);Uf.className="LinkingTool";Uf.Either=Vf;Uf.ForwardsOnly=Wf;Uf.BackwardsOnly=Xf; -function Se(){Bf.call(this);this.name="Relinking";var a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.Y=a;a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Qd=a;this.F=null;this.iw=new M}la(Se,Bf); -Se.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.yf()&&(c=a.Hj(b),null===c&&(c=this.makeAdornment(d,!1),a.Tg(b,c)))}null===c&&a.zf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.yf()&& -(c=a.Hj(b),null===c?(c=this.makeAdornment(d,!0),a.Tg(b,c)):c.w()));null===c&&a.zf(b)}};Se.prototype.makeAdornment=function(a,b){var c=new ue;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +function Se(){Bf.call(this);this.name="Relinking";var a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.W=a;a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Qd=a;this.F=null;this.iw=new M}la(Se,Bf); +Se.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.zf()&&(c=a.Hj(b),null===c&&(c=this.makeAdornment(d,!1),a.Tg(b,c)))}null===c&&a.Af(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.zf()&& +(c=a.Hj(b),null===c?(c=this.makeAdornment(d,!0),a.Tg(b,c)):c.w()));null===c&&a.Af(b)}};Se.prototype.makeAdornment=function(a,b){var c=new ue;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; Se.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.Vr()||!a.lastInput.left)return!1;var b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"));return null!==b}; Se.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof ue&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Da(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; this.originalFromPort=this.originalLink.fromPort;this.originalFromNode=this.originalLink.fromNode;this.originalToPort=this.originalLink.toPort;this.originalToNode=this.originalLink.toNode;this.iw.set(this.originalLink.actualBounds);null!==this.originalLink&&0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": +hg.prototype.updateResizeHandles=function(a,b){if(null!==a)if(!a.alignment.Sb()&&("pointer"===a.cursor||0=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};hg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -hg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.vc(),this.Da(this.name),this.wq.set(this.adornedObject.ia(this.handle.alignment.Qu())),this.An.set(this.adornedObject.part.location),this.hw.set(this.adornedObject.desiredSize),this.Ss=this.computeCellSize(),this.Us= -this.computeMinSize(),this.Ts=this.computeMaxSize(),this.isActive=!0))};hg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.le=this.handle=null;this.isActive=a.isMouseCaptured=!1};hg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b}; +hg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.wc(),this.Da(this.name),this.wq.set(this.adornedObject.ia(this.handle.alignment.Qu())),this.An.set(this.adornedObject.part.location),this.hw.set(this.adornedObject.desiredSize),this.Ss=this.computeCellSize(),this.Us= +this.computeMinSize(),this.Ts=this.computeMaxSize(),this.isActive=!0))};hg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.me=this.handle=null;this.isActive=a.isMouseCaptured=!1};hg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b}; hg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};hg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Us,c=this.Ts,d=this.Ss,e=this.adornedObject.Nr(a.lastInput.documentPoint,I.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.nd();I.free(e)}}; hg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Us,c=this.Ts,d=this.Ss,e=this.adornedObject.Nr(a.lastInput.documentPoint,I.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);I.free(e);a.Va();this.transactionResult=this.name;a.P("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -hg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Za();c=c.ia(this.handle.alignment.Qu());if(a instanceof qf){var d=new E;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ce;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ie(c),!0,e)}else a.location=a.location.copy().ie(c).add(this.oppositePoint);b.nd()}}; -hg.prototype.computeResize=function(a,b,c,d,e,f){b.Ec()&&(b=yc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=I.alloc();J.so(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* +hg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Za();c=c.ia(this.handle.alignment.Qu());if(a instanceof qf){var d=new E;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ce;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().je(c),!0,e)}else a.location=a.location.copy().je(c).add(this.oppositePoint);b.nd()}}; +hg.prototype.computeResize=function(a,b,c,d,e,f){b.Fc()&&(b=yc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=I.alloc();J.so(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), a.y=m-a.height)):1<=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width))):(a.width=Math.max(Math.min(p.x-h,d.width),c.width),f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):0>=b.y?(a.y=Math.max(p.y,m-d.height), @@ -456,43 +456,43 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig hg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};hg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ -d,b.y=-d);return a.ia(b)};og.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.le=this.handle=null;this.Jq=new I(NaN,NaN);this.isActive=a.isMouseCaptured=!1};og.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b};og.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.ia(b)};og.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.me=this.handle=null;this.Jq=new I(NaN,NaN);this.isActive=a.isMouseCaptured=!1};og.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b};og.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; og.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};og.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Va();this.transactionResult=this.name;a.P("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; -og.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Za();var c=b.locationObject,d=b.rotateObject;if(c===d||c.ig(d))c=this.An.copy(),b.location=c.ie(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.nd()}}; +og.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Za();var c=b.locationObject,d=b.rotateObject;if(c===d||c.jg(d))c=this.An.copy(),b.location=c.je(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.nd()}}; og.prototype.computeRotate=function(a){a=this.rotationPoint.Ya(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.fi());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -ma.Object.defineProperties(og.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof ue))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.le},set:function(a){if(null!==a&&a.part instanceof ue)throw Error("new handle must not be in an Adornment: "+ -a);this.le=a}},snapAngleMultiple:{get:function(){return this.ga},set:function(a){this.ga=a}},snapAngleEpsilon:{get:function(){return this.Y},set:function(a){this.Y=a}},originalAngle:{get:function(){return this.gw}},rotationPoint:{get:function(){return this.Jq},set:function(a){this.Jq=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= +ma.Object.defineProperties(og.prototype,{handleArchetype:{get:function(){return this.m},set:function(a){this.m=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof ue))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.me},set:function(a){if(null!==a&&a.part instanceof ue)throw Error("new handle must not be in an Adornment: "+ +a);this.me=a}},snapAngleMultiple:{get:function(){return this.ga},set:function(a){this.ga=a}},snapAngleEpsilon:{get:function(){return this.W},set:function(a){this.W=a}},originalAngle:{get:function(){return this.gw}},rotationPoint:{get:function(){return this.Jq},set:function(a){this.Jq=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});og.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function pg(){ke.call(this);this.name="ClickSelecting"}la(pg,ke);pg.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; pg.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};pg.className="ClickSelectingTool";function qg(){ke.call(this);this.name="Action";this.ck=null}la(qg,ke); qg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,b=a.lastInput,c=a.ec(b.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a});if(null!==c){if(!c.isActionable)return!1;this.ck=c;a.qk=a.ec(b.documentPoint,null,null);return!0}return!1};qg.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionDown&&b.actionDown(a,b))}else this.canStart()&&this.doActivate()}; qg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionMove&&b.actionMove(a,b))}};qg.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;if(null===b)return;a.targetObject=b;null!==b.actionUp&&b.actionUp(a,b);this.standardMouseClick(function(a){for(;null!==a.panel&&(!a.isActionable||a!==b);)a=a.panel;return a},function(a){return a===b})}this.stopTool()}; -qg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};qg.prototype.doStop=function(){this.ck=null};qg.className="ActionTool";function rg(){ke.call(this);this.name="ClickCreating";this.Li=null;this.o=!0;this.j=!1;this.Rv=new I(0,0)}la(rg,ke); +qg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};qg.prototype.doStop=function(){this.ck=null};qg.className="ActionTool";function rg(){ke.call(this);this.name="ClickCreating";this.Li=null;this.m=!0;this.j=!1;this.Rv=new I(0,0)}la(rg,ke); rg.prototype.canStart=function(){if(!this.isEnabled||null===this.archetypeNodeData)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(1===a.lastInput.clickCount&&(this.Rv=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.Rv))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.wl(a.lastInput.documentPoint,!0)?!1:!0}; rg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -rg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.P("ChangingSelection",b.selection);this.Da(this.name);if(c instanceof U)c.Tc()&&(kg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);ya(e)&&(b.model.kf(e),d=b.Dc(e))}if(null!==d){var f=I.allocAt(a.x,a.y);this.isGridSnapEnabled&&Ag(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);I.free(f)}b.Va();this.transactionResult= -this.name;b.P("PartCreated",d)}finally{this.stopTransaction(),b.P("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(rg.prototype,{archetypeNodeData:{get:function(){return this.Li},set:function(a){this.Li=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});rg.className="ClickCreatingTool"; -function Bg(){ke.call(this);this.name="DragSelecting";this.wk=175;this.o=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Cf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Bg,ke); +rg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.P("ChangingSelection",b.selection);this.Da(this.name);if(c instanceof U)c.Tc()&&(kg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);ya(e)&&(b.model.lf(e),d=b.Ec(e))}if(null!==d){var f=I.allocAt(a.x,a.y);this.isGridSnapEnabled&&Ag(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);I.free(f)}b.Va();this.transactionResult= +this.name;b.P("PartCreated",d)}finally{this.stopTransaction(),b.P("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(rg.prototype,{archetypeNodeData:{get:function(){return this.Li},set:function(a){this.Li=a}},isDoubleClick:{get:function(){return this.m},set:function(a){this.m=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});rg.className="ClickCreatingTool"; +function Bg(){ke.call(this);this.name="DragSelecting";this.wk=175;this.m=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Cf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Bg,ke); Bg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var b=a.lastInput;return!b.left||a.currentTool!==this&&(!this.isBeyondDragSize()||b.timestamp-a.firstInput.timestampe.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};Pg.prototype.doStart=function(){Zg=this;null!==this.textBlock&&this.doActivate()}; -Pg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ec(a.lastInput.documentPoint));if(null!==b&&b instanceof Qg&&(this.textBlock=b,null!==b.part)){a.animationManager.vc();this.isActive=!0;this.na=Wg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Sh=this.textBlock.copy();var d=new M(this.textBlock.ia(tc),this.textBlock.ia(Cc));a.bv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Pg.prototype.doCancel=function(){this.stopTool()}; +Pg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ec(a.lastInput.documentPoint));if(null!==b&&b instanceof Qg&&(this.textBlock=b,null!==b.part)){a.animationManager.wc();this.isActive=!0;this.na=Wg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Sh=this.textBlock.copy();var d=new M(this.textBlock.ia(tc),this.textBlock.ia(Cc));a.bv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Pg.prototype.doCancel=function(){this.stopTool()}; Pg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Pg.prototype.doMouseDown=function(){this.isActive&&this.acceptText($g)};Pg.prototype.acceptText=function(a){switch(a){case $g:if(this.na===bh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.na===Wg||this.na===Yg||this.na===Xg)this.na=ch,dh(this);break;case eh:case Ug:case Vg:if(Ug!==a||!0!==this.textBlock.isMultiline)if(this.na===Wg||this.na===Yg||this.na===Xg)this.na=ch,dh(this)}}; function dh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Da(a.name),a.na=bh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.P("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.na=Yg,a.doError(e,f))}} Pg.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};Pg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Pg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.na=Sg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Pg.prototype.doStop=function(){Zg=null}; -Pg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Pg.prototype.px=function(a){var b=this.Sh;b.text=a;b.measure(this.textBlock.zh,Infinity);return b}; -ma.Object.defineProperties(Pg.prototype,{textBlock:{get:function(){return this.ga},set:function(a){this.ga=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.Y},set:function(a){this.Y=a}},textValidation:{get:function(){return this.qj}, -set:function(a){this.qj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.na},set:function(a){this.na!==a&&(this.na=a)}}});Pg.prototype.measureTemporaryTextBlock=Pg.prototype.px; +Pg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Pg.prototype.qx=function(a){var b=this.Sh;b.text=a;b.measure(this.textBlock.zh,Infinity);return b}; +ma.Object.defineProperties(Pg.prototype,{textBlock:{get:function(){return this.ga},set:function(a){this.ga=a}},currentTextEditor:{get:function(){return this.m},set:function(a){this.m=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.W},set:function(a){this.W=a}},textValidation:{get:function(){return this.qj}, +set:function(a){this.qj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.na},set:function(a){this.na!==a&&(this.na=a)}}});Pg.prototype.measureTemporaryTextBlock=Pg.prototype.qx; var eh=new D(Pg,"LostFocus",0),$g=new D(Pg,"MouseDown",1),Vg=new D(Pg,"Tab",2),Ug=new D(Pg,"Enter",3),fh=new D(Pg,"SingleClick",0),Rg=new D(Pg,"SingleClickSelected",1),ah=new D(Pg,"DoubleClick",2),Sg=new D(Pg,"StateNone",0),Wg=new D(Pg,"StateActive",1),Xg=new D(Pg,"StateEditing",2),ch=new D(Pg,"StateValidating",3),Yg=new D(Pg,"StateInvalid",4),bh=new D(Pg,"StateValidated",5),Zg=null;Pg.className="TextEditingTool";Pg.LostFocus=eh;Pg.MouseDown=$g;Pg.Tab=Vg;Pg.Enter=Ug;Pg.SingleClick=fh; Pg.SingleClickSelected=Rg;Pg.DoubleClick=ah;Pg.StateNone=Sg;Pg.StateActive=Wg;Pg.StateEditing=Xg;Pg.StateValidating=ch;Pg.StateInvalid=Yg;Pg.StateValidated=bh;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); -function gh(a){hh||(ih(),hh=!0);this.H=le;this.Dk=this.zb=this.Xp=this.$b=!1;this.uw=!0;this.Ek=jh;this.lm=!1;this.wh=this.Ad=!0;this.tg=600;this.Hv=this.sw=!1;this.Sd=new G;this.Wd=new kh;this.Wd.Rd=this;this.yi=new G;this.Vt=new G;this.rr=new G;this.dl=new G;a&&Object.assign(this,a)}gh.prototype.Ke=function(a){this.H=a};gh.prototype.canStart=function(){return!0};function lh(a,b){a.Ad&&a.canStart(b)&&(a.Sd.add(b),a.defaultAnimation.isAnimating&&a.vc(),mh(a.H),a.zb=!0)} -function nh(a){if(a.Ad&&a.zb){var b=a.Wd,c=a.H,d=a.Sd.contains("Model");d&&(a.Dk=!0,a.Ek===jh?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ek===oh&&b.rc.clear(),a.uw=a.Ek===ph&&c.Jt.C(c.pa)?!0:!1,c.P("InitialAnimationStarting",a));d&&!a.wh||0===b.rc.count?(a.Sd.clear(),a.zb=!1,b.rc.clear(),qh(b,c),a.Dk=!1,c.N()):(a.Sd.clear(),c.bg=!1,d=b.rc.get(c),c.autoScale!==rh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.zb||b.$b||(c.Fe("temporaryPixelRatio")&&Ge(c),sh(c),a.zb=!1,b.start(),b.$b&&(th(a),c.Va(),uh(b,0),zf(c,!0),vh(a),c.P("AnimationStarting",a)))}))}}function wh(a){return a.Sd.contains("Trigger")&&1===a.Sd.count}function xh(a,b,c,d){a.isTicking||wh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.Wd.add(b,"position",c,d,!1)}t=gh.prototype;t.es=function(a){return this.Wd.es(a)};t.Ju=function(a){return this.Wd.Ju(a)}; +function gh(a){hh||(ih(),hh=!0);this.H=le;this.Dk=this.zb=this.Xp=this.$b=!1;this.uw=!0;this.Ek=jh;this.lm=!1;this.wh=this.Ad=!0;this.ug=600;this.Hv=this.sw=!1;this.Sd=new G;this.Wd=new kh;this.Wd.Rd=this;this.yi=new G;this.Vt=new G;this.rr=new G;this.dl=new G;a&&Object.assign(this,a)}gh.prototype.Le=function(a){this.H=a};gh.prototype.canStart=function(){return!0};function lh(a,b){a.Ad&&a.canStart(b)&&(a.Sd.add(b),a.defaultAnimation.isAnimating&&a.wc(),mh(a.H),a.zb=!0)} +function nh(a){if(a.Ad&&a.zb){var b=a.Wd,c=a.H,d=a.Sd.contains("Model");d&&(a.Dk=!0,a.Ek===jh?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ek===oh&&b.rc.clear(),a.uw=a.Ek===ph&&c.Jt.C(c.pa)?!0:!1,c.P("InitialAnimationStarting",a));d&&!a.wh||0===b.rc.count?(a.Sd.clear(),a.zb=!1,b.rc.clear(),qh(b,c),a.Dk=!1,c.N()):(a.Sd.clear(),c.cg=!1,d=b.rc.get(c),c.autoScale!==rh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.zb||b.$b||(c.Ge("temporaryPixelRatio")&&Ge(c),sh(c),a.zb=!1,b.start(),b.$b&&(th(a),c.Va(),uh(b,0),zf(c,!0),vh(a),c.P("AnimationStarting",a)))}))}}function wh(a){return a.Sd.contains("Trigger")&&1===a.Sd.count}function xh(a,b,c,d){a.isTicking||wh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.Wd.add(b,"position",c,d,!1)}t=gh.prototype;t.es=function(a){return this.Wd.es(a)};t.Ju=function(a){return this.Wd.Ju(a)}; function yh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function Bh(a,b){for(b=b.findLinksConnected();b.next();){var c=b.value;c.ef=c.points.copy();a.dl.add(c)}}function Oh(a,b,c,d,e){null===a&&(a=[0,0,0,0]);null===b&&(b=[0,0,0,0]);var f=a[0],g=a[1],h=a[2];a=a[3];var k=b[0],l=b[1],m=b[2];b=b[3];if(0===h||100===h)f=k,g=l;else if(0===m||100===m)k=f,l=g;180f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function ih(){function a(a,b,e,f,g,h){a.position=new I(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new pb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&wa(a,">= 1",gh,"duration");this.tg=a}},isAnimating:{get:function(){return this.$b}}, -isTicking:{get:function(){return this.Xp}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a}},defaultAnimation:{get:function(){return this.Wd}},activeAnimations:{get:function(){return this.yi}},initialAnimationStyle:{get:function(){return this.Ek},set:function(a){this.Ek=a}}});gh.prototype.stopAnimation=gh.prototype.vc; +ma.Object.defineProperties(gh.prototype,{animationReasons:{get:function(){return this.Sd}},isEnabled:{get:function(){return this.Ad},set:function(a){(this.Ad=a)&&this.yi.each(function(a){a.isAnimating||Infinity!==a.runCount||a.start()})}},duration:{get:function(){return this.ug},set:function(a){1>a&&wa(a,">= 1",gh,"duration");this.ug=a}},isAnimating:{get:function(){return this.$b}}, +isTicking:{get:function(){return this.Xp}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a}},defaultAnimation:{get:function(){return this.Wd}},activeAnimations:{get:function(){return this.yi}},initialAnimationStyle:{get:function(){return this.Ek},set:function(a){this.Ek=a}}});gh.prototype.stopAnimation=gh.prototype.wc; var Ph=null,hh=!1,jh=new D(gh,"Default",1),ph=new D(gh,"AnimateLocations",2),oh=new D(gh,"None",3);gh.className="AnimationManager";gh.defineAnimationEffect=function(a,b){hh||(ih(),hh=!0);Ph.add(a,b)};gh.Default=jh;gh.AnimateLocations=ph;gh.None=oh; -function kh(a){this.au=this.rw=this.Rd=this.H=null;this.Mk=this.$b=this.j=!1;this.Km=this.Gd=0;this.op=this.Rs=Qh;this.Lk=this.Kn=!1;this.It=1;this.Gt=0;this.yd=this.tg=NaN;this.Lv=0;this.Lm=null;this.o=qb;this.rc=new pb;this.yt=new pb;this.nl=new G;this.zt=new G;this.Iv=Rh;a&&Object.assign(this,a)}kh.prototype.suspend=function(){this.Mk=!0};kh.prototype.advanceTo=function(a,b){b&&(this.Mk=!1);this.Kn&&a>=this.yd&&(this.Lk=!0,a-=this.yd);this.Lv=a;zh(this,!0);th(this.Rd);zf(this.H);vh(this.Rd);this.H.redraw()}; -function qh(a,b){a.yt.clear();a.Lk=!1;a.Gt=0;a.yd=NaN;0=this.yd&&(this.Lk=!0,a-=this.yd);this.Lv=a;zh(this,!0);th(this.Rd);zf(this.H);vh(this.Rd);this.H.redraw()}; +function qh(a,b){a.yt.clear();a.Lk=!1;a.Gt=0;a.yd=NaN;0a.Km?a.yd:d-a.Gd;b&&(e=a.Lv,ea.Km&&(a.Kn&&!a.Lk?(a.Gd=+new Date,a.Km=a.Gd+a.yd,a.Lk=!0):a.ul(!1))}}} function uh(a,b){for(var c=a.yd,d=a.rc.iterator,e=a.Lk;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Ph,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.op,b,c,a)}}}t.stop=function(){if(!this.$b)return this;this.ul(!0);return this}; t.ul=function(a){null!==this.au&&this.au.Mn.remove(this.rw);if(this.$b){var b=this.H,c=this.Rd;this.Mk=this.$b=c.Dk=!1;th(c);for(var d=this.rc,e=this.nl.iterator;e.next();)b.remove(e.value);for(e=this.zt.iterator;e.next();)e.value.w();e=this.Kn;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.uu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.ou||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.ou?k[n]:l[n],this.op,this.yd,this.yd,this)}h.ou&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Wu&&g instanceof U&&g.Ub(!1)}b.Zr.clear();Ye(b,!1);b.Va();b.N();zf(b,!0);if(c.defaultAnimation===this){for(n=c.dl.iterator;n.next();)e=n.value,null!==e.df&&(e.points=e.df,e.df=null);c.dl.clear()}zf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Iv);vh(c);this.Gt++;!a&&this.It>this.Gt?(this.Lk=!1,this.start()):(this.Lm&&this.Lm(this),qh(this,null),c.ul(this),b.Mb())}}; +h.ou?k[n]:l[n],this.op,this.yd,this.yd,this)}h.ou&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Wu&&g instanceof U&&g.Ub(!1)}b.Zr.clear();Ye(b,!1);b.Va();b.N();zf(b,!0);if(c.defaultAnimation===this){for(n=c.dl.iterator;n.next();)e=n.value,null!==e.ef&&(e.points=e.ef,e.ef=null);c.dl.clear()}zf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Iv);vh(c);this.Gt++;!a&&this.It>this.Gt?(this.Lk=!1,this.start()):(this.Lm&&this.Lm(this),qh(this,null),c.ul(this),b.Mb())}}; t.xj=function(a,b){var c=b.actualBounds,d=null;b instanceof qf&&(d=b.placeholder);null!==d?(c=d.ia(tc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new I(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof qf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.xj(d,b)}; t.vj=function(a,b){if(a.isVisible()){var c=null;b instanceof qf&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.rc;c.contains(a)&&(c.I(a).Wu=!0);if(a instanceof qf)for(a=a.memberParts;a.next();)c=a.value,c instanceof V&&this.vj(c,b)}};t.lz=function(a){var b=this.yt.get(a);null===b&&(b={},this.yt.add(a,b));return b}; -ma.Object.defineProperties(kh.prototype,{duration:{get:function(){return this.tg},set:function(a){1>a&&wa(a,">= 1",kh,"duration");this.tg=a}},reversible:{get:function(){return this.Kn},set:function(a){this.Kn=a}},runCount:{get:function(){return this.It},set:function(a){0a&&wa(a,">= 1",kh,"duration");this.ug=a}},reversible:{get:function(){return this.Kn},set:function(a){this.Kn=a}},runCount:{get:function(){return this.It},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}kh.className="Animation";kh.EaseLinear=function(a,b,c,d){return c*a/d+b};kh.EaseInOutQuad=Qh;kh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};kh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};kh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};kh.EaseOutExpo=Sh; -function Yh(a,b,c){this.start=a;this.end=b;this.uu={};this.ou=c;this.Wu=!1}Yh.className="AnimationState";function Zh(a,b,c){this.sd=null;this.cf=a;this.Vn=c||$h;this.hk=null;void 0!==b&&(this.hk=b,void 0===c&&(this.Vn=ai))}Zh.prototype.copy=function(){var a=new Zh(this.cf);a.Vn=this.Vn;var b=this.hk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.hk=c}return a}; -function bi(a,b){a=a.hk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.cf},set:function(a){this.cf=a}},animationSettings:{get:function(){return this.hk},set:function(a){this.hk=a}},startCondition:{get:function(){return this.Vn},set:function(a){this.Vn=a}}}); -var $h=new D(Zh,"Default",1),ai=new D(Zh,"Immediate",2),ci=new D(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Ra(this);this.H=null;this.Ma=new E;this.va="";this.tb=1;this.o=!1;this.j=this.Nh=this.u=this.Ii=this.Hi=this.Gi=this.Fi=this.Di=this.Ei=this.Ci=this.Ki=this.Bi=this.Ji=this.Ai=this.zi=!0;this.Bn=[];a&&Object.assign(this,a)}t=di.prototype;t.clear=function(){this.Ma.clear();this.Bn.length=0};t.Ke=function(a){this.H=a}; +function Yh(a,b,c){this.start=a;this.end=b;this.uu={};this.ou=c;this.Wu=!1}Yh.className="AnimationState";function Zh(a,b,c){this.sd=null;this.df=a;this.Vn=c||$h;this.hk=null;void 0!==b&&(this.hk=b,void 0===c&&(this.Vn=ai))}Zh.prototype.copy=function(){var a=new Zh(this.df);a.Vn=this.Vn;var b=this.hk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.hk=c}return a}; +function bi(a,b){a=a.hk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.df},set:function(a){this.df=a}},animationSettings:{get:function(){return this.hk},set:function(a){this.hk=a}},startCondition:{get:function(){return this.Vn},set:function(a){this.Vn=a}}}); +var $h=new D(Zh,"Default",1),ai=new D(Zh,"Immediate",2),ci=new D(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Ra(this);this.H=null;this.Ma=new E;this.va="";this.tb=1;this.m=!1;this.j=this.Nh=this.u=this.Ii=this.Hi=this.Gi=this.Fi=this.Di=this.Ei=this.Ci=this.Ki=this.Bi=this.Ji=this.Ai=this.zi=!0;this.Bn=[];a&&Object.assign(this,a)}t=di.prototype;t.clear=function(){this.Ma.clear();this.Bn.length=0};t.Le=function(a){this.H=a}; t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ma.iterator;h.next();){var k=h.value;k instanceof qf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof ue?g++:c++}h="";0c.nq||h.height*e>c.nq?b.tc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| +t.$h=function(a,b,c,d,e,f,g){if(!g||ig(b)){if(null!==d&&b instanceof T&&(b.isOrthogonal&&d.push(b),!1===b.xd))return;g=!1;for(d=b.containingGroup;null!==d;)g?null!==d.ib&&f.ix(d.ib):null!==d.ib&&(g=!0,f.assign(d.ib)),d=d.containingGroup;var h=b.actualBounds;d=!1;if(g&&b.isVisible()){if(!f.Sc(h))return;d=!f.Ee(h)}d&&(a.save(),a.beginPath(),a.rect(f.x,f.y,f.width,f.height),a.clip());h.width*e>c.nq||h.height*e>c.nq?b.tc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(gi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(gi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),gi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Ur()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Nc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.bb(de,a,this,b,c,d,e)};t.ii=function(a,b,c){var d=this.Ma;b.Ah=this;if(a>=d.count)a=d.count;else if(d.K(a)===b)return-1;d.Cb(a,b);b.yo(c);d=this.diagram;null!==d&&(c?d.N():d.ii(b));hi(this,a,b);return a}; +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Oc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.bb(de,a,this,b,c,d,e)};t.ii=function(a,b,c){var d=this.Ma;b.Ah=this;if(a>=d.count)a=d.count;else if(d.K(a)===b)return-1;d.Cb(a,b);b.yo(c);d=this.diagram;null!==d&&(c?d.N():d.ii(b));hi(this,a,b);return a}; t.lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.lc(a,b,c);var d=this.Ma;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.K(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.zo(c);d.mb(a);d=this.diagram;null!==d&&(c?d.N():d.lc(b));b.Ah=null;return a}; function hi(a,b,c){b=ii(a,b,c);if(c instanceof qf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ma.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.K(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.mb(b);a.Cb(f,c);return f}for(g=NaN;0<=--f&&(g=a.K(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.mb(b);a.Cb(h,c);return h}for(k=NaN;++h< e&&(k=a.K(h).zOrder,isNaN(k)););}return b} ma.Object.defineProperties(di.prototype,{parts:{get:function(){return this.Ma.iterator}},partsBackwards:{get:function(){return this.Ma.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.va},set:function(a){var b=this.va;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&C("Cannot rename default Layer to: "+a),c=c.layers;c.next();)c.value.name=== -a&&C("Layer.name is already present in this diagram: "+a);this.va=a;this.g("name",b,a);for(a=this.Ma.iterator;a.next();)a.value.layerName=this.va}}},opacity:{get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&((0>a||1a||1=a)return b;for(var c=this.Ua.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; function Ei(a){var b=a.Ha.Sa;b instanceof HTMLCanvasElement&&(a.addEventListener(b,"pointerdown",a.Wj,!1),a.addEventListener(b,"pointermove",a.Xj,!1),a.addEventListener(b,"pointerup",a.Zj,!1),a.addEventListener(b,"pointerout",a.Yj,!1),a.addEventListener(b,"pointerenter",a.Jy,!1),a.addEventListener(b,"pointerleave",a.Ky,!1),a.addEventListener(b,"wheel",a.Sj,!1),a.addEventListener(b,"keydown",a.yz,!1),a.addEventListener(b,"keyup",a.zz,!1),a.addEventListener(b,"blur",a.vy,!1),a.addEventListener(b,"focus", -a.wy,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(x,"resize",a.sv,!1),Qa&&a.addEventListener(b,"touchstart",function(a){a.preventDefault()},!1))}function Ge(a){30q&&(this.position=w.h(-(b.scrollWidth-this.Ba)+v-this.Ba/e+m,this.position.y))),a.$x&&this.allowVerticalScroll&&(hu&&(this.position= +"gray";c.strokeWidth=1;c.interval=10;b.add(c);c=new U;c.add(b);c.layerName="Grid";c.zOrder=0;c.isInDocumentBounds=!1;c.isAnimated=!1;c.pickable=!1;c.locationObjectName="GRID";a.add(c);a.partManager.parts.remove(c);b.visible=!1;return b}function Gi(){this.H.Mt?this.H.Mt=!1:this.H.isEnabled?this.H.Nw(this):Oi(this.H)}function Qi(a){this.H.isEnabled?(this.H.Rt=a.target.scrollTop,this.H.Pt=a.target.scrollLeft):Oi(this.H)} +Q.prototype.Nw=function(a){if(null!==this.Ha){var b=this.Qt,c=this.Nt;this.Nq=!0;var d=this.documentBounds,e=this.viewportBounds,f=this.mj,g=d.x-f.left,h=d.y-f.top,k=d.width+f.left+f.right,l=d.height+f.top+f.bottom,m=d.right+f.right;f=d.bottom+f.bottom;var n=e.x;d=e.y;var p=e.width,r=e.height,q=e.right,u=e.bottom;e=this.scale;var w=a.scrollLeft;if(this.$m)switch(this.Ht){case "negative":w=w+a.scrollWidth-a.clientWidth;break;case "reverse":w=a.scrollWidth-w-a.clientWidth}var v=w;pq&&(this.position=w.h(-(b.scrollWidth-this.Ba)+v-this.Ba/e+m,this.position.y))),a.ay&&this.allowVerticalScroll&&(hu&&(this.position= w.h(this.position.x,-(b.scrollHeight-this.Aa)+a.scrollTop-this.Aa/e+f))),I.free(w),Ri(this),this.Ti=this.Nq=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);mh(this);return Si(this,a)}; function Si(a,b){if(a.fixedBounds.v())return b.assign(a.fixedBounds),b.fo(a.ub),b;for(var c=!0,d=a.Ua.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Zi?(b=k>h?(g-a.Ab)/d:(f-a.Ab)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +function Ui(a,b){var c=a.sp;if(null===a.Ha)return c;a.Za();var d=a.documentBounds;if(!d.v())return c;var e=d.width;d=d.height;var f=a.Ba+(a.Of?a.Ab:0),g=a.Aa+(a.We?a.Ab:0),h=f/e,k=g/d;return b===Yi?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Zi?(b=k>h?(g-a.Ab)/d:(f-a.Ab)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} Q.prototype.zoomToFit=function(){var a=this.nj;this.nj=Rh;this.scale=Ui(this,Yi);a!==Rh&&(Ti(this,!1),Vi(this,this.documentBounds,this.Ba/this.xa,this.Aa/this.xa,this.mk,!1));this.nj=a};t=Q.prototype; -t.kA=function(a,b){void 0===b&&(b=Yi);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Yi||b===Zi)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ba;var f=this.Aa;e=b===Zi?f/d>e/c?(f-(this.Ve?this.Ab:0))/d:(e-(this.Nf?this.Ab:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new I(a.x,a.y)}}; -t.oy=function(a,b){this.Za();var c=this.documentBounds,d=this.viewportBounds;this.position=new I(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))};t.gz=function(a){if(a instanceof Y){this.Hp=a;var b=I.alloc();this.Ip=this.Ro(a.ia(tc,b));I.free(b)}else this.Hp=null,this.Ip=ub}; +t.kA=function(a,b){void 0===b&&(b=Yi);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Yi||b===Zi)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ba;var f=this.Aa;e=b===Zi?f/d>e/c?(f-(this.We?this.Ab:0))/d:(e-(this.Of?this.Ab:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new I(a.x,a.y)}}; +t.py=function(a,b){this.Za();var c=this.documentBounds,d=this.viewportBounds;this.position=new I(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))};t.gz=function(a){if(a instanceof Y){this.Hp=a;var b=I.alloc();this.Ip=this.Ro(a.ia(tc,b));I.free(b)}else this.Hp=null,this.Ip=ub}; function Vi(a,b,c,d,e,f){var g=I.allocAt(a.pa.x,a.pa.y),h=g.x,k=g.y;if(null!==a.Hp){var l=I.alloc();l=a.Hp.ia(tc,l);h=l.x-a.Ip.x/a.scale;k=l.y-a.Ip.y/a.scale;e=sc;I.free(l)}if(f||a.scrollMode===Rh)e.pb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.mj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.$k[0])b=a.$k[c];else return;c=a.Ha;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ba/c.width*c.left,b.clientY-a.Aa/c.height*c.top))}Q.prototype.Va=function(){this.Si||(this.Si=!0,this.Mb(!0))};function hj(a){a.cd||mh(a);a.Za()}Q.prototype.redraw=function(){this.wb||this.cd||(this.N(),Wi(this),this.nd())};t=Q.prototype;t.xz=function(){return this.bg}; -t.Ey=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.vc();b.isEnabled=!1;zf(this);this.Pf=!1;this.Jt=new I(NaN,NaN);b.isEnabled=c;this.cd=!0;var d=this;null!==a&&ta(function(){d.cd=!1;lh(b,"Model");a(d)},1)};t.Mb=function(a){void 0===a&&(a=!1);if(!0!==this.bg&&!(this.wb||!1===a&&this.cd)){this.bg=!0;var b=this;x.requestAnimationFrame(function(){b.bg&&b.nd()})}};t.nd=function(){if(!this.Nm||this.bg)this.Nm&&(this.Nm=!1),zf(this)}; +function ae(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.$k[0])b=a.$k[c];else return;c=a.Ha;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ba/c.width*c.left,b.clientY-a.Aa/c.height*c.top))}Q.prototype.Va=function(){this.Si||(this.Si=!0,this.Mb(!0))};function hj(a){a.cd||mh(a);a.Za()}Q.prototype.redraw=function(){this.wb||this.cd||(this.N(),Wi(this),this.nd())};t=Q.prototype;t.xz=function(){return this.cg}; +t.Ey=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.wc();b.isEnabled=!1;zf(this);this.Qf=!1;this.Jt=new I(NaN,NaN);b.isEnabled=c;this.cd=!0;var d=this;null!==a&&ta(function(){d.cd=!1;lh(b,"Model");a(d)},1)};t.Mb=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.wb||!1===a&&this.cd)){this.cg=!0;var b=this;x.requestAnimationFrame(function(){b.cg&&b.nd()})}};t.nd=function(){if(!this.Nm||this.cg)this.Nm&&(this.Nm=!1),zf(this)}; function Xi(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.wb||!a.Ti||Oi(a)||(b&&mh(a),c&&Ti(a,!1))} -function zf(a,b){if(!a.cd&&(a.bg=!1,null!==a.La||a.Zn.v())){a.cd=!0;var c=a.animationManager,d=a.Fn;if(!c.isAnimating&&0!==d.length){for(var e=d.s,f=e.length,g=0;gb;b++){var c=a.se.iterator;if(null===c||0===a.se.count)break;a.se=new G;a.rv(c,a.se)}a.nodes.each(function(a){a instanceof qf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} +function mh(a){if(0!==a.te.count&&(a.cd||!a.animationManager.isTicking)){for(var b=0;23>b;b++){var c=a.te.iterator;if(null===c||0===a.te.count)break;a.te=new G;a.rv(c,a.te)}a.nodes.each(function(a){a instanceof qf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} t.rv=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Tc()||c instanceof qf||(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof qf&&c.isVisible()&&mj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof ue&&c.isVisible()&&(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function mj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof qf?(nj(f)||oj(f)||pj(f))&&mj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;en&&(z=L.left,y= +Math.floor(k.y),Math.ceil(k.width),Math.ceil(k.height));f.clip();f.setTransform(h,0,0,h,0,0);f.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy);f.Pc();b=this.Ua.s;l=b.length;this.Pd(b,l,this,this.viewportBounds);rj(this,f);f.globalAlpha=this.tb;for(h=0;hn&&(z=L.left,y= L.right),v.height>F&&(A=L.top,B=L.bottom)):(z=L.left,y=L.right,A=L.top,B=L.bottom);L=v.width+z+y;var S=v.height+A+B;z=v.x-z;var R=e.x;y=v.right+y;var P=e.right+r;A=v.y-A;var H=e.y;v=v.bottom+B;B=e.bottom+q;var da="1px",X="1px";e=a.scale;u=L>u/e;w=S>w/e;a.scrollMode===Rh&&(u||w)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1P+1&&(u=Math.max((y-P)*e+a.Ba,u)),n+r+1B+1&&(u=Math.max((v-B)*e+a.Aa,u)),F+q+1P+1&&(r=Math.max((y-P)*e+a.Ba,r)),n+1B+1&&(q=Math.max((v-B)*e+r,q)),F+1P+1&&(b=a.position.x*e));if(a.$m)switch(a.Ht){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(F+1B+1&&(l.scrollTop=a.position.y*e));u=a.Ba;w=a.Aa;l.style.width=u+(a.Nf?a.Ab:0)+"px";l.style.height=w+(a.Ve?a.Ab:0)+"px";return c!==u||d!==w||a.animationManager.zb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; +(u=1,A+1B+1&&(u=Math.max((v-B)*e+a.Aa,u)),F+q+1P+1&&(r=Math.max((y-P)*e+a.Ba,r)),n+1B+1&&(q=Math.max((v-B)*e+r,q)),F+1P+1&&(b=a.position.x*e));if(a.$m)switch(a.Ht){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(F+1B+1&&(l.scrollTop=a.position.y*e));u=a.Ba;w=a.Aa;l.style.width=u+(a.Of?a.Ab:0)+"px";l.style.height=w+(a.We?a.Ab:0)+"px";return c!==u||d!==w||a.animationManager.zb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Ij(a.layerName),null===b&&(b=this.Ij("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.ii(99999999,a,a.diagram===this);0<=c&&this.bb(fe,"parts",b,null,a,null,c);b.isTemporary||this.Va();a.D(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.ii=function(a){this.partManager.ii(a);var b=this;Aj(a,function(a){Bj(b,a)});(a instanceof ue||a instanceof qf&&null!==a.placeholder)&&a.w();null!==a.data&&Aj(a,function(a){Cj(b.partManager,a)});!0!==oj(a)&&!0!==pj(a)||this.se.add(a);Dj(a,!0,this);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()}; -t.lc=function(a){a.zj();this.partManager.lc(a);var b=this;null!==a.data&&Aj(a,function(a){Fj(b.partManager,a,b)});this.se.remove(a);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()};t.remove=function(a){Gj(this,a,!0)}; +t.ii=function(a){this.partManager.ii(a);var b=this;Aj(a,function(a){Bj(b,a)});(a instanceof ue||a instanceof qf&&null!==a.placeholder)&&a.w();null!==a.data&&Aj(a,function(a){Cj(b.partManager,a)});!0!==oj(a)&&!0!==pj(a)||this.te.add(a);Dj(a,!0,this);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()}; +t.lc=function(a){a.zj();this.partManager.lc(a);var b=this;null!==a.data&&Aj(a,function(a){Fj(b.partManager,a,b)});this.te.remove(a);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()};t.remove=function(a){Gj(this,a,!0)}; function Gj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.D(2),c&&b.Fj(),c=d.lc(-1,b,!1),0<=c&&a.bb(ge,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.hs=function(a,b){void 0===b&&(b=!1);if(za(a))for(var c=a.length,d=0;dd&&this.Va();return this}; -t.iy=function(a,b){Mj(this,a,b);a.Ke(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; +t.pl=function(a){Mj(this,a,null);a.Le(this);var b=this.Ua,c=b.count-1;if(!a.isTemporary)for(;0<=c&&b.K(c).isTemporary;)c--;b.Cb(c+1,a);null!==this.ac&&this.bb(fe,"layers",this,null,a,null,c+1);this.N();this.Va();return this}; +t.Aw=function(a,b){Mj(this,a,b);a.Le(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; +t.jy=function(a,b){Mj(this,a,b);a.Le(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; t.Rz=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ua,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ma.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ac&&this.bb(ge,"layers",this,a,null,c,null);this.N();this.Va()}}};t.Ij=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; -t.Cw=function(a){null===this.af&&(this.af=new E);this.af.add(a);this.model.Ug(a);return this};t.Tz=function(a){null!==this.af&&(this.af.remove(a),0===this.af.count&&(this.af=null));this.model.ak(a)};t.Ug=function(a){null===this.pg&&(this.pg=new E);this.pg.add(a);return this};t.ak=function(a){null!==this.pg&&(this.pg.remove(a),0===this.pg.count&&(this.pg=null))}; -t.Cr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Fu(a);a.change!==ee&&(this.isModified=!0);if(null!==this.pg)for(var b=this.pg,c=b.length,d=0;dn.Ma.indexOf(r)&&n.ii(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.lc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof di&&(b?(r.Ke(this),this.Ua.Cb(p,r)):this.Ua.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};Q.prototype.Da=function(a){return this.undoManager.Da(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Af=function(){return this.undoManager.Af()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Da(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.eb(b):this.undoManager.Af(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):Qj(g,h,b?void 0:k));else if(g instanceof di){var m=!0===a.oldParam;"number"===typeof h&&k instanceof U&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Rb(),g.lc(m?h:-1,k,m)):g.ii(h,k,m))}else g instanceof Q?"number"===typeof h&&k instanceof di&&(b?this.Ua.mb(h):(k.Le(this),this.Ua.Cb(h,k))):C("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===ge){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof W)"number"===typeof p&&r instanceof Y?b?n.Cb(p,r):n.lc(p): +"number"===typeof p&&r instanceof Oj&&(r.isRow?Pj(n,p,b?r:void 0):Qj(n,p,b?r:void 0));else if(n instanceof di){var q=!0===a.newParam;"number"===typeof p&&r instanceof U&&(b?0>n.Ma.indexOf(r)&&n.ii(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.lc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof di&&(b?(r.Le(this),this.Ua.Cb(p,r)):this.Ua.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};Q.prototype.Da=function(a){return this.undoManager.Da(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Bf=function(){return this.undoManager.Bf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Da(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.eb(b):this.undoManager.Bf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.Uo=function(){this.partManager.Uo()}; -function Rj(a,b,c){var d=a.animationManager;if(a.wb||a.cd)a.xa=c,Ci(a),d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));else if(null===a.Ha)a.xa=c,Ci(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Ba,g=a.Aa;e.width=a.Ba/b;e.height=a.Aa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.wf(Ec)?h=0:l.wf(Gc)&&(h=f-1):h=l.pb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.wf(Dc)?k=0:l.wf(Hc)&&(k=g-1):k=l.pb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| +function Rj(a,b,c){var d=a.animationManager;if(a.wb||a.cd)a.xa=c,Ci(a),d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));else if(null===a.Ha)a.xa=c,Ci(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Ba,g=a.Aa;e.width=a.Ba/b;e.height=a.Aa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.xf(Ec)?h=0:l.xf(Gc)&&(h=f-1):h=l.pb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.xf(Dc)?k=0:l.xf(Hc)&&(k=g-1):k=l.pb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| (c=a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=I.allocAt(a.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;I.free(f);a.xa=c;Ci(a);a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.wb=!1;Ti(a,!1);d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));a.N();Wi(a)}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.C(b)){void 0===d&&(d=!1);d||Wi(this);Ri(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==rh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.Kk&&e instanceof La&&(this.lastInput.documentPoint=this.rs(this.lastInput.viewPoint),ye(e,this));this.wb||this.invalidateViewport(a,b);jj(this);this.kd.scale=c;this.kd.position.x=a.x;this.kd.position.y=a.y;this.kd.bounds.assign(a);this.kd.Gw.width= -Math.round(a.width*c);this.kd.Gw.height=Math.round(a.height*c);this.kd.qx.width=this.Ba;this.kd.qx.height=this.Aa;this.kd.kx=d;this.P("ViewportBoundsChanged",this.kd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.ab()})}}; -function jj(a,b){var c=a.Yd;if(null!==c&&c.visible){for(var d=K.alloc(),e=1,f=1,g=c.R.s,h=g.length,k=0;km||(Sj(l.figure)?f=f*m/J.Ww(f,m):e=e*m/J.Ww(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.v()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=I.alloc();J.so(a,g,0,0,d.width,d.height, +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.C(b)){void 0===d&&(d=!1);d||Wi(this);Ri(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==rh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.Kk&&e instanceof La&&(this.lastInput.documentPoint=this.rs(this.lastInput.viewPoint),ye(e,this));this.wb||this.invalidateViewport(a,b);jj(this);this.kd.scale=c;this.kd.position.x=a.x;this.kd.position.y=a.y;this.kd.bounds.assign(a);this.kd.Hw.width= +Math.round(a.width*c);this.kd.Hw.height=Math.round(a.height*c);this.kd.sx.width=this.Ba;this.kd.sx.height=this.Aa;this.kd.lx=d;this.P("ViewportBoundsChanged",this.kd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.ab()})}}; +function jj(a,b){var c=a.Zd;if(null!==c&&c.visible){for(var d=K.alloc(),e=1,f=1,g=c.R.s,h=g.length,k=0;km||(Sj(l.figure)?f=f*m/J.Xw(f,m):e=e*m/J.Xw(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.v()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=I.alloc();J.so(a,g,0,0,d.width,d.height, b);b.offset(-d.width,-d.height);K.free(d);c.part.location=b;I.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.P("ChangingSelection",b);for(var c=b.Ea(),d=c.length,e=0;e=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=I.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.$a(qb)||(b=new I(b.x+f.x/e,b.y+f.y/e)); -M.free(d);I.free(f);return b};t=Q.prototype;t.bs=function(){return null};t.Nu=function(){return null};t.my=function(a,b){this.Xx.add(a,b)};t.lu=function(a){(this.tw=a)||this.nodes.each(function(a){a instanceof qf&&(a.Dp=null)})}; -function yk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].Qk){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Fg.iterator;g.next();)if(!g.value[0].Qk){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Dz=function(a){if(!Og)return null;void 0===a&&(a={});a.returnType="Image";return this.nx(a)}; -t.nx=function(a){void 0===a&&(a={});return yk(this,this.Ez,a)}; +M.free(d);I.free(f);return b};t=Q.prototype;t.bs=function(){return null};t.Nu=function(){return null};t.ny=function(a,b){this.Yx.add(a,b)};t.lu=function(a){(this.tw=a)||this.nodes.each(function(a){a instanceof qf&&(a.Dp=null)})}; +function yk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].Qk){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Fg.iterator;g.next();)if(!g.value[0].Qk){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Dz=function(a){if(!Og)return null;void 0===a&&(a={});a.returnType="Image";return this.ox(a)}; +t.ox=function(a){void 0===a&&(a={});return yk(this,this.Ez,a)}; t.Ez=function(a,b,c){var d=zk(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Ak+"data":e=d.getImageData(0,0,c.width,c.height);break;case Ak:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";if("function"===typeof c.msToBlob)return b(c.msToBlob()),"msToBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function zk(a,b,c,d){a.animationManager.vc();a.nd();if(null===a.Ha)return null;"object"!==typeof b&&C("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new K(Infinity,Infinity):new K(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,r=b.elementFinished||null,q=b.showTemporary; -void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new ic(l):l instanceof ic||C("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.Zb.Nc(!0);n=new Bk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.Ba+Math.ceil(l.left+l.right);n.height=a.Aa+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, +function zk(a,b,c,d){a.animationManager.wc();a.nd();if(null===a.Ha)return null;"object"!==typeof b&&C("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new K(Infinity,Infinity):new K(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,r=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new ec(l):l instanceof ec||C("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.Zb.Oc(!0);n=new Bk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.Ba+Math.ceil(l.left+l.right);n.height=a.Aa+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, n.height,n.width,n.height);d.ownerDocument=p;d.po=r;tj(a,d.context,l,new K(n.width,n.height),a.xa,a.pa,k,m,q,b);return d.context}a.Fm=!1;tj(a,u,l,new K(n.width,n.height),a.xa,a.pa,k,m,q,b);a.Fm=!0;return n.context}var w=a.sp,v=a.documentBounds.copy();v.jv(a.ub);if(q)for(var z=a.Ua.s,y=z.length,A=0;Aw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=y):l=new ic(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&&(e=Math.min(e, +(e=B,v=A):isNaN(A)?(e=B,v=v.height*f):(e=v.width*f,v=A)):null!==e?e.v()?(f=Math.min(B/v.width,A/v.height),e=B,v=A):isNaN(A)?(f=B/v.width,e=B,v=v.height*f):(f=A/v.height,e=v.width*f,v=A):null!==f?"NaN"===f&&g.v()?(f=Math.min((g.width-h)/v.width,(g.height-y)/v.height),f>w?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=y):l=new ec(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&&(e=Math.min(e, w)),isFinite(g)&&(v=Math.min(v,g)));n.width=Math.ceil(e);n.height=Math.ceil(v);if("SVG"===c){if(null===d)return null;d.resize(n.width,n.height,n.width,n.height);d.ownerDocument=p;d.po=r;tj(a,d.context,l,new K(Math.ceil(e),Math.ceil(v)),f,z,k,m,q,b);return d.context}a.Fm=!1;tj(a,u,l,new K(Math.ceil(e),Math.ceil(v)),f,z,k,m,q,b);a.Fm=!0;return n.context} -ma.Object.defineProperties(Q.prototype,{div:{get:function(){return this.La},set:function(a){if(this.La!==a){var b=this.La;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Ha&&(b=this.Ha.Sa,this.removeEventListener(b,"pointermove",this.Xj,!1),this.removeEventListener(b,"pointerdown",this.Wj,!1),this.removeEventListener(b,"pointerup",this.Zj,!1),this.removeEventListener(b,"pointerout",this.Yj,!1),this.Ha.Ow()),this.cl&&(this.cl.disconnect(), -this.cl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Ha=null,this.removeEventListener(x,"resize",this.sv,!1),this.removeEventListener(x,"wheel",this.Sj,!0),le===this&&(le=null)):this.Pf=!1;this.La=null;if(null!==a){if(b=a.H)b.div=null;si(this,a);this.redraw()}}}},Ew:{ -get:function(){return this.rq}},ji:{get:function(){return this.Pf}},draggedLink:{get:function(){return this.Ps},set:function(a){this.Ps!==a&&(this.Ps=a,null!==a&&(this.At=a.fromPort,this.Bt=a.toPort))}},sx:{get:function(){return this.At},set:function(a){this.At=a}},tx:{get:function(){return this.Bt},set:function(a){this.Bt=a}},animationManager:{get:function(){return this.Rd}}, +ma.Object.defineProperties(Q.prototype,{div:{get:function(){return this.La},set:function(a){if(this.La!==a){var b=this.La;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Ha&&(b=this.Ha.Sa,this.removeEventListener(b,"pointermove",this.Xj,!1),this.removeEventListener(b,"pointerdown",this.Wj,!1),this.removeEventListener(b,"pointerup",this.Zj,!1),this.removeEventListener(b,"pointerout",this.Yj,!1),this.Ha.Pw()),this.cl&&(this.cl.disconnect(), +this.cl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Ha=null,this.removeEventListener(x,"resize",this.sv,!1),this.removeEventListener(x,"wheel",this.Sj,!0),le===this&&(le=null)):this.Qf=!1;this.La=null;if(null!==a){if(b=a.H)b.div=null;si(this,a);this.redraw()}}}},Ew:{ +get:function(){return this.rq}},ji:{get:function(){return this.Qf}},draggedLink:{get:function(){return this.Ps},set:function(a){this.Ps!==a&&(this.Ps=a,null!==a&&(this.At=a.fromPort,this.Bt=a.toPort))}},tx:{get:function(){return this.At},set:function(a){this.At=a}},ux:{get:function(){return this.Bt},set:function(a){this.Bt=a}},animationManager:{get:function(){return this.Rd}}, undoManager:{get:function(){return this.ac.undoManager}},skipsUndoManager:{get:function(){return this.Mg},set:function(a){this.Mg=a;this.ac.skipsUndoManager=a}},delaysLayout:{get:function(){return this.Ns},set:function(a){this.Ns=a}},opacity:{get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&((0>a||1= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.xt},set:function(a){var b=this.xt;b!==a&&(this.xt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.Zs},set:function(a){var b=this.Zs;b!==a&&(this.Zs=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.nt}, -set:function(a){var b=this.nt;b!==a&&(this.nt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{get:function(){return this.Tv}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Ym&&this.re!==a.historyIndex:this.Ym},set:function(a){if(this.Ym!==a){this.Ym=a;var b=this.undoManager;!a&&b.isEnabled&&(this.re=b.historyIndex);a||Tj(this)}}},model:{ -get:function(){return this.ac},set:function(a){var b=this.ac;if(b!==a){this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&C("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.vc(!0);var c=Ai(this,!0);this.Pf=!1;this.Nm=!0;this.re=-2;this.bg=!1;var d=this.wb;this.wb=!0;lh(this.animationManager,"Model");b&&(null!==this.af&&this.af.each(function(a){b.ak(a)}),b.ak(this.Gc));this.ac=a;this.partManager=Uj(this.ac.type);for(var e= -0;ethis.scale&&(this.scale=a)):wa(a,"> 0",Q,"minScale"))}},maxScale:{get:function(){return this.pt},set:function(a){var b=this.pt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{get:function(){return this.eu},set:function(a){this.eu.C(a)||(this.eu=a=a.J())}},contentAlignment:{get:function(){return this.mk}, -set:function(a){var b=this.mk;b.C(a)||(this.mk=a=a.J(),this.g("contentAlignment",b,a),Ti(this,!1))}},initialContentAlignment:{get:function(){return this.Rp},set:function(a){var b=this.Rp;b.C(a)||(this.Rp=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.Va(),this.g("padding",b,a))}},partManager:{ -get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Ke(null),this.Hc=a,a.Ke(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{ -get:function(){return this.Jc},set:function(a){var b=this.Jc;b!==a&&(this.Jc=a,a.diagram=this,a.group=null,this.mh=!0,this.g("layout",b,a),this.Mb())}},isTreePathToChildren:{get:function(){return this.kt},set:function(a){var b=this.kt;if(b!==a&&(this.kt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ck(a.value)}},treeCollapsePolicy:{get:function(){return this.$t},set:function(a){var b= -this.$t;b!==a&&(a!==vi&&a!==Dk&&a!==Ek&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.$t=a,this.g("treeCollapsePolicy",b,a))}},He:{get:function(){return this.Vv},set:function(a){this.Vv=a}},avoidanceCellSize:{get:function(){return this.Fv},set:function(a){this.Qh=null;this.Fv=new K(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.Gv},set:function(a){this.Gv=Math.max(1, -a)}},autoScrollInterval:{get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(this.Yo=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.$o},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.$o;b.C(a)||(this.$o=a=a.J(),this.Va(),this.g("autoScrollRegion",b,a))}}}); -ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Fk.fc()},set:function(a){Fk.add(a.replace(/\s/g,""))}},version:{get:function(){return Gk}}});Q.prototype.makeImageData=Q.prototype.nx;Q.prototype.makeImage=Q.prototype.Dz;Q.prototype.cacheGroupExternalLinks=Q.prototype.lu;Q.prototype.addRenderer=Q.prototype.my;Q.prototype.makeSVG=Q.prototype.Nu;Q.prototype.makeSvg=Q.prototype.bs;Q.prototype.stopAutoScroll=Q.prototype.kg; +set:function(a){var b=this.mk;b.C(a)||(this.mk=a=a.J(),this.g("contentAlignment",b,a),Ti(this,!1))}},initialContentAlignment:{get:function(){return this.Rp},set:function(a){var b=this.Rp;b.C(a)||(this.Rp=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.Va(),this.g("padding",b,a))}},partManager:{ +get:function(){return this.Ic},set:function(a){var b=this.Ic;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Le(null),this.Ic=a,a.Le(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{ +get:function(){return this.Kc},set:function(a){var b=this.Kc;b!==a&&(this.Kc=a,a.diagram=this,a.group=null,this.mh=!0,this.g("layout",b,a),this.Mb())}},isTreePathToChildren:{get:function(){return this.kt},set:function(a){var b=this.kt;if(b!==a&&(this.kt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ck(a.value)}},treeCollapsePolicy:{get:function(){return this.$t},set:function(a){var b= +this.$t;b!==a&&(a!==vi&&a!==Dk&&a!==Ek&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.$t=a,this.g("treeCollapsePolicy",b,a))}},Ie:{get:function(){return this.Vv},set:function(a){this.Vv=a}},avoidanceCellSize:{get:function(){return this.Fv},set:function(a){this.Qh=null;this.Fv=new K(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.Gv},set:function(a){this.Gv=Math.max(1, +a)}},autoScrollInterval:{get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(this.Yo=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.$o},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.$o;b.C(a)||(this.$o=a=a.J(),this.Va(),this.g("autoScrollRegion",b,a))}}}); +ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Fk.fc()},set:function(a){Fk.add(a.replace(/\s/g,""))}},version:{get:function(){return Gk}}});Q.prototype.makeImageData=Q.prototype.ox;Q.prototype.makeImage=Q.prototype.Dz;Q.prototype.cacheGroupExternalLinks=Q.prototype.lu;Q.prototype.addRenderer=Q.prototype.ny;Q.prototype.makeSVG=Q.prototype.Nu;Q.prototype.makeSvg=Q.prototype.bs;Q.prototype.stopAutoScroll=Q.prototype.lg; Q.prototype.doAutoScroll=Q.prototype.Fr;Q.prototype.isUnoccupied=Q.prototype.Pj;Q.prototype.raiseDiagramEvent=Q.prototype.P;Q.prototype.removeDiagramListener=Q.prototype.Il;Q.prototype.addDiagramListener=Q.prototype.wj;Q.prototype.findTreeRoots=Q.prototype.fz;Q.prototype.layoutDiagram=Q.prototype.Bz;Q.prototype.findTopLevelGroups=Q.prototype.Zy;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.$y;Q.prototype.ensureBounds=Q.prototype.Za;Q.prototype.findLinksByExample=Q.prototype.Ir; -Q.prototype.findNodesByExample=Q.prototype.Jr;Q.prototype.findLinkForData=Q.prototype.Cc;Q.prototype.findNodeForData=Q.prototype.ci;Q.prototype.findPartForData=Q.prototype.Dc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Lb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Od;Q.prototype.transformViewToDoc=Q.prototype.rs;Q.prototype.transformRectDocToView=Q.prototype.gA;Q.prototype.transformDocToView=Q.prototype.Ro; -Q.prototype.centerRect=Q.prototype.Dr;Q.prototype.scrollToRect=Q.prototype.bv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.rz;Q.prototype.highlight=Q.prototype.qz;Q.prototype.selectCollection=Q.prototype.Yz;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Uo;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Af; -Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prototype.Da;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.bb;Q.prototype.removeChangedListener=Q.prototype.ak;Q.prototype.addChangedListener=Q.prototype.Ug;Q.prototype.removeModelChangedListener=Q.prototype.Tz;Q.prototype.addModelChangedListener=Q.prototype.Cw;Q.prototype.findLayer=Q.prototype.Ij;Q.prototype.removeLayer=Q.prototype.Rz;Q.prototype.addLayerAfter=Q.prototype.iy; -Q.prototype.addLayerBefore=Q.prototype.Aw;Q.prototype.addLayer=Q.prototype.pl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Ej;Q.prototype.removeParts=Q.prototype.hs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.mu;Q.prototype.setProperties=Q.prototype.Vl;Q.prototype.attach=Q.prototype.ku;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.yx;Q.prototype.setInputOption=Q.prototype.Zz; -Q.prototype.getInputOption=Q.prototype.yl;Q.prototype.resetRenderingHints=Q.prototype.zx;Q.prototype.setRenderingHint=Q.prototype.Ex;Q.prototype.getRenderingHint=Q.prototype.Fe;Q.prototype.maybeUpdate=Q.prototype.nd;Q.prototype.requestUpdate=Q.prototype.Mb;Q.prototype.delayInitialization=Q.prototype.Ey;Q.prototype.isUpdateRequested=Q.prototype.xz;Q.prototype.invalidateDocumentBounds=Q.prototype.Va;Q.prototype.findObjectsNear=Q.prototype.gg;Q.prototype.findPartsNear=Q.prototype.Vy; -Q.prototype.findObjectsIn=Q.prototype.sf;Q.prototype.findPartsIn=Q.prototype.Vw;Q.prototype.findObjectsAt=Q.prototype.di;Q.prototype.findPartsAt=Q.prototype.Uy;Q.prototype.findObjectAt=Q.prototype.ec;Q.prototype.findPartAt=Q.prototype.wl;Q.prototype.focusObject=Q.prototype.gz;Q.prototype.alignDocument=Q.prototype.oy;Q.prototype.zoomToRect=Q.prototype.kA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Mw;Q.prototype.focus=Q.prototype.focus; +Q.prototype.findNodesByExample=Q.prototype.Jr;Q.prototype.findLinkForData=Q.prototype.Dc;Q.prototype.findNodeForData=Q.prototype.ci;Q.prototype.findPartForData=Q.prototype.Ec;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Lb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Od;Q.prototype.transformViewToDoc=Q.prototype.rs;Q.prototype.transformRectDocToView=Q.prototype.gA;Q.prototype.transformDocToView=Q.prototype.Ro; +Q.prototype.centerRect=Q.prototype.Dr;Q.prototype.scrollToRect=Q.prototype.bv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.rz;Q.prototype.highlight=Q.prototype.qz;Q.prototype.selectCollection=Q.prototype.Yz;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Uo;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Bf; +Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prototype.Da;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.bb;Q.prototype.removeChangedListener=Q.prototype.ak;Q.prototype.addChangedListener=Q.prototype.Ug;Q.prototype.removeModelChangedListener=Q.prototype.Tz;Q.prototype.addModelChangedListener=Q.prototype.Cw;Q.prototype.findLayer=Q.prototype.Ij;Q.prototype.removeLayer=Q.prototype.Rz;Q.prototype.addLayerAfter=Q.prototype.jy; +Q.prototype.addLayerBefore=Q.prototype.Aw;Q.prototype.addLayer=Q.prototype.pl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Ej;Q.prototype.removeParts=Q.prototype.hs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.mu;Q.prototype.setProperties=Q.prototype.Vl;Q.prototype.attach=Q.prototype.ku;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.zx;Q.prototype.setInputOption=Q.prototype.Zz; +Q.prototype.getInputOption=Q.prototype.yl;Q.prototype.resetRenderingHints=Q.prototype.Ax;Q.prototype.setRenderingHint=Q.prototype.Fx;Q.prototype.getRenderingHint=Q.prototype.Ge;Q.prototype.maybeUpdate=Q.prototype.nd;Q.prototype.requestUpdate=Q.prototype.Mb;Q.prototype.delayInitialization=Q.prototype.Ey;Q.prototype.isUpdateRequested=Q.prototype.xz;Q.prototype.invalidateDocumentBounds=Q.prototype.Va;Q.prototype.findObjectsNear=Q.prototype.hg;Q.prototype.findPartsNear=Q.prototype.Vy; +Q.prototype.findObjectsIn=Q.prototype.tf;Q.prototype.findPartsIn=Q.prototype.Ww;Q.prototype.findObjectsAt=Q.prototype.di;Q.prototype.findPartsAt=Q.prototype.Uy;Q.prototype.findObjectAt=Q.prototype.ec;Q.prototype.findPartAt=Q.prototype.wl;Q.prototype.focusObject=Q.prototype.gz;Q.prototype.alignDocument=Q.prototype.py;Q.prototype.zoomToRect=Q.prototype.kA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Nw;Q.prototype.focus=Q.prototype.focus; var li=new pb,Di=null,Og=void 0!==x.document,yi=null,zi="",rh=new D(Q,"None",0),Yi=new D(Q,"Uniform",1),Zi=new D(Q,"UniformToFill",2),Ef=new D(Q,"CycleAll",10),If=new D(Q,"CycleNotDirected",11),Kf=new D(Q,"CycleNotDirectedFast",12),Lf=new D(Q,"CycleNotUndirected",13),Ff=new D(Q,"CycleDestinationTree",14),Hf=new D(Q,"CycleSourceTree",15),Rh=new D(Q,"DocumentScroll",1),Th=new D(Q,"InfiniteScroll",2),vi=new D(Q,"TreeParentCollapsed",21),Dk=new D(Q,"AllParentsCollapsed",22),Ek=new D(Q,"AnyParentsCollapsed", -23),Fk=new E,Gk="2.2.14",Ak="image",Hk=null,ji=!1; +23),Fk=new E,Gk="2.2.15",Ak="image",Hk=null,ji=!1; function ki(){if(Og){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d6038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",md.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",J.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])md.prototype.Ld=md.prototype.Fw; Hk=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){Og=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Og};Q.None=rh;Q.Uniform=Yi; -Q.UniformToFill=Zi;Q.CycleAll=Ef;Q.CycleNotDirected=If;Q.CycleNotDirectedFast=Kf;Q.CycleNotUndirected=Lf;Q.CycleDestinationTree=Ff;Q.CycleSourceTree=Hf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=vi;Q.AllParentsCollapsed=Dk;Q.AnyParentsCollapsed=Ek;function ri(){this.ay=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.pd=this.j=!0:this.pd=null} -function sj(a,b){b.Zb.setTransform(b.kc,0,0,b.kc,0,0);b.Zb.Oc();if(null===a.pd)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")];a.pd=!0;if(Og){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Fk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); +Q.UniformToFill=Zi;Q.CycleAll=Ef;Q.CycleNotDirected=If;Q.CycleNotDirectedFast=Kf;Q.CycleNotUndirected=Lf;Q.CycleDestinationTree=Ff;Q.CycleSourceTree=Hf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=vi;Q.AllParentsCollapsed=Dk;Q.AnyParentsCollapsed=Ek;function ri(){this.by=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.pd=this.j=!0:this.pd=null} +function sj(a,b){b.Zb.setTransform(b.kc,0,0,b.kc,0,0);b.Zb.Pc();if(null===a.pd)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")];a.pd=!0;if(Og){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Fk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); f=Ma(d[2]);if(-1g&&f!==Ma("7da71ca0ad381e90")&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=c[Ma("73a612b6fb191d")](Ma("7baa19a6f76c1988428554")));a.pd=!(0<=g&&gk.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Ma("79a417a0f0181a8946")]=d;if(x.document[Ma("78a712aa")]){x.document[Ma("78a712aa")][Ma("7bb806b6ed32388c4a875b")](g); k=x.getComputedStyle(g).getPropertyValue(Ma("78a704b7e62456904c9b12701b6532a8"));var l=x.getComputedStyle(g).getPropertyValue(Ma("75b817b0ea2202"));x.document[Ma("78a712aa")][Ma("68ad1bbcf533388c4a875b")](g);if(k)if(g=x[Ma("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.pd=!1;break}else if(g&&g(Ma("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& +"none",e.style.touchAction="none");a.Ha=e;a.Zb=e.context;d=a.Zb;a.kc=a.computePixelRatio();a.viewSize.v()||(a.Ba=a.La.clientWidth||1,a.Aa=a.La.clientHeight||1);zj(a,a.Ba,a.Aa);a.La.insertBefore(e.Sa,a.La.firstChild);e=new Bk(null);e.width=1;e.height=1;a.Ov=e;a.Ux=e.context;if(Og){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ba+"px";e.style.height=a.Aa+"px";e.style.zIndex="1";f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.La.appendChild(e); +e.appendChild(f);e.onscroll=Gi;e.addEventListener("pointerdown",Qi);e.H=a;e.$x=!0;e.ay=!0;a.Qt=e;a.Nt=f}a.Jo=sa(function(){a.Rh=null;a.N()},300);a.sv=sa(function(){sh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Sj=function(b){if(a.isEnabled){var c=cj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& (d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0c||Math.abs(e.y-b.screenY)>c)?a.Yp++:a.Yp=1;d.clickCount=a.Yp;a.Zv=b.timeStamp;a.$v.jg(b.screenX,b.screenY); +b;else if(null!==c[1]&&c[1].pointerId===b.pointerId)c[1]=b,d=!0;else if(null===c[0])c[0]=b;else if(null===c[1])c[1]=b,d=!0;else{b.preventDefault();return}if(c="touch"===b.pointerType||"pen"===b.pointerType)a.Wt=!1,a.jt=!0;var e=d;d=fj(a,b,!0,!1,!0,e);dj(a,b,d);d.targetDiagram=ej(b,b.target);d.targetObject=null;e||d.clone(a.Fp);e=a.$v;c=c?25:10;b.timeStamp-a.Zvc||Math.abs(e.y-b.screenY)>c)?a.Yp++:a.Yp=1;d.clickCount=a.Yp;a.Zv=b.timeStamp;a.$v.kg(b.screenX,b.screenY); a.doMouseDown();1===b.button?b.preventDefault():gj(d,b)}};a.Xj=function(b){if(a.isEnabled){a.Kk=!0;var c=a.$k;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}if(c[0].pointerId===b.pointerId){c=fj(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX,b.clientY);null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b; d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;dj(a,f,c);c.targetObject=null;a.doMouseMove();gj(c,b)}}};a.Zj=function(b){if(a.isEnabled){a.Kk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Dt;if(c&&a.Wt)delete d[b.pointerId],b.preventDefault();else if(d=a.$k,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]=null;d=fj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY)); null!==e&&e.H instanceof Q&&e.H!==a&&dj(e.H,b,d);null===e&&(e=b.target);dj(a,b,d);d.clickCount=a.Yp;d.targetDiagram=ej(b,e);d.targetObject=null;a.doMouseUp();gj(d,b);c&&(a.jt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Yj=function(b){if(a.isEnabled){a.Kk=!1;var c=a.Dt;c[b.pointerId]&&delete c[b.pointerId];c=a.$k;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.currentTool, -b.cancelWaitAfter(),b.standardMouseOver())}};a.Qs=d.Z["d"+Ik[1]+Ik[2]+"wI"+Ak.slice(1,5)]["b"+Jk.slice(1,b)](d.Z,Hk,b,b);d.Nc(!0);Ei(a)}}ri.className="DiagramHelper";function Te(a){this.j=void 0===a?new I:a;this.o=new I}ma.Object.defineProperties(Te.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Ik="DraggingInfo";Te.className="DraggingInfo"; +b.cancelWaitAfter(),b.standardMouseOver())}};a.Qs=d.Z["d"+Ik[1]+Ik[2]+"wI"+Ak.slice(1,5)]["b"+Jk.slice(1,b)](d.Z,Hk,b,b);d.Oc(!0);Ei(a)}}ri.className="DiagramHelper";function Te(a){this.j=void 0===a?new I:a;this.m=new I}ma.Object.defineProperties(Te.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.m},set:function(a){this.m=a}}});var Ik="DraggingInfo";Te.className="DraggingInfo"; function Kj(a,b,c){this.node=a;this.info=b;this.Eu=c}Kj.className="DraggingNodeInfoPair";function Ce(){this.reset()}Ce.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new K(NaN,NaN)).freeze();this.gridSnapCellSpot=tc;this.gridSnapOrigin=(new I(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Ce.className="DraggingOptions"; function Kk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;Lk(c);b&&c.Vl(b);return c}la(Kk,Q);function Lk(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=uc;a.layout=new Mk}Kk.prototype.reset=function(){Q.prototype.reset.call(this);Lk(this)};Kk.className="Palette"; -function Nk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.Y=null;c.Tm=!1;c.Um=!1;c.F=!0;c.u=!0;c.ga=0;c.o=!1;c.fl=null;c.Ex("drawShadows",!1);a=new U;var e=new Cf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= -"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new ic(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Ok,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new I(c.x-b.width/2,c.y-b.height/2)}};c.Ff=function(){d.Va();Pk(d)};c.Qd=function(){null!==d.observed&&(d.Va(),d.N())};c.Ga=function(){1>d.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Ef=function(){null!==d.observed&&Pk(d)};c.autoScale=Yi;c.wb=!1;b&&Object.assign(c,b);return c}la(Nk,Q);Nk.prototype.computePixelRatio=function(){return 1}; -Nk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Ha,b=this.Zb;if(null!==a&&null!==b){qj(this);if(null===this.fl){var c=new Bk(null);c.width=a.width;c.height=a.height;this.fl=c}try{this.Ha=this.fl,this.Zb=this.Ha.context,this.Zb.Nc(!0),this.Zb.setTransform(1,0,0,1,0,0),this.Zb.clearRect(0,0,this.Ha.width,this.Ha.height),Qk(this)}finally{this.Ha=a,this.Zb=b}}}Q.prototype.redraw.call(this)}; -Nk.prototype.tc=function(){null===this.La&&C("No div specified");null===this.Ha&&C("No canvas specified");if(!(this.Ha instanceof xj)&&(ei(this.box),this.bd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.ji){qj(this);var b=this.Ha;a=this.Zb;a.Nc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Qk(this):null!==this.fl&&(a.drawImage(this.fl.Sa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +function Nk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.W=null;c.Tm=!1;c.Um=!1;c.F=!0;c.u=!0;c.ga=0;c.m=!1;c.fl=null;c.Fx("drawShadows",!1);a=new U;var e=new Cf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new ec(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Ok,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new I(c.x-b.width/2,c.y-b.height/2)}};c.Gf=function(){d.Va();Pk(d)};c.Qd=function(){null!==d.observed&&(d.Va(),d.N())};c.Ga=function(){1>d.updateDelay?d.N():d.m||(d.m=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Ff=function(){null!==d.observed&&Pk(d)};c.autoScale=Yi;c.wb=!1;b&&Object.assign(c,b);return c}la(Nk,Q);Nk.prototype.computePixelRatio=function(){return 1}; +Nk.prototype.redraw=function(){if(this.m&&1<=this.updateDelay){this.m=!1;var a=this.Ha,b=this.Zb;if(null!==a&&null!==b){qj(this);if(null===this.fl){var c=new Bk(null);c.width=a.width;c.height=a.height;this.fl=c}try{this.Ha=this.fl,this.Zb=this.Ha.context,this.Zb.Oc(!0),this.Zb.setTransform(1,0,0,1,0,0),this.Zb.clearRect(0,0,this.Ha.width,this.Ha.height),Qk(this)}finally{this.Ha=a,this.Zb=b}}}Q.prototype.redraw.call(this)}; +Nk.prototype.tc=function(){null===this.La&&C("No div specified");null===this.Ha&&C("No canvas specified");if(!(this.Ha instanceof xj)&&(ei(this.box),this.bd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.ji){qj(this);var b=this.Ha;a=this.Zb;a.Oc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Qk(this):null!==this.fl&&(a.drawImage(this.fl.Sa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.kc,this.kc),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ua.s;for(var c=b.length,d=0;da&&(a=0);this.ga!==a&&(this.ga=a)}}});Nk.className="Overview";function Ok(){Be.call(this);this.j=null}la(Ok,Be); Ok.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))};Rk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==rh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; Rk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===rh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Rk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==rh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Rk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; Rk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Rk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.vc();a.redraw();var c=a.position,d=a.scale;lh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.fu&&!isNaN(this.mt)&&a.documentBounds.C(this.du)?(a.scale=this.mt,a.position=this.Yv,this.fu=NaN,this.du=cc):(this.mt=d,this.Yv=c.copy(),a.zoomToFit(),this.fu=a.scale,this.du=a.documentBounds.copy());nh(b)};Rk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Rk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Za();if(null===a){try{null!==this.Uf&&(this.Uf.next()?a=this.Uf.value:this.Uf=null)}catch(k){this.Uf=null}null===a&&(0a&&(a+=360));return a}; -t.tf=function(){if(0!==(this.m&4096)===!1)return this.yk;var a=this.xa;return null!==this.panel?a*this.panel.tf():a};t.Nr=function(a,b){void 0===b&&(b=new I);b.assign(a);this.fe.Ld(b);return b};t.Or=function(a,b,c){return this.Kj(a.x,a.y,b.x,b.y,c)}; -t.Kj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,J.vf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=J.vf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +M.free(c);!h&&(J.Rr(a,d,e)||J.Rr(a,e,f)||J.Rr(a,f,g)||J.Rr(a,g,d))&&(h=!0)}I.free(d);I.free(e);I.free(f);I.free(g);return h};t.ia=function(a,b){void 0===b&&(b=new I);if(a instanceof N){var c=this.naturalBounds;b.h(a.x*c.width+a.offsetX,a.y*c.height+a.offsetY)}else b.set(a);this.ge.Fa(b);return b}; +t.gi=function(a){void 0===a&&(a=new M);var b=this.naturalBounds,c=this.ge,d=I.allocAt(0,0).transform(c);a.h(d.x,d.y,0,0);d.h(b.width,0).transform(c);Zb(a,d.x,d.y,0,0);d.h(b.width,b.height).transform(c);Zb(a,d.x,d.y,0,0);d.h(0,b.height).transform(c);Zb(a,d.x,d.y,0,0);I.free(d);return a};t.fi=function(){var a=this.ge;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a}; +t.uf=function(){if(0!==(this.o&4096)===!1)return this.yk;var a=this.xa;return null!==this.panel?a*this.panel.uf():a};t.Nr=function(a,b){void 0===b&&(b=new I);b.assign(a);this.ge.Ld(b);return b};t.Or=function(a,b,c){return this.Kj(a.x,a.y,b.x,b.y,c)}; +t.Kj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,J.wf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=J.wf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; Y.prototype.measure=function(a,b,c,d){if(!1!==nj(this)){var e=this.Ag,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=0;this instanceof Cf&&(g=this.strokeWidth);90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(il(this,!0)){case lg:g=e=0;h&&(b=a=Infinity); break;case td:isFinite(a)&&a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Vk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case Wk:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.yb>a.width)))c=!0;this.m=c?this.m|256:this.m&-257;this.Eb.v()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Eb.toString());this.Fl(f,this.Eb);jl(this,!1);M.free(f)};t=Y.prototype;t.Vg=function(){}; +this.kq>a.height||this.yb>a.width)))c=!0;this.o=c?this.o|256:this.o&-257;this.Eb.v()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Eb.toString());this.Fl(f,this.Eb);jl(this,!1);M.free(f)};t=Y.prototype;t.Vg=function(){}; function kl(a,b,c,d,e){a.Eb.h(b,c,d,e);if(!a.desiredSize.v()){var f=a.qc;c=a.Ag;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=il(a,!0);c===d&&f===e&&(b=lg);switch(b){case lg:if(c>d||f>e)ij(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:ij(a,!0);a.measure(d,e,0,0);break;case Vk:ij(a,!0);a.measure(d,f,0,0);break;case Wk:ij(a,!0),a.measure(c,e,0,0)}}} -t.Fl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ll(c,!0),this.N(),Vb(a,b)||(c.dh(),this.wn(c)))};t.wn=function(a){null!==this.portId&&(ll(a,!0),a instanceof V&&ml(a,this))}; -t.tc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn),e=this.Eb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Eb;d=this.bc;var g=this.areaBackground,h=this.Yb;null===g&&null===h||a.Oc();null!==g&&(gi(this,a,g,!0,!0,d,e),g instanceof nl&&g.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(g)):a.fillRect(e.x,e.y,e.width,e.height)); -null!==h&&(gi(this,a,h,!0,!1,d,e),h instanceof nl&&h.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(h)):a.fillRect(e.x,e.y,e.width,e.height));this.ai(a,b)}else if(!this.Pw(a,b)){this instanceof T&&this.Rj(!1);d=this.transform;g=this.panel;0!==(this.m&4096)===!0&&pl(this);var k=this.part;h=!1;var l=0;if(k&&b.Fe("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.kc}m=this.li();var n;if(!(n=b.Vi||!m)){var p=this.naturalBounds;n=this.lh;var r=n.m11,q= +t.Fl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ll(c,!0),this.N(),Tb(a,b)||(c.dh(),this.wn(c)))};t.wn=function(a){null!==this.portId&&(ll(a,!0),a instanceof V&&ml(a,this))}; +t.tc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn),e=this.Eb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Eb;d=this.bc;var g=this.areaBackground,h=this.Yb;null===g&&null===h||a.Pc();null!==g&&(gi(this,a,g,!0,!0,d,e),g instanceof nl&&g.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(g)):a.fillRect(e.x,e.y,e.width,e.height)); +null!==h&&(gi(this,a,h,!0,!1,d,e),h instanceof nl&&h.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(h)):a.fillRect(e.x,e.y,e.width,e.height));this.ai(a,b)}else if(!this.Qw(a,b)){this instanceof T&&this.Rj(!1);d=this.transform;g=this.panel;0!==(this.o&4096)===!0&&pl(this);var k=this.part;h=!1;var l=0;if(k&&b.Ge("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.kc}m=this.li();var n;if(!(n=b.Vi||!m)){var p=this.naturalBounds;n=this.lh;var r=n.m11,q= n.m21,u=n.dx,w=n.m12,v=n.m22,z=n.dy,y,A=y=0;n=y*r+A*q+u;var B=y*w+A*v+z;y=p.width+l;A=0;var F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);var L=Math.min(B,y);var S=Math.max(n+0,F)-A;var R=Math.max(B+0,y)-L;n=A;B=L;y=p.width+l;A=p.height+l;F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);L=Math.min(B,y);S=Math.max(n+S,F)-A;R=Math.max(B+R,y)-L;n=A;B=L;y=0;A=p.height+l;F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);L=Math.min(B,y);S=Math.max(n+S,F)-A;R=Math.max(B+R,y)-L;n=A;B=L;l=b.viewportBounds;p=l.x;r=l.y;n=!(n>l.width+ -p||p>S+n||B>l.height+r||r>R+B)}if(n){n=0!==(this.m&256);a.clipInsteadOfFill&&(n=!1);this instanceof Qg&&(a.font=this.font);if(n){B=g.je()?g.naturalBounds:g.actualBounds;null!==this.ib?(p=this.ib,S=p.x,R=p.y,l=p.width,p=p.height):(S=Math.max(e.x,B.x),R=Math.max(e.y,B.y),l=Math.min(e.right,B.right)-S,p=Math.min(e.bottom,B.bottom)-R);if(S>e.width+e.x||e.x>B.width+B.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(S,R,l,p);a.clip()}if(m){if(!k.isVisible()){1!==c&&(a.globalAlpha=f);return}h&& -(B=k.shadowOffset,a.iv(B.x*b.scale*b.kc,B.y*b.scale*b.kc,k.shadowBlur),ql(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?ql(a):h&&!1===this.shadowVisible&&rl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Oc(),gi(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof nl&&this.areaBackground.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);h&&(null!== -g&&0!==(g.m&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)&&null===this.shadowVisible&&rl(a);null!==this.Yb&&(a.Oc(),sl(this,a,k,e));h&&(null!==this.Yb||null!==this.areaBackground||null!==g&&0!==(g.m&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)?(tl(this,!0),null===this.shadowVisible&&rl(a)):tl(this,!1);this.ai(a,b);h&&0!==(this.m&512)===!0&&ql(a);m&&h&&rl(a);n&&(a.restore(),a.Nc(this instanceof W));d.Ur()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22* -b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function sl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.Sv();a instanceof Cf&&(e=a.sa.bounds,f=e.x,g=e.y,h=e.width,e=e.height);gi(a,b,a.Yb,!0,!1,c,d);a.Yb instanceof nl&&a.Yb.type===ol?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.rf(a.Yb)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.Pw=function(){return!1};t.ai=function(){}; -function gi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===ul)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Cf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof vl)&&c.ne&&(c.type===wl||c.lk===h&&c.Hs===k))var m=c.ne;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ -c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===xl)m=b.createLinearGradient(n,p,r,q);else if(c.type===ol)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===wl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}if(c.type!==wl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ne=m,null!==m&&(c.lk=h,c.Hs=k),null=== -m&&c.type===wl&&-1!==c.lk)){c.lk=-1;var v=a.diagram;null!==v&&-1===c.lk&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.ig=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.yf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.yf():!0};t.xf=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function pl(a){if(0!==(a.m&2048)===!0){var b=a.Bb;b.reset();if(!a.Eb.v()||!a.qc.v()){yl(a,!1);return}b.translate(a.Eb.x-a.qc.x,a.Eb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.Qn(b,c.x,c.y,c.width,c.height)}yl(a,!1);zl(a,!0)}0!==(a.m&4096)===!0&&(b=a.panel,null===b?(a.lh.set(a.Bb),a.yk=a.scale,zl(a,!1)):null!==b.fe&&(c=a.lh,c.reset(),b.je()?c.multiply(b.lh):null!==b.panel&&c.multiply(b.panel.lh),c.multiply(a.Bb),a.yk=a.scale*b.yk,zl(a,!1)))} -t.Qn=function(a,b,c,d,e){1!==this.xa&&a.scale(this.xa);if(0!==this.Gb){var f=I.alloc();f.pi(b,c,d,e,yc);a.rotate(this.Gb,f.x,f.y);I.free(f)}};t.w=function(a){if(!nj(this)){void 0===a&&(a=!1);ij(this,!0);jl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Mj=function(){nj(this)||(ij(this,!0),jl(this,!0))};function Al(a){if(!oj(a)){var b=a.panel;null!==b?b.w():a.li()&&(b=a.diagram,null!==b&&(b.se.add(a),a instanceof V&&a.vd(),b.Mb()));jl(a,!0)}} -t.Jk=function(){0!==(this.m&2048)===!1&&(yl(this,!0),zl(this,!0))};t.Iu=function(){zl(this,!0)};t.N=function(){var a=this.part;null!==a&&a.N()}; +p||p>S+n||B>l.height+r||r>R+B)}if(n){n=0!==(this.o&256);a.clipInsteadOfFill&&(n=!1);this instanceof Qg&&(a.font=this.font);if(n){B=g.ke()?g.naturalBounds:g.actualBounds;null!==this.ib?(p=this.ib,S=p.x,R=p.y,l=p.width,p=p.height):(S=Math.max(e.x,B.x),R=Math.max(e.y,B.y),l=Math.min(e.right,B.right)-S,p=Math.min(e.bottom,B.bottom)-R);if(S>e.width+e.x||e.x>B.width+B.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(S,R,l,p);a.clip()}if(m){if(!k.isVisible()){1!==c&&(a.globalAlpha=f);return}h&& +(B=k.shadowOffset,a.iv(B.x*b.scale*b.kc,B.y*b.scale*b.kc,k.shadowBlur),ql(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?ql(a):h&&!1===this.shadowVisible&&rl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Pc(),gi(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof nl&&this.areaBackground.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);h&&(null!== +g&&0!==(g.o&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)&&null===this.shadowVisible&&rl(a);null!==this.Yb&&(a.Pc(),sl(this,a,k,e));h&&(null!==this.Yb||null!==this.areaBackground||null!==g&&0!==(g.o&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)?(tl(this,!0),null===this.shadowVisible&&rl(a)):tl(this,!1);this.ai(a,b);h&&0!==(this.o&512)===!0&&ql(a);m&&h&&rl(a);n&&(a.restore(),a.Oc(this instanceof W));d.Ur()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22* +b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function sl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.Sv();a instanceof Cf&&(e=a.sa.bounds,f=e.x,g=e.y,h=e.width,e=e.height);gi(a,b,a.Yb,!0,!1,c,d);a.Yb instanceof nl&&a.Yb.type===ol?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.sf(a.Yb)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.Qw=function(){return!1};t.ai=function(){}; +function gi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===ul)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Cf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof vl)&&c.oe&&(c.type===wl||c.lk===h&&c.Hs===k))var m=c.oe;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===xl)m=b.createLinearGradient(n,p,r,q);else if(c.type===ol)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===wl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}if(c.type!==wl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.oe=m,null!==m&&(c.lk=h,c.Hs=k),null=== +m&&c.type===wl&&-1!==c.lk)){c.lk=-1;var v=a.diagram;null!==v&&-1===c.lk&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.jg=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.zf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.zf():!0};t.yf=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; +function pl(a){if(0!==(a.o&2048)===!0){var b=a.Bb;b.reset();if(!a.Eb.v()||!a.qc.v()){yl(a,!1);return}b.translate(a.Eb.x-a.qc.x,a.Eb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.Qn(b,c.x,c.y,c.width,c.height)}yl(a,!1);zl(a,!0)}0!==(a.o&4096)===!0&&(b=a.panel,null===b?(a.lh.set(a.Bb),a.yk=a.scale,zl(a,!1)):null!==b.ge&&(c=a.lh,c.reset(),b.ke()?c.multiply(b.lh):null!==b.panel&&c.multiply(b.panel.lh),c.multiply(a.Bb),a.yk=a.scale*b.yk,zl(a,!1)))} +t.Qn=function(a,b,c,d,e){1!==this.xa&&a.scale(this.xa);if(0!==this.Gb){var f=I.alloc();f.pi(b,c,d,e,yc);a.rotate(this.Gb,f.x,f.y);I.free(f)}};t.w=function(a){if(!nj(this)){void 0===a&&(a=!1);ij(this,!0);jl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Mj=function(){nj(this)||(ij(this,!0),jl(this,!0))};function Al(a){if(!oj(a)){var b=a.panel;null!==b?b.w():a.li()&&(b=a.diagram,null!==b&&(b.te.add(a),a instanceof V&&a.vd(),b.Mb()));jl(a,!0)}} +t.Jk=function(){0!==(this.o&2048)===!1&&(yl(this,!0),zl(this,!0))};t.Iu=function(){zl(this,!0)};t.N=function(){var a=this.part;null!==a&&a.N()}; function il(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===W.Table)return Bl(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===W.Auto&&d.vb()===a)return Cl(a,td,b);if(c===Xk){if(null!==d){if(d.type===W.Spot&&d.vb()===a)return Cl(a,td,b);c=d.defaultStretch;return c===Xk?Cl(a,lg,b):Cl(a,c,b)}return Cl(a,lg,b)}return Cl(a,c,b)} function Bl(a,b,c,d){var e=a.stretch;if(e!==Xk)return Cl(a,e,d);var f=e=null;switch(b.stretch){case Wk:f=!0;break;case td:f=!0}switch(c.stretch){case Vk:e=!0;break;case td:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===Vk||b===td);null===f&&(f=b===Wk||b===td);return!0===e&&!0===f?Cl(a,td,d):!0===e?Cl(a,Vk,d):!0===f?Cl(a,Wk,d):Cl(a,lg,d)} -function Cl(a,b,c){if(c)return b;if(b===lg)return lg;c=a.desiredSize;if(c.v())return lg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===Vk)return lg;if(b===td)return Wk}else{if(b===Wk)return lg;if(b===td)return Vk}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===Wk)return lg;if(b===td)return Vk}else{if(b===Vk)return lg;if(b===td)return Wk}return b}function tl(a,b){a.m=b?a.m|512:a.m&-513}function el(a){return 0!==(a.m&1024)}function Dl(a,b){a.m=b?a.m|1024:a.m&-1025} -function yl(a,b){a.m=b?a.m|2048:a.m&-2049}function zl(a,b){a.m=b?a.m|4096:a.m&-4097}function nj(a){return 0!==(a.m&8192)}function ij(a,b){a.m=b?a.m|8192:a.m&-8193}function oj(a){return 0!==(a.m&16384)}function jl(a,b){a.m=b?a.m|16384:a.m&-16385}t.ni=function(a){this.Tf=a};t.ns=function(){};t.fv=function(a){this.pa=a;Al(this);return!0};t.Ul=function(a,b){if(this.pa.x!==a||this.pa.y!==b)this.pa.h(a,b),this.Jk()};t.Sv=function(){return 0}; +function Cl(a,b,c){if(c)return b;if(b===lg)return lg;c=a.desiredSize;if(c.v())return lg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===Vk)return lg;if(b===td)return Wk}else{if(b===Wk)return lg;if(b===td)return Vk}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===Wk)return lg;if(b===td)return Vk}else{if(b===Vk)return lg;if(b===td)return Wk}return b}function tl(a,b){a.o=b?a.o|512:a.o&-513}function el(a){return 0!==(a.o&1024)}function Dl(a,b){a.o=b?a.o|1024:a.o&-1025} +function yl(a,b){a.o=b?a.o|2048:a.o&-2049}function zl(a,b){a.o=b?a.o|4096:a.o&-4097}function nj(a){return 0!==(a.o&8192)}function ij(a,b){a.o=b?a.o|8192:a.o&-8193}function oj(a){return 0!==(a.o&16384)}function jl(a,b){a.o=b?a.o|16384:a.o&-16385}t.ni=function(a){this.Uf=a};t.ns=function(){};t.fv=function(a){this.pa=a;Al(this);return!0};t.Ul=function(a,b){if(this.pa.x!==a||this.pa.y!==b)this.pa.h(a,b),this.Jk()};t.Sv=function(){return 0}; function El(a){var b=a.part;if(b instanceof V&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||ml(b,a)}}function Fl(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof W?a instanceof V?a.vd():a.$l(a,function(a){El(a)}):El(a))} t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new wi(a,b,c,d):e=a;e.sd=this;a=this.Yg();null!==a&&Gl(a)&&C("Cannot add a Binding to a template that has already been copied: "+e);null===this.localBindings&&(this.localBindings=new E);this.localBindings.add(e);return this};t.set=function(a){Object.assign(this,a);return this};t.ku=function(a){Hl(this,a);return this};t.apply=function(a){a(this);return this};t.Vl=function(a){uj(this,a);return this};t.Yy=function(){return this.Yg()}; t.Yg=function(){for(var a=this instanceof W?this:this.panel;null!==a;){if(null!==a.allBindings)return a;a=a.panel}return null};t.mv=function(a){a.sd=this;null===this.animationTriggers&&(this.animationTriggers=new pb);this.animationTriggers.add(a.propertyName,a);return this}; function Il(a,b){for(var c=1;ce)&&C("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&C("Must specify non-negative integer column for RowColumnDefinition "+ b+", not: "+e),a.isRow=!1,a.index=e);e=new Wa;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);uj(a,e)}else uj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function Ml(a,b){Jl.add(a,b)}function Nl(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} -ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.bp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new cl),this.A.bp=a)}},localBindings:{get:function(){return null!==this.A?this.A.Ef:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.Ef=a)}},srcBindings:{get:function(){return null!==this.A?this.A.Wo:null},set:function(a){this.srcBindings!== -a&&(null===this.A&&(this.A=new cl),this.A.Wo=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.wi:null},set:function(a){var b=this.shadowVisible;b!==a&&(bl(this),this.A.wi=a,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Gc:null},set:function(a){var b=this.enabledChanged;b!==a&&(bl(this),this.A.Gc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ +ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.bp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new cl),this.A.bp=a)}},localBindings:{get:function(){return null!==this.A?this.A.Ff:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.Ff=a)}},srcBindings:{get:function(){return null!==this.A?this.A.Wo:null},set:function(a){this.srcBindings!== +a&&(null===this.A&&(this.A=new cl),this.A.Wo=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.wi:null},set:function(a){var b=this.shadowVisible;b!==a&&(bl(this),this.A.wi=a,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Hc:null},set:function(a){var b=this.enabledChanged;b!==a&&(bl(this),this.A.Hc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ get:function(){return null!==this.Ra?this.Ra.Oq:$f},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ra&&(this.Ra=new Ol),this.Ra.Oq=a,this.w(),this.g("segmentOrientation",b,a),a===$f&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ra?this.Ra.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ra&&(this.Ra=new Ol),this.Ra.u=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{ -get:function(){return null!==this.Ra?this.Ra.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&C("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.xa=a,this.w(),this.g("scale",b,a))}},angle:{get:function(){return this.Gb},set:function(a){var b=this.Gb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Gb=a,Fl(this),this.w(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.$c},set:function(a){var b=a.width,c=a.height,d=this.$c,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&& isNaN(c))||(this.$c=a=a.J(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",d,a),el(this)&&(a=this.part,null!==a&&(fl(this,a,"width"),fl(this,a,"height"))))}},width:{get:function(){return this.$c.width},set:function(a){var b=this.$c.width;b===a||isNaN(b)&&isNaN(a)||(b=this.$c,this.$c=a=(new K(a,this.$c.height)).freeze(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",b,a),el(this)&&(a=this.part,null!==a&&fl(this,a,"width")))}},height:{ get:function(){return this.$c.height},set:function(a){var b=this.$c.height;b===a||isNaN(b)&&isNaN(a)||(b=this.$c,this.$c=a=(new K(this.$c.width,a)).freeze(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",b,a),el(this)&&(a=this.part,null!==a&&fl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Db},set:function(a){var b=this.minSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), -bl(this),this.A.u=a,this.w(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Lb},set:function(a){var b=this.maxSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),bl(this),this.A.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.bc}},margin:{ -get:function(){return this.Ag},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.Ag;b.C(a)||(this.Ag=a=a.J(),this.w(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.m&2048)===!0&&pl(this);return this.Bb}},fe:{get:function(){0!==(this.m&4096)===!0&&pl(this);return this.lh}},animationTriggers:{get:function(){return null!==this.A?this.A.cb:null},set:function(a){this.animationTriggers!== -a&&(bl(this),this.A.cb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.ui:lg},set:function(a){this.reshapingBehavior!==a&&(bl(this),this.A.ui=a)}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(a.Ec()&&!a.Sb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Fb=a=a.J(),Al(this),this.g("alignment",b,a))}},column:{get:function(){return this.qg}, -set:function(a){a=Math.round(a);var b=this.qg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.qg=a,this.w(),this.g("column",b,a))}},columnSpan:{get:function(){return null!==this.A?this.A.Db:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),bl(this),this.A.Db=a,this.w(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Ln},set:function(a){a=Math.round(a);var b=this.Ln;b!==a&&(0>a&&wa(a,">= 0", +bl(this),this.A.u=a,this.w(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.m:Lb},set:function(a){var b=this.maxSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),bl(this),this.A.m=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.bc}},margin:{ +get:function(){return this.Ag},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.Ag;b.C(a)||(this.Ag=a=a.J(),this.w(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.o&2048)===!0&&pl(this);return this.Bb}},ge:{get:function(){0!==(this.o&4096)===!0&&pl(this);return this.lh}},animationTriggers:{get:function(){return null!==this.A?this.A.cb:null},set:function(a){this.animationTriggers!== +a&&(bl(this),this.A.cb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.ui:lg},set:function(a){this.reshapingBehavior!==a&&(bl(this),this.A.ui=a)}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(a.Fc()&&!a.Sb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Fb=a=a.J(),Al(this),this.g("alignment",b,a))}},column:{get:function(){return this.rg}, +set:function(a){a=Math.round(a);var b=this.rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.rg=a,this.w(),this.g("column",b,a))}},columnSpan:{get:function(){return null!==this.A?this.A.Db:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),bl(this),this.A.Db=a,this.w(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Ln},set:function(a){a=Math.round(a);var b=this.Ln;b!==a&&(0>a&&wa(a,">= 0", Y,"row"),this.Ln=a,this.w(),this.g("row",b,a))}},rowSpan:{get:function(){return null!==this.A?this.A.vi:1},set:function(a){a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),bl(this),this.A.vi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.xi:null},set:function(a){var b=this.spanAllocation;b!==a&&(bl(this),this.A.xi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{ -get:function(){return this.fk},set:function(a){var b=this.fk;b.C(a)||(this.fk=a=a.J(),this.w(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.Gn},set:function(a){var b=this.Gn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&Ql(c,this);this.Gn=a;null!==a&&null!==c&&(c.Ge=!0,Rl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!== +get:function(){return this.fk},set:function(a){var b=this.fk;b.C(a)||(this.fk=a=a.J(),this.w(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.Gn},set:function(a){var b=this.Gn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&Ql(c,this);this.Gn=a;null!==a&&null!==c&&(c.He=!0,Rl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!== this.aa?this.aa.tj:sc},set:function(a){var b=this.toSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.tj=a,this.g("toSpot",b,a),El(this))}},toEndSegmentLength:{get:function(){return null!==this.aa?this.aa.rj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",Y,"toEndSegmentLength"),this.Rc(),this.aa.rj=a,this.g("toEndSegmentLength",b,a),El(this))}},toShortLength:{get:function(){return null!==this.aa?this.aa.sj:0},set:function(a){var b= this.toShortLength;b!==a&&(this.Rc(),this.aa.sj=a,this.g("toShortLength",b,a),El(this))}},toLinkable:{get:function(){return null!==this.aa?this.aa.sr:null},set:function(a){var b=this.toLinkable;b!==a&&(this.Rc(),this.aa.sr=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.aa?this.aa.tr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(0>a&&wa(a,">= 0",Y,"toMaxLinks"),this.Rc(),this.aa.tr=a,this.g("toMaxLinks", b,a))}},fromSpot:{get:function(){return null!==this.aa?this.aa.Qi:sc},set:function(a){var b=this.fromSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.Qi=a,this.g("fromSpot",b,a),El(this))}},fromEndSegmentLength:{get:function(){return null!==this.aa?this.aa.Oi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",Y,"fromEndSegmentLength"),this.Rc(),this.aa.Oi=a,this.g("fromEndSegmentLength",b,a),El(this))}},fromShortLength:{ @@ -968,16 +968,16 @@ this.fromMaxLinks;b!==a&&(0>a&&wa(a,">= 0",Y,"fromMaxLinks"),this.Rc(),this.aa.L get:function(){return null!==this.A?this.A.uh:null},set:function(a){var b=this.doubleClick;b!==a&&(bl(this),this.A.uh=a,this.g("doubleClick",b,a))}},contextClick:{get:function(){return null!==this.A?this.A.qh:null},set:function(a){var b=this.contextClick;b!==a&&(bl(this),this.A.qh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.mouseEnter;b!==a&&(bl(this),this.A.Fh= a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ih:null},set:function(a){var b=this.mouseLeave;b!==a&&(bl(this),this.A.Ih=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Jh:null},set:function(a){var b=this.mouseOver;b!==a&&(bl(this),this.A.Jh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Hh:null},set:function(a){var b= this.mouseHover;b!==a&&(bl(this),this.A.Hh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Gh:null},set:function(a){var b=this.mouseHold;b!==a&&(bl(this),this.A.Gh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Qd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(bl(this),this.A.Qd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{ -get:function(){return null!==this.A?this.A.Ff:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(bl(this),this.A.Ff=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{get:function(){return null!==this.A?this.A.Eh:null},set:function(a){var b=this.mouseDrop;b!==a&&(bl(this),this.A.Eh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.Y:null},set:function(a){var b=this.actionDown;b!==a&&(bl(this),this.A.Y=a,this.g("actionDown", +get:function(){return null!==this.A?this.A.Gf:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(bl(this),this.A.Gf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{get:function(){return null!==this.A?this.A.Eh:null},set:function(a){var b=this.mouseDrop;b!==a&&(bl(this),this.A.Eh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.W:null},set:function(a){var b=this.actionDown;b!==a&&(bl(this),this.A.W=a,this.g("actionDown", b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ga:null},set:function(a){var b=this.actionMove;b!==a&&(bl(this),this.A.ga=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ga:null},set:function(a){var b=this.actionUp;b!==a&&(bl(this),this.A.Ga=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel; b!==a&&(bl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!==this.A?this.A.Th:null},set:function(a){var b=this.toolTip;b!==a&&(bl(this),this.A.Th=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.rh:null},set:function(a){var b=this.contextMenu;b!==a&&(bl(this),this.A.rh=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.mv;Y.prototype.findBindingPanel=Y.prototype.Yg; -Y.prototype.findTemplateBinder=Y.prototype.Yy;Y.prototype.setProperties=Y.prototype.Vl;Y.prototype.apply=Y.prototype.apply;Y.prototype.attach=Y.prototype.ku;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.xf;Y.prototype.isVisibleObject=Y.prototype.yf;Y.prototype.isContainedBy=Y.prototype.ig;Y.prototype.getNearestIntersectionPoint=Y.prototype.Or;Y.prototype.getLocalPoint=Y.prototype.Nr;Y.prototype.getDocumentScale=Y.prototype.tf;Y.prototype.getDocumentAngle=Y.prototype.fi; -Y.prototype.getDocumentBounds=Y.prototype.gi;Y.prototype.getDocumentPoint=Y.prototype.ia;Y.prototype.intersectsRect=Y.prototype.Sc;Y.prototype.containedInRect=Y.prototype.Wg;Y.prototype.containsRect=Y.prototype.De;Y.prototype.containsPoint=Y.prototype.ba;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.bb;Y.prototype.addCopyProperty=Y.prototype.zw;var Jl=null;Y.className="GraphObject";Jl=new pb; +Y.prototype.findTemplateBinder=Y.prototype.Yy;Y.prototype.setProperties=Y.prototype.Vl;Y.prototype.apply=Y.prototype.apply;Y.prototype.attach=Y.prototype.ku;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.yf;Y.prototype.isVisibleObject=Y.prototype.zf;Y.prototype.isContainedBy=Y.prototype.jg;Y.prototype.getNearestIntersectionPoint=Y.prototype.Or;Y.prototype.getLocalPoint=Y.prototype.Nr;Y.prototype.getDocumentScale=Y.prototype.uf;Y.prototype.getDocumentAngle=Y.prototype.fi; +Y.prototype.getDocumentBounds=Y.prototype.gi;Y.prototype.getDocumentPoint=Y.prototype.ia;Y.prototype.intersectsRect=Y.prototype.Sc;Y.prototype.containedInRect=Y.prototype.Wg;Y.prototype.containsRect=Y.prototype.Ee;Y.prototype.containsPoint=Y.prototype.ba;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.bb;Y.prototype.addCopyProperty=Y.prototype.zw;var Jl=null;Y.className="GraphObject";Jl=new pb; Ml("Button",function(){function a(a,b){return null!==a.diagram.ec(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Il(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Il(Cf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new N(0,0,2.76142374915397,2.761423749153969),spot2:new N(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.xf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; -b.mouseLeave=function(a,b){b.xf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.xf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Cf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram, -g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Cf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Il(Cf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new N(0,0,2.76142374915397,2.761423749153969),spot2:new N(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.yf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; +b.mouseLeave=function(a,b){b.yf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.yf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Cf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram, +g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Cf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); Ml("TreeExpanderButton",function(){var a=Il("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Il(Cf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Jb},(new wi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Fo()),{visible:!1},(new wi("visible","isTreeLeaf",function(a){return!a})).Fo());a.click=function(a,c){c=c.part;c instanceof ue&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); @@ -986,85 +986,85 @@ a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};r Ml("ContextMenu",function(){return Il(ue,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new I(0,3),shadowBlur:5},new wi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ml("ContextMenuButton",function(){var a=Il("Button");a.stretch=Vk;var b=a.fb("ButtonBorder");b instanceof Cf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); Ml("PanelExpanderButton",function(a){var b=Nl(a,"COLLAPSIBLE"),c=Il("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Il(Cf,{name:"ButtonIcon",strokeWidth:2},(new wi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Fo(b))); a=c.fb("ButtonBorder");a instanceof Cf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.Yg();null===e&&(e=c.part);null!==e&&(c=e.fb(b),null!==c&&(a.handled=!0,d.Da("Collapse/Expand Panel"),c.visible=!c.visible,d.eb("Collapse/Expand Panel")))}};return c}); -Ml("CheckBoxButton",function(a){var b=Nl(a);a=Il("Button",{desiredSize:new K(14,14)},Il(Cf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:ng,visible:!1},""!==b?(new wi("visible",b)).ox():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.fb("ButtonIcon");c.Da("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +Ml("CheckBoxButton",function(a){var b=Nl(a);a=Il("Button",{desiredSize:new K(14,14)},Il(Cf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:ng,visible:!1},""!==b?(new wi("visible",b)).px():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.fb("ButtonIcon");c.Da("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.eb("checkbox")}}};return a}); -Ml("CheckBox",function(a){a=Nl(a);a=Il("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ic(0,1,0,0)});var b=Il(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, +Ml("CheckBox",function(a){a=Nl(a);a=Il("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ec(0,1,0,0)});var b=Il(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});Y.None=lg=new D(Y,"None",0);Y.Default=Xk=new D(Y,"Default",0);Y.Vertical=Wk=new D(Y,"Vertical",4);Y.Horizontal=Vk=new D(Y,"Horizontal",5);Y.Fill=td=new D(Y,"Fill",3);Y.Uniform=ng=new D(Y,"Uniform",1); Y.UniformToFill=Yk=new D(Y,"UniformToFill",2);Y.FlipVertical=Zk=new D(Y,"FlipVertical",1);Y.FlipHorizontal=$k=new D(Y,"FlipHorizontal",2);Y.FlipBoth=al=new D(Y,"FlipBoth",3);Y.make=Il;Y.getBuilders=function(){var a=new pb,b;for(b in Jl)if(b!==b.toLowerCase()){var c=Jl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=Ml; Y.build=function(a,b){var c=Jl.I(a);if("function"===typeof c&&(c=c(null),c instanceof Y))return b&&c.set(b),c;C('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')};Y.takeBuilderArgument=Nl; -function cl(){this.ic=!1;this.va="";this.bp=-1;this.hb=this.Wo=this.Ef=null;this.j="";this.cb=this.xi=this.Gc=this.rh=this.Th=this.F=this.Ga=this.ga=this.Y=this.Eh=this.Ff=this.Qd=this.Gh=this.Hh=this.Jh=this.Ih=this.Fh=this.qh=this.uh=this.oh=null;this.u=Db;this.o=Lb;this.Zf=Xk;this.Db=this.vi=1;this.ui=lg;this.ke=this.wi=this.nb=null;this.Hc="category"} -cl.prototype.copy=function(){var a=new cl;a.va=this.va;a.bp=this.bp;a.Ef=this.Ef;a.hb=this.hb;a.j=this.j;a.oh=this.oh;a.uh=this.uh;a.qh=this.qh;a.Fh=this.Fh;a.Ih=this.Ih;a.Jh=this.Jh;a.Hh=this.Hh;a.Gh=this.Gh;a.Qd=this.Qd;a.Ff=this.Ff;a.Eh=this.Eh;a.Y=this.Y;a.ga=this.ga;a.Ga=this.Ga;a.F=this.F;a.Th=this.Th;a.rh=this.rh;a.Gc=this.Gc;a.xi=this.xi;a.cb=this.cb;a.u=this.u.J();a.o=this.o.J();a.Zf=this.Zf;a.vi=this.vi;a.Db=this.Db;a.ui=this.ui;a.nb=this.nb;a.wi=this.wi;a.ke=this.ke;a.Hc=this.Hc;return a}; -function Ol(){this.u=-Infinity;this.o=0;this.F=qb;this.Oq=$f;this.j=this.Y="None"}Ol.prototype.copy=function(){var a=new Ol;a.u=this.u;a.o=this.o;a.F=this.F.J();a.Oq=this.Oq;a.Y=this.Y;a.j=this.j;return a};Ol.className="LinkElementSettings";function dl(){this.tj=this.Qi=Wc;this.sj=this.Pi=this.rj=this.Oi=NaN;this.sr=this.Kp=null;this.tr=this.Lp=Infinity} +function cl(){this.ic=!1;this.va="";this.bp=-1;this.hb=this.Wo=this.Ff=null;this.j="";this.cb=this.xi=this.Hc=this.rh=this.Th=this.F=this.Ga=this.ga=this.W=this.Eh=this.Gf=this.Qd=this.Gh=this.Hh=this.Jh=this.Ih=this.Fh=this.qh=this.uh=this.oh=null;this.u=Db;this.m=Lb;this.$f=Xk;this.Db=this.vi=1;this.ui=lg;this.le=this.wi=this.nb=null;this.Ic="category"} +cl.prototype.copy=function(){var a=new cl;a.va=this.va;a.bp=this.bp;a.Ff=this.Ff;a.hb=this.hb;a.j=this.j;a.oh=this.oh;a.uh=this.uh;a.qh=this.qh;a.Fh=this.Fh;a.Ih=this.Ih;a.Jh=this.Jh;a.Hh=this.Hh;a.Gh=this.Gh;a.Qd=this.Qd;a.Gf=this.Gf;a.Eh=this.Eh;a.W=this.W;a.ga=this.ga;a.Ga=this.Ga;a.F=this.F;a.Th=this.Th;a.rh=this.rh;a.Hc=this.Hc;a.xi=this.xi;a.cb=this.cb;a.u=this.u.J();a.m=this.m.J();a.$f=this.$f;a.vi=this.vi;a.Db=this.Db;a.ui=this.ui;a.nb=this.nb;a.wi=this.wi;a.le=this.le;a.Ic=this.Ic;return a}; +function Ol(){this.u=-Infinity;this.m=0;this.F=qb;this.Oq=$f;this.j=this.W="None"}Ol.prototype.copy=function(){var a=new Ol;a.u=this.u;a.m=this.m;a.F=this.F.J();a.Oq=this.Oq;a.W=this.W;a.j=this.j;return a};Ol.className="LinkElementSettings";function dl(){this.tj=this.Qi=Wc;this.sj=this.Pi=this.rj=this.Oi=NaN;this.sr=this.Kp=null;this.tr=this.Lp=Infinity} dl.prototype.copy=function(){var a=new dl;a.Qi=this.Qi.J();a.tj=this.tj.J();a.Oi=this.Oi;a.rj=this.rj;a.Pi=this.Pi;a.sj=this.sj;a.Kp=this.Kp;a.sr=this.sr;a.Lp=this.Lp;a.tr=this.tr;return a};dl.className="LinkSettings";function Sl(){this.Ta=[1,0,0,1,0,0]}Sl.prototype.copy=function(){var a=new Sl;a.Ta[0]=this.Ta[0];a.Ta[1]=this.Ta[1];a.Ta[2]=this.Ta[2];a.Ta[3]=this.Ta[3];a.Ta[4]=this.Ta[4];a.Ta[5]=this.Ta[5];return a}; -Sl.prototype.translate=function(a,b){this.Ta[4]+=this.Ta[0]*a+this.Ta[2]*b;this.Ta[5]+=this.Ta[1]*a+this.Ta[3]*b};Sl.prototype.scale=function(a,b){this.Ta[0]*=a;this.Ta[1]*=a;this.Ta[2]*=b;this.Ta[3]*=b};Sl.className="STransform";function Tl(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Iw=[];this.pattern=null}Tl.prototype.addColorStop=function(a,b){this.Iw.push({offset:a,color:b})};Tl.className="SGradient"; +Sl.prototype.translate=function(a,b){this.Ta[4]+=this.Ta[0]*a+this.Ta[2]*b;this.Ta[5]+=this.Ta[1]*a+this.Ta[3]*b};Sl.prototype.scale=function(a,b){this.Ta[0]*=a;this.Ta[1]*=a;this.Ta[2]*=b;this.Ta[3]*=b};Sl.className="STransform";function Tl(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Jw=[];this.pattern=null}Tl.prototype.addColorStop=function(a,b){this.Jw.push({offset:a,color:b})};Tl.className="SGradient"; function xj(a,b){this.ownerDocument=a=void 0===b?x.document:b;this.Jz="http://www.w3.org/2000/svg";void 0!==a&&(this.Sa=this.Vb("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Sa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Sa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.po=null;this.context=new Ul(this)} xj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.style.width=c+"px",this.style.height=d+"px",this.Sa.setAttributeNS(null,"width",c+"px"),this.Sa.setAttributeNS(null,"height",d+"px"),this.Sa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.bw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.bw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -xj.prototype.Vb=function(a,b,c){a=this.ownerDocument.createElementNS(this.Jz,a);if(ya(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};xj.prototype.getBoundingClientRect=function(){return this.Sa.getBoundingClientRect()};xj.prototype.focus=function(){this.Sa.focus()};xj.prototype.Ow=function(){this.ownerDocument=null}; +xj.prototype.Vb=function(a,b,c){a=this.ownerDocument.createElementNS(this.Jz,a);if(ya(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};xj.prototype.getBoundingClientRect=function(){return this.Sa.getBoundingClientRect()};xj.prototype.focus=function(){this.Sa.focus()};xj.prototype.Pw=function(){this.ownerDocument=null}; ma.Object.defineProperties(xj.prototype,{width:{get:function(){return this.Sa.width.baseVal.value},set:function(a){this.Sa.width=a}},height:{get:function(){return this.Sa.height.baseVal.value},set:function(a){this.Sa.height=a}},style:{get:function(){return this.Sa.style}}});xj.className="SVGSurface"; -function Ul(a){this.qs=a;this.svg=a.Sa;this.stack=[];this.md=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Lg=this.Yq=this.Xq=0;this.Xr=null;this.path=[];this.et=!1;this.Og=null;this.pj=0;this.Ee=new Sl; +function Ul(a){this.qs=a;this.svg=a.Sa;this.stack=[];this.md=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Lg=this.Yq=this.Xq=0;this.Xr=null;this.path=[];this.et=!1;this.Og=null;this.pj=0;this.Fe=new Sl; Vl(this,1,0,0,1,0,0);var b=kb++,c=this.Vb("clipPath",{id:"mainClip"+b});c.appendChild(this.Vb("rect",{x:0,y:0,width:a.width,height:a.height}));this.bw=c;this.qs.Sa.appendChild(c);this.md[0].setAttributeNS(null,"clip-path","url(#mainClip"+b+")");this.Lz={}}t=Ul.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,r=b+n,q=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,q,a-m,b-n]),this.path.push(["A",c,c,0,1,q,p,r])):1E-6=Math.PI),q,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[]};t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){}; -t.clip=function(){this.addPath("clipPath",this.path,this.Ee)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new Tl("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.clip=function(){this.addPath("clipPath",this.path,this.Fe)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new Tl("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.Lz;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+kb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Vb("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Vb(Ak,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; t.createRadialGradient=function(a,b,c,d,e,f){var g=new Tl("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g}; t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width,n=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=n);d=d||0;e=e||0;f=f||0;g=g||0;h=h||0;k=k||0;a={x:0,y:0,width:m||d,height:n||e,href:l};J.ca(d,h)&&J.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(a.preserveAspectRatio= -"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+kb++,g=this.Vb("clipPath",{id:f}),g.appendChild(this.Vb("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";Wl(this,Ak,a,this.Ee,l);this.addElement(Ak,a)};t.fill=function(){this.addPath("fill",this.path,this.Ee)}; -t.rf=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};Wl(this,"fill",a,this.Ee);this.addElement("rect",a)};t.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};Wl(this,"fill",b,this.Ee);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; +"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+kb++,g=this.Vb("clipPath",{id:f}),g.appendChild(this.Vb("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";Wl(this,Ak,a,this.Fe,l);this.addElement(Ak,a)};t.fill=function(){this.addPath("fill",this.path,this.Fe)}; +t.sf=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};Wl(this,"fill",a,this.Fe);this.addElement("rect",a)};t.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};Wl(this,"fill",b,this.Fe);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.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"])}; -t.restore=function(){this.Ee=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.lineDashOffset=a.lineDashOffset;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}; -t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(e=0;eg.width+g.x||g.x> -k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;Vl(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.li()&&!this.isVisible())return!0;a.Ee.Ta=[1,0,0,1,0,0];(this instanceof Qg&&1g.width+g.x||g.x> +k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;Vl(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.li()&&!this.isVisible())return!0;a.Fe.Ta=[1,0,0,1,0,0];(this instanceof Qg&&1b?(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.pm?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.pm?this.clip():this.fill()};t.si=function(){this.pm||this.stroke()};t.iv=function(a,b,c){this.Xq=a;this.Yq=b;this.Lg=c}; -t.Gr=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Er=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(Yl),a.lineDashOffset=0)};t.Nc=function(a){a&&(this.Fs="");this.Es=this.Gs=""}; +t.save=function(){this.Pc();this.Z.save()};vl.prototype.rotate=function(a){this.rl.rotate(57.2958*a,0,0)};t=vl.prototype;t.setTransform=function(a,b,c,d,e,f){this.rl.setTransform(a,b,c,d,e,f)};t.scale=function(a,b){this.rl.scale(a,b)};t.translate=function(a,b){this.rl.translate(a,b)};t.stroke=function(){this.Z.stroke()}; +t.transform=function(a,b,c,d,e,f){if(1!==a||0!==b||0!==c||1!==d||0!==e||0!==f){var g=this.rl,h=g.m11*a+g.m21*b;a=g.m12*a+g.m22*b;b=g.m11*c+g.m21*d;c=g.m12*c+g.m22*d;g.dx=g.m11*e+g.m21*f+g.dx;g.dy=g.m12*e+g.m22*f+g.dy;g.m11=h;g.m12=a;g.m21=b;g.m22=c}};t.Pc=function(){var a=this.rl;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)}; +t.sf=function(a){if(a instanceof nl&&a.type===ol){var b=a.lk;a=a.Hs;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.pm?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.pm?this.clip():this.fill()};t.si=function(){this.pm||this.stroke()};t.iv=function(a,b,c){this.Xq=a;this.Yq=b;this.Lg=c}; +t.Gr=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Er=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(Yl),a.lineDashOffset=0)};t.Oc=function(a){a&&(this.Fs="");this.Es=this.Gs=""}; ma.Object.defineProperties(vl.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.Es!==a&&(this.Es=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.Fs!==a&&(this.Fs=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit= a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY= a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.Gs!==a&&(this.Gs=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},clipInsteadOfFill:{get:function(){return this.pm}, -set:function(a){this.pm=a}}});var Yl=Object.freeze([]);vl.className="CanvasSurfaceContext";function Zl(){this.F=this.o=this.u=this.j=0}Zl.className="ColorNumbers"; -function nl(a,b){$l||(am(),$l=!0);Ra(this);this._isFrozen=!1;void 0===a?(this.qa=ul,this.kk="black"):"string"===typeof a?(this.qa=ul,this.kk=a):(this.qa=a,this.kk="black");a=this.qa;a===xl?(this.Gd=uc,this.zk=Bc):this.zk=a===ol?this.Gd=yc:this.Gd=sc;this.cr=0;this.Ap=NaN;this.ne=this.Bq=this.me=null;this.Hs=this.lk=0;b&&Object.assign(this,b)} -nl.prototype.copy=function(){var a=new nl;a.qa=this.qa;a.kk=this.kk;a.Gd=this.Gd.J();a.zk=this.zk.J();a.cr=this.cr;a.Ap=this.Ap;null!==this.me&&(a.me=this.me.copy());a.Bq=this.Bq;return a};t=nl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.me&&this.me.freeze();return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.me&&this.me.ja();return this};t.ob=function(a){a.classType===nl&&(this.type=a)}; +set:function(a){this.pm=a}}});var Yl=Object.freeze([]);vl.className="CanvasSurfaceContext";function Zl(){this.F=this.m=this.u=this.j=0}Zl.className="ColorNumbers"; +function nl(a,b){$l||(am(),$l=!0);Ra(this);this._isFrozen=!1;void 0===a?(this.qa=ul,this.kk="black"):"string"===typeof a?(this.qa=ul,this.kk=a):(this.qa=a,this.kk="black");a=this.qa;a===xl?(this.Gd=uc,this.zk=Bc):this.zk=a===ol?this.Gd=yc:this.Gd=sc;this.cr=0;this.Ap=NaN;this.oe=this.Bq=this.ne=null;this.Hs=this.lk=0;b&&Object.assign(this,b)} +nl.prototype.copy=function(){var a=new nl;a.qa=this.qa;a.kk=this.kk;a.Gd=this.Gd.J();a.zk=this.zk.J();a.cr=this.cr;a.Ap=this.Ap;null!==this.ne&&(a.ne=this.ne.copy());a.Bq=this.Bq;return a};t=nl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.ne&&this.ne.freeze();return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.ne&&this.ne.ja();return this};t.ob=function(a){a.classType===nl&&(this.type=a)}; t.toString=function(){var a="Brush(";if(this.type===ul)a+=this.color;else if(a=this.type===xl?a+"Linear ":this.type===ol?a+"Radial ":this.type===wl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&wa(a,"0 <= loc <= 1",nl,"addColorStop:loc");null===this.me&&(this.me=new pb);this.me.add(a,b);this.qa===ul&&(this.type=xl);this.ne=null;return this}; +t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&wa(a,"0 <= loc <= 1",nl,"addColorStop:loc");null===this.ne&&(this.ne=new pb);this.ne.add(a,b);this.qa===ul&&(this.type=xl);this.oe=null;return this}; t.Cz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?bm:b;if(this.type===ul)Uh(this.color),this.color=cm(a,b);else if((this.type===xl||this.type===ol)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,cm(a,b));return this};function dm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bm:c;Uh(a);return cm(b,c)} t.Dy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?bm:b;if(this.type===ul)Uh(this.color),this.color=cm(-a,b);else if((this.type===xl||this.type===ol)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,cm(-a,b));return this};function em(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bm:c;Uh(a);return cm(-b,c)} -function fm(a,b,c){Uh(a);a=gm.j;var d=gm.u,e=gm.o,f=gm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((gm.j-a)*c+a)+", "+Math.round((gm.u-d)*c+d)+", "+Math.round((gm.o-e)*c+e)+", "+Math.round((gm.F-f)*c+f)+")"} -t.jx=function(){if(this.type===ul)return hm(this.color);if((this.type===xl||this.type===ol)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ol)return hm(a.first().value);if(null!==a.get(.5))return hm(a.get(.5));if(2===a.count)return a=a.Ea(),hm(fm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return hm(fm(a.get(c),a.get(d),1-f/e))}return!1}; -function hm(a){if(!a)return!1;if(a instanceof nl)return a.jx();Uh(a);return 128>(299*gm.j+587*gm.u+114*gm.o)/1E3} -function cm(a,b){switch(b){case bm:b=100*im(gm.j);var c=100*im(gm.u),d=100*im(gm.o);jm.j=.4124564*b+.3575761*c+.1804375*d;jm.u=.2126729*b+.7151522*c+.072175*d;jm.o=.0193339*b+.119192*c+.9503041*d;jm.F=gm.F;b=km(jm.j/lm[0]);c=km(jm.u/lm[1]);d=km(jm.o/lm[2]);mm.j=116*c-16;mm.u=500*(b-c);mm.o=200*(c-d);mm.F=jm.F;mm.j=Math.min(100,Math.max(0,mm.j+100*a));a=(mm.j+16)/116;b=a-mm.o/200;jm.j=lm[0]*nm(mm.u/500+a);jm.u=lm[1]*(mm.j>om*pm?Math.pow(a,3):mm.j/om);jm.o=lm[2]*nm(b);jm.F=mm.F;a=-.969266*jm.j+1.8760108* -jm.u+.041556*jm.o;b=.0556434*jm.j+-.2040259*jm.u+1.0572252*jm.o;gm.j=255*qm((3.2404542*jm.j+-1.5371385*jm.u+-.4985314*jm.o)/100);gm.u=255*qm(a/100);gm.o=255*qm(b/100);gm.F=jm.F;gm.j=Math.round(gm.j);255gm.j&&(gm.j=0);gm.u=Math.round(gm.u);255gm.u&&(gm.u=0);gm.o=Math.round(gm.o);255gm.o&&(gm.o=0);return"rgba("+gm.j+", "+gm.u+", "+gm.o+", "+gm.F+")";case rm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ -Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){$l||(am(),$l=!0);var b=sm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,gm.j=a[0],gm.u=a[1],gm.o=a[2],gm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,gm.j=0,gm.u=0,gm.o=0,gm.F=1)}} -function Vh(){var a=gm.j/255,b=gm.u/255,c=gm.o/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=gm.F}function im(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function qm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function fm(a,b,c){Uh(a);a=gm.j;var d=gm.u,e=gm.m,f=gm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((gm.j-a)*c+a)+", "+Math.round((gm.u-d)*c+d)+", "+Math.round((gm.m-e)*c+e)+", "+Math.round((gm.F-f)*c+f)+")"} +t.kx=function(){if(this.type===ul)return hm(this.color);if((this.type===xl||this.type===ol)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ol)return hm(a.first().value);if(null!==a.get(.5))return hm(a.get(.5));if(2===a.count)return a=a.Ea(),hm(fm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return hm(fm(a.get(c),a.get(d),1-f/e))}return!1}; +function hm(a){if(!a)return!1;if(a instanceof nl)return a.kx();Uh(a);return 128>(299*gm.j+587*gm.u+114*gm.m)/1E3} +function cm(a,b){switch(b){case bm:b=100*im(gm.j);var c=100*im(gm.u),d=100*im(gm.m);jm.j=.4124564*b+.3575761*c+.1804375*d;jm.u=.2126729*b+.7151522*c+.072175*d;jm.m=.0193339*b+.119192*c+.9503041*d;jm.F=gm.F;b=km(jm.j/lm[0]);c=km(jm.u/lm[1]);d=km(jm.m/lm[2]);mm.j=116*c-16;mm.u=500*(b-c);mm.m=200*(c-d);mm.F=jm.F;mm.j=Math.min(100,Math.max(0,mm.j+100*a));a=(mm.j+16)/116;b=a-mm.m/200;jm.j=lm[0]*nm(mm.u/500+a);jm.u=lm[1]*(mm.j>om*pm?Math.pow(a,3):mm.j/om);jm.m=lm[2]*nm(b);jm.F=mm.F;a=-.969266*jm.j+1.8760108* +jm.u+.041556*jm.m;b=.0556434*jm.j+-.2040259*jm.u+1.0572252*jm.m;gm.j=255*qm((3.2404542*jm.j+-1.5371385*jm.u+-.4985314*jm.m)/100);gm.u=255*qm(a/100);gm.m=255*qm(b/100);gm.F=jm.F;gm.j=Math.round(gm.j);255gm.j&&(gm.j=0);gm.u=Math.round(gm.u);255gm.u&&(gm.u=0);gm.m=Math.round(gm.m);255gm.m&&(gm.m=0);return"rgba("+gm.j+", "+gm.u+", "+gm.m+", "+gm.F+")";case rm:return Vh(),Wh.m=Math.min(100,Math.max(0,Wh.m+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.m+"%, "+ +Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){$l||(am(),$l=!0);var b=sm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,gm.j=a[0],gm.u=a[1],gm.m=a[2],gm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,gm.j=0,gm.u=0,gm.m=0,gm.F=1)}} +function Vh(){var a=gm.j/255,b=gm.u/255,c=gm.m/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.m=Math.round(100*e);Wh.F=gm.F}function im(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function qm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function km(a){return a>pm?Math.pow(a,1/3):(om*a+16)/116}function nm(a){var b=a*a*a;return b>pm?b:(116*a-16)/om}function Pl(a,b){"string"!==typeof a&&(a instanceof nl||C("Value for "+b+" must be a color string or a Brush, not "+a))}function am(){sm=Og?(new Bk(null)).context:null} -ma.Object.defineProperties(nl.prototype,{type:{get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this.start.Ec()&&(a===xl?this.start=uc:a===ol&&(this.start=yc));this.end.Ec()&&(a===xl?this.end=Bc:a===ol&&(this.end=yc));this.ne=null}},color:{get:function(){return this.kk},set:function(a){this._isFrozen&&va(this,a);this.kk=a;this.ne=null}},start:{get:function(){return this.Gd}, -set:function(a){this._isFrozen&&va(this,a);this.Gd=a.J();this.ne=null}},end:{get:function(){return this.zk},set:function(a){this._isFrozen&&va(this,a);this.zk=a.J();this.ne=null}},startRadius:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);0>a&&wa(a,">= zero",nl,"startRadius");this.cr=a;this.ne=null}},endRadius:{get:function(){return this.Ap},set:function(a){this._isFrozen&&va(this, -a);0>a&&wa(a,">= zero",nl,"endRadius");this.Ap=a;this.ne=null}},colorStops:{get:function(){return this.me},set:function(a){this._isFrozen&&va(this,a);this.me=a;this.ne=null}},pattern:{get:function(){return this.Bq},set:function(a){this._isFrozen&&va(this,a);this.Bq=a;this.ne=null}}});nl.prototype.isDark=nl.prototype.jx;nl.prototype.darkenBy=nl.prototype.Dy;nl.prototype.lightenBy=nl.prototype.Cz;nl.prototype.addColorStop=nl.prototype.addColorStop; +ma.Object.defineProperties(nl.prototype,{type:{get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this.start.Fc()&&(a===xl?this.start=uc:a===ol&&(this.start=yc));this.end.Fc()&&(a===xl?this.end=Bc:a===ol&&(this.end=yc));this.oe=null}},color:{get:function(){return this.kk},set:function(a){this._isFrozen&&va(this,a);this.kk=a;this.oe=null}},start:{get:function(){return this.Gd}, +set:function(a){this._isFrozen&&va(this,a);this.Gd=a.J();this.oe=null}},end:{get:function(){return this.zk},set:function(a){this._isFrozen&&va(this,a);this.zk=a.J();this.oe=null}},startRadius:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);0>a&&wa(a,">= zero",nl,"startRadius");this.cr=a;this.oe=null}},endRadius:{get:function(){return this.Ap},set:function(a){this._isFrozen&&va(this, +a);0>a&&wa(a,">= zero",nl,"endRadius");this.Ap=a;this.oe=null}},colorStops:{get:function(){return this.ne},set:function(a){this._isFrozen&&va(this,a);this.ne=a;this.oe=null}},pattern:{get:function(){return this.Bq},set:function(a){this._isFrozen&&va(this,a);this.Bq=a;this.oe=null}}});nl.prototype.isDark=nl.prototype.kx;nl.prototype.darkenBy=nl.prototype.Dy;nl.prototype.lightenBy=nl.prototype.Cz;nl.prototype.addColorStop=nl.prototype.addColorStop; var pm=216/24389,om=24389/27,lm=[95.047,100,108.883],sm=null,gm=new Zl,Wh=new Zl,jm=new Zl,mm=new Zl,$l=!1;nl.className="Brush";var ul;nl.Solid=ul=new D(nl,"Solid",0);var xl;nl.Linear=xl=new D(nl,"Linear",1);var ol;nl.Radial=ol=new D(nl,"Radial",2);var wl;nl.Pattern=wl=new D(nl,"Pattern",4);var bm;nl.Lab=bm=new D(nl,"Lab",5);var rm;nl.HSL=rm=new D(nl,"HSL",6); nl.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a);b=Math.floor(a+Math.random()*c).toString(16);var d=Math.floor(a+Math.random()*c).toString(16);a=Math.floor(a+Math.random()*c).toString(16);2>b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+a}; nl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;$l||(am(),$l=!0);var b=sm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c};nl.lighten=function(a){return dm(a)};nl.lightenBy=dm;nl.darken=function(a){return em(a)};nl.darkenBy=em;nl.mix=fm;nl.isDark=hm;function Ll(){this.va="Base"}Ll.prototype.measure=function(){}; -Ll.prototype.Fz=function(a,b,c,d,e){a.measure(b,c,d,e)};Ll.prototype.arrange=function(){};Ll.prototype.qy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Ll.prototype.Pz=function(a){a.Mj()};Ll.prototype.tc=function(){};ma.Object.defineProperties(Ll.prototype,{name:{get:function(){return this.va},set:function(a){this.va=a}},classType:{get:function(){return W}}});Ll.prototype.remeasureObject=Ll.prototype.Pz;Ll.prototype.arrangeElement=Ll.prototype.qy; +Ll.prototype.Fz=function(a,b,c,d,e){a.measure(b,c,d,e)};Ll.prototype.arrange=function(){};Ll.prototype.sy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Ll.prototype.Pz=function(a){a.Mj()};Ll.prototype.tc=function(){};ma.Object.defineProperties(Ll.prototype,{name:{get:function(){return this.va},set:function(a){this.va=a}},classType:{get:function(){return W}}});Ll.prototype.remeasureObject=Ll.prototype.Pz;Ll.prototype.arrangeElement=Ll.prototype.sy; Ll.prototype.measureElement=Ll.prototype.Fz;Ll.className="PanelLayout";function tm(){this.va="Base"}la(tm,Ll); tm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=um(a);for(var k=0;kS&&(eb=Math.max(S-hf,0));var mk=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;S=Math.max(S-(eb+(mk?hf:0)),0)}if(1===ec.columnSpan&& -(Gb===lg||Gb===Wk)){H=a.getColumnDefinition(Fb);var Ii=H.Pc();eb=Math.max(Mf-H.actual,0);eb+Ii>L&&(eb=Math.max(L-Ii,0));var Kn=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;L=Math.max(L-(eb+(Kn?Ii:0)),0)}gf&&ec.Mj()}}}}}Ga(z);var Nd=0,me=0;f=a.columnCount;for(var tg=0;tg=a.rowCount);Ne++)H=a.getRowDefinition(Na.row+Ne),eb=0,eb=Gb===td||Gb===Wk?Math.max(H.minimum,0===rd[Na.row+Ne]?H.maximum:Math.min(rd[Na.row+Ne],H.maximum)):Math.max(H.minimum,isNaN(H.zc)?H.maximum:Math.min(H.zc,H.maximum)),Ed.height+=eb,oc+=H.minimum;for(var Tc=1;Tc=a.columnCount);Tc++)H=a.getColumnDefinition(Na.column+ -Tc),eb=0,eb=Gb===td||Gb===Vk?Math.max(H.minimum,0===Fc[Na.column+Tc]?H.maximum:Math.min(Fc[Na.column+Tc],H.maximum)):Math.max(H.minimum,isNaN(H.zc)?H.maximum:Math.min(H.zc,H.maximum)),Ed.width+=eb,qk+=H.minimum;ib.width+=Ed.width;ib.height+=Ed.height;var Kh=Na.margin,nf=Kh.right+Kh.left,Ki=Kh.top+Kh.bottom;Na.measure(ib.width,ib.height,qk,oc);for(var Lh=Na.measuredBounds,Fd=Math.max(Lh.width+nf,0),Qf=Math.max(Lh.height+Ki,0),of=0,Mh=0;Mh=a.rowCount);Mh++)H=a.getRowDefinition(Na.row+ -Mh),of+=H.total||0;if(of=Oe)&&!(Na.row+pe>=a.rowCount);pe++){H=a.getRowDefinition(Na.row+pe);var Qe=H.ma||0,Rf=Pe(Na,H,Pd);H.actual=Math.min(H.maximum,Qe+Rf);H.ma!==Qe&&(Oe-=H.ma-Qe)}for(;0sd&&(H.actual=Math.min(H.maximum,sd+Oe),H.ma!==sd&&(Oe-=H.ma-sd));if(0===H.index)break;H=a.getRowDefinition(H.index-1)}}for(var wg=0,Re=0;Re=a.columnCount);Re++)H=a.getColumnDefinition(Na.column+Re),wg+=H.total||0;if(wg=xg)&&!(Na.column+Sf>=a.columnCount);Sf++){H=a.getColumnDefinition(Na.column+Sf);var Li=H.ma||0,Nn=qe(Na,H,Mn);H.actual=Math.min(H.maximum,Li+Nn);H.ma!==Li&&(xg-=H.ma-Li)}for(;0rk&&(H.actual=Math.min(H.maximum,rk+xg),H.ma!==rk&&(xg-=H.ma-rk));if(0=== -H.index)break;H=a.getColumnDefinition(H.index-1)}}}}Ga(y);K.free(Ed);K.free(ib);void 0!==rd&&Ga(rd);void 0!==Fc&&Ga(Fc);var yg=0,zg=0,sk=a.desiredSize,vr=a.maxSize;Gb=il(a,!0);var Mi=me=Nd=0,Ni=0;f=a.columnCount;for(var tk=0;tkS&&(eb=Math.max(S-hf,0));var mk=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;S=Math.max(S-(eb+(mk?hf:0)),0)}if(1===fc.columnSpan&& +(Hb===lg||Hb===Wk)){H=a.getColumnDefinition(Gb);var Ii=H.Qc();eb=Math.max(Mf-H.actual,0);eb+Ii>L&&(eb=Math.max(L-Ii,0));var Kn=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;L=Math.max(L-(eb+(Kn?Ii:0)),0)}gf&&fc.Mj()}}}}}Ga(z);var Nd=0,me=0;f=a.columnCount;for(var tg=0;tg=a.rowCount);Ne++)H=a.getRowDefinition(Oa.row+Ne),eb=0,eb=Hb===td||Hb===Wk?Math.max(H.minimum,0===rd[Oa.row+Ne]?H.maximum:Math.min(rd[Oa.row+Ne],H.maximum)):Math.max(H.minimum,isNaN(H.Ac)?H.maximum:Math.min(H.Ac,H.maximum)),Ed.height+=eb,oc+=H.minimum;for(var Tc=1;Tc=a.columnCount);Tc++)H=a.getColumnDefinition(Oa.column+ +Tc),eb=0,eb=Hb===td||Hb===Vk?Math.max(H.minimum,0===Fc[Oa.column+Tc]?H.maximum:Math.min(Fc[Oa.column+Tc],H.maximum)):Math.max(H.minimum,isNaN(H.Ac)?H.maximum:Math.min(H.Ac,H.maximum)),Ed.width+=eb,qk+=H.minimum;ib.width+=Ed.width;ib.height+=Ed.height;var Kh=Oa.margin,nf=Kh.right+Kh.left,Ki=Kh.top+Kh.bottom;Oa.measure(ib.width,ib.height,qk,oc);for(var Lh=Oa.measuredBounds,Fd=Math.max(Lh.width+nf,0),Qf=Math.max(Lh.height+Ki,0),of=0,Mh=0;Mh=a.rowCount);Mh++)H=a.getRowDefinition(Oa.row+ +Mh),of+=H.total||0;if(of=Oe)&&!(Oa.row+pe>=a.rowCount);pe++){H=a.getRowDefinition(Oa.row+pe);var Qe=H.ma||0,Rf=Pe(Oa,H,Pd);H.actual=Math.min(H.maximum,Qe+Rf);H.ma!==Qe&&(Oe-=H.ma-Qe)}for(;0sd&&(H.actual=Math.min(H.maximum,sd+Oe),H.ma!==sd&&(Oe-=H.ma-sd));if(0===H.index)break;H=a.getRowDefinition(H.index-1)}}for(var wg=0,Re=0;Re=a.columnCount);Re++)H=a.getColumnDefinition(Oa.column+Re),wg+=H.total||0;if(wg=xg)&&!(Oa.column+Sf>=a.columnCount);Sf++){H=a.getColumnDefinition(Oa.column+Sf);var Li=H.ma||0,Nn=qe(Oa,H,Mn);H.actual=Math.min(H.maximum,Li+Nn);H.ma!==Li&&(xg-=H.ma-Li)}for(;0rk&&(H.actual=Math.min(H.maximum,rk+xg),H.ma!==rk&&(xg-=H.ma-rk));if(0=== +H.index)break;H=a.getColumnDefinition(H.index-1)}}}}Ga(y);K.free(Ed);K.free(ib);void 0!==rd&&Ga(rd);void 0!==Fc&&Ga(Fc);var yg=0,zg=0,sk=a.desiredSize,vr=a.maxSize;Hb=il(a,!0);var Mi=me=Nd=0,Ni=0;f=a.columnCount;for(var tk=0;tk=a.rowCount);H++){var da=a.getRowDefinition(z+H);0!==da.ma&&(v.height+=da.total)}for(H=1;H=a.columnCount);H++)da=a.getColumnDefinition(A+H),0!==da.ma&&(v.width+=da.total);var X=B.ma+v.width,na=y.ma+v.height;H=h;da=k;var Ba=X,db=na,hb=h,Eb=k,eb=X,Je=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Je=Math.max(c.height-k,0));var Ta=R.alignment;if(Ta.Sb()){Ta=a.defaultAlignment;Ta.pb()||(Ta=yc);var od=Ta.x;var Fb=Ta.y;var Ke=Ta.offsetX; -Ta=Ta.offsetY;var wc=B.alignment,Rc=y.alignment;wc.pb()&&(od=wc.x,Ke=wc.offsetX);Rc.pb()&&(Fb=Rc.y,Ta=Rc.offsetY)}else od=Ta.x,Fb=Ta.y,Ke=Ta.offsetX,Ta=Ta.offsetY;if(isNaN(od)||isNaN(Fb))Fb=od=.5,Ta=Ke=0;wc=P.width;Rc=P.height;var lc=R.margin,ec=lc.left+lc.right,gf=lc.top+lc.bottom,pd=Bl(R,y,B,!1);!isNaN(R.desiredSize.width)||pd!==td&&pd!==Vk||(wc=Math.max(X-ec,0));!isNaN(R.desiredSize.height)||pd!==td&&pd!==Wk||(Rc=Math.max(na-gf,0));X=R.maxSize;na=R.minSize;wc=Math.min(X.width,wc);Rc=Math.min(X.height, -Rc);wc=Math.max(na.width,wc);Rc=Math.max(na.height,Rc);X=Rc+gf;H+=Ba*od-(wc+ec)*od+Ke+lc.left;da+=db*Fb-X*Fb+Ta+lc.top;R.visible&&($b(hb,Eb,eb,Je,H,da,P.width,P.height)?R.arrange(H,da,wc,Rc):R.arrange(H,da,wc,Rc,new M(hb,Eb,eb,Je)))}}K.free(v);for(a=0;a=a.rowCount);H++){var da=a.getRowDefinition(z+H);0!==da.ma&&(v.height+=da.total)}for(H=1;H=a.columnCount);H++)da=a.getColumnDefinition(A+H),0!==da.ma&&(v.width+=da.total);var X=B.ma+v.width,oa=y.ma+v.height;H=h;da=k;var Ba=X,db=oa,hb=h,Fb=k,eb=X,Je=oa;h+X>c.width&&(eb=Math.max(c.width-h,0));k+oa>c.height&&(Je=Math.max(c.height-k,0));var Ua=R.alignment;if(Ua.Sb()){Ua=a.defaultAlignment; +Ua.pb()||(Ua=yc);var od=Ua.x;var Gb=Ua.y;var Ke=Ua.offsetX;Ua=Ua.offsetY;var wc=B.alignment,Rc=y.alignment;wc.pb()&&(od=wc.x,Ke=wc.offsetX);Rc.pb()&&(Gb=Rc.y,Ua=Rc.offsetY)}else od=Ua.x,Gb=Ua.y,Ke=Ua.offsetX,Ua=Ua.offsetY;if(isNaN(od)||isNaN(Gb))Gb=od=.5,Ua=Ke=0;wc=P.width;Rc=P.height;var lc=R.margin,fc=lc.left+lc.right,gf=lc.top+lc.bottom,pd=Bl(R,y,B,!1);!isNaN(R.desiredSize.width)||pd!==td&&pd!==Vk||(wc=Math.max(X-fc,0));!isNaN(R.desiredSize.height)||pd!==td&&pd!==Wk||(Rc=Math.max(oa-gf,0));X=R.maxSize; +oa=R.minSize;wc=Math.min(X.width,wc);Rc=Math.min(X.height,Rc);wc=Math.max(oa.width,wc);Rc=Math.max(oa.height,Rc);X=Rc+gf;H+=Ba*od-(wc+fc)*od+Ke+lc.left;da+=db*Gb-X*Gb+Ua+lc.top;R.visible&&($b(hb,Fb,eb,Je,H,da,P.width,P.height)?R.arrange(H,da,wc,Rc):R.arrange(H,da,wc,Rc,new M(hb,Fb,eb,Je)))}}K.free(v);for(a=0;a=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.R.s,u=q.length,w=0;wy)){v=Sj(v.figure);for(var A=0;Ay&&z.push(B))}}}}q= +Im.prototype.tc=function(a,b,c){c=a.uf()*c.scale;0>=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.R.s,u=q.length,w=0;wy)){v=Sj(v.figure);for(var A=0;Ay&&z.push(B))}}}}q= a.R.s;u=q.length;for(w=0;we*v*c))){y=F.segmentIndex;if(!isFinite(y)||isNaN(y))y=0;0>y&&(y=v-Math.min(-y,v));y=Math.round(y%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}B=r[w];var L=!1,S=F.strokeDashArray;null!==S&&(L=!0,b.Gr(S,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),y=z.measuredBounds,c.Xc(y),r.push(y);else{var A=z.segmentIndex,B=z.segmentFraction,F=z.alignmentFocus;F.Ec()&&(F=yc);var L=z.segmentOrientation,S=z.segmentOffset;if(isNaN(A)){var R=k.sa;y=Ea();R.Cu(B,y);var P=I.allocAt(y[0],y[1]);P.add(k.i(0));R.type=== -O.j?P.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&P.offset(-R.startX,-R.startY));R=y[2];if(L!==$f){var H=k.computeAngle(z,L,R);z.Gb=H}H=P.x-b.x;var da=P.y-b.y;I.free(P);Ga(y)}else if(A<-n||A>=n)y=I.alloc(),k.lg(),k.computeMidPoint(y),R=k.midAngle,L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H),H=y.x-b.x,da=y.y-b.y,I.free(y);else{H=0;0<=A?(da=m.K(A),y=AX+10?0<=A?R.Ya(da):da.Ya(R):X>P+10?0<=A?y.Ya(H):H.Ya(y):0<=A?R.Ya(H):H.Ya(R)}else R=0<=A?da.Ya(y):y.Ya(da);L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H);H=da.x+(y.x-da.x)*B-b.x;da=da.y+(y.y-da.y)*B-b.y}z.measure(Infinity,Infinity,0,0);y=z.measuredBounds;P=z.naturalBounds;var na=0;z instanceof Cf&&(na=z.strokeWidth);X=P.width+na;var Ba=P.height+na;q.reset();q.translate(-y.x,-y.y);q.scale(z.scale,z.scale);q.rotate(L===$f?z.angle:R,X/2,Ba/2);L!==Mm&&L!==Nm||q.rotate(90, -X/2,Ba/2);L!==Om&&L!==Pm||q.rotate(-90,X/2,Ba/2);L===Qm&&(45R||225R)&&q.rotate(-R,X/2,Ba/2);P=new M(0,0,X,Ba);u.oi(P,F);q.Fa(u);F=-u.x+na/2*z.scale;z=-u.y+na/2*z.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;Ba=Ba/2+3;var hb=45<=R&&135>=R,Eb=225<=R&&315>=R;L===$f&&(hb||Eb)?(w.x=db?X:S.y,w.y=na?Ba:S.x,hb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-Ba):Eb&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-Ba),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-Ba),w.rotate(R))}else w.rotate(R); -H+=w.x;da+=w.y;P.set(y);P.h(H+F,da+z,y.width,y.height);r.push(P);c.Xc(P)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.ag=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);Qb(e,c.width||0,c.height||0);md.free(q);I.free(u);I.free(w)}}}}; -Km.prototype.arrange=function(a,b){var c=b.length;if(a instanceof ue||a instanceof T){var d=a,e=null;a instanceof ue&&(e=a,d=e.adornedPart);var f=a instanceof ue?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=I.alloc(),r=n,w=q,r.lg(),r.computeMidPoint(w),r=n.midAngle,l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,w=q.y, -I.free(q);else{u=0;0<=h?(q=b.s[h],w=hz+10?0<=h?r.Ya(q):q.Ya(r):z>v+10?0<=h?w.Ya(u):u.Ya(w):0<=h?r.Ya(u):u.Ya(r)}else r=0<=h?q.Ya(w):w.Ya(q);l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(w.x-q.x)*k;w=q.y+(w.y-q.y)*k}if(p.Wr())g.location=new I(n,w);else{p.Ec()&&(p=yc);q=md.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, +B)&&b.fillRect(P,0,F,k)}else if("BarH"===F.figure&&null!==F.fill)for(gi(a,b,F.fill,!0,!1,f,g),F=F.height,isNaN(F)&&(F=d),R=S=Math.floor((n-d)/d);R<=S+m;R++)P=R*d+n,0<=P+F&&P<=k&&Jm(R,z,y,B)&&b.fillRect(0,P,h,F);L&&b.Er();1!==v&&(b.globalAlpha=A)}}b.restore();b.Oc(!1)};function Jm(a,b,c,d){if(0>b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),y=z.measuredBounds,c.Xc(y),r.push(y);else{var A=z.segmentIndex,B=z.segmentFraction,F=z.alignmentFocus;F.Fc()&&(F=yc);var L=z.segmentOrientation,S=z.segmentOffset;if(isNaN(A)){var R=k.sa;y=Ea();R.Cu(B,y);var P=I.allocAt(y[0],y[1]);P.add(k.i(0));R.type=== +O.j?P.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&P.offset(-R.startX,-R.startY));R=y[2];if(L!==$f){var H=k.computeAngle(z,L,R);z.Gb=H}H=P.x-b.x;var da=P.y-b.y;I.free(P);Ga(y)}else if(A<-n||A>=n)y=I.alloc(),k.mg(),k.computeMidPoint(y),R=k.midAngle,L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H),H=y.x-b.x,da=y.y-b.y,I.free(y);else{H=0;0<=A?(da=m.K(A),y=AX+10?0<=A?R.Ya(da):da.Ya(R):X>P+10?0<=A?y.Ya(H):H.Ya(y):0<=A?R.Ya(H):H.Ya(R)}else R=0<=A?da.Ya(y):y.Ya(da);L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H);H=da.x+(y.x-da.x)*B-b.x;da=da.y+(y.y-da.y)*B-b.y}z.measure(Infinity,Infinity,0,0);y=z.measuredBounds;P=z.naturalBounds;var oa=0;z instanceof Cf&&(oa=z.strokeWidth);X=P.width+oa;var Ba=P.height+oa;q.reset();q.translate(-y.x,-y.y);q.scale(z.scale,z.scale);q.rotate(L===$f?z.angle:R,X/2,Ba/2);L!==Mm&&L!==Nm||q.rotate(90, +X/2,Ba/2);L!==Om&&L!==Pm||q.rotate(-90,X/2,Ba/2);L===Qm&&(45R||225R)&&q.rotate(-R,X/2,Ba/2);P=new M(0,0,X,Ba);u.oi(P,F);q.Fa(u);F=-u.x+oa/2*z.scale;z=-u.y+oa/2*z.scale;w.assign(S);oa=isNaN(S.x);var db=isNaN(S.y);if(oa||db){X=X/2+3;Ba=Ba/2+3;var hb=45<=R&&135>=R,Fb=225<=R&&315>=R;L===$f&&(hb||Fb)?(w.x=db?X:S.y,w.y=oa?Ba:S.x,hb?0<=A||isNaN(A)&&.5>B||!oa||(w.y=-Ba):Fb&&((0<=A||isNaN(A)&&.5>B)&&oa&&(w.y=-Ba),db&&(w.x=-X))):(oa&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-Ba),w.rotate(R))}else w.rotate(R); +H+=w.x;da+=w.y;P.set(y);P.h(H+F,da+z,y.width,y.height);r.push(P);c.Xc(P)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.bg=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);Qb(e,c.width||0,c.height||0);md.free(q);I.free(u);I.free(w)}}}}; +Km.prototype.arrange=function(a,b){var c=b.length;if(a instanceof ue||a instanceof T){var d=a,e=null;a instanceof ue&&(e=a,d=e.adornedPart);var f=a instanceof ue?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=I.alloc(),r=n,w=q,r.mg(),r.computeMidPoint(w),r=n.midAngle,l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,w=q.y, +I.free(q);else{u=0;0<=h?(q=b.s[h],w=hz+10?0<=h?r.Ya(q):q.Ya(r):z>v+10?0<=h?w.Ya(u):u.Ya(w):0<=h?r.Ya(u):u.Ya(r)}else r=0<=h?q.Ya(w):w.Ya(q);l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(w.x-q.x)*k;w=q.y+(w.y-q.y)*k}if(p.Wr())g.location=new I(n,w);else{p.Fc()&&(p=yc);q=md.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, 0,0);var y=g.naturalBounds;u=M.allocAt(0,0,y.width,y.height);v=I.alloc();v.oi(u,p);q.Fa(v);p=-v.x;z=-v.y;var A=y.width,B=y.height;y=I.alloc();y.assign(m);var F=isNaN(m.x),L=isNaN(m.y);if(F||L){A=A/2+3;B=B/2+3;var S=45<=r&&135>=r,R=225<=r&&315>=r;l===$f&&(S||R)?(y.x=L?A:m.y,y.y=F?B:m.x,S?0<=h||isNaN(h)&&.5>k||!F||(y.y=-B):R&&((0<=h||isNaN(h)&&.5>k)&&F&&(y.y=-B),L&&(y.x=-A))):(F&&(y.x=0<=h||isNaN(h)&&.5>k?A:-A),L&&(y.y=-B),y.rotate(r))}else y.rotate(r);n+=y.x;w+=y.y;q.So(u);p+=u.x;z+=u.y;h=I.allocAt(n+ p,w+z);g.move(h);I.free(h);I.free(y);I.free(v);M.free(u);md.free(q)}}null!==e?e.Rj(!1):d.Rj(!1)}}; -function Lm(a,b,c,d){if(!1!==nj(d)){var e=d.strokeWidth;0===e&&a instanceof ue&&a.type===W.Link&&a.adornedObject instanceof Cf&&(e=a.adornedObject.strokeWidth);e*=d.xa;a instanceof T&&null!==a.sa?(a=a.sa.bounds,d.ue(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof ue&&null!==a.adornedPart.sa?(a=a.adornedPart.sa.bounds,d.ue(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.ue(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.v()||null===d.sa?d.bc.h(0,0,e.width,e.height):d.bc.assign(d.sa.bounds);ij(d,!1)}} +function Lm(a,b,c,d){if(!1!==nj(d)){var e=d.strokeWidth;0===e&&a instanceof ue&&a.type===W.Link&&a.adornedObject instanceof Cf&&(e=a.adornedObject.strokeWidth);e*=d.xa;a instanceof T&&null!==a.sa?(a=a.sa.bounds,d.ve(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof ue&&null!==a.adornedPart.sa?(a=a.adornedPart.sa.bounds,d.ve(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.ve(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.v()||null===d.sa?d.bc.h(0,0,e.width,e.height):d.bc.assign(d.sa.bounds);ij(d,!1)}} function Rm(){this.va="Base"}la(Rm,Ll); Rm.prototype.measure=function(a,b,c,d,e,f,g){var h=a.vb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var r=h.geometry,q=h.strokeWidth,u=r.flattenedSegments,w=r.flattenedLengths,v=r.flattenedTotalLength,z=u.length,y=0,A=0,B=Ea(),F=0;FX&&(X+=360);S.push(X)}y=H;A=da}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],Ba=a.R.s,db=Ba.length,hb=0;hbJe))for(var Ta=0;TaJe&&eb.push(Fb)}}}}a.graduatedIntervals=na}var Ke=a.graduatedIntervals;var wc=a.R.s,Rc=wc.length,lc=0,ec=0,gf=v;a.graduatedMarks=[];for(var pd, -Dh=0;DhHi*Gb*v/a.graduatedRange&&null===mc.graduatedSkip)){var sg=w[0][0],Bd=0,fc=0;ec=v*mc.graduatedStart-1E-4;gf=v*mc.graduatedEnd+1E-4;var Mf=Hi*Gb,nc=a.graduatedTickBase;if(nca.graduatedMin+Mf&&(nc-=Math.floor((nc-a.graduatedMin)/Mf)*Mf);for(var mk=Ke[Dh],Ii=nc,Kn=1E-6*a.graduatedMax,Nd= -1;nc<=a.graduatedMax+Kn;Nd++){a:{for(var me=mk.length,tg=0;tg-Eh){var kf=!1;break a}}kf=!0}if(kf&&(nc>a.graduatedMax&&(nc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Qg&&!mc.graduatedSkip(nc,mc)||mc instanceof Cf&&!mc.graduatedSkip(nc,mc))&&(lc=(nc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),ec<=lc&&lc<=gf)){for(var Od=B[Bd][fc],Le=w[Bd][fc];Bdsg&&fcne&&.4995ne?0ne||.9995ug){var Gh=1-Math.abs(.5-ne);Od=(qd*Gh+Dd*(1-Gh))%360;break a}}}Od=qd}if(mc instanceof Qg){var bd="";null!==mc.graduatedFunction?(bd=mc.graduatedFunction(nc,mc),bd=null!==bd&&void 0!==bd?bd.toString():""):bd=(+nc.toFixed(2)).toString();""!==bd&&pd.push({Hl:Fh,angle:Od,text:bd})}else pd.push({Hl:Fh,angle:Od})}nc=Ii+Nd*Mf}}}a.graduatedMarks.push(pd)}Ga(B); -var ib=a.graduatedMarks;if(null!==ib)for(var Ji=d.length,Tb=0;Tbcd;cd++){switch(cd){case 0:hc.h(Ed,rd);break;case 1:hc.h(Ed+Hh,rd);break;case 2:hc.h(Ed,rd+Pf);break;case 3:hc.h(Ed+Hh,rd+Pf)}hc.rotate(Na+Ua.angle);hc.offset(pk,Jh);0===Ih&&0===cd?Fc.h(hc.x,hc.y,0,0):Fc.Le(hc);hc.offset(-pk,-Jh);hc.rotate(-Na-Ua.angle)}I.free(hc);null!==oe.graduatedBounds&&oe.graduatedBounds.push(Fc);Zb(Me,Fc.x,Fc.y,Fc.width,Fc.height)}else if(Ua instanceof Qg){var Sc=a,qk=e;null===Sc.temporaryTextBlock&&(Sc.temporaryTextBlock=new Qg);var oc=Sc.temporaryTextBlock;Sm(oc,Ua); -var Ne=Ua.alignmentFocus;Ne.Ec()&&(Ne=uc);for(var Tc=Ua.segmentOrientation,Kh=Ua.segmentOffset,nf=new M,Ki=0,Lh=0,Fd=0,Qf=0,of=0,Mh=Ub.length,Oe=0;OeX&&(X+=360);S.push(X)}y=H;A=da}B.push(S)}if(null===a.graduatedIntervals){for(var oa=[],Ba=a.R.s,db=Ba.length,hb=0;hbJe))for(var Ua=0;UaJe&&eb.push(Gb)}}}}a.graduatedIntervals=oa}var Ke=a.graduatedIntervals;var wc=a.R.s,Rc=wc.length,lc=0,fc=0,gf=v;a.graduatedMarks=[];for(var pd, +Dh=0;DhHi*Hb*v/a.graduatedRange&&null===mc.graduatedSkip)){var sg=w[0][0],Bd=0,gc=0;fc=v*mc.graduatedStart-1E-4;gf=v*mc.graduatedEnd+1E-4;var Mf=Hi*Hb,nc=a.graduatedTickBase;if(nca.graduatedMin+Mf&&(nc-=Math.floor((nc-a.graduatedMin)/Mf)*Mf);for(var mk=Ke[Dh],Ii=nc,Kn=1E-6*a.graduatedMax,Nd= +1;nc<=a.graduatedMax+Kn;Nd++){a:{for(var me=mk.length,tg=0;tg-Eh){var kf=!1;break a}}kf=!0}if(kf&&(nc>a.graduatedMax&&(nc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Qg&&!mc.graduatedSkip(nc,mc)||mc instanceof Cf&&!mc.graduatedSkip(nc,mc))&&(lc=(nc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),fc<=lc&&lc<=gf)){for(var Od=B[Bd][gc],Le=w[Bd][gc];Bdsg&&gcne&&.4995ne?0ne||.9995ug){var Gh=1-Math.abs(.5-ne);Od=(qd*Gh+Dd*(1-Gh))%360;break a}}}Od=qd}if(mc instanceof Qg){var bd="";null!==mc.graduatedFunction?(bd=mc.graduatedFunction(nc,mc),bd=null!==bd&&void 0!==bd?bd.toString():""):bd=(+nc.toFixed(2)).toString();""!==bd&&pd.push({Hl:Fh,angle:Od,text:bd})}else pd.push({Hl:Fh,angle:Od})}nc=Ii+Nd*Mf}}}a.graduatedMarks.push(pd)}Ga(B); +var ib=a.graduatedMarks;if(null!==ib)for(var Ji=d.length,Vb=0;Vbcd;cd++){switch(cd){case 0:ic.h(Ed,rd);break;case 1:ic.h(Ed+Hh,rd);break;case 2:ic.h(Ed,rd+Pf);break;case 3:ic.h(Ed+Hh,rd+Pf)}ic.rotate(Oa+Va.angle);ic.offset(pk,Jh);0===Ih&&0===cd?Fc.h(ic.x,ic.y,0,0):Fc.Me(ic);ic.offset(-pk,-Jh);ic.rotate(-Oa-Va.angle)}I.free(ic);null!==oe.graduatedBounds&&oe.graduatedBounds.push(Fc);Zb(Me,Fc.x,Fc.y,Fc.width,Fc.height)}else if(Va instanceof Qg){var Sc=a,qk=e;null===Sc.temporaryTextBlock&&(Sc.temporaryTextBlock=new Qg);var oc=Sc.temporaryTextBlock;Sm(oc,Va); +var Ne=Va.alignmentFocus;Ne.Fc()&&(Ne=uc);for(var Tc=Va.segmentOrientation,Kh=Va.segmentOffset,nf=new M,Ki=0,Lh=0,Fd=0,Qf=0,of=0,Mh=Wb.length,Oe=0;OeFd||225Fd)&&sd.rotate(-Fd,Qe/2,Rf/2);var wg=M.allocAt(0,0,Qe,Rf),Re=I.alloc();Re.oi(wg,Ne);sd.Fa(Re);var xg=-Re.x,Mn=-Re.y,qe=I.alloc();qe.assign(Kh);isNaN(qe.x)&&(qe.x=Qe/2+3);isNaN(qe.y)&&(qe.y=-(Rf/2+3));qe.rotate(Fd);Ki+=qe.x+xg;Lh+=qe.y+Mn;var Sf=new M(Ki,Lh,Pe.width,Pe.height),Li=new M(Pe.x,Pe.y,Pe.width,Pe.height),Nn=new M(pe.x,pe.y,pe.width,pe.height); -Pd.Az=Qf;Pd.lineCount=oc.lineCount;Pd.lines=[oc.yb,oc.zh,oc.Se,oc.ze,oc.Ic,oc.Wb,oc.pe];Pd.actualBounds=Sf;Pd.measuredBounds=Li;Pd.naturalBounds=Nn;0===Oe?nf.assign(Sf):nf.Xc(Sf);I.free(qe);I.free(Re);M.free(wg);md.free(sd)}null!==Sc.graduatedBounds&&Sc.graduatedBounds.push(nf);Zb(qk,nf.x,nf.y,nf.width,nf.height)}ij(Ua,!1)}}}; +Pd.Az=Qf;Pd.lineCount=oc.lineCount;Pd.lines=[oc.yb,oc.zh,oc.Te,oc.Ae,oc.Jc,oc.Wb,oc.qe];Pd.actualBounds=Sf;Pd.measuredBounds=Li;Pd.naturalBounds=Nn;0===Oe?nf.assign(Sf):nf.Xc(Sf);I.free(qe);I.free(Re);M.free(wg);md.free(sd)}null!==Sc.graduatedBounds&&Sc.graduatedBounds.push(nf);Zb(qk,nf.x,nf.y,nf.width,nf.height)}ij(Va,!1)}}}; Rm.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=e&&(e=1);for(var g=f.actualBounds,h=a.R.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* -n.scale,w=n.alignmentFocus;w.Ec()&&(w=uc);for(var v=0;v=e&&(e=1);for(var g=f.actualBounds,h=a.R.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* +n.scale,w=n.alignmentFocus;w.Fc()&&(w=uc);for(var v=0;vf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){gi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.Gr(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-=p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ub;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Er()}}}} -function Vm(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=Xm(a,!0),l=Xm(a,!1),m=0;mp)){var r=n.Pc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= +function Vm(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=Xm(a,!0),l=Xm(a,!1),m=0;mp)){var r=n.Qc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= q;q=n.position+q;r+=n.actual;q+r>p&&(r=p-q);0>=r||(p=a.ub,gi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,q+p.top,g.width-(p.left+p.right),r):b.fillRect(q+p.left,p.top,r,g.height-(p.top+p.bottom)))}}}}function Xm(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(q),I.free(q));I.free(m);f&&e.transform(g);return l}; t.w=function(a){if(!nj(this)){Y.prototype.w.call(this,a);a=null;if(this.qa===W.Auto||this.qa===W.Link)a=this.vb();for(var b=this.R.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.w(!0);this.measure(c+h,d+g,0,0);break;case Vk:this.w(!0);this.measure(c+h,f+g,0,0);break;case Wk:this.w(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.ag)}}; +t.Jk=function(){if(0!==(this.o&2048)===!1){yl(this,!0);zl(this,!0);for(var a=this.R.s,b=a.length,c=0;cc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.w(!0);this.measure(c+h,d+g,0,0);break;case Vk:this.w(!0);this.measure(c+h,f+g,0,0);break;case Wk:this.w(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.bg)}}; t.Xg=function(a){var b=this.naturalBounds,c=um(this);if($b(0,0,b.width,b.height,a.x,a.y)){b=this.R.s;for(var d=b.length,e=I.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(yb(e.set(a),f.transform),f.ba(e))return I.free(e),!0}I.free(e);return null===this.Yb&&null===this.areaBackground?!1:!0}return!1};t.Hr=function(a){if(this.bindingId===a)return this;for(var b=this.R.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=md.alloc();p.set(g); -if(null!==m?m.sf(a,b,c,d,e,p):hl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);md.free(p)}}}void 0===f&&md.free(g);return d}void 0===f&&md.free(g);return!1};function dn(a,b,c,d){for(var e=a.R.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&dn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} -t.gg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.je(),k=h?a:yb(I.allocAt(a.x,a.y),this.transform),l=h?b:yb(I.allocAt(b.x,b.y),this.transform),m=k.qf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(q.je()?(u=q.transform,yb(k.set(a),u),yb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof W?q:null,null!==q?q.gg(k,l,c,d,e,f):u.Uw(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}I.free(k);I.free(l)}return e?n:g}return!1}; +t.tf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=md.alloc(),g.reset());g.multiply(this.transform);if(this.Wg(a,g))return dn(this,b,c,e),void 0===f&&md.free(g),!0;if(this.Sc(a,g)){if(!this.isAtomic)for(var h=um(this),k=this.R.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=md.alloc();p.set(g); +if(null!==m?m.tf(a,b,c,d,e,p):hl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);md.free(p)}}}void 0===f&&md.free(g);return d}void 0===f&&md.free(g);return!1};function dn(a,b,c,d){for(var e=a.R.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&dn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.hg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.ke(),k=h?a:yb(I.allocAt(a.x,a.y),this.transform),l=h?b:yb(I.allocAt(b.x,b.y),this.transform),m=k.rf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(q.ke()?(u=q.transform,yb(k.set(a),u),yb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof W?q:null,null!==q?q.hg(k,l,c,d,e,f):u.Vw(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}I.free(k);I.free(l)}return e?n:g}return!1}; function Am(a){var b=null;a instanceof Cf&&(b=a.spot1,b===Wc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=tc);return b}function Bm(a){var b=null;a instanceof Cf&&(b=a.spot2,b===Wc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Cc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Cb(a,b);if(0===a||b.isPanelMain)this.Qg=null;nj(this)||this.w();b.w(!1);null!==b.portId?this.Ge=!0:b instanceof W&&!0===b.Ge&&(this.Ge=!0);this.graduatedIntervals=null;this.xf()||en(this,b,!1);c=this.part;null!==c&&(c.Kh=null,c.Rf=NaN,this.Ge&&c instanceof V&&(c.Ge=!0),c.Ge&&c instanceof V&&(c.sc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.bb(ge,"elements",this,b,null,d,null),c.bb(fe,"elements",this,null,b,null,a)))};function fn(a,b){a.m=b?a.m|16777216:a.m&-16777217}t.remove=function(a){for(var b=this.R.s,c=b.length,d=-1,e=0;e=e.count&&a>=e.count)return; +e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Cb(a,b);if(0===a||b.isPanelMain)this.Qg=null;nj(this)||this.w();b.w(!1);null!==b.portId?this.He=!0:b instanceof W&&!0===b.He&&(this.He=!0);this.graduatedIntervals=null;this.yf()||en(this,b,!1);c=this.part;null!==c&&(c.Kh=null,c.Sf=NaN,this.He&&c instanceof V&&(c.He=!0),c.He&&c instanceof V&&(c.sc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.bb(ge,"elements",this,b,null,d,null),c.bb(fe,"elements",this,null,b,null,a)))};function fn(a,b){a.o=b?a.o|16777216:a.o&-16777217}t.remove=function(a){for(var b=this.R.s,c=b.length,d=-1,e=0;ea&&wa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Oj;c.ni(this);c.isRow=!0;c.index=a;b[a]=c;this.bb(fe,"rowdefs",this,null,c,null,a)}return b[a]};W.prototype.Vz=function(a){0>a&&wa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.bb(ge,"rowdefs",this,c,null,a,null);this.w()}}}; function Pj(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof Oj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}}W.prototype.getColumnDefinition=function(a){0>a&&wa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Oj;c.ni(this);c.isRow=!1;c.index=a;b[a]=c;this.bb(fe,"coldefs",this,null,c,null,a)}return b[a]};t=W.prototype; t.Qz=function(a){0>a&&wa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.bb(ge,"coldefs",this,c,null,a,null);this.w()}}};function Qj(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof Oj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} t.Wy=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;ea;)this.lc(this.R.length-1,!1);jn(this,this.itemArray)}; -function jn(a,b){var c=bn(a);if(null===b||0===b.length)for(;a.R.length>c;)a.lc(a.R.length-1,!1);else if(a.R.length<=c){c=b.length;for(var d=0;dc)){var e=ln(a,b);e=mn(a,e);if(null!==e){kg(e);e=e.copy();if(0!==(e.m&16777216)){var f=a.Yg();null!==f&&fn(f,!0)}"object"===typeof b&&(null===a.Zd&&(a.Zd=new pb),a.Zd.add(b,e));f=c+bn(a);a.Cb(f,e);d&&(e.qb=b,nn(a,f,c),e.qb=null);e.data=b}}} +function jn(a,b){var c=bn(a);if(null===b||0===b.length)for(;a.R.length>c;)a.lc(a.R.length-1,!1);else if(a.R.length<=c){c=b.length;for(var d=0;dc)){var e=ln(a,b);e=mn(a,e);if(null!==e){kg(e);e=e.copy();if(0!==(e.o&16777216)){var f=a.Yg();null!==f&&fn(f,!0)}"object"===typeof b&&(null===a.$d&&(a.$d=new pb),a.$d.add(b,e));f=c+bn(a);a.Cb(f,e);d&&(e.qb=b,nn(a,f,c),e.qb=null);e.data=b}}} function nn(a,b,c){for(a=a.R;ba&&wa(a,">= 0",W,"padding"), -a=new ic(a)):(0>a.left&&wa(a.left,">= 0",W,"padding:value.left"),0>a.right&&wa(a.right,">= 0",W,"padding:value.right"),0>a.top&&wa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.w(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Bm},set:function(a){var b=this.Bm;b.C(a)||(this.Bm=a=a.J(),this.w(),this.g("defaultAlignment",b,a))}},defaultStretch:{ -get:function(){return this.Jf},set:function(a){var b=this.Jf;b!==a&&(this.Jf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.T?this.T.tp:qc},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.defaultSeparatorPadding;b.C(a)||(a=a.J(),null===this.T&&(this.T=new sn),this.T.tp=a,this.w(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== +a=new ec(a)):(0>a.left&&wa(a.left,">= 0",W,"padding:value.left"),0>a.right&&wa(a.right,">= 0",W,"padding:value.right"),0>a.top&&wa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.w(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Bm},set:function(a){var b=this.Bm;b.C(a)||(this.Bm=a=a.J(),this.w(),this.g("defaultAlignment",b,a))}},defaultStretch:{ +get:function(){return this.Kf},set:function(a){var b=this.Kf;b!==a&&(this.Kf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.T?this.T.tp:qc},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.defaultSeparatorPadding;b.C(a)||(a=a.J(),null===this.T&&(this.T=new sn),this.T.tp=a,this.w(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== this.T?this.T.ga:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof nl)&&(a instanceof nl&&a.freeze(),null===this.T&&(this.T=new sn),this.T.ga=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.T?this.T.Ga:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.T&&(this.T=new sn),this.T.Ga=a,this.w(), -this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.T?this.T.Y:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.T&&(this.T=new sn),this.T.Db=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.T?this.T.cb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ -a),null===this.T&&(this.T=new sn),this.T.cb=a,this.w(),this.g("leftIndex",b,a))}},data:{get:function(){return this.qb},set:function(a){var b=this.qb;if(b!==a){var c=this instanceof U&&!(this instanceof ue);kg(this);this.qb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.Qe.remove(b),null!==a&&c.Qe.add(a,this)):this instanceof U&&(null!==b&&c.Re.remove(b),null!==a&&c.Re.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b), -null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ka()}}},itemIndex:{get:function(){return this.fn},set:function(a){var b=this.fn;b!==a&&(this.fn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.hb=a)}},itemArray:{get:function(){return this.xh}, +a),null===this.T&&(this.T=new sn),this.T.cb=a,this.w(),this.g("leftIndex",b,a))}},data:{get:function(){return this.qb},set:function(a){var b=this.qb;if(b!==a){var c=this instanceof U&&!(this instanceof ue);kg(this);this.qb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.Re.remove(b),null!==a&&c.Re.add(a,this)):this instanceof U&&(null!==b&&c.Se.remove(b),null!==a&&c.Se.add(a,this))):(c=this.panel,null!==c&&null!==c.$d&&(null!==b&&c.$d.remove(b), +null!==a&&c.$d.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ka()}}},itemIndex:{get:function(){return this.fn},set:function(a){var b=this.fn;b!==a&&(this.fn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.hb=a)}},itemArray:{get:function(){return this.xh}, set:function(a){var b=this.xh;if(b!==a||null!==a&&hn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Fj(c.partManager,this,c),this.xh=a,null!==c&&null!==a&&Cj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||jn(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new pb}var b=this.itemTemplateMap.I(""); -b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Vu())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.ke:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););bl(this);this.A.ke=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| -this.Vu()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Hc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(bl(this),this.A.Hc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(this.m^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.m&2097152)}, -set:function(a){var b=0!==(this.m&2097152);b!==a&&(this.m^=2097152,this instanceof qf&&(this.ib=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.m&33554432)},set:function(a){var b=0!==(this.m&33554432);b!==a&&(this.m^=33554432,this.w(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);if(b!==a){var c=null===this.panel||this.panel.xf(); -this.m^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&en(this,this,a)}}},alignmentFocusName:{get:function(){return this.Oe},set:function(a){var b=this.Oe;b!==a&&(this.Oe=a,this.w(),this.g("alignmentFocusName",b,a))}}}); +b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Vu())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.le:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););bl(this);this.A.le=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| +this.Vu()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Ic:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(bl(this),this.A.Ic=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.o&2097152)}, +set:function(a){var b=0!==(this.o&2097152);b!==a&&(this.o^=2097152,this instanceof qf&&(this.ib=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.o&33554432)},set:function(a){var b=0!==(this.o&33554432);b!==a&&(this.o^=33554432,this.w(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);if(b!==a){var c=null===this.panel||this.panel.yf(); +this.o^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&en(this,this,a)}}},alignmentFocusName:{get:function(){return this.Pe},set:function(a){var b=this.Pe;b!==a&&(this.Pe=a,this.w(),this.g("alignmentFocusName",b,a))}}}); ma.Object.defineProperties(W,{Position:{get:function(){return Kl.I("Position")}},Horizontal:{get:function(){return Kl.I("Horizontal")}},Vertical:{get:function(){return Kl.I("Vertical")}},Spot:{get:function(){return Kl.I("Spot")}},Auto:{get:function(){return Kl.I("Auto")}},Table:{get:function(){return Kl.I("Table")}},Viewbox:{ get:function(){return Kl.I("Viewbox")}},TableRow:{get:function(){return Kl.I("TableRow")}},TableColumn:{get:function(){return Kl.I("TableColumn")}},Link:{get:function(){return Kl.I("Link")}},Grid:{get:function(){return Kl.I("Grid")}},Graduated:{get:function(){return Kl.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Vu; -W.prototype.findItemPanelForData=W.prototype.Tw;W.prototype.updateTargetBindings=W.prototype.Ka;W.prototype.copyTemplate=W.prototype.By;W.prototype.graduatedValueForPoint=W.prototype.nz;W.prototype.graduatedPointForValue=W.prototype.mz;W.prototype.findColumnForLocalX=W.prototype.Oy;W.prototype.findRowForLocalY=W.prototype.Wy;W.prototype.removeColumnDefinition=W.prototype.Qz;W.prototype.removeRowDefinition=W.prototype.Vz;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove; +W.prototype.findItemPanelForData=W.prototype.Uw;W.prototype.updateTargetBindings=W.prototype.Ka;W.prototype.copyTemplate=W.prototype.By;W.prototype.graduatedValueForPoint=W.prototype.nz;W.prototype.graduatedPointForValue=W.prototype.mz;W.prototype.findColumnForLocalX=W.prototype.Oy;W.prototype.findRowForLocalY=W.prototype.Wy;W.prototype.removeColumnDefinition=W.prototype.Qz;W.prototype.removeRowDefinition=W.prototype.Vz;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove; W.prototype.insertAt=W.prototype.Cb;W.prototype.elt=W.prototype.K;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.fb;W.prototype.findInVisualTree=W.prototype.vl;W.prototype.walkVisualTreeFrom=W.prototype.$l;W.prototype.findMainElement=W.prototype.vb;var pn=!1,qn=null,Kl=new pb;W.className="Panel";W.definePanelLayout=rn;rn("Position",new tm);rn("Vertical",new wm);rn("Auto",new zm);rn("Link",new Km); -function tn(){this.Np=0;this.F=100;this.ga=10;this.Y=0;this.Sh=this.o=this.j=this.u=null}tn.prototype.copy=function(){var a=new tn;a.Np=this.Np;a.F=this.F;a.ga=this.ga;a.Y=this.Y;a.u=this.u;a.j=this.j;a.o=this.o;a.Sh=this.Sh;return a};tn.className="GradPanelSettings";function sn(){this.Hc=[];this.Gc=[];this.j=this.nb=un;this.cb=this.Db=0;this.tp=qc;this.Ga=1;this.Y=this.ga=null;this.F=1;this.hb=this.o=this.u=null} -sn.prototype.copy=function(a){for(var b=new sn,c=this.Hc,d=c.length,e=b.Hc,f=0;fa&&wa(a,">= 0",Oj,"height"),this.zc=a,this.actual=this.ma,null!==this.panel&&this.panel.w(), -this.Kb("height",b,a))}},width:{get:function(){return this.zc},set:function(a){var b=this.zc;b!==a&&(0>a&&wa(a,">= 0",Oj,"width"),this.zc=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("width",b,a))}},minimum:{get:function(){return this.ej},set:function(a){var b=this.ej;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Oj,"minimum"),this.ej=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("minimum",b,a))}},maximum:{ -get:function(){return this.cj},set:function(a){var b=this.cj;b!==a&&(0>a&&wa(a,">= 0",Oj,"maximum"),this.cj=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("maximum",b,a))}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(this.Fb=a.J(),null!==this.panel&&this.panel.w(),this.Kb("alignment",b,a))}},stretch:{get:function(){return this.Zf},set:function(a){var b=this.Zf;b!==a&&(this.Zf= -a,null!==this.panel&&this.panel.w(),this.Kb("stretch",b,a))}},separatorPadding:{get:function(){return this.Vf},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.Vf;null!==a&&null!==b&&b.C(a)||(null!==a&&(a=a.J()),this.Vf=a,null!==this.panel&&this.panel.w(),this.Kb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.On},set:function(a){var b=this.On;b!==a&&(null!==a&&Pl(a,"RowColumnDefinition.separatorStroke"), +ma.Object.defineProperties(Oj.prototype,{panel:{get:function(){return this.Uf}},isRow:{get:function(){return this.Wp},set:function(a){this.Wp=a}},index:{get:function(){return this.Wa},set:function(a){this.Wa=a}},height:{get:function(){return this.Ac},set:function(a){var b=this.Ac;b!==a&&(0>a&&wa(a,">= 0",Oj,"height"),this.Ac=a,this.actual=this.ma,null!==this.panel&&this.panel.w(), +this.Kb("height",b,a))}},width:{get:function(){return this.Ac},set:function(a){var b=this.Ac;b!==a&&(0>a&&wa(a,">= 0",Oj,"width"),this.Ac=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("width",b,a))}},minimum:{get:function(){return this.ej},set:function(a){var b=this.ej;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Oj,"minimum"),this.ej=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("minimum",b,a))}},maximum:{ +get:function(){return this.cj},set:function(a){var b=this.cj;b!==a&&(0>a&&wa(a,">= 0",Oj,"maximum"),this.cj=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("maximum",b,a))}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(this.Fb=a.J(),null!==this.panel&&this.panel.w(),this.Kb("alignment",b,a))}},stretch:{get:function(){return this.$f},set:function(a){var b=this.$f;b!==a&&(this.$f= +a,null!==this.panel&&this.panel.w(),this.Kb("stretch",b,a))}},separatorPadding:{get:function(){return this.Wf},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.Wf;null!==a&&null!==b&&b.C(a)||(null!==a&&(a=a.J()),this.Wf=a,null!==this.panel&&this.panel.w(),this.Kb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.On},set:function(a){var b=this.On;b!==a&&(null!==a&&Pl(a,"RowColumnDefinition.separatorStroke"), a instanceof nl&&a.freeze(),this.On=a,null!==this.panel&&this.panel.w(),this.Kb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Pn},set:function(a){var b=this.Pn;b!==a&&(this.Pn=a,null!==this.panel&&this.panel.w(),this.Kb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.oj},set:function(a){var b=this.oj;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Ga(w);return}e>q?(z=e-q,e=q):z=0;var y=Math.sqrt(e*e/(1+p*p));0>n&&(y=-y);h+=y;k+=p*y;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.ai(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){v++;if(v===w.length){Ga(w);return}q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Ga(w)}} -t.ai=function(a,b){var c=this.Mc,d=this.Ak;if(null!==c||null!==d){var e=this.sa;if(null!==e){a.Oc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&gi(this,a,d,!0,!1,g,f);var h=this.part,k=this.$f;null===c||0!==k||null===h||!this.isPanelMain&&h.vb()!==this||(k=h.type===W.Link&&h instanceof ue&&"Selection"===h.category&&h.adornedObject instanceof Cf&&h.adornedPart.vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(gi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= -this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Fe("drawShadows")&&(f=h.isShadowed);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.Gr(k,this.strokeDashOffset));if(e.type===O.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.si();else if(e.type===O.u){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n-k);a.beginPath();a.rect(e, -p,l,k);null!==d&&a.rf(d);if(null!==c){h&&f&&rl(a);if(0===l||0===k)a.beginPath(),a.rect(e,p,Math.max(l,.1),Math.max(k,.1));a.si();h&&f&&ql(a)}}else if(e.type===O.F)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+J.mg*e,k-p,l+e,k-J.mg*p,l+e,k),a.bezierCurveTo(l+e,k+J.mg*p,l+J.mg*e,k+p,l,k+p),a.bezierCurveTo(l-J.mg*e,k+p,l-e,k+J.mg*p,l-e,k),a.bezierCurveTo(l-e,k-J.mg*p,l-J.mg*e,k-p,l,k-p), -a.closePath(),null!==d&&a.rf(d),null!==c&&(h&&f?(rl(a),a.si(),ql(a)):a.si());else if(e.type===O.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==r?r.endX:l.startX,null!==r?r.endY:l.startY)}else if(r=Rd(u,l),w=r.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;v(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return J.Tb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== -O.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Qc(-d,-d);if(f.ba(a))return M.free(f),!1;f.Qc(d,d)}null!==this.stroke&&f.Qc(e,e);a=f.ba(a);M.free(f);return a}if(c.type===O.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===O.o)return M.free(f),null===this.fill?Vd(c,a.x,a.y,e):Td(c,a,e,1(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return J.Tb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== +O.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.vc(-d,-d);if(f.ba(a))return M.free(f),!1;f.vc(d,d)}null!==this.stroke&&f.vc(e,e);a=f.ba(a);M.free(f);return a}if(c.type===O.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), +!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===O.m)return M.free(f),null===this.fill?Vd(c,a.x,a.y,e):Td(c,a,e,1=this.strokeWidth)m=J.Ie(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), -d=m*b);b=Ea();a=new I;J.Ie(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* -(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),v-=q,z-= -u;r.contains(v,z);)v-=q,z-=u;e.x=h;e.y=k;for(u=0;u=this.strokeWidth)m=J.Je(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), +d=m*b);b=Ea();a=new I;J.Je(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* +(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),v-=q,z-= +u;r.contains(v,z);)v-=q,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||J.ca(k.y,a))&&(k.yb||J.ca(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} -t.Uw=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Xg(a,!0))return!0;var e=a.qf(b),f=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.Xg(a,!0))return!0;var e=a.rf(b),f=e;1.5=e||Ab(b,f,0,-n)>=e||Ab(b, -f,0,n)>=e||Ab(b,f,m,0)>=e?!1:!0}else if(b.type===O.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&zb(a.x,a.y,f,h,k,h)>e&&zb(a.x,a.y,k,l,f,l)>e&&zb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Vd(b,a.x,a.y,f):Td(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Kd:var p=Ea();J.Ce(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Ld:p=Ea();J.Go(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Md:case Qd:p=n.type===Md?Rd(n,f):Sd(n,f,g,m);var r=p.length;if(0===r){g=n.type===Md?n.centerX:n.endX;m=n.type===Md?n.centerY:n.endY;if(a.td(g,m)>e)return!1; -break}n=null;for(var q=Ea(),u=0;u=e||Ab(b,f,m,0)>=e?!1:!0}else if(b.type===O.m){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&zb(a.x,a.y,f,h,k,h)>e&&zb(a.x,a.y,k,l,f,l)>e&&zb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Vd(b,a.x,a.y,f):Td(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Kd:var p=Ea();J.De(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Ld:p=Ea();J.Go(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Md:case Qd:p=n.type===Md?Rd(n,f):Sd(n,f,g,m);var r=p.length;if(0===r){g=n.type===Md?n.centerX:n.endX;m=n.type===Md?n.centerY:n.endY;if(a.td(g,m)>e)return!1; +break}n=null;for(var q=Ea(),u=0;u= 0",Cf,"strokeWidth:value")}},strokeCap:{ +ma.Object.defineProperties(Cf.prototype,{geometry:{get:function(){return null!==this.sa?this.sa:this.Hd},set:function(a){var b=this.sa,c=this.Hd;if(b!==a){null!==a?this.Hd=this.sa=a.freeze():this.Hd=this.sa=null;var d=this.part;null!==d&&(d.Sf=NaN);this.w();this.g("geometry",b||c,a);el(this)&&(a=this.part,null!==a&&fl(this,a,"geometryString"))}}},geometryString:{get:function(){return null===this.geometry?"":this.geometry.toString()},set:function(a){a= +O.parse(a);var b=a.normalize();this.geometry=a;this.position=a=I.allocAt(-b.x,-b.y);I.free(a)}},isGeometryPositioned:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{get:function(){return this.Ak},set:function(a){var b=this.Ak;b!==a&&(null!==a&&Pl(a,"Shape.fill"),a instanceof nl&&a.freeze(),this.Ak=a,this.N(),this.g("fill", +b,a))}},stroke:{get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(null!==a&&Pl(a,"Shape.stroke"),a instanceof nl&&a.freeze(),this.Nc=a,this.N(),this.g("stroke",b,a))}},strokeWidth:{get:function(){return this.ag},set:function(a){var b=this.ag;if(b!==a)if(0<=a){this.ag=a;this.w();var c=this.part;null!==c&&(c.Sf=NaN);this.g("strokeWidth",b,a)}else wa(a,"value >= 0",Cf,"strokeWidth:value")}},strokeCap:{ get:function(){return null!==this.Na?this.Na.dr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?wa(a,'"butt", "round", or "square"',Cf,"strokeCap"):(wn(this),this.Na.dr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.er:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?wa(a,'"miter", "bevel", or "round"', -Cf,"strokeJoin"):(wn(this),this.Na.er=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.fr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){wn(this);this.Na.fr=a;this.N();var c=this.part;null!==c&&(c.Rf=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Og},set:function(a){var b=this.Og;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.Zb!==a&&(c=!1);!1===b.Fe("textGreeking")&& -(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case $k:a.translate(e,0);a.scale(-1,1);break;case Zk:a.translate(0,f);a.scale(1,-1);break;case al:a.translate(e,f),a.scale(-1,-1)}a.Oc();m=this.dd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.pe)n=this.yb,n>e&&(n=e),this.$h(this.pe,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Ic&&null!==this.Wb)for(p=0;pe&&(r=e);d+=b;this.$h(this.Wb[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case $k:a.scale(-1, +function Sm(a,b){a.o=b.o|6144;a.tb=b.opacity;a.Yb=b.background;a.areaBackground=b.areaBackground;a.$c=b.desiredSize.J();a.minSize=b.minSize.J();a.maxSize=b.maxSize.J();null!==b.Ib?a.Ib=b.Ib.copy():a.Ib=null;a.xa=b.scale;a.Gb=b.angle;a.stretch=b.stretch;a.Ag=b.margin.J();a.Fb=b.alignment.J();a.fk=b.alignmentFocus.J();a.segmentFraction=b.segmentFraction;a.segmentOffset=b.segmentOffset.J();a.segmentOrientation=b.segmentOrientation;null!==b.ib&&(a.ib=b.ib.copy());a.shadowVisible=b.shadowVisible;a.cc= +b.cc;a.Nc=b.Nc;a.re=b.re;null!==a.fa&&(a.fa=b.fa.copy());null!==b.da&&(a.da=b.da.ic?b.da:b.da.copy());a.zh=b.zh}t.ob=function(a){a.classType===Qg?this.wrap=a:Y.prototype.ob.call(this,a)};t.toString=function(){return 22(n*n+m*m)*p*p&&(c=!0);b.Zb!==a&&(c=!1);!1===b.Ge("textGreeking")&& +(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case $k:a.translate(e,0);a.scale(-1,1);break;case Zk:a.translate(0,f);a.scale(1,-1);break;case al:a.translate(e,f),a.scale(-1,-1)}a.Pc();m=this.dd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.qe)n=this.yb,n>e&&(n=e),this.$h(this.qe,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Jc&&null!==this.Wb)for(p=0;pe&&(r=e);d+=b;this.$h(this.Wb[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case $k:a.scale(-1, 1);a.translate(-e,0);break;case Zk:a.scale(1,-1);a.translate(0,-f);break;case al:a.scale(-1,-1),a.translate(-e,-f)}}}; t.$h=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==Tn?Tn(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==Un?Un(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ n+g,d),b.stroke()))}; -t.El=function(a,b,c,d){this.zh=a;var e=this.qe;null!==In&&Vn!==e&&(Vn=In.font=e);this.yb=this.ze=0;this.pe=this.Wb=this.Ic=this.Se=null;var f;if(isNaN(this.desiredSize.width)){e=this.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===Wn&&(g=g.trim());f=Math.max(f,Xn(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=Xn(e);e=Math.min(e, -a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=Yn(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.yb&&null!==this.Ic&&null!==this.Wb&&this.overflow===Zn&&(b=this.qe,b=this.overflow===Zn?$n(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,Sn(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.Wb.length))){k=this.Wb[h];for(b=Math.max(1, -a-b);Xn(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===fo){a.ze=1;var l=Xn(b);if(0===k||l<=c)a.yb=Math.max(a.yb,l),co(a,b,a.yb),null!==d&&d.h(l,h);else{f=go(a,g);g=g.substr(f.length);b=go(a,g);for(l=Xn(f+b);0 +t.El=function(a,b,c,d){this.zh=a;var e=this.re;null!==In&&Vn!==e&&(Vn=In.font=e);this.yb=this.Ae=0;this.qe=this.Wb=this.Jc=this.Te=null;var f;if(isNaN(this.desiredSize.width)){e=this.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===Wn&&(g=g.trim());f=Math.max(f,Xn(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=Xn(e);e=Math.min(e, +a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=Yn(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.yb&&null!==this.Jc&&null!==this.Wb&&this.overflow===Zn&&(b=this.re,b=this.overflow===Zn?$n(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,Sn(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.Wb.length))){k=this.Wb[h];for(b=Math.max(1, +a-b);Xn(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===fo){a.Ae=1;var l=Xn(b);if(0===k||l<=c)a.yb=Math.max(a.yb,l),co(a,b,a.yb),null!==d&&d.h(l,h);else{f=go(a,g);g=g.substr(f.length);b=go(a,g);for(l=Xn(f+b);0 c&&1c;){var n=1;l=Xn(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Xn(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);co(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.dd+k>a.maxLines)break}m=go(a,g);for(l=Xn(b+m);0a.maxLines))break}a.ze=Math.min(a.maxLines,k);a.yb=Math.max(a.yb,f);null!==d&&d.h(a.yb,h*a.ze)}} -function go(a,b){if(a.wrap===ho)return b.substr(0,1);for(var c=b.length,d=0,e=io;d=b.length?b:b.substr(0,d)}function Xn(a){return null===In?8*a.length:In.measureText(a).width}function Sn(a){if(null!==a.Se)return a.Se;var b=a.qe;if(null===In){var c=16;return a.Se=c}void 0!==ko[b]&&5E3>lo?c=ko[b]:(c=1.3*In.measureText("M").width,ko[b]=c,lo++);return a.Se=c} +l=Xn(l);e&&(b=b.trim());if(""!==b&&("\u00ad"===b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=Xn(b),f=Math.max(f,m)),co(a,b,n),k++,a.dd+k>a.maxLines))break}a.Ae=Math.min(a.maxLines,k);a.yb=Math.max(a.yb,f);null!==d&&d.h(a.yb,h*a.Ae)}} +function go(a,b){if(a.wrap===ho)return b.substr(0,1);for(var c=b.length,d=0,e=io;d=b.length?b:b.substr(0,d)}function Xn(a){return null===In?8*a.length:In.measureText(a).width}function Sn(a){if(null!==a.Te)return a.Te;var b=a.re;if(null===In){var c=16;return a.Te=c}void 0!==ko[b]&&5E3>lo?c=ko[b]:(c=1.3*In.measureText("M").width,ko[b]=c,lo++);return a.Te=c} function $n(a){if(null===In)return 6;if(void 0!==mo[a]&&5E3>no)var b=mo[a];else b=In.measureText(ao).width,mo[a]=b,no++;return b} -function Yn(a,b){var c=a.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Sn(a)+d);if(0===c.length)return a.yb=0,a.dd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.dd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==fo){a.ze=0;var k=K.alloc();eo(a,f,b,k);e+=k.height;K.free(k);a.dd+=a.ze}else eo(a,f,b,null),e+=d,a.dd++;a.dd===a.maxLines&&(h=!0)}f=g+1}return a.kq=e} -ma.Object.defineProperties(Qg.prototype,{font:{get:function(){return this.qe},set:function(a){var b=this.qe;b!==a&&(this.qe=a,this.Se=null,this.w(),this.g("font",b,a))}},text:{get:function(){return this.cc},set:function(a){var b=this.cc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.cc=a,this.w(),this.g("text",b,a))}},textAlign:{get:function(){return null!==this.da?this.da.mr:"start"},set:function(a){var b= -this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(Jn(this),this.da.mr=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Mf:lg},set:function(a){var b=this.flip;b!==a&&(Jn(this),this.da.Mf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.xr:Zc},set:function(a){var b=this.verticalAlignment;b.C(a)||(a=a.J(),Jn(this),this.da.xr= -a,Al(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.bc.v()){var a=K.alloc();eo(this,this.cc,999999,a);var b=a.width;K.free(a);a=Yn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Qb(this.bc,b,a)}return this.bc}},isMultiline:{get:function(){return 0!==(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(this.m^=2097152,this.w(),this.g("isMultiline",b, -a))}},isUnderline:{get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);b!==a&&(this.m^=4194304,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.m&8388608)},set:function(a){var b=0!==(this.m&8388608);b!==a&&(this.m^=8388608,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.Ar:oo},set:function(a){var b= -this.wrap;b!==a&&(Jn(this),this.da.Ar=a,this.w(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.yq:po},set:function(a){var b=this.overflow;b!==a&&(Jn(this),this.da.yq=a,this.w(),this.g("overflow",b,a))}},stroke:{get:function(){return this.Mc},set:function(a){var b=this.Mc;b!==a&&(null!==a&&Pl(a,"TextBlock.stroke"),a instanceof nl&&a.freeze(),this.Mc=a,this.N(),this.g("stroke",b,a))}},lineCount:{ -get:function(){return this.dd}},lineHeight:{get:function(){return Sn(this)}},editable:{get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(this.m^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.pr:null},set:function(a){var b=this.textEditor;b!==a&&(Jn(this),this.da.pr=a,this.g("textEditor",b,a))}},errorFunction:{ +function Yn(a,b){var c=a.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Sn(a)+d);if(0===c.length)return a.yb=0,a.dd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.dd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==fo){a.Ae=0;var k=K.alloc();eo(a,f,b,k);e+=k.height;K.free(k);a.dd+=a.Ae}else eo(a,f,b,null),e+=d,a.dd++;a.dd===a.maxLines&&(h=!0)}f=g+1}return a.kq=e} +ma.Object.defineProperties(Qg.prototype,{font:{get:function(){return this.re},set:function(a){var b=this.re;b!==a&&(this.re=a,this.Te=null,this.w(),this.g("font",b,a))}},text:{get:function(){return this.cc},set:function(a){var b=this.cc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.cc=a,this.w(),this.g("text",b,a))}},textAlign:{get:function(){return null!==this.da?this.da.mr:"start"},set:function(a){var b= +this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(Jn(this),this.da.mr=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Nf:lg},set:function(a){var b=this.flip;b!==a&&(Jn(this),this.da.Nf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.xr:Zc},set:function(a){var b=this.verticalAlignment;b.C(a)||(a=a.J(),Jn(this),this.da.xr= +a,Al(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.bc.v()){var a=K.alloc();eo(this,this.cc,999999,a);var b=a.width;K.free(a);a=Yn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Qb(this.bc,b,a)}return this.bc}},isMultiline:{get:function(){return 0!==(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(this.o^=2097152,this.w(),this.g("isMultiline",b, +a))}},isUnderline:{get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);b!==a&&(this.o^=4194304,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.o&8388608)},set:function(a){var b=0!==(this.o&8388608);b!==a&&(this.o^=8388608,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.Ar:oo},set:function(a){var b= +this.wrap;b!==a&&(Jn(this),this.da.Ar=a,this.w(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.yq:po},set:function(a){var b=this.overflow;b!==a&&(Jn(this),this.da.yq=a,this.w(),this.g("overflow",b,a))}},stroke:{get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(null!==a&&Pl(a,"TextBlock.stroke"),a instanceof nl&&a.freeze(),this.Nc=a,this.N(),this.g("stroke",b,a))}},lineCount:{ +get:function(){return this.dd}},lineHeight:{get:function(){return Sn(this)}},editable:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.pr:null},set:function(a){var b=this.textEditor;b!==a&&(Jn(this),this.da.pr=a,this.g("textEditor",b,a))}},errorFunction:{ get:function(){return null!==this.da?this.da.zd:null},set:function(a){var b=this.errorFunction;b!==a&&(Jn(this),this.da.zd=a,this.g("errorFunction",b,a))}},interval:{get:function(){return null!==this.fa?this.fa.Ik:1},set:function(a){var b=this.interval;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.fa&&(this.fa=new Gn);this.fa.Ik=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{ get:function(){return null!==this.fa?this.fa.u:0},set:function(a){var b=this.graduatedStart;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Qg,"maxLines"),Jn(this),this.da.iq=a,this.w(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Ic?this.Ic:[this.yb],arrText:null!==this.Wb?this.Wb:[this.pe],maxLineWidth:this.yb,fontHeight:this.Se}}},choices:{get:function(){return this.om},set:function(a){var b=this.om;b!==a&&(this.om=a,this.g("choices",b,a))}}}); +set:function(a){var b=this.maxLines;b!==a&&(a=Math.floor(a),0>=a&&wa(a,"> 0",Qg,"maxLines"),Jn(this),this.da.iq=a,this.w(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Jc?this.Jc:[this.yb],arrText:null!==this.Wb?this.Wb:[this.qe],maxLineWidth:this.yb,fontHeight:this.Te}}},choices:{get:function(){return this.om},set:function(a){var b=this.om;b!==a&&(this.om=a,this.g("choices",b,a))}}}); var Tn=null,Un=null,fo=new D(Qg,"None",0),bo=new D(Qg,"WrapFit",1),oo=new D(Qg,"WrapDesiredSize",2),ho=new D(Qg,"WrapBreakAll",3),po=new D(Qg,"OverflowClip",0),Zn=new D(Qg,"OverflowEllipsis",1),Wn=new D(Qg,"FormatTrim",0),jo=new D(Qg,"FormatNone",0),io=/[ \u200b\u00ad]/,ko=new Wa,lo=0,mo=new Wa,no=0,ao="...",Vn="",In=null,Hn=!1;Qg.className="TextBlock"; -function Rn(){this.ic=!1;this.zd=null;this.Mf=lg;this.Jp=Wn;this.iq=Infinity;this.yq=po;this.ar=this.$q=0;this.mr="start";this.qj=this.pr=this.nr=null;this.xr=Zc;this.Ar=oo}Rn.prototype.copy=function(){var a=new Rn;a.zd=this.zd;a.Mf=this.Mf;a.Jp=this.Jp;a.iq=this.iq;a.yq=this.yq;a.$q=this.$q;a.ar=this.ar;a.mr=this.mr;a.nr=this.nr;a.pr=this.pr;a.qj=this.qj;a.xr=this.xr;a.Ar=this.Ar;return a};Qg.getEllipsis=function(){return ao};Qg.setEllipsis=function(a){ao=a;mo=new Wa;no=0};Qg.getBaseline=function(){return Tn}; +function Rn(){this.ic=!1;this.zd=null;this.Nf=lg;this.Jp=Wn;this.iq=Infinity;this.yq=po;this.ar=this.$q=0;this.mr="start";this.qj=this.pr=this.nr=null;this.xr=Zc;this.Ar=oo}Rn.prototype.copy=function(){var a=new Rn;a.zd=this.zd;a.Nf=this.Nf;a.Jp=this.Jp;a.iq=this.iq;a.yq=this.yq;a.$q=this.$q;a.ar=this.ar;a.mr=this.mr;a.nr=this.nr;a.pr=this.pr;a.qj=this.qj;a.xr=this.xr;a.Ar=this.Ar;return a};Qg.getEllipsis=function(){return ao};Qg.setEllipsis=function(a){ao=a;mo=new Wa;no=0};Qg.getBaseline=function(){return Tn}; Qg.setBaseline=function(a){Tn=a};Qg.getUnderline=function(){return Un};Qg.setUnderline=function(a){Un=a};Qg.isValidFont=function(a){Hn||(In=Og?(new Bk(null)).context:null,Hn=!0);if(null===In)return!0;var b=In.font;if(a===b||"10px sans-serif"===a)return!0;In.font="10px sans-serif";In.font=a;var c=In.font;if("10px sans-serif"!==c)return In.font=b,!0;In.font="19px serif";var d=In.font;In.font=a;c=In.font;In.font=b;return c!==d};Qg.FormatNone=jo;Qg.FormatTrim=Wn;Qg.None=fo;Qg.OverflowClip=po; -Qg.OverflowEllipsis=Zn;Qg.WrapBreakAll=ho;Qg.WrapDesiredSize=oo;Qg.WrapFit=bo;function Gn(){this.Ik=1;this.u=0;this.j=1;this.o=this.F=null}Gn.prototype.copy=function(){var a=new Gn;a.Ik=this.Ik;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};Gn.className="GradElementSettings"; -function Wj(a,b){Y.call(this);this.ug=null;this.Tn="";this.Ng=dc;this.Ck=td;this.Pg=this.zd=null;this.Bk=yc;this.Mf=lg;this.kl=null;this.Xm=!1;this.Mm=!0;this.Qk=!1;this.gl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var qo;la(Wj,Y);Wj.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.ug;a.Tn=this.Tn;a.Ng=this.Ng.J();a.Ck=this.Ck;a.Mf=this.Mf;a.zd=this.zd;a.Pg=this.Pg;a.Bk=this.Bk.J();a.Mm=this.Mm;a.gl=this.gl}; +Qg.OverflowEllipsis=Zn;Qg.WrapBreakAll=ho;Qg.WrapDesiredSize=oo;Qg.WrapFit=bo;function Gn(){this.Ik=1;this.u=0;this.j=1;this.m=this.F=null}Gn.prototype.copy=function(){var a=new Gn;a.Ik=this.Ik;a.u=this.u;a.j=this.j;a.F=this.F;a.m=this.m;return a};Gn.className="GradElementSettings"; +function Wj(a,b){Y.call(this);this.vg=null;this.Tn="";this.Ng=dc;this.Ck=td;this.Pg=this.zd=null;this.Bk=yc;this.Nf=lg;this.kl=null;this.Xm=!1;this.Mm=!0;this.Qk=!1;this.gl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var qo;la(Wj,Y);Wj.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.vg;a.Tn=this.Tn;a.Ng=this.Ng.J();a.Ck=this.Ck;a.Nf=this.Nf;a.zd=this.zd;a.Pg=this.Pg;a.Bk=this.Bk.J();a.Mm=this.Mm;a.gl=this.gl}; Wj.prototype.ob=function(a){a===lg||a===ng||a===Yk?this.imageStretch=a:Y.prototype.ob.call(this,a)};Wj.prototype.toString=function(){return"Picture("+this.source+")#"+cb(this)};function Bi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new Wa,ro=0)} -function so(a,b){b.Vx||(b.fq=function(c){b.Up=!0;b.Sm=!1;var d=b.rg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src")||"";var g=e.Fg.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case ng:case Yk:p===ng?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===Yk&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ -d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.tf()*b.scale;var q=m*p*n*p,u=h*g/q,w=c.__goCache;p=null;var v=to;if(c.Up&&void 0!==w&&4v*v)for(null===w.Zh&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.Zh,l=k.length,q=0;qv*v)for(null===w.Zh&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.Zh,l=k.length,q=0;qa)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=J.Cf[d];if(void 0!==e)return e;var f=a*J.mg;e=(new O).add((new Xd(a,0,!0)).add(new Yd(vd,b-a,0)).add(new Yd(Kd,b,a,b-f,0,b,f)).add(new Yd(vd,b,c-a)).add(new Yd(Kd,b-a,c,b,c-f,b-f,c)).add(new Yd(vd,a,c)).add(new Yd(Kd,0,c-a,f,c,0,c-f)).add(new Yd(vd,0,a)).add((new Yd(Kd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=J.Df[d];if(void 0!==e)return e;var f=a*J.ng;e=(new O).add((new Xd(a,0,!0)).add(new Yd(vd,b-a,0)).add(new Yd(Kd,b,a,b-f,0,b,f)).add(new Yd(vd,b,c-a)).add(new Yd(Kd,b-a,c,b,c-f,b-f,c)).add(new Yd(vd,a,c)).add(new Yd(Kd,0,c-a,f,c,0,c-f)).add(new Yd(vd,0,a)).add((new Yd(Kd,a,0,0,f,f,0)).close()));1e.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righte.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.He){b.He=!0;var c=new G;c.add(this);fp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.He=!1}};function fp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ie){b.Ie=!0;var c=new G;c.add(this);fp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.Ie=!1}};function fp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.He){b.He=!0;var c=new G;c.add(this);hp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.He=!1}}; +V.prototype.expandTree=function(a){void 0===a&&(a=2);2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ie){b.Ie=!0;var c=new G;c.add(this);hp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.Ie=!1}}; function hp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.ro():a.Kd();k.next();){var l=k.value;l.isTreeLink&&(h||l.xd||l.ab(),l=l.wo(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ub(!0),l.dh(),g&&e.xj(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, -a.h(b.x,b.y,0,0));return a};ma.Object.defineProperties(jg.prototype,{padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.g("padding",b,a),this.w())}}});jg.className="Placeholder"; -function T(a){U.call(this,W.Link);this.Oa=8;this.Te=null;this.Ue="";this.gf=this.Om=null;this.hf="";this.Xn=null;this.dk=$f;this.wm=0;this.ym=$f;this.zm=NaN;this.kj=mp;this.Sn=.5;this.rd=null;this.Jb=(new E).freeze();this.df=this.Eg=null;this.bl=new M;this.sa=new O;this.u=this.o=this.Hf=this.Lf=null;this.Yt=new I;this.Gp=this.qw=this.pw=null;this.Ys=NaN;this.aa=null;this.j=[];a&&Object.assign(this,a)}la(T,U); -T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Oa=this.Oa&-113;a.Ue=this.Ue;a.Om=this.Om;a.hf=this.hf;a.Xn=this.Xn;a.dk=this.dk;a.wm=this.wm;a.ym=this.ym;a.zm=this.zm;a.kj=this.kj;a.Sn=this.Sn;null!==this.aa&&(a.aa=this.aa.copy())};t=T.prototype;t.pf=function(a){U.prototype.pf.call(this,a);this.Ue=a.Ue;this.hf=a.hf;a.Eg=null;a.ab();a.Hf=this.Hf;var b=a.fromPort;null!==b&&Zo(b);a=a.toPort;null!==a&&Zo(a)}; +a.h(b.x,b.y,0,0));return a};ma.Object.defineProperties(jg.prototype,{padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.g("padding",b,a),this.w())}}});jg.className="Placeholder"; +function T(a){U.call(this,W.Link);this.Oa=8;this.Ue=null;this.Ve="";this.hf=this.Om=null;this.jf="";this.Xn=null;this.dk=$f;this.wm=0;this.ym=$f;this.zm=NaN;this.kj=mp;this.Sn=.5;this.rd=null;this.Jb=(new E).freeze();this.ef=this.Eg=null;this.bl=new M;this.sa=new O;this.u=this.m=this.If=this.Mf=null;this.Yt=new I;this.Gp=this.qw=this.pw=null;this.Ys=NaN;this.aa=null;this.j=[];a&&Object.assign(this,a)}la(T,U); +T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Oa=this.Oa&-113;a.Ve=this.Ve;a.Om=this.Om;a.jf=this.jf;a.Xn=this.Xn;a.dk=this.dk;a.wm=this.wm;a.ym=this.ym;a.zm=this.zm;a.kj=this.kj;a.Sn=this.Sn;null!==this.aa&&(a.aa=this.aa.copy())};t=T.prototype;t.qf=function(a){U.prototype.qf.call(this,a);this.Ve=a.Ve;this.jf=a.jf;a.Eg=null;a.ab();a.If=this.If;var b=a.fromPort;null!==b&&Zo(b);a=a.toPort;null!==a&&Zo(a)}; t.ob=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===cg||a===Zf||a===Yf?this.curve=a:a===np||a===op||a===pp?this.adjusting=a:a!==mp&&a!==$f&&C("Unknown Link enum value for a Link property: "+a):U.prototype.ob.call(this,a)};t.Rc=function(){null===this.aa&&(this.aa=new dl)};t.mi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(oj(a)||pj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),oj(a)||pj(a))?!1:!0};t.fv=function(){return!1}; t.ns=function(){};t.Tc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case $f:a=0;break;case Tm:a=b;break;case Mm:a=b+90;break;case Om:a=b-90;break;case qp:a=b+180;break;case Um:a=J.Eo(b);90a&&(a-=180);break;case Nm:a=J.Eo(b+90);90a&&(a-=180);break;case Pm:a=J.Eo(b-90);90a&&(a-=180);break;case Qm:a=J.Eo(b);if(45a||225a)return 0;90a&&(a-=180)}return J.Eo(a)}; -function To(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Rw(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.ph;if(c!==b){null!==c&&Oo(c,a);a.ph=b;null!==b&&No(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.$,g.$=!0);e(a,c,b);null!==g&&(g.$=f)}!a.xd||a.pw!==c&&a.qw!==c||a.ab()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; +function To(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Sw(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.ph;if(c!==b){null!==c&&Oo(c,a);a.ph=b;null!==b&&No(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.$,g.$=!0);e(a,c,b);null!==g&&(g.$=f)}!a.xd||a.pw!==c&&a.qw!==c||a.ab()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; t.dh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.dh.call(this)};t.wo=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.jz=function(a){var b=this.fromPort;return a===b?this.toPort:b};function cp(a,b){null===a.rd&&(a.rd=new G);a.rd.add(b);a.w()} -t.yo=function(a){U.prototype.yo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Te;var b=null;null!==a&&(b=this.fromPort,ap(a,this,b));var c=this.gf;if(null!==c){var d=this.toPort;c===a&&d===b||ap(c,this,d)}sp(this)}};t.zo=function(a){U.prototype.zo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Te;var b=null;null!==a&&(b=this.fromPort,bp(a,this,b));var c=this.gf;if(null!==c){var d=this.toPort;c===a&&d===b||bp(c,this,d)}tp(this)}}; +t.yo=function(a){U.prototype.yo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Ue;var b=null;null!==a&&(b=this.fromPort,ap(a,this,b));var c=this.hf;if(null!==c){var d=this.toPort;c===a&&d===b||ap(c,this,d)}sp(this)}};t.zo=function(a){U.prototype.zo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Ue;var b=null;null!==a&&(b=this.fromPort,bp(a,this,b));var c=this.hf;if(null!==c){var d=this.toPort;c===a&&d===b||bp(c,this,d)}tp(this)}}; t.Fj=function(){this.xd=!0;if(null!==this.rd){var a=this.diagram;if(null!==a)for(var b=this.rd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};T.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; T.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?U.prototype.move.call(this,a,!1):(a=I.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),I.free(a));cf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; T.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};T.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; -T.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(ub),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Bu(.5,a),a.add(this.i(0)),c=this.sa.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===cg){if(3===b)return this.i(1);d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);var e=this.i(c+1), -f=this.i(c+2);c=this.i(c+3);J.ty(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a}; -T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Ya(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Xw(.5);if(this.computeCurve()===cg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return J.sy(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0c/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- +b.y)));return a}; +T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Ya(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Yw(.5);if(this.computeCurve()===cg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return J.ty(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.Ya(d)};t=T.prototype;t.i=function(a){return this.Jb.s[a]};t.Wc=function(a,b){this.Jb.Vc(a,b)};t.M=function(a,b,c){this.Jb.Vc(a,new I(b,c))};t.sz=function(a,b){this.Jb.Cb(a,b)}; -t.l=function(a,b,c){this.Jb.Cb(a,new I(b,c))};t.ee=function(a){this.Jb.add(a)};t.lf=function(a,b){this.Jb.add(new I(a,b))};t.Yu=function(a){this.Jb.mb(a)};t.Aj=function(){this.Jb.clear()}; -function cf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.xd,e=new E,f=a.Jb.iterator;f.next();){var g=f.value;e.add((new I(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Jb;a.Jb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.zb?a.w():(a.ce.h(a.ce.x+b,a.ce.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Al(a));d?up(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= -a.i(a.pointsCount-1)));null!==g&&g.animationManager.zb&&(b=g.animationManager,a.df=e,b.dl.add(a));a.g("points",f,e)}}t.jh=function(){null===this.Eg&&(this.Eg=this.Jb,this.Jb=this.Jb.copy())}; -t.nf=function(){if(null!==this.Eg){for(var a=this.Eg,b=this.Jb,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= -(0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,z=q;J.B(k,0)?z=0k?-1:1)*n+r,z=m*(v-r)+q);this.Aj();this.ee(f);this.lf(u,w);this.lf(v,z);this.ee(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,J.B(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ee(d),this.lf(f,h),this.ee(e);else{this.ee(d);this.ee(e);h=M.alloc();b.gi(h);k=h.ba(e);p.gi(h);l=h.ba(d);if(k||l)g=b.ia(zp(g),new I),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ia(zp(c),new I),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Aj();var y=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r= -this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>y&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(w+=Math.abs(y)*(m?1:2)),0===r?q=w:90===r?u=w:180===r?q=-w:270===r?u=-w:(q=w*Math.cos(r*Math.PI/180),u=w*Math.sin(r*Math.PI/180)),g.Ec()&&l&&(w=b.ia(yc,I.alloc()),v=I.allocAt(w.x+1E3*q,w.y+1E3*u),this.getLinkPointFromPoint(a,b,w,v,!0,n),I.free(w),I.free(v));w=this.getLinkPoint(d,e,c,!1,m,a,b);var A=z=v=0;if(m||!k||l){var B=this.computeEndSegmentLength(d,e, -c,!1);A=this.getLinkDirection(d,e,w,c,!1,m,a,b);l&&(k||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(A+=m?0:30,0>y&&(A+=180));0>A?A+=360:360<=A&&(A-=360);l&&(B+=Math.abs(y)*(m?1:2));0===A?v=B:90===A?z=B:180===A?v=-B:270===A?z=-B:(v=B*Math.cos(A*Math.PI/180),z=B*Math.sin(A*Math.PI/180));c.Ec()&&l&&(c=e.ia(yc,I.alloc()),g=I.allocAt(c.x+1E3*v,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,w),I.free(c),I.free(g))}c=n;if(m||!h||l)c=new I(n.x+q,n.y+u);g=w;if(m||!k||l)g=new I(w.x+v,w.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} -T.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new I);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.je()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.fe;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Kj(e,d,g,c,f);null!== +(0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,z=q;J.B(k,0)?z=0k?-1:1)*n+r,z=m*(v-r)+q);this.Aj();this.fe(f);this.mf(u,w);this.mf(v,z);this.fe(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,J.B(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.fe(d),this.mf(f,h),this.fe(e);else{this.fe(d);this.fe(e);h=M.alloc();b.gi(h);k=h.ba(e);p.gi(h);l=h.ba(d);if(k||l)g=b.ia(zp(g),new I),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ia(zp(c),new I),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Aj();var y=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r= +this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>y&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(w+=Math.abs(y)*(m?1:2)),0===r?q=w:90===r?u=w:180===r?q=-w:270===r?u=-w:(q=w*Math.cos(r*Math.PI/180),u=w*Math.sin(r*Math.PI/180)),g.Fc()&&l&&(w=b.ia(yc,I.alloc()),v=I.allocAt(w.x+1E3*q,w.y+1E3*u),this.getLinkPointFromPoint(a,b,w,v,!0,n),I.free(w),I.free(v));w=this.getLinkPoint(d,e,c,!1,m,a,b);var A=z=v=0;if(m||!k||l){var B=this.computeEndSegmentLength(d,e, +c,!1);A=this.getLinkDirection(d,e,w,c,!1,m,a,b);l&&(k||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(A+=m?0:30,0>y&&(A+=180));0>A?A+=360:360<=A&&(A-=360);l&&(B+=Math.abs(y)*(m?1:2));0===A?v=B:90===A?z=B:180===A?v=-B:270===A?z=-B:(v=B*Math.cos(A*Math.PI/180),z=B*Math.sin(A*Math.PI/180));c.Fc()&&l&&(c=e.ia(yc,I.alloc()),g=I.allocAt(c.x+1E3*v,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,w),I.free(c),I.free(g))}c=n;if(m||!h||l)c=new I(n.x+q,n.y+u);g=w;if(m||!k||l)g=new I(w.x+v,w.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +T.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new I);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.ke()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.ge;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Kj(e,d,g,c,f);null!== a&&f.transform(a);return f};function Bp(a,b){var c=b.Hn;null===c&&(c=new Cp,c.port=b,c.node=b.part,b.Hn=c);return Dp(c,a)} -T.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new I);if(c.pb()&&!yp(c))return b.ia(c,h),h;if(c.Uc()){var k=Bp(this,b);if(null!==k){h.assign(k.Co);if(e&&this.routing===Ep){var l=Bp(this,g);if(null!==l&&k.tl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.wf(Dc)||c.wf(Hc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);I.free(k);I.free(l)}}return h}}c= +T.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new I);if(c.pb()&&!yp(c))return b.ia(c,h),h;if(c.Uc()){var k=Bp(this,b);if(null!==k){h.assign(k.Co);if(e&&this.routing===Ep){var l=Bp(this,g);if(null!==l&&k.tl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.xf(Dc)||c.xf(Hc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);I.free(k);I.free(l)}}return h}}c= b.ia(zp(c),I.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=Ap(c,g.copy()))):(k=this.computeSpot(!d,g),f=I.alloc(),g=g.ia(zp(k),f),e&&(g=Ap(c,g)),I.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);I.free(c);return h}; -T.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.pb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Ap(k,h.copy()):c):(c=I.alloc(),h=h.ia(yc,c),I.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= -k.x?0:180:h.y>=k.y?90:270;I.free(k);k=c}d.Ec()&&g.Md(a)&&(k+=180,360<=k&&(k-=360));if(yp(d))return k;a=b.fi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Uc()&&(a=Bp(this,b),null!==a))return a.tu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; +T.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.pb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Ap(k,h.copy()):c):(c=I.alloc(),h=h.ia(yc,c),I.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +k.x?0:180:h.y>=k.y?90:270;I.free(k);k=c}d.Fc()&&g.Md(a)&&(k+=180,360<=k&&(k-=360));if(yp(d))return k;a=b.fi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Uc()&&(a=Bp(this,b),null!==a))return a.tu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; T.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=yc:(b=this.fromSpot,b.Sb()&&(b=a.fromSpot),a=b===Wc?sc:b)):(a=b?b:this.toPort,null===a?a=yc:(b=this.toSpot,b.Sb()&&(b=a.toSpot),a=b===Wc?sc:b));return a};function yp(a){return a===sc||.5===a.x&&.5===a.y}function zp(a){return.5===a.x&&.5===a.y?a:yc} T.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==$f&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=md.alloc();n.set(g); -if(m instanceof W)h=m.sf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Cf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.Wg(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.De(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var w=I.alloc(),v=I.alloc(),z=I.alloc(),y=md.alloc();y.set(q);y.Ou(m.transform);y.Tr();v.x=p;v.y=u;v.transform(y);w.x=h;w.y=u;w.transform(y);q=!1;Cn(m,w,v,z)?q=!0:(w.x=p,w.y=r,w.transform(y),Cn(m,w,v,z)?q=!0:(v.x= +T.prototype.tf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=md.alloc(),g.reset());g.multiply(this.transform);if(this.Wg(a,g))return dn(this,b,c,e),void 0===f&&md.free(g),!0;if(this.Sc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.R.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=md.alloc();n.set(g); +if(m instanceof W)h=m.tf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Cf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.Wg(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Ee(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var w=I.alloc(),v=I.alloc(),z=I.alloc(),y=md.alloc();y.set(q);y.Ou(m.transform);y.Tr();v.x=p;v.y=u;v.transform(y);w.x=h;w.y=u;w.transform(y);q=!1;Cn(m,w,v,z)?q=!0:(w.x=p,w.y=r,w.transform(y),Cn(m,w,v,z)?q=!0:(v.x= h,v.y=r,v.transform(y),Cn(m,w,v,z)?q=!0:(w.x=h,w.y=u,w.transform(y),Cn(m,w,v,z)&&(q=!0))));md.free(y);I.free(w);I.free(v);I.free(z);h=q}}else h=m.Wg(h,n)}else h=hl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));md.free(n)}}}void 0===f&&md.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&md.free(g);return!1}; -T.prototype.computeCurve=function(){if(null===this.Lf){var a=this.fromPort,b=this.isOrthogonal;this.Lf=null!==a&&a===this.toPort&&!b}return this.Lf?cg:this.curve};T.prototype.computeCorner=function(){if(this.curve===cg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; +T.prototype.computeCurve=function(){if(null===this.Mf){var a=this.fromPort,b=this.isOrthogonal;this.Mf=null!==a&&a===this.toPort&&!b}return this.Mf?cg:this.curve};T.prototype.computeCorner=function(){if(this.curve===cg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; T.prototype.findMidLabel=function(){for(var a=this.path,b=this.R.s,c=b.length,d=0;dk?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);J.ca(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.Wc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.M(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Wc(c,d)}}return!0;case pp:f=this.i(a);n=this.i(c);if(!f.$a(b)||!n.$a(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Wc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.v()&&k.v()){h.Qc(Hp,Hp);k.Qc(Hp,Hp);h.Le(a);k.Le(c);var l=I.alloc(),m=I.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +T.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.v()&&k.v()){h.vc(Hp,Hp);k.vc(Hp,Hp);h.Me(a);k.Me(c);var l=I.alloc(),m=I.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ba(a)||h.ba(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left,m.x=l.x, @@ -1581,17 +1583,17 @@ a.y,c.x,c.y,!1):c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ba(a)||h.ba(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=Kp&&(ik(r),h.Qc(r.lo*r.lx,r.ko*r.mx),Ip(r,a,b,n,d,h,!1),k=Jp(r, +Math.min(a.y,l.y),Math.abs(a.x-l.x),Math.abs(a.y-l.y))&&r.Pj(Math.min(l.x,m.x),Math.min(l.y,m.y),Math.abs(l.x-m.x),Math.abs(l.y-m.y))&&r.Pj(Math.min(m.x,n.x),Math.min(m.y,n.y),Math.abs(m.x-n.x),Math.abs(m.y-n.y)))b=!1;else{e=a;f=n;var q=c=null;if(p.isVirtualized){p=r.bounds.copy();p.vc(-r.lo,-r.ko);var u=I.alloc();jk(r,a.x,a.y)||(J.wf(p.x,p.y,p.x+p.width,p.y+p.height,a.x,a.y,l.x,l.y,u)?(c=a=u.copy(),b=u.Ya(l)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,l.x,l.y,m.x,m.y,u)?(c=a=u.copy(),b=u.Ya(m)):J.wf(p.x, +p.y,p.x+p.width,p.y+p.height,m.x,m.y,n.x,n.y,u)&&(c=a=u.copy(),b=u.Ya(n)));jk(r,n.x,n.y)||(J.wf(p.x,p.y,p.x+p.width,p.y+p.height,n.x,n.y,m.x,m.y,u)?(q=n=u.copy(),d=m.Ya(u)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,m.x,m.y,l.x,l.y,u)?(q=n=u.copy(),d=l.Ya(u)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,l.x,l.y,a.x,a.y,u)&&(q=n=u.copy(),d=a.Ya(u)));I.free(u)}h=h.copy().Xc(k);h.vc(r.lo*r.ps,r.ko*r.ps);Ip(r,a,b,n,d,h,!0);k=Jp(r,n.x,n.y);!r.abort&&k>=Kp&&(ik(r),h.vc(r.lo*r.mx,r.ko*r.nx),Ip(r,a,b,n,d,h,!1),k=Jp(r, n.x,n.y));if(!r.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.M(2,h.x,h.y),this.l(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)J.B(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.M(2,h,a.y),this.M(3,h,g.y)):J.B(h.y,g.y)?(Math.abs(a.y-h.y)<=r.ko/2&&(this.M(2,h.x,a.y),this.M(3,g.x,a.y)),this.l(2,h.x,a.y)):this.M(2,a.x,h.y);else if(90===b||270===b)J.B(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): -Math.min(h.y,a.y),this.M(2,a.x,h),this.M(3,g.x,h)):J.B(h.x,g.x)?(Math.abs(a.x-h.x)<=r.lo/2&&(this.M(2,a.x,h.y),this.M(3,a.x,g.y)),this.l(2,a.x,h.y)):this.M(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.lf(f.x,q.y):this.lf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ee(l.copy()),this.ee(m.copy()));I.free(l);I.free(m)}}; +Math.min(h.y,a.y),this.M(2,a.x,h),this.M(3,g.x,h)):J.B(h.x,g.x)?(Math.abs(a.x-h.x)<=r.lo/2&&(this.M(2,a.x,h.y),this.M(3,a.x,g.y)),this.l(2,a.x,h.y)):this.M(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.mf(f.x,q.y):this.mf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.fe(l.copy()),this.fe(m.copy()));I.free(l);I.free(m)}}; T.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Uc()||this.computeSpot(!1,this.toPort).Uc()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function Lj(a){if(null===a.diagram||!a.isAvoiding||!dk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=ek(a.diagram,!0,a.containingGroup,null);for(var d=1;dMp&&Jp(b,m,n)!==l-1&&(Jp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Jp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Jp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Jp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>Mp&&Jp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>Mp)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ -k)*k+k/2;l>Mp&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Jp(b,g,m)===l-1?Lp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Jp(b,g,m)===l-1&&Lp(a,b,g,m,f,!1,f)));a.lf(c,d)}T.prototype.Ny=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=zb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gMp&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Jp(b,g,m)===l-1?Lp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Jp(b,g,m)===l-1&&Lp(a,b,g,m,f,!1,f)));a.mf(c,d)}T.prototype.Ny=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=zb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=O.j,this.Zl=!0,a;var c=!1,d=this.diagram;null!==d&&rp(this)&&d.th.contains(this)&&(0!==this.bl.width||0!==this.bl.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Jb.s;var g=this.computeCurve();if(g===cg&&3<=b&&!J.ca(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kw?q>r?(f.x= v-y,f.y=r-y,e.x=v+u,e.y=r+u):(f.x=v-y,f.y=r+y,e.x=v+u,e.y=r-u):q>r?(f.x=v+y,f.y=r-y,e.x=v-u,e.y=r+u):(f.x=v+y,f.y=r+y,e.x=v-u,e.y=r-u));J.ca(w,v)&&J.ca(r,q)&&(r>p?(z>v?(f.x=v-y,f.y=r-y,e.x=v+u):(f.x=v+y,f.y=r-y,e.x=v-u),e.y=r+u):(z>v?(f.x=v-y,f.y=r+y,e.x=v+u):(f.x=v+y,f.y=r+y,e.x=v-u),e.y=r-u));if(J.ca(w,v)&&J.ca(v,z)||J.ca(p,r)&&J.ca(r,q))w=.5*(w+z),p=.5*(p+q),f.x=w,f.y=p,e.x=w,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&J.ca(g.x,this.i(0).x)&&J.ca(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x), c.y=.5*(g.y+l.y));yd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=Np(this,m.copy(),!1,qb));l=.5*(l+m.x);g=.5*(g+m.y);yd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);I.free(b);I.free(c);I.free(f);I.free(e)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=Np(this,g.copy(),!1,qb)),yd(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=I.alloc();f.assign(this.i(0)); @@ -1603,42 +1605,42 @@ function Op(a,b,c,d){for(var e=a.pointsCount,f=b;J.ca(b.x,f.x)&&J.ca(b.y,f.y);){ function Qp(a,b,c,d,e,f,g){if(!g&&rp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=Rp(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===Zf?xd(b,n,r,!1):yd(b,p,m,n,m,n,r)}else if(J.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===Zf?xd(b,r,m,!1):yd(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function Rp(a,b,c,d){var e=a.diagram;if(null===e||b.C(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ma.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,w)n&&!J.B(g,w)){h.x=q;h.y=n;m=!0;break a}}else if(!J.B(n,r)&& J.B(g,w)&&Math.min(n,r)g&&Math.min(q,u)m&&!J.B(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}I.free(h)}function rp(a){a=a.curve;return a===Yf||a===Zf}function vp(a,b){if(b||rp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.th.contains(a)||0===a.bl.width&&0===a.bl.height||b.th.add(a,a.bl.copy())} T.prototype.Ao=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ma.s;for(var g=e.length,h=0;ha&&wa(a,">= 0",T,"fromEndSegmentLength"),this.Rc(),this.aa.Oi=a,this.g("fromEndSegmentLength", b,a),this.ab())}},fromShortLength:{get:function(){return null!==this.aa?this.aa.Pi:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(this.Rc(),this.aa.Pi=a,this.mc(!0),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.aa?this.aa.tj:Wc},set:function(a){var b=this.toSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.tj=a,this.g("toSpot",b,a),(b.Uc()||a.Uc())&&null!==this.toNode&&Zo(this.toPort),this.ab())}},toEndSegmentLength:{ get:function(){return null!==this.aa?this.aa.rj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",T,"toEndSegmentLength"),this.Rc(),this.aa.rj=a,this.g("toEndSegmentLength",b,a),this.ab())}},toShortLength:{get:function(){return null!==this.aa?this.aa.sj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(this.Rc(),this.aa.sj=a,this.mc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{get:function(){return null=== this.rd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);J.ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Le(f),e=2;ed&&(d=-d)):J.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.qf(e));a.push(d)}}return this.Gp}},flattenedTotalLength:{get:function(){var a=this.Ys;if(isNaN(a)){for(var b= +get:function(){this.mg();var a=this.bl,b=Infinity,c=Infinity,d=this.pointsCount;if(0===d)a.h(NaN,NaN,0,0);else{if(1===d)d=this.i(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.h(d.x,d.y,0,0);else if(2===d){d=this.i(0);var e=this.i(1);b=Math.min(d.x,e.x);c=Math.min(d.y,e.y);a.h(d.x,d.y,0,0);a.Me(e)}else if(this.computeCurve()===cg&&3<=d&&!this.isOrthogonal)if(e=this.i(0),b=e.x,c=e.y,a.h(b,c,0,0),3===d){d=this.i(1);b=Math.min(d.x,b);c=Math.min(d.y,c);var f=this.i(2);b=Math.min(f.x,b);c=Math.min(f.y, +c);J.ql(e.x,e.y,d.x,d.y,d.x,d.y,f.x,f.y,.5,a)}else for(f=3;f=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);J.ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Me(f),e=2;ed&&(d=-d)):J.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.rf(e));a.push(d)}}return this.Gp}},flattenedTotalLength:{get:function(){var a=this.Ys;if(isNaN(a)){for(var b= this.flattenedLengths,c=b.length,d=a=0;d=this.pointsCount?0:this.isOrthogonal||!yp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!yp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.dk},set:function(a){var b=this.dk;b!== +get:function(){return this.m},set:function(a){this.m=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return 2===(this.kj.value&2)}},isAvoiding:{get:function(){return 4===(this.kj.value&4)}},Zl:{get:function(){return 0!==(this.Oa&128)},set:function(a){0!==(this.Oa&128)!==a&&(this.Oa^=128)}},geometry:{ +get:function(){this.Zl||(this.mg(),this.sa=this.makeGeometry());return this.sa}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!yp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!yp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.dk},set:function(a){var b=this.dk;b!== a&&(this.dk=a,this.g("adjusting",b,a))}},corner:{get:function(){return this.wm},set:function(a){var b=this.wm;b!==a&&(this.wm=a,this.mc(!0),this.g("corner",b,a))}},curve:{get:function(){return this.ym},set:function(a){var b=this.ym;b!==a&&(this.ym=a,this.ab(),this.mc(!0),vp(this,b===Zf||b===Yf||a===Zf||a===Yf),this.g("curve",b,a))}},curviness:{get:function(){return this.zm},set:function(a){var b=this.zm;b!== -a&&(this.zm=a,this.ab(),this.mc(!1),this.g("curviness",b,a))}},routing:{get:function(){return this.kj},set:function(a){var b=this.kj;b!==a&&(this.kj=a,this.Lf=null,this.ab(),vp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.mc(!0),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram; -if(null!==a&&a.model.ki())return a.model.uc(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Ao;T.prototype.findClosestSegment=T.prototype.Ny;T.prototype.updateRoute=T.prototype.lg;T.prototype.invalidateRoute=T.prototype.ab;T.prototype.rollbackRoute=T.prototype.$u;T.prototype.commitRoute=T.prototype.nf;T.prototype.startRoute=T.prototype.jh;T.prototype.clearPoints=T.prototype.Aj;T.prototype.removePoint=T.prototype.Yu;T.prototype.addPointAt=T.prototype.lf;T.prototype.addPoint=T.prototype.ee; +a&&(this.zm=a,this.ab(),this.mc(!1),this.g("curviness",b,a))}},routing:{get:function(){return this.kj},set:function(a){var b=this.kj;b!==a&&(this.kj=a,this.Mf=null,this.ab(),vp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.mc(!0),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram; +if(null!==a&&a.model.ki())return a.model.uc(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Ao;T.prototype.findClosestSegment=T.prototype.Ny;T.prototype.updateRoute=T.prototype.mg;T.prototype.invalidateRoute=T.prototype.ab;T.prototype.rollbackRoute=T.prototype.$u;T.prototype.commitRoute=T.prototype.pf;T.prototype.startRoute=T.prototype.jh;T.prototype.clearPoints=T.prototype.Aj;T.prototype.removePoint=T.prototype.Yu;T.prototype.addPointAt=T.prototype.mf;T.prototype.addPoint=T.prototype.fe; T.prototype.insertPointAt=T.prototype.l;T.prototype.insertPoint=T.prototype.sz;T.prototype.setPointAt=T.prototype.M;T.prototype.setPoint=T.prototype.Wc;T.prototype.getPoint=T.prototype.i;T.prototype.getOtherPort=T.prototype.jz;T.prototype.getOtherNode=T.prototype.wo; var wp=null,xp=null,mp=new D(T,"Normal",1),Vp=new D(T,"Orthogonal",2),Wp=new D(T,"AvoidsNodes",6),Ep=new D(T,"AvoidsNodesStraight",7),$f=new D(T,"None",0),cg=new D(T,"Bezier",9),Zf=new D(T,"JumpGap",10),Yf=new D(T,"JumpOver",11),np=new D(T,"End",17),op=new D(T,"Scale",18),pp=new D(T,"Stretch",19),Tm=new D(T,"OrientAlong",21),Mm=new D(T,"OrientPlus90",22),Om=new D(T,"OrientMinus90",23),qp=new D(T,"OrientOpposite",24),Um=new D(T,"OrientUpright",25),Nm=new D(T,"OrientPlus90Upright",26),Pm=new D(T,"OrientMinus90Upright", 27),Qm=new D(T,"OrientUpright45",28),Gp=16,Fp=14,Hp=8;T.className="Link";T.Normal=mp;T.Orthogonal=Vp;T.AvoidsNodes=Wp;T.AvoidsNodesStraight=Ep;T.None=$f;T.Bezier=cg;T.JumpGap=Zf;T.JumpOver=Yf;T.End=np;T.Scale=op;T.Stretch=pp;T.OrientAlong=Tm;T.OrientPlus90=Mm;T.OrientMinus90=Om;T.OrientOpposite=qp;T.OrientUpright=Um;T.OrientPlus90Upright=Nm;T.OrientMinus90Upright=Pm;T.OrientUpright45=Qm;T.EndSegmentStep=8;T.CurvinessStart=Gp;T.SpacingMin=Fp;T.OrthoShortCut=Hp; -function Up(a,b,c,d){Ra(this);this.te=this.Sp=!1;this.cs=a;this.ux=b;this.Pu=c;this.vx=d;this.links=[]}Up.prototype.Al=function(){if(!this.Sp){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Dd=Math.floor((a.x-this.nc)/this.nc)*this.nc;this.Ed=Math.floor((b-this.oc)/this.oc)*this.oc;this.ln=Math.ceil((c+2*this.nc)/this.nc)*this.nc;this.mn=Math.ceil((d+2*this.oc)/this.oc)*this.oc;a=1+(Math.ceil((this.ln-this.Dd)/this.nc)|0);b=1+(Math.ceil((this.mn-this.Ed)/this.oc)|0);if(null===this.Xb||this.Wh=Mp&&(c[d]=Xp)} fk.prototype.Pj=function(a,b,c,d){if(a>this.ln||a+cthis.mn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Wh)|0;for(c=Math.min(b+e-1,this.Xh)|0;a<=d;a++){e=this.Xb[a];for(var f=b;f<=c;f++)if(e[f]===kk)return!1}return!0}; @@ -1650,79 +1652,79 @@ a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:be)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===bq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==bq){g.push(k);g.push(l);if(aq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=bq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} ma.Object.defineProperties(fk.prototype,{bounds:{get:function(){return new M(this.Dd,this.Ed,this.ln-this.Dd,this.mn-this.Ed)}},lo:{get:function(){return this.nc},set:function(a){0=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> -a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Cp.prototype.Al=function(){this.ge.length=0}; -function Dp(a,b){var c=a.ge;if(0===c.length){a:if(!a.Do){c=a.Do;a.Do=!0;var d=null,e=a.node,f=e instanceof qf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Sw();else{if(!f.actualBounds.v()){a.Do=c;break a}d=f;g=d.vu()}f=a.ge.length=0;var h=a.port.ia(tc,I.alloc()),k=a.port.ia(Cc,I.alloc());e=M.allocAt(h.x,h.y,0,0);e.Le(k);I.free(h);I.free(k);h=I.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.fi();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& -l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Md(d),n=l.computeSpot(m,a.port);if(n.Uc()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.Ya(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=cq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.ge[f];void 0===r?(r=new dq(l,p,n),a.ge[f]=r):(r.link=l,r.angle=p,r.Fc= -n);r.Ru.set(m);f++}}}}I.free(h);a.ge.sort(Cp.prototype.j);k=a.ge.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(y)?(z=Math.abs(y)/r,r=Math.abs(y)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(y)?(z=Math.abs(y)/ -m,m=Math.abs(y)):z=1}v=0}var F=A.Co;if(d===jp){A=A.link.computeThickness();A*=z;F.set(B);switch(q){case 8:F.x=B.x+u/2+p/2-v-A/2;break;case 2:F.y=B.y+y/2+r/2-v-A/2;break;case 1:F.x=B.x+u/2-n/2+v+A/2;break;default:case 4:F.y=B.y+y/2-m/2+v+A/2}v+=A}else{var L=.5;d===Vo&&(L=(A.xo+1)/(A.tl+1));F.x=B.x+u*L;F.y=B.y+y*L}}}I.free(h);I.free(k);I.free(g);I.free(l);B=a.ge;for(f=0;fb.Fc?1:a.angleb.angle?1:0}; -Cp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.xo;if(0>d)return c;var e=a.tl;if(1>=e||!b.isOrthogonal)return c;b=a.Ru;var f=a.Co;if(2===a.Fc||8===a.Fc)d=e-1-d;return((a=2===a.Fc||4===a.Fc)?b.y180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Cp.prototype.Al=function(){this.he.length=0}; +function Dp(a,b){var c=a.he;if(0===c.length){a:if(!a.Do){c=a.Do;a.Do=!0;var d=null,e=a.node,f=e instanceof qf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Tw();else{if(!f.actualBounds.v()){a.Do=c;break a}d=f;g=d.vu()}f=a.he.length=0;var h=a.port.ia(tc,I.alloc()),k=a.port.ia(Cc,I.alloc());e=M.allocAt(h.x,h.y,0,0);e.Me(k);I.free(h);I.free(k);h=I.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.fi();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Md(d),n=l.computeSpot(m,a.port);if(n.Uc()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.Ya(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=cq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.he[f];void 0===r?(r=new dq(l,p,n),a.he[f]=r):(r.link=l,r.angle=p,r.Gc= +n);r.Ru.set(m);f++}}}}I.free(h);a.he.sort(Cp.prototype.j);k=a.he.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(y)?(z=Math.abs(y)/r,r=Math.abs(y)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(y)?(z=Math.abs(y)/ +m,m=Math.abs(y)):z=1}v=0}var F=A.Co;if(d===jp){A=A.link.computeThickness();A*=z;F.set(B);switch(q){case 8:F.x=B.x+u/2+p/2-v-A/2;break;case 2:F.y=B.y+y/2+r/2-v-A/2;break;case 1:F.x=B.x+u/2-n/2+v+A/2;break;default:case 4:F.y=B.y+y/2-m/2+v+A/2}v+=A}else{var L=.5;d===Vo&&(L=(A.xo+1)/(A.tl+1));F.x=B.x+u*L;F.y=B.y+y*L}}}I.free(h);I.free(k);I.free(g);I.free(l);B=a.he;for(f=0;fb.Gc?1:a.angleb.angle?1:0}; +Cp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.xo;if(0>d)return c;var e=a.tl;if(1>=e||!b.isOrthogonal)return c;b=a.Ru;var f=a.Co;if(2===a.Gc||8===a.Gc)d=e-1-d;return((a=2===a.Gc||4===a.Gc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; qi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof T)&&(gq(h),this.gh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof qf&&(h.gh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= 0,c=b,d+=f+20,f=0):e++}}};qi.prototype.gh=function(a){return!a.location.v()||a instanceof qf&&a.gh?!0:!1};function fq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof qf?null===k.layout?fq(a,b,k.memberParts,!1,e,f,g,h):(gq(k),b.add(k)):(gq(k),b.add(k))):g&&k instanceof T?b.add(k):!h||!k.Tc()||k instanceof V||(gq(k),b.add(k)))}} function gq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Za()}qi.prototype.hi=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -qi.prototype.Hw=function(a){var b=new G;a instanceof Q?(fq(this,b,a.nodes,!0,null,!0,!0,!0),fq(this,b,a.links,!0,null,!0,!0,!0),fq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof qf?fq(this,b,a.memberParts,!1,null,!0,!0,!0):fq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +qi.prototype.Iw=function(a){var b=new G;a instanceof Q?(fq(this,b,a.nodes,!0,null,!0,!0,!0),fq(this,b,a.links,!0,null,!0,!0,!0),fq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof qf?fq(this,b,a.memberParts,!1,null,!0,!0,!0):fq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; qi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ia(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};qi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};qi.prototype.workerLayout=function(){return!1}; -function hq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.lj&&(c.running=iq(a.lj));null!==a.cg&&(c.waiting=iq(a.cg));a.workerStateChanged(c,a)}}function iq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}qi.prototype.uy=function(){var a=jq(this.constructor);a&&(null!==a.Me&&a.Me.terminate(),a.Me=null,a.Cl.iteratorValues.each(function(a){a.zr=!1;a.lj=null;a.cg=null;a.ir=!1;hq(a)}),a.Cl.clear())}; -function kq(a,b){var c=jq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function jq(a){var b=null;if("function"===typeof a){if(b=lq.get(a),!b){var c=Ha(a);b=lq.get(c);b||(b=new mq,b.pu=a,b.name=c,b.j=a.name,b.gx=nq,lq.set(c,b),lq.set(a,b),lq.set(a.name,b))}}else"string"===typeof a&&(b=lq.get(a));return b} -qi.prototype.qv=function(){if("undefined"===typeof Worker||!oq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.zr&&(this.ir=!0,this.cg=this.lj=null,hq(this)),!1;var a=jq(this.constructor);if(null===a)return!1;null===a.Me&&(a.Me=new Worker(oq),a.Me.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Me.j=function(a){xa("Worker serialization error: "+a)},a.Me.onmessage= -function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)xa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Cl.get(c.id)){a.Cl.remove(c.id);b.zr=!1;b.lj=null;if(b.ir)b.ir=!1,b.cg=null;else{var d=pq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}hq(b,c.time);c=b.cg;if(null!==c)b.cg=null;else for(d=a.Cl.iteratorValues;d.next();){var e=d.value;c=e.cg;if(null!==c){e.cg=null;break}}null!==c&&qq(b,c)}},a.Me.postMessage({_GoJS:"_GoJS", -url:a.gx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Me.postMessage({_GoJS:"_GoJS",url:b})}),a.Me.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.lj?this.cg=this.network:qq(this,this.network);hq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function qq(a,b){a.zr=!0;var c=jq(a.constructor),d=rq(a,b,!0);d._GoJS="_GoJS";c.Me.postMessage(d);c.Cl.set(cb(a),a);a.lj=b} +function hq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.lj&&(c.running=iq(a.lj));null!==a.dg&&(c.waiting=iq(a.dg));a.workerStateChanged(c,a)}}function iq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}qi.prototype.uy=function(){var a=jq(this.constructor);a&&(null!==a.Ne&&a.Ne.terminate(),a.Ne=null,a.Cl.iteratorValues.each(function(a){a.zr=!1;a.lj=null;a.dg=null;a.ir=!1;hq(a)}),a.Cl.clear())}; +function kq(a,b){var c=jq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function jq(a){var b=null;if("function"===typeof a){if(b=lq.get(a),!b){var c=Ha(a);b=lq.get(c);b||(b=new mq,b.pu=a,b.name=c,b.j=a.name,b.hx=nq,lq.set(c,b),lq.set(a,b),lq.set(a.name,b))}}else"string"===typeof a&&(b=lq.get(a));return b} +qi.prototype.qv=function(){if("undefined"===typeof Worker||!oq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.zr&&(this.ir=!0,this.dg=this.lj=null,hq(this)),!1;var a=jq(this.constructor);if(null===a)return!1;null===a.Ne&&(a.Ne=new Worker(oq),a.Ne.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Ne.j=function(a){xa("Worker serialization error: "+a)},a.Ne.onmessage= +function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)xa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Cl.get(c.id)){a.Cl.remove(c.id);b.zr=!1;b.lj=null;if(b.ir)b.ir=!1,b.dg=null;else{var d=pq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}hq(b,c.time);c=b.dg;if(null!==c)b.dg=null;else for(d=a.Cl.iteratorValues;d.next();){var e=d.value;c=e.dg;if(null!==c){e.dg=null;break}}null!==c&&qq(b,c)}},a.Ne.postMessage({_GoJS:"_GoJS", +url:a.hx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Ne.postMessage({_GoJS:"_GoJS",url:b})}),a.Ne.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.lj?this.dg=this.network:qq(this,this.network);hq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function qq(a,b){a.zr=!0;var c=jq(a.constructor),d=rq(a,b,!0);d._GoJS="_GoJS";c.Ne.postMessage(d);c.Cl.set(cb(a),a);a.lj=b} function rq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?cb(a):a.id,layout:Ha(a.constructor),p:d,hA:e,Ly:f};a.onNetworkSerialization(2,c,b,d);return d} -function pq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.hA,g=new pb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Lb(a.key));null!==b?b=e.yj(b):(b=e.createVertex(),e.eg(b));c&&null!==a.key&&(b.data={yh:a.key});g.set(a.id,b)});var h=b.Ly,k=new pb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.ol(f);f.link=b;c&&null!==a.key&&(f.data={yh:a.key});k.set(a.id, +function pq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.hA,g=new pb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Lb(a.key));null!==b?b=e.yj(b):(b=e.createVertex(),e.fg(b));c&&null!==a.key&&(b.data={yh:a.key});g.set(a.id,b)});var h=b.Ly,k=new pb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.ol(f);f.link=b;c&&null!==a.key&&(f.data={yh:a.key});k.set(a.id, f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.deserializeVertexProperties(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}qi.prototype.onNetworkSerialization=function(){}; -ma.Object.defineProperties(qi.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.Zm},set:function(a){this.Zm!==a&&(this.Zm=a)}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a;a||(this.dn=!0)}}, +ma.Object.defineProperties(qi.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.m},set:function(a){this.m!==a&&(this.m=a,null!==a&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.Zm},set:function(a){this.Zm!==a&&(this.Zm=a)}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a;a||(this.dn=!0)}}, isViewportSized:{get:function(){return this.en},set:function(a){this.en!==a&&(this.en=a)&&this.D()}},isRouting:{get:function(){return this.bn},set:function(a){this.bn!==a&&(this.bn=a)}},isRealtime:{get:function(){return this.an},set:function(a){this.an!==a&&(this.an=a)}},isValidLayout:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a,a||(a=this.diagram,null!== a&&(a.mh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.mm},set:function(a){this.mm!==a&&(this.mm=a,this.D())}},arrangementOrigin:{get:function(){return this.im},set:function(a){this.im.C(a)||(this.im.assign(a),this.D())}},id:{get:function(){return this.u},set:function(a){this.u= -a}},mayUseWorkerFunction:{get:function(){return this.nn},set:function(a){this.nn!==a&&(this.nn=a)}},workerStateChanged:{get:function(){return this.ao},set:function(a){this.ao!==a&&(this.ao=a)}}});qi.prototype.useWorker=qi.prototype.qv;qi.declareWorkerLayout=kq;qi.prototype.cancelWorker=qi.prototype.uy;qi.prototype.collectParts=qi.prototype.Hw;qi.prototype.getLayoutBounds=qi.prototype.hi;qi.prototype.invalidateLayout=qi.prototype.D; +a}},mayUseWorkerFunction:{get:function(){return this.nn},set:function(a){this.nn!==a&&(this.nn=a)}},workerStateChanged:{get:function(){return this.ao},set:function(a){this.ao!==a&&(this.ao=a)}}});qi.prototype.useWorker=qi.prototype.qv;qi.declareWorkerLayout=kq;qi.prototype.cancelWorker=qi.prototype.uy;qi.prototype.collectParts=qi.prototype.Iw;qi.prototype.getLayoutBounds=qi.prototype.hi;qi.prototype.invalidateLayout=qi.prototype.D; var lq=new pb,nq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",oq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";qi.className="Layout";qi.GoJSScriptURL=nq;qi.declareWorkerLayout=kq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:Q.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=jq(a.layout));var d=null;c&&c.pu&&(d=new c.pu);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=pq(d,a,!0); -d.workerLayout=function(){var a=rq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new E)}});function mq(){this.pu=null;this.gx=this.j=this.name="";this.scripts=[];this.Me=null;this.Cl=new pb}function eq(a){Ra(this);this.Jc=a;this.jf=new G;this.oe=new G;this.ds=new pb;this.Yr=new pb} -eq.prototype.clear=function(){if(this.jf)for(var a=this.jf.iterator;a.next();)a.value.clear();if(this.oe)for(a=this.oe.iterator;a.next();)a.value.clear();this.jf=new G;this.oe=new G;this.ds=new pb;this.Yr=new pb}; -eq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.jf.count+" edges: "+this.oe.count;if(1=a)return b;b+=" vertexes: "+this.kf.count+" edges: "+this.pe.count;if(1b?1:0):1:null!==b?-1:0} -ma.Object.defineProperties(sq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.wd._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Jd._dataArray}},data:{get:function(){return this.qb},set:function(a){this.qb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{get:function(){return this.Lh}, -set:function(a){if(this.Lh!==a){this.Lh=a;a.Za();var b=this.network.layout,c=M.alloc(),d=b.hi(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof qf)&&(a=a.locationObject.ia(yc),a.v())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.C(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.C(a)|| -this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(b.ja(),b.x=a-this.o.x,b.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(b.ja(),b.y=a-this.o.y,b.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},focusY:{ -get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},x:{get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},y:{get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},width:{get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.ja(),b.width= +ma.Object.defineProperties(sq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.wd._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Jd._dataArray}},data:{get:function(){return this.qb},set:function(a){this.qb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.m.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{get:function(){return this.Lh}, +set:function(a){if(this.Lh!==a){this.Lh=a;a.Za();var b=this.network.layout,c=M.alloc(),d=b.hi(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof qf)&&(a=a.locationObject.ia(yc),a.v())){this.m.h(a.x-b,a.y-e);return}this.m.h(f/2,d/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.C(a)||this.j.assign(a)}},focus:{get:function(){return this.m},set:function(a){this.m.C(a)|| +this.m.assign(a)}},centerX:{get:function(){return this.j.x+this.m.x},set:function(a){var b=this.j;b.x+this.m.x!==a&&(b.ja(),b.x=a-this.m.x,b.freeze())}},centerY:{get:function(){return this.j.y+this.m.y},set:function(a){var b=this.j;b.y+this.m.y!==a&&(b.ja(),b.y=a-this.m.y,b.freeze())}},focusX:{get:function(){return this.m.x},set:function(a){var b=this.m;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},focusY:{ +get:function(){return this.m.y},set:function(a){var b=this.m;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},x:{get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},y:{get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},width:{get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.ja(),b.width= a,b.freeze())}},height:{get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.ja(),b.height=a,b.freeze())}},network:{get:function(){return this.nb},set:function(a){this.nb=a}},sourceVertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new G,b= this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.wd.iterator}},destinationEdges:{get:function(){return this.Jd.iterator}},edges:{get:function(){for(var a= new E,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{get:function(){return this.wd.count+this.Jd.count}}});sq.prototype.deleteDestinationEdge=sq.prototype.qu;sq.prototype.addDestinationEdge=sq.prototype.gu;sq.prototype.deleteSourceEdge=sq.prototype.ru;sq.prototype.addSourceEdge=sq.prototype.iu;sq.className="LayoutVertex";sq.standardComparer=zq; sq.smartComparer=function(a,b){if(null!==a){if(null!==b){a=a.Lh;var c=b.Lh;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Da("Layout");d=[];switch(this.alignment){case Iq:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0g)d.push(new M(0,u,g+h,v)),w=0,q=r,u+=v,v=0;v=Math.max(v,F);switch(p){case Hq:A=-A.width;break;default:A= 0}y.moveTo(q+A,u);switch(p){case Hq:q-=B;break;default:q+=B}w++}d.push(new M(0,u,g+h,v));M.free(l);break;case Aq:k=g;m=f;n=b;p=c;g=M.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=I.alloc();for(q=0;q=l&&(k-=l);l=y=0;B=Math.max(this.cellSize.height,1);A=f=0;F=!0;w=I.alloc() m&&u>m-1||0k){d.push(new M(0,F?z-f:z,k+n,A+f+p));for(S=0;Sl&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -ma.Object.defineProperties(Mk.prototype,{wrappingWidth:{get:function(){return this.co},set:function(a){this.co!==a&&(0n)){var u=n+bn(q);q.lc(u,!0);nn(q,u,n)}}b.isModified=!0}}finally{b.$=!0}}}}};mi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ka(a);for(b=this.nodes.iterator;b.next();)b.value.Ka(a);for(b=this.links.iterator;b.next();)b.value.Ka(a)}; -mi.prototype.Uo=function(){for(var a=this.H.model,b=new G,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new Va;e.add("[");c&&1=d)return"[]";var e=new Ta;e.add("[");c&&1d)return;Da(a.Lc,d)}ur(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.To(b)}t.Uz=function(a){if(za(a))for(var b=a.length,c=0;cd)return;Da(a.Mc,d)}ur(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.To(b)}t.Uz=function(a){if(za(a))for(var b=a.length,c=0;cb&&(b=a.length);Ca(a,b,c);ur(this,"",fe,"",a,null,c,null,b)};t.Xu=function(a,b){void 0===b&&(b=-1);a===this.Lc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",ge,"",a,c,null,b,null)}; +t.ho=function(a,b){if(b){var c=this.lb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.iy=function(a,b){this.Qr(a,-1,b)};t.Qr=function(a,b,c){0>b&&(b=a.length);Ca(a,b,c);ur(this,"",fe,"",a,null,c,null,b)};t.Xu=function(a,b){void 0===b&&(b=-1);a===this.Mc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",ge,"",a,c,null,b,null)}; t.uo=function(a){if(null===a)return"";var b=this.gj;if(""===b)return"";b=on(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.Rl=function(a,b){if(null!==a){var c=this.gj;if(""!==c)if(this.lb(a)){var d=on(a,c);void 0===d&&(d="");d!==b&&(Nj(a,c,b),ur(this,"nodeCategory",de,c,a,d,b))}else Nj(a,c,b)}};t.Tl=function(a,b){this.Rl(b,this.uo(a))};t.Bl=function(){return!1};t.Nj=function(){return!1};t.ki=function(){return!1}; t.Vr=function(){return!1};t.Oj=function(){return!1};function oi(){return new Z}function pr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return pr(a,b.constructor);return typeof b}function tr(a){return yr[a]?yr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} function on(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c}function Nj(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){}} ma.Object.defineProperties(Z.prototype,{name:{get:function(){return this.va},set:function(a){var b=this.va;b!==a&&(this.va=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Am},set:function(a){var b=this.Am;b!==a&&(this.Am=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.xg},set:function(a){var b=this.xg;b!==a&&(this.xg=a,this.g("isReadOnly",b,a))}},modelData:{ -get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(this.j=a,this.g("modelData",b,a),this.Ka(a))}},undoManager:{get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(null!==b&&b.xx(this),this.o=a,null!==a&&a.Bw(this))}},skipsUndoManager:{get:function(){return this.Mg},set:function(a){this.Mg=a}},nodeKeyProperty:{get:function(){return this.Mh},set:function(a){var b=this.Mh; -b!==a&&(""===a&&C("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;ya(a)&&"number"===typeof c&&(d=this.uc(a),b?(this.Qf.add(a),this.ed[c]!==a&&this.ed.splice(c,0,a),void 0!==d&&this.rb.add(d,a)):(this.Qf.remove(a),this.ed[c]=== -a&&this.ed.splice(c,1),void 0!==d&&this.rb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.uf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=Ar.prototype;t.Dl=function(a){if(void 0!==a){var b=this.Li;if(null!==b){var c=this.dc(a);null===c&&(c=this.copyNodeData(b),Nj(c,this.nodeKeyProperty,a),this.kf(c))}return a}}; -t.Zw=function(a){return Wq(this,a,!0)};t.cv=function(a,b){dr(this,a,b,!0)};t.bx=function(a){return Wq(this,a,!1)};t.gv=function(a,b){dr(this,a,b,!1)};function Wq(a,b,c){if(null!==b&&(a=c?a.Ye:a.Ze,""!==a&&(a=on(b,a),void 0!==a))){if(Yq(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function dr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.Ye:a.Ze;if(""!==e)if(c=a.Dl(c),a.Bc(b)){var f=on(b,e);f!==c&&(br(a,f,b),Nj(b,e,c),null===a.dc(c)&&cr(a,c,b),ur(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.$w=function(a){return Vq(this,a,!0)};t.dv=function(a,b){er(this,a,b,!0)};t.ex=function(a){return Vq(this,a,!1)};t.hv=function(a,b){er(this,a,b,!1)}; -function Vq(a,b,c){if(null===b)return"";a=c?a.$i:a.aj;if(""===a)return"";b=on(b,a);return void 0===b?"":b}function er(a,b,c,d){if(null!==b){var e=d?a.$i:a.aj;if(""!==e)if(a.Bc(b)){var f=on(b,e);void 0===f&&(f="");f!==c&&(Nj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.uf=function(a){if(null===a)return Dr;var b=this.be;if(""===b)return Dr;a=on(a,b);return void 0===a?Dr:a}; -t.ls=function(a,b){if(null!==a){var c=this.be;if(""!==c)if(this.Bc(a)){var d=on(a,c);void 0===d&&(d=Dr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Bc(a)&&(br(this,b,a),ur(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.uc=function(a){if(null!==a){var b=this.Bh;if(""!==b&&(b=on(a,b),void 0!==b)){if(Yq(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.ks=function(a,b){if(null!==a){var c=this.Bh;if(""!==c)if(this.Bc(a)){var d=on(a,c);d!==b&&null===this.Zg(b)&&(Nj(a,c,b),void 0!==d&&this.rb.remove(d),this.rb.add(b,a),ur(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.Ka(a,c))}else Nj(a,c,b)}};t.Zg=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Yq(a)?this.rb.I(a):null}; -t.$r=function(a){if(null!==a){var b=this.Bh;if(""!==b){var c=this.uc(a);if(void 0===c||this.rb.contains(c)){var d=this.Sk;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.rb.contains(c))){Nj(a,b,c);return}if("string"===typeof c){for(d=2;this.rb.contains(c+d);)d++;Nj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.rb.count-1;this.rb.contains(c);)c--;Nj(a,b,c)}}}}};t.Bc=function(a){return null===a?!1:this.Qf.contains(a)};t.Yh=function(a){null!==a&&(gb(a),this.Bc(a)||$q(this,a,!0))}; -function $q(a,b,c){if(""!==a.linkKeyProperty){var d=a.uc(b);if(void 0!==d&&a.rb.I(d)===b)return;a.$r(b);d=a.uc(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.rb.add(d,b)}a.Qf.add(b);d=null;c&&(d=a.ed.length,a.ed.splice(d,0,b));ur(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Er(a,b)}t.ky=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ed.splice(d,1)}ur(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=Wq(a,b,!0);br(a,c,b);c=Wq(a,b,!1);br(a,c,b);d=a.uf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;ya(a)&&"number"===typeof c&&(d=this.uc(a),b?(this.Rf.add(a),this.ed[c]!==a&&this.ed.splice(c,0,a),void 0!==d&&this.rb.add(d,a)):(this.Rf.remove(a),this.ed[c]=== +a&&this.ed.splice(c,1),void 0!==d&&this.rb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.vf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=Ar.prototype;t.Dl=function(a){if(void 0!==a){var b=this.Li;if(null!==b){var c=this.dc(a);null===c&&(c=this.copyNodeData(b),Nj(c,this.nodeKeyProperty,a),this.lf(c))}return a}}; +t.$w=function(a){return Wq(this,a,!0)};t.cv=function(a,b){dr(this,a,b,!0)};t.ex=function(a){return Wq(this,a,!1)};t.gv=function(a,b){dr(this,a,b,!1)};function Wq(a,b,c){if(null!==b&&(a=c?a.Ze:a.$e,""!==a&&(a=on(b,a),void 0!==a))){if(Yq(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function dr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.Ze:a.$e;if(""!==e)if(c=a.Dl(c),a.Cc(b)){var f=on(b,e);f!==c&&(br(a,f,b),Nj(b,e,c),null===a.dc(c)&&cr(a,c,b),ur(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.ax=function(a){return Vq(this,a,!0)};t.dv=function(a,b){er(this,a,b,!0)};t.gx=function(a){return Vq(this,a,!1)};t.hv=function(a,b){er(this,a,b,!1)}; +function Vq(a,b,c){if(null===b)return"";a=c?a.$i:a.aj;if(""===a)return"";b=on(b,a);return void 0===b?"":b}function er(a,b,c,d){if(null!==b){var e=d?a.$i:a.aj;if(""!==e)if(a.Cc(b)){var f=on(b,e);void 0===f&&(f="");f!==c&&(Nj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.vf=function(a){if(null===a)return Dr;var b=this.ce;if(""===b)return Dr;a=on(a,b);return void 0===a?Dr:a}; +t.ls=function(a,b){if(null!==a){var c=this.ce;if(""!==c)if(this.Cc(a)){var d=on(a,c);void 0===d&&(d=Dr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Cc(a)&&(br(this,b,a),ur(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.uc=function(a){if(null!==a){var b=this.Bh;if(""!==b&&(b=on(a,b),void 0!==b)){if(Yq(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; +t.ks=function(a,b){if(null!==a){var c=this.Bh;if(""!==c)if(this.Cc(a)){var d=on(a,c);d!==b&&null===this.Zg(b)&&(Nj(a,c,b),void 0!==d&&this.rb.remove(d),this.rb.add(b,a),ur(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.Ka(a,c))}else Nj(a,c,b)}};t.Zg=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Yq(a)?this.rb.I(a):null}; +t.$r=function(a){if(null!==a){var b=this.Bh;if(""!==b){var c=this.uc(a);if(void 0===c||this.rb.contains(c)){var d=this.Sk;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.rb.contains(c))){Nj(a,b,c);return}if("string"===typeof c){for(d=2;this.rb.contains(c+d);)d++;Nj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.rb.count-1;this.rb.contains(c);)c--;Nj(a,b,c)}}}}};t.Cc=function(a){return null===a?!1:this.Rf.contains(a)};t.Yh=function(a){null!==a&&(gb(a),this.Cc(a)||$q(this,a,!0))}; +function $q(a,b,c){if(""!==a.linkKeyProperty){var d=a.uc(b);if(void 0!==d&&a.rb.I(d)===b)return;a.$r(b);d=a.uc(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.rb.add(d,b)}a.Rf.add(b);d=null;c&&(d=a.ed.length,a.ed.splice(d,0,b));ur(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Er(a,b)}t.ly=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ed.splice(d,1)}ur(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=Wq(a,b,!0);br(a,c,b);c=Wq(a,b,!1);br(a,c,b);d=a.vf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new E;b.addAll(a.iterator);a=new E;var c=new E;var d=this.sort(b);var e,f,g=this.mp;var h=this.arrangement;var k=this.nodeDiameterFormula;var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle; isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===Vr&&k===Wr?h=Hr:h===Vr&&k!==Wr&&(h=this.arrangement);if((this.direction===Qr||this.direction===Rr)&&this.sorting!==Kr){for(k=0;!(k>=d.length);k+=2){a.add(d.K(k));if(k+1>=d.length)break;c.add(d.K(k+1))}this.direction===Qr?(this.arrangement===Vr&&a.reverse(),d=new E,d.addAll(a),d.addAll(c)):(this.arrangement===Vr&&c.reverse(),d=new E,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;r< d.length;r++){var q=n+p*f*(this.direction===Jr?1:-1)/k,u=d.K(r).diameter;isNaN(u)&&(u=Yr(d.K(r),q));360>p&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===Vr){isNaN(b)&&(b=6);if(h!==Hr&&h!==Vr){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g= -r/(360<=p?k:k-1)}this.Pv=h;this.hc=l;this.Hm=m;this.Qv=n;this.zp=p;this.Ni=b;this.de=f;this.mp=g;b=d;d=this.Pv;h=this.hc;l=this.Qv;m=this.zp;n=this.Ni;p=this.de;k=this.mp;if(this.direction!==Qr&&this.direction!==Rr||d!==Vr)if(this.direction===Qr||this.direction===Rr){g=0;switch(d){case Ur:g=180*as(this,h,p,l,k)/Math.PI;break;case Hr:k=b=0;g=a.first();null!==g&&(b=Yr(g,Math.PI/2));g=c.first();null!==g&&(k=Yr(g,Math.PI/2));g=180*as(this,h,p,l,n+(b+k)/2)/Math.PI;break;case Tr:g=m/b.length}if(this.direction=== +r/(360<=p?k:k-1)}this.Pv=h;this.hc=l;this.Hm=m;this.Qv=n;this.zp=p;this.Ni=b;this.ee=f;this.mp=g;b=d;d=this.Pv;h=this.hc;l=this.Qv;m=this.zp;n=this.Ni;p=this.ee;k=this.mp;if(this.direction!==Qr&&this.direction!==Rr||d!==Vr)if(this.direction===Qr||this.direction===Rr){g=0;switch(d){case Ur:g=180*as(this,h,p,l,k)/Math.PI;break;case Hr:k=b=0;g=a.first();null!==g&&(b=Yr(g,Math.PI/2));g=c.first();null!==g&&(k=Yr(g,Math.PI/2));g=180*as(this,h,p,l,n+(b+k)/2)/Math.PI;break;case Tr:g=m/b.length}if(this.direction=== Qr){switch(d){case Ur:bs(this,a,l,Sr);break;case Hr:cs(this,a,l,Sr);break;case Tr:ds(this,a,m/2,l,Sr)}switch(d){case Ur:bs(this,c,l+g,Jr);break;case Hr:cs(this,c,l+g,Jr);break;case Tr:ds(this,c,m/2,l+g,Jr)}}else{switch(d){case Ur:bs(this,c,l,Sr);break;case Hr:cs(this,c,l,Sr);break;case Tr:ds(this,c,m/2,l,Sr)}switch(d){case Ur:bs(this,a,l+g,Jr);break;case Hr:cs(this,a,l+g,Jr);break;case Tr:ds(this,a,m/2,l+g,Jr)}}}else switch(d){case Ur:bs(this,b,l,this.direction);break;case Hr:cs(this,b,l,this.direction); -break;case Tr:ds(this,b,m,l,this.direction);break;case Vr:es(this,b,m,l,this.direction)}else es(this,b,m,l-m/2,Jr)}this.updateParts();this.network=null;this.isValidLayout=!0};function ds(a,b,c,d,e){var f=a.zp,g=a.hc;a=a.de;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===Jr?f:-f);0>f;)f+=360;f%=360;180c){for(f=d+(e===Jr?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;hs(a,k,l,m,n,e,f)||is(a,k,l,m,n,e,f);k=f.x;l=f.y}I.free(f);a.hj++;if(!(23Math.abs(r)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.hj?a.hc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;hs(a,k,l,n,p,e,m)||is(a,k,l,n,p,e,m);k=m.x;l=m.y}I.free(m);a.hj++;if(!(23a.hj?a.hc-f/(2*Math.PI):a.hc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function is(a,b,c,d,e,f,g){var h=a.hc,k=a.de,l=0;a=(d[e].height+d[e+1].height)/2+a.Ni;d=!1;if(0<=b!==(f===Jr)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Gr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -Gr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new I(0,0):(c.x=this.arrangementOrigin.x+this.hc,c.y=this.arrangementOrigin.y+this.de);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.Za(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ie(c.ie(a)),this.group.move(b),this.Dv=b.ie(a))}; -Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function $r(a,b,c,d,e){var f=a.Yx;if(.001>Math.abs(a.Hm-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.hj?a.hc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;hs(a,k,l,n,p,e,m)||is(a,k,l,n,p,e,m);k=m.x;l=m.y}I.free(m);a.hj++;if(!(23a.hj?a.hc-f/(2*Math.PI):a.hc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function is(a,b,c,d,e,f,g){var h=a.hc,k=a.ee,l=0;a=(d[e].height+d[e+1].height)/2+a.Ni;d=!1;if(0<=b!==(f===Jr)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Gr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +Gr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new I(0,0):(c.x=this.arrangementOrigin.x+this.hc,c.y=this.arrangementOrigin.y+this.ee);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.Za(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.je(c.je(a)),this.group.move(b),this.Dv=b.je(a))}; +Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function $r(a,b,c,d,e){var f=a.Zx;if(.001>Math.abs(a.Hm-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} function Zr(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?$r(a,1,c,d,e):$r(a,1,c))}function as(a,b,c,d,e){if(.001>Math.abs(a.Hm-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} Gr.prototype.sort=function(a){switch(this.sorting){case Or:break;case Pr:a.reverse();break;case Mr:a.sort(this.comparer);break;case Nr:a.sort(this.comparer);a.reverse();break;case Kr:return this.Vj(js(a));default:C("Invalid sorting type.")}return a}; function js(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.K(f));b[f]=-1;f=a.K(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} @@ -1956,36 +1958,36 @@ c.indexOf(b[l][z]),0<=B&&(B=Math.abs(u-(B>=u?B+1:B)),v+=Br||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.jl=a:this.jl=360,this.D())}},arrangement:{get:function(){return this.Nb},set:function(a){this.Nb===a||a!==Vr&&a!==Hr&&a!==Ur&&a!==Tr||(this.Nb=a,this.D())}},direction:{get:function(){return this.L},set:function(a){this.L===a||a!==Jr&&a!==Sr&&a!==Qr&&a!==Rr||(this.L=a,this.D())}},sorting:{get:function(){return this.fd},set:function(a){this.fd===a||a!==Or&&a!==Pr&& -a!==Mr&&!Nr&&a!==Kr||(this.fd=a,this.D())}},comparer:{get:function(){return this.Zc},set:function(a){this.Zc!==a&&(this.Zc=a,this.D())}},spacing:{get:function(){return this.ff},set:function(a){this.ff!==a&&(this.ff=a,this.D())}},nodeDiameterFormula:{get:function(){return this.un},set:function(a){this.un===a||a!==Lr&&a!==Wr||(this.un=a,this.D())}},actualXRadius:{get:function(){return this.hc}}, -actualYRadius:{get:function(){return this.de}},actualSpacing:{get:function(){return this.Ni}},actualCenter:{get:function(){return this.Dv}}}); +a!==Mr&&!Nr&&a!==Kr||(this.fd=a,this.D())}},comparer:{get:function(){return this.Zc},set:function(a){this.Zc!==a&&(this.Zc=a,this.D())}},spacing:{get:function(){return this.gf},set:function(a){this.gf!==a&&(this.gf=a,this.D())}},nodeDiameterFormula:{get:function(){return this.un},set:function(a){this.un===a||a!==Lr&&a!==Wr||(this.un=a,this.D())}},actualXRadius:{get:function(){return this.hc}}, +actualYRadius:{get:function(){return this.ee}},actualSpacing:{get:function(){return this.Ni}},actualCenter:{get:function(){return this.Dv}}}); var Hr=new D(Gr,"ConstantSpacing",0),Ur=new D(Gr,"ConstantDistance",1),Tr=new D(Gr,"ConstantAngle",2),Vr=new D(Gr,"Packed",3),Jr=new D(Gr,"Clockwise",4),Sr=new D(Gr,"Counterclockwise",5),Qr=new D(Gr,"BidirectionalLeft",6),Rr=new D(Gr,"BidirectionalRight",7),Or=new D(Gr,"Forwards",8),Pr=new D(Gr,"Reverse",9),Mr=new D(Gr,"Ascending",10),Nr=new D(Gr,"Descending",11),Kr=new D(Gr,"Optimized",12),Lr=new D(Gr,"Pythagorean",13),Wr=new D(Gr,"Circular",14);Gr.className="CircularLayout";Gr.ConstantSpacing=Hr; Gr.ConstantDistance=Ur;Gr.ConstantAngle=Tr;Gr.Packed=Vr;Gr.Clockwise=Jr;Gr.Counterclockwise=Sr;Gr.BidirectionalLeft=Qr;Gr.BidirectionalRight=Rr;Gr.Forwards=Or;Gr.Reverse=Pr;Gr.Ascending=Mr;Gr.Descending=Nr;Gr.Optimized=Kr;Gr.Pythagorean=Lr;Gr.Circular=Wr;function Ir(){this.xl=-Infinity;this.cm=this.bk=null} Ir.prototype.compare=function(a,b){if(0this.xl||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+p.height/2,l[0]=new I(p.x+p.width+d.width,p.y),l[1]=new I(p.x,p.y+p.height+d.height),h=2):(k=ps(l,h,e,f,p.width,p.height,d),n=l[k],r=new I(n.x+ -p.width+d.width,n.y),p=new I(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.Sc(c)&&(a++,2a.network.vertexes.count)return!1;a.Sg=a.network.vertexes.Ea();a=a.Sg;a.sort(function(a,b){return null===a||null===b||a===b?0:b.Nd-a.Nd});for(b=a.length-1;0<=b&&1>=a[b].Nd;)b--;return 1=g))){for(var l=h=0,m=k.count-g;mr&& -(r=1);h=J.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new I(p.x+g,p.y+h)}}a.network=d;return c}function ts(a,b){for(var c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.Je){var e=d.Je.K(d.av);d.Nd=e.ts;var f=e.wv,g=e.xv;d.bounds=new M(d.centerX-f,d.centerY-g,e.us,e.ss);d.focus=new I(f,g);d.av--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function us(a,b){var c=b.Bj;if(null!==c&&0!==c.count){var d=b.centerX,e=b.centerY,f=b.width,g=b.height;null!==b.Je&&0=n.Nd?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=g))){for(var l=h=0,m=k.count-g;mr&& +(r=1);h=J.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new I(p.x+g,p.y+h)}}a.network=d;return c}function ts(a,b){for(var c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.Ke){var e=d.Ke.K(d.av);d.Nd=e.ts;var f=e.wv,g=e.xv;d.bounds=new M(d.centerX-f,d.centerY-g,e.us,e.ss);d.focus=new I(f,g);d.av--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} +function us(a,b){var c=b.Bj;if(null!==c&&0!==c.count){var d=b.centerX,e=b.centerY,f=b.width,g=b.height;null!==b.Ke&&0=n.Nd?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=d+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} function ps(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,J.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,J.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.Of;var l=d=h=0;for(f= +function xs(a){null===a.Sg&&(a.Sg=a.network.vertexes.Ea());var b=a.Sg;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.Pf;var l=d=h=0;for(f= 0;fc||l-k>c){if(e)break}else if(m-r>c||r-m>c){if(!e)break}else{var q=ws(g,p);1>q?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new ys),q=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*q):kr?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new ys),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;eu&&0u&&0a[this.yc]&&(this.Dh=a[c]-1,this.yc=c),a[c]u&&0u&&0a[this.zc]&&(this.Dh=a[c]-1,this.zc=c),a[c]g)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.mf===l.mf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lg)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.nf===l.nf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lu||n===u&&r>q)&&h++;wn||u===n&&q>r)&&h++}}}if(0>=c)for(k=d[g].destinationEdgesArrayAccess,l=0;lu||n===u&&m>w)&&h++,qn||u===n&&w>m)&&h++);f[g*e+g]=h;for(k=g+ 1;k=c)for(h=d[g].destinationEdgesArrayAccess,y=d[k].destinationEdgesArrayAccess,l=0;l>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}Ls(a,b,d);return f}function Ts(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&Ts(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&Ts(a,k,c,d,e,f)}} function Us(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)Us(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)Us(a,b.value.fromVertex,c,d,e,f)}} Bs.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.rk){default:case Vs:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==Ws(a);){for(e=Xs(a);null!==e;)d[c]=e,c--,e.valid=!1,e=Xs(a);for(e=Ys(a);null!==e;)d[b]=e,b++,e.valid=!1,e=Ys(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& -k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.Ol(b),b.rev=!0);break;case Cs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.fg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Cg=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -Zs(this,b);for(d.reset();d.next();)b=d.value,-1===b.fg&&Zs(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.fgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cb.toVertex.index&&(a.Ol(b),b.rev=!0);break;case Cs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.gg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Cg=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +Zs(this,b);for(d.reset();d.next();)b=d.value,-1===b.gg&&Zs(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.ggd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cf+1&&(p+=4*(z-f),r+=4*(z-(f+1)))}A=d[f].destinationEdges.iterator;for(A.reset();A.next();)if(z=A.value,y=z.toVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;z===f+1&&(r+=1)}A=d[f+1].sourceEdges.iterator;for(A.reset();A.next();)if(z=A.value,y=z.fromVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;zf+1&&(p+=4*(z-(f+1)),r+=4*(z-f))}A=d[f+1].destinationEdges.iterator; for(A.reset();A.next();)if(z=A.value,y=z.toVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;z===f&&(p+=1)}z=y=0;A=g[d[f].index];var B=h[d[f].index],F=g[d[f+1].index],L=h[d[f+1].index];-1!==A&&(y+=Math.abs(A-q),z+=Math.abs(A-v));-1!==B&&(y+=Math.abs(B-q),z+=Math.abs(B-v));-1!==F&&(y+=Math.abs(F-u),z+=Math.abs(F-w));-1!==L&&(y+=Math.abs(L-u),z+=Math.abs(L-w));if(r>1)+8*d;this.Ja*=8}if(0!==(this.Sf&2))for(c=!0;c;){c=!1;for(b=this.yc+1;b<=this.wa;b++)c=ot(this,b,1)|| -c;for(b=this.yc-1;0<=b;b--)c=ot(this,b,-1)||c;c=ot(this,this.yc,0)||c}if(0!==(this.Sf&4)){for(b=this.yc+1;b<=this.wa;b++)pt(this,b,1);for(b=this.yc-1;0<=b;b--)pt(this,b,-1);pt(this,this.yc,0)}a&&(qt(this,-1),qt(this,1));if(0!==(this.Sf&2))for(c=!0;c;){c=!1;c=ot(this,this.yc,0)||c;for(b=this.yc+1;b<=this.wa;b++)c=ot(this,b,0)||c;for(b=this.yc-1;0<=b;b--)c=ot(this,b,0)||c}};function ot(a,b,c){for(var d=!1;rt(a,b,c);)d=!0;return d} +Bs.prototype.straightenAndPack=function(){var a=0!==(this.Tf&1);var b=0!==(this.Tf&nt);1E3>1)+8*d;this.Ja*=8}if(0!==(this.Tf&2))for(c=!0;c;){c=!1;for(b=this.zc+1;b<=this.wa;b++)c=ot(this,b,1)|| +c;for(b=this.zc-1;0<=b;b--)c=ot(this,b,-1)||c;c=ot(this,this.zc,0)||c}if(0!==(this.Tf&4)){for(b=this.zc+1;b<=this.wa;b++)pt(this,b,1);for(b=this.zc-1;0<=b;b--)pt(this,b,-1);pt(this,this.zc,0)}a&&(qt(this,-1),qt(this,1));if(0!==(this.Tf&2))for(c=!0;c;){c=!1;c=ot(this,this.zc,0)||c;for(b=this.zc+1;b<=this.wa;b++)c=ot(this,b,0)||c;for(b=this.zc-1;0<=b;b--)c=ot(this,b,0)||c}};function ot(a,b,c){for(var d=!1;rt(a,b,c);)d=!0;return d} function rt(a,b,c){var d,e=Ks(a,b),f=a.Hb[b],g=Rs(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?r=m-1:r=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var q=p=0,u=0;if(0>=c)for(var w=e[d].sourceEdges.iterator;w.next();){var v=w.value;var z=v.fromVertex; if(v.valid&&z.layer!==b){var y=Ms(v);var A=v.portFromColOffset;v=v.portToColOffset;z=z.column;p+=(Math.abs(m+v-(z+A))+1)*y;q+=(Math.abs(r+v-(z+A))+1)*y;u+=(Math.abs(n+v-(z+A))+1)*y}}if(0<=c)for(w=e[d].destinationEdges.iterator;w.next();)v=w.value,z=v.toVertex,v.valid&&z.layer!==b&&(y=Ms(v),A=v.portFromColOffset,v=v.portToColOffset,z=z.column,p+=(Math.abs(m+A-(z+v))+1)*y,q+=(Math.abs(r+A-(z+v))+1)*y,u+=(Math.abs(n+A-(z+v))+1)*y);v=A=y=0;w=g[e[d].index];z=h[e[d].index];-1!==w&&(y+=Math.abs(w-m),A+= Math.abs(w-r),v+=Math.abs(w-n));-1!==z&&(y+=Math.abs(z-m),A+=Math.abs(z-r),v+=Math.abs(z-n));if(q=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} function tt(a,b){var c=b+1;var d,e=[],f=[];for(d=0;d<=a.wa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.wa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} function qt(a,b){for(var c=0;c<=a.Ja;c++)for(;st(a,c););a.normalize();for(c=0;cf?Os(a,e):gb)for(c=a.Ja;0<=c;c--)for(e=Ns(a),f=Qs(a),d=f+1;ff?Os(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Kc);a.Kc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Us(a,b,a.Kc,-1,!0,!0),a.Kc++);var f;b=[];for(f=0;fc)for(g=a.Ja;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +function ut(a,b,c){a.Lc=0;for(var d=a.network.vertexes.iterator;d.next();)d.value.component=-1;if(0c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Lc);a.Lc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Us(a,b,a.Lc,-1,!0,!0),a.Lc++);var f;b=[];for(f=0;fc)for(g=a.Ja;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} Bs.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Is(this,!0),b=Is(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.nu();this.isRouting&&this.commitLinks()};function Is(a,b){return 270===a.L?b?ad:fd:90===a.L?b?fd:ad:180===a.L?b?dd:ed:b?ed:dd} -Bs.prototype.commitNodes=function(){this.$d=[];this.Cd=[];this.Bd=[];this.Qa=[];for(var a=0;a<=this.wa;a++)this.$d[a]=0,this.Cd[a]=0,this.Bd[a]=0,this.Qa[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.$d[c]=Math.max(this.$d[c],this.nodeMinLayerSpace(b,!0));this.Cd[c]=Math.max(this.Cd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ae;for(var d=0;d<=this.wa;d++){var e=c;0>=this.$d[d]+this.Cd[d]&&(e=0);0=this.ae[d]+this.Cd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.l(q++,A,n+F),b.l(q++,A,n),b.l(q++,A,n-y)):(b.l(q++,A,B+F),b.l(q++,A,B),b.l(q++,A,B-y)):270===this.L?B<=n.bounds.y?(n=n.bounds.y,b.l(q++,A,n-y),b.l(q++,A,n),b.l(q++,A,n+F)):(b.l(q++,A,B-y),b.l(q++,A,B),b.l(q++,A,B+F)):0===this.L&&(A>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.l(q++,n+F,B),b.l(q++,n,B),b.l(q++,n-y,B)):(b.l(q++,A+F,B),b.l(q++,A,B),b.l(q++,A-y,B)));else{b.l(q++,v,z);var L=0;if(180===this.L||0===this.L){if(180===this.L?A>=n.bounds.right: -A<=n.bounds.x)L=(0===this.L?-y:F)/2;b.l(q++,v+L,B)}else{if(270===this.L?B>=n.bounds.bottom:B<=n.bounds.y)L=(90===this.L?-y:F)/2;b.l(q++,A,z+L)}b.l(q++,A,B)}}else y=Math.max(10,this.$d[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):90===this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)): +A<=n.bounds.x)L=(0===this.L?-y:F)/2;b.l(q++,v+L,B)}else{if(270===this.L?B>=n.bounds.bottom:B<=n.bounds.y)L=(90===this.L?-y:F)/2;b.l(q++,A,z+L)}b.l(q++,A,B)}}else y=Math.max(10,this.ae[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):90===this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)): 270===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):b.l(q++,A,B)}n=w}if(null===h||l!==sc||p)if(v=b.i(q-1).x,z=b.i(q-1).y,A=b.i(q).x,B=b.i(q).y,p)u=this.Cd[m.layer],180===this.L||0===this.L?(p=z,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.L?A>=m.bounds.x:A<=m.bounds.right)&&(n=m.centerX+(180=== -this.L?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.L?B>=m.bounds.y:B<=m.bounds.bottom)&&(n=m.centerY+(270===this.L?-u:u),p=m.bounds.x?(n=m.bounds.x+ -m.bounds.width,b.M(q-2,n,z),b.M(q-1,n+F,z)):90===this.L&&B<=m.bounds.bottom?(n=m.bounds.y,b.M(q-2,v,n),b.M(q-1,v,n-y)):270===this.L&&B>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.M(q-2,v,n),b.M(q-1,v,n+F)):0===this.L&&A<=m.bounds.right&&(n=m.bounds.x,b.M(q-2,n,z),b.M(q-1,n-y,z));else{y=Math.max(10,this.$d[m.layer]);F=Math.max(10,this.Cd[m.layer]);p=0;if(180===this.L||0===this.L){if(180===this.L?A<=m.bounds.x:A>=m.bounds.right)p=(0===this.L?F:-y)/2;b.l(q++,A+p,z)}else{if(270===this.L?B<=m.bounds.y: +this.L?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.L?B>=m.bounds.y:B<=m.bounds.bottom)&&(n=m.centerY+(270===this.L?-u:u),p=m.bounds.x?(n=m.bounds.x+ +m.bounds.width,b.M(q-2,n,z),b.M(q-1,n+F,z)):90===this.L&&B<=m.bounds.bottom?(n=m.bounds.y,b.M(q-2,v,n),b.M(q-1,v,n-y)):270===this.L&&B>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.M(q-2,v,n),b.M(q-1,v,n+F)):0===this.L&&A<=m.bounds.right&&(n=m.bounds.x,b.M(q-2,n,z),b.M(q-1,n-y,z));else{y=Math.max(10,this.ae[m.layer]);F=Math.max(10,this.Cd[m.layer]);p=0;if(180===this.L||0===this.L){if(180===this.L?A<=m.bounds.x:A>=m.bounds.right)p=(0===this.L?F:-y)/2;b.l(q++,A+p,z)}else{if(270===this.L?B<=m.bounds.y: B>=m.bounds.bottom)p=(90===this.L?F:-y)/2;b.l(q++,v,B+p)}b.l(q++,A,B)}}else{for(;null!==m&&m!==n;){y=w=null;for(m=m.destinationEdges.iterator;m.next()&&(v=m.value,v.link!==c.link||(w=v.toVertex,y=v.fromVertex,null!==y.node&&(y=null),null!==w.node)););if(null===w)break;w!==n&&(v=b.i(q-1).x,z=b.i(q-1).y,A=w.centerX,B=w.centerY,p?180===this.L||0===this.L?(null!==y?y.centerY:z)!==B&&(y=this.Qa[w.layer]+this.Yc.x,q===b.firstPickIndex+1&&(y=0===this.L?Math.max(y,v):Math.min(y,v)),b.l(q++,y,z),b.l(q++,y, -B)):(null!==y?y.centerX:v)!==A&&(y=this.Qa[w.layer]+this.Yc.y,q===b.firstPickIndex+1&&(y=90===this.L?Math.max(y,z):Math.min(y,z)),b.l(q++,v,y),b.l(q++,A,y)):(y=Math.max(10,this.$d[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):90===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):270=== +B)):(null!==y?y.centerX:v)!==A&&(y=this.Qa[w.layer]+this.Yc.y,q===b.firstPickIndex+1&&(y=90===this.L?Math.max(y,z):Math.min(y,z)),b.l(q++,v,y),b.l(q++,A,y)):(y=Math.max(10,this.ae[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):90===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):270=== this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)):(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):180===this.L?(b.l(q++,A+F,B),b.l(q++,A-y,B)):90===this.L?(b.l(q++,A,B-y),b.l(q++,A,B+F)):270===this.L?(b.l(q++,A,B+F),b.l(q++,A,B-y)):(b.l(q++,A-y,B),b.l(q++,A+F,B))));m=w}p&&(v=b.i(q-1).x,z=b.i(q-1).y,A=b.i(q).x,B=b.i(q).y,180===this.L||0===this.L? z!==B&&(y=0===this.L?Math.min(Math.max((A+v)/2,this.Qa[n.layer]+this.Yc.x),A):Math.max(Math.min((A+v)/2,this.Qa[n.layer]+this.Yc.x),A),b.l(q++,y,z),b.l(q++,y,B)):v!==A&&(y=90===this.L?Math.min(Math.max((B+z)/2,this.Qa[n.layer]+this.Yc.y),B):Math.max(Math.min((B+z)/2,this.Qa[n.layer]+this.Yc.y),B),b.l(q++,v,y),b.l(q++,A,y)))}null!==d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.C(d)||b.M(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.v()||l.set(e.actualBounds.center),b.M(0,l.x,l.y)), -null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.C(l)||b.M(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.v()||e.set(f.actualBounds.center),b.M(b.pointsCount-1,e.x,e.y)));b.nf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.C(l)||b.M(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.v()||e.set(f.actualBounds.center),b.M(b.pointsCount-1,e.x,e.y)));b.pf();c.commit()}}}this.avoidOrthogonalOverlaps()}; Bs.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new E,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.ldb.ld?1:a.Acb.Ac?1:0:0};t.Ax=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.firstb.first||a.jb.j||a.ldb.ld?1:a.Acb.Ac?1:0:0}; -t.js=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.fcb.fc||a.jb.j||a.ldb.ld?1:a.Acb.Ac?1:0:0};t.B=function(a,b){a-=b;return-1a}; +k.x*k.x+k.y;h.fc=l.x*l.x+l.y;h.ld=Math.min(f.x,g.x);h.Bc=Math.max(f.x,g.x);h.index=e;h.link=d;if(e+2f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.ldb.ld?1:a.Bcb.Bc?1:0:0};t.Bx=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.firstb.first||a.jb.j||a.ldb.ld?1:a.Bcb.Bc?1:0:0}; +t.js=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.fcb.fc||a.jb.j||a.ldb.ld?1:a.Bcb.Bc?1:0:0};t.B=function(a,b){a-=b;return-1a}; t.ri=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&C("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.ve.length){var d=[];for(var e=0;e=a.we.length){var d=[];for(var e=0;ea&&(this.Sf=a,this.D())}},setsPortSpots:{get:function(){return this.ef},set:function(a){this.ef!==a&&(this.ef=a,this.D())}}, -linkSpacing:{get:function(){return this.jn},set:function(a){this.jn!==a&&0<=a&&(this.jn=a,this.D())}},maxLayer:{get:function(){return this.wa}},maxIndex:{get:function(){return this.Dh}},maxColumn:{get:function(){return this.Ja}},minIndexLayer:{get:function(){return this.Bg}},maxIndexLayer:{get:function(){return this.yc}}}); +get:function(){return this.Xi},set:function(a){this.Xi!==a&&0<=a&&(this.Xi=a,this.D())}},aggressiveOption:{get:function(){return this.ek},set:function(a){this.ek===a||a!==lt&&a!==Fs&&a!==mt||(this.ek=a,this.D())}},packOption:{get:function(){return this.Tf},set:function(a){this.Tf!==a&&0<=a&&8>a&&(this.Tf=a,this.D())}},setsPortSpots:{get:function(){return this.ff},set:function(a){this.ff!==a&&(this.ff=a,this.D())}}, +linkSpacing:{get:function(){return this.jn},set:function(a){this.jn!==a&&0<=a&&(this.jn=a,this.D())}},maxLayer:{get:function(){return this.wa}},maxIndex:{get:function(){return this.Dh}},maxColumn:{get:function(){return this.Ja}},minIndexLayer:{get:function(){return this.Bg}},maxIndexLayer:{get:function(){return this.zc}}}); var Cs=new D(Bs,"CycleDepthFirst",0),Vs=new D(Bs,"CycleGreedy",1),Hs=new D(Bs,"CycleFromLayers",2),Ds=new D(Bs,"LayerOptimalLinkLength",0),$s=new D(Bs,"LayerLongestPathSink",1),bt=new D(Bs,"LayerLongestPathSource",2),Es=new D(Bs,"InitDepthFirstOut",0),ht=new D(Bs,"InitDepthFirstIn",1),ft=new D(Bs,"InitNaive",2),lt=new D(Bs,"AggressiveNone",0),Fs=new D(Bs,"AggressiveLess",1),mt=new D(Bs,"AggressiveMore",2),nt=8;Bs.className="LayeredDigraphLayout";Bs.CycleDepthFirst=Cs;Bs.CycleGreedy=Vs; -Bs.CycleFromLayers=Hs;Bs.LayerOptimalLinkLength=Ds;Bs.LayerLongestPathSink=$s;Bs.LayerLongestPathSource=bt;Bs.InitDepthFirstOut=Es;Bs.InitDepthFirstIn=ht;Bs.InitNaive=ft;Bs.AggressiveNone=lt;Bs.AggressiveLess=Fs;Bs.AggressiveMore=mt;Bs.PackNone=0;Bs.PackExpand=1;Bs.PackStraighten=2;Bs.PackMedian=4;Bs.PackAll=15;function vt(){this.index=this.Ac=this.ld=this.fc=this.first=this.layer=0;this.link=null;this.j=0}vt.className="SegInfo";function Gs(a){eq.call(this,a)}la(Gs,eq);Gs.prototype.createVertex=function(){return new wt(this)}; -Gs.prototype.createEdge=function(){return new xt(this)};Gs.className="LayeredDigraphNetwork";function wt(a){sq.call(this,a);this.Wa=this.qg=this.Ah=-1;this.u=NaN;this.F=null;this.valid=!1;this.finish=this.fg=NaN;this.mf=0;this.Tj=this.Uj=null}la(wt,sq); -wt.prototype.serializeVertexProperties=function(a,b){sq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?cb(this.near):null;a.valid=this.valid;a.fg=this.fg;a.finish=this.finish;a.mf=this.mf;a.Uj=this.Uj;a.Tj=this.Tj}; -wt.prototype.deserializeVertexProperties=function(a,b,c,d){sq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.fg=a.fg;this.finish=a.finish;this.mf=a.mf;this.Uj=a.Uj;this.Tj=a.Tj}; -ma.Object.defineProperties(wt.prototype,{layer:{get:function(){return this.Ah},set:function(a){this.Ah!==a&&(this.Ah=a)}},column:{get:function(){return this.qg},set:function(a){this.qg!==a&&(this.qg=a)}},index:{get:function(){return this.Wa},set:function(a){this.Wa!==a&&(this.Wa=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{ -get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}});wt.className="LayeredDigraphVertex";function xt(a){tq.call(this,a);this.j=this.ga=this.Ga=!1;this.Y=this.u=NaN;this.F=this.o=0}la(xt,tq); +Bs.CycleFromLayers=Hs;Bs.LayerOptimalLinkLength=Ds;Bs.LayerLongestPathSink=$s;Bs.LayerLongestPathSource=bt;Bs.InitDepthFirstOut=Es;Bs.InitDepthFirstIn=ht;Bs.InitNaive=ft;Bs.AggressiveNone=lt;Bs.AggressiveLess=Fs;Bs.AggressiveMore=mt;Bs.PackNone=0;Bs.PackExpand=1;Bs.PackStraighten=2;Bs.PackMedian=4;Bs.PackAll=15;function vt(){this.index=this.Bc=this.ld=this.fc=this.first=this.layer=0;this.link=null;this.j=0}vt.className="SegInfo";function Gs(a){eq.call(this,a)}la(Gs,eq);Gs.prototype.createVertex=function(){return new wt(this)}; +Gs.prototype.createEdge=function(){return new xt(this)};Gs.className="LayeredDigraphNetwork";function wt(a){sq.call(this,a);this.Wa=this.rg=this.Ah=-1;this.u=NaN;this.F=null;this.valid=!1;this.finish=this.gg=NaN;this.nf=0;this.Tj=this.Uj=null}la(wt,sq); +wt.prototype.serializeVertexProperties=function(a,b){sq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?cb(this.near):null;a.valid=this.valid;a.gg=this.gg;a.finish=this.finish;a.nf=this.nf;a.Uj=this.Uj;a.Tj=this.Tj}; +wt.prototype.deserializeVertexProperties=function(a,b,c,d){sq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.gg=a.gg;this.finish=a.finish;this.nf=a.nf;this.Uj=a.Uj;this.Tj=a.Tj}; +ma.Object.defineProperties(wt.prototype,{layer:{get:function(){return this.Ah},set:function(a){this.Ah!==a&&(this.Ah=a)}},column:{get:function(){return this.rg},set:function(a){this.rg!==a&&(this.rg=a)}},index:{get:function(){return this.Wa},set:function(a){this.Wa!==a&&(this.Wa=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{ +get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}});wt.className="LayeredDigraphVertex";function xt(a){tq.call(this,a);this.j=this.ga=this.Ga=!1;this.W=this.u=NaN;this.F=this.m=0}la(xt,tq); xt.prototype.serializeEdgeProperties=function(a,b){tq.prototype.serializeEdgeProperties.call(this,a,b);a.valid=this.valid;a.rev=this.rev;a.forest=this.forest;a.portFromPos=this.portFromPos;a.portToPos=this.portToPos;a.portFromColOffset=this.portFromColOffset;a.portToColOffset=this.portToColOffset}; xt.prototype.deserializeEdgeProperties=function(a,b,c,d){tq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; ma.Object.defineProperties(xt.prototype,{fromVertex:{get:function(){return this.ad},set:function(a){this.ad!==a&&(this.ad=a)}},toVertex:{get:function(){return this.jd},set:function(a){this.jd!==a&&(this.jd=a)}},valid:{get:function(){return this.Ga},set:function(a){this.Ga!==a&&(this.Ga=a)}},rev:{get:function(){return this.ga},set:function(a){this.ga!==a&&(this.ga=a)}},forest:{ -get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F}, -set:function(a){this.F!==a&&(this.F=a)}}});xt.className="LayeredDigraphEdge";function yt(a){qi.call(this);this.Qb=new G;this.En=zt;this.qd=At;this.Yn=Bt;this.aq=Ct;this.Ev=[];this.od=!0;this.Nb=Dt;this.Td=(new K(10,10)).freeze();var b=new Et(this);this.V=new Ft(b);this.W=new Ft(b);this.Xt=[];a&&Object.assign(this,a)}la(yt,qi); -yt.prototype.cloneProtected=function(a){qi.prototype.cloneProtected.call(this,a);a.En=this.En;a.Yn=this.Yn;a.aq=this.aq;a.od=this.od;a.Nb=this.Nb;a.Td.assign(this.Td);a.V.copyInheritedPropertiesFrom(this.V);a.W.copyInheritedPropertiesFrom(this.W)}; +get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a)}},portFromColOffset:{get:function(){return this.m},set:function(a){this.m!==a&&(this.m=a)}},portToColOffset:{get:function(){return this.F}, +set:function(a){this.F!==a&&(this.F=a)}}});xt.className="LayeredDigraphEdge";function yt(a){qi.call(this);this.Qb=new G;this.En=zt;this.qd=At;this.Yn=Bt;this.aq=Ct;this.Ev=[];this.od=!0;this.Nb=Dt;this.Td=(new K(10,10)).freeze();var b=new Et(this);this.V=new Ft(b);this.Y=new Ft(b);this.Xt=[];a&&Object.assign(this,a)}la(yt,qi); +yt.prototype.cloneProtected=function(a){qi.prototype.cloneProtected.call(this,a);a.En=this.En;a.Yn=this.Yn;a.aq=this.aq;a.od=this.od;a.Nb=this.Nb;a.Td.assign(this.Td);a.V.copyInheritedPropertiesFrom(this.V);a.Y.copyInheritedPropertiesFrom(this.Y)}; yt.prototype.ob=function(a){a.classType===yt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:C("Unknown enum value: "+a):qi.prototype.ob.call(this,a)};yt.prototype.createNetwork=function(){return new Et(this)}; -yt.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof T){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.dg(a.nodes,!0,b),c.dg(a.links,!0,b)):a instanceof qf?c.dg(a.memberParts,!1,b):c.dg(a.iterator,!1,b);return c}; +yt.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof T){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.eg(a.nodes,!0,b),c.eg(a.links,!0,b)):a instanceof qf?c.eg(a.memberParts,!1,b):c.eg(a.iterator,!1,b);return c}; yt.prototype.doLayout=function(a){null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Gt&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===zt&&null!==b?this.qd=b.isTreePathToChildren?At:Ht:this.qd=this.path===zt?At:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0}yt.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ee?pu(a,g,X,v,z):qu(a,g,X,v,z);X=z.x;v=z.width;z=z.height;break;case bu:for(A=0;An&&(Shb&&(vu(a,-hb,0,da,na-1),wu(A,-hb,0),wu(B,-hb,0),hb=0)}Ba.S.h(hb,R);v=Math.max(v,F);z=Math.max(z,y+(0===P?0:q)+db.height);S=F}else{0n&&(Rhb&&(vu(a,0,-hb,da,na-1),wu(A,0,-hb),wu(B,0,-hb),hb=0);Ba.S.h(S,hb);z=Math.max(z,L);v=Math.max(v,y+(0===P?0:q)+db.width);R=L}H++}0e?pu(a,g,X,v,z):qu(a,g,X,v,z);X=z.x;v=z.width;z=z.height;break;case bu:for(A=0;An&&(Shb&&(vu(a,-hb,0,da,oa-1),wu(A,-hb,0),wu(B,-hb,0),hb=0)}Ba.S.h(hb,R);v=Math.max(v,F);z=Math.max(z,y+(0===P?0:q)+db.height);S=F}else{0n&&(Rhb&&(vu(a,0,-hb,da,oa-1),wu(A,0,-hb),wu(B,0,-hb),hb=0);Ba.S.h(S,hb);z=Math.max(z,L);v=Math.max(v,y+(0===P?0:q)+db.width);R=L}H++}0l&&(l=0),135u&&(u=0), k===cu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Bu(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=zu(a,v,l),0>l&&(g-=l,l=0),135z&&(z=Bu(k,0,w-z),g=z.x,h=z.y,z=w,u=0):z=Au(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(l+d,0),P[1].h(P[0].x,w),P[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?pu(b,e,H,y,A): +lu;h=$t(l);var p=Math.max(0,b.breadthLimit);k=mu(b);var r=b.nodeSpacing,q=nu(b),u=m||n?0:q/2,w=b.rowSpacing,v=0;if(m||n||b.Pl||b.Ql&&1===b.maxGenerationCount)v=Math.max(0,b.rowIndent);m=b.width;var z=b.height,y=0,A=0,B=0,F=0,L=0,S=0,R=0,P=0,H=0;h&&!du(l)&&135d?pu(b,e,H,y,A): qu(b,e,H,y,A);H=A.x;y=A.width;A=A.height;break;case bu:for(a=0;ap&&(Fp&&(Lp&&(Fp&&(Ln&&(n=0),135v&&(v=0));b.ka.h(n,v);b.Ca.h(y,A)}} @@ -2177,7 +2179,7 @@ function Cu(a,b){var c=b.length,d=a.Xt[c];void 0===d&&(d=[],a.Xt[c]=d);d.push(b) yt.prototype.arrangeTrees=function(){if(this.Nb===Gt)for(var a=this.Qb.iterator;a.next();){var b=a.value;if(b instanceof Ft){var c=b.node;if(null!==c){var d=c.position;c=d.x;d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);Fu(this,b,c,d)}}}else{a=[];for(b=this.Qb.iterator;b.next();)c=b.value,c instanceof Ft&&a.push(c);switch(this.sorting){case Wt:break;case Xt:a.reverse();break;case Yt:a.sort(this.comparer);break;case Zt:a.sort(this.comparer);a.reverse();break;default:C("Unhandled sorting value "+this.sorting.toString())}c= this.arrangementOrigin;b=c.x;c=c.y;for(d=0;d=a?0:135>=a?90:225>=a?180:315>=a?270:0}function mu(a){var b=ku(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.V.nodeIndentPastParent=a,this.D())}},nodeSpacing:{get:function(){return this.V.nodeSpacing},set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.D())}},layerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!== a&&(this.V.layerSpacing=a,this.D())}},layerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.D())}},compaction:{get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==fu&&a!==hu||(this.V.compaction=a,this.D())}},breadthLimit:{get:function(){return this.V.breadthLimit}, set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.D())}},rowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.D())}},rowIndent:{get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.D())}},commentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!== a&&(this.V.commentSpacing=a,this.D())}},commentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.D())}},setsPortSpot:{get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.D())}},portSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.C(a)||(this.V.portSpot= -a,this.D())}},setsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.D())}},childPortSpot:{get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.C(a)||(this.V.childPortSpot=a,this.D())}},alternateSorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Wt&&a!==Xt&& -a!==Yt&&!Zt||(this.W.sorting=a,this.D())}},alternateComparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.D())}},alternateAngle:{get:function(){return this.W.angle},set:function(a){this.W.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.W.angle=a,this.D())}},alternateAlignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!== -a&&(this.W.alignment=a,this.D())}},alternateNodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.D())}},alternateNodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.D())}},alternateNodeSpacing:{get:function(){return this.W.nodeSpacing}, -set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.D())}},alternateLayerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.D())}},alternateLayerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.D())}},alternateCompaction:{ -get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==fu&&a!==hu||(this.W.compaction=a,this.D())}},alternateBreadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.D())}},alternateRowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.D())}},alternateRowIndent:{ -get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.D())}},alternateCommentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.D())}},alternateCommentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.D())}},alternateSetsPortSpot:{ -get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.D())}},alternatePortSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.C(a)||(this.W.portSpot=a,this.D())}},alternateSetsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.D())}},alternateChildPortSpot:{ -get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.C(a)||(this.W.childPortSpot=a,this.D())}}}); +a,this.D())}},setsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.D())}},childPortSpot:{get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.C(a)||(this.V.childPortSpot=a,this.D())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Wt&&a!==Xt&& +a!==Yt&&!Zt||(this.Y.sorting=a,this.D())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.D())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.Y.angle=a,this.D())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!== +a&&(this.Y.alignment=a,this.D())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.D())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.D())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing}, +set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.D())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.D())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.D())}},alternateCompaction:{ +get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==fu&&a!==hu||(this.Y.compaction=a,this.D())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.D())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.D())}},alternateRowIndent:{ +get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.D())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.D())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.D())}},alternateSetsPortSpot:{ +get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.D())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.C(a)||(this.Y.portSpot=a,this.D())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.D())}},alternateChildPortSpot:{ +get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.C(a)||(this.Y.childPortSpot=a,this.D())}}}); var zt=new D(yt,"PathDefault",-1),At=new D(yt,"PathDestination",0),Ht=new D(yt,"PathSource",1),Wt=new D(yt,"SortingForwards",10),Xt=new D(yt,"SortingReverse",11),Yt=new D(yt,"SortingAscending",12),Zt=new D(yt,"SortingDescending",13),xu=new D(yt,"AlignmentCenterSubtrees",20),yu=new D(yt,"AlignmentCenterChildren",21),ou=new D(yt,"AlignmentStart",22),lu=new D(yt,"AlignmentEnd",23),au=new D(yt,"AlignmentBus",24),Rt=new D(yt,"AlignmentBusBranching",25),bu=new D(yt,"AlignmentTopLeftBus",26),cu=new D(yt, "AlignmentBottomRightBus",27),fu=new D(yt,"CompactionNone",30),hu=new D(yt,"CompactionBlock",31),Bt=new D(yt,"StyleLayered",40),Vt=new D(yt,"StyleLastParents",41),Ut=new D(yt,"StyleAlternating",42),Tt=new D(yt,"StyleRootOnly",43),Dt=new D(yt,"ArrangementVertical",50),Gu=new D(yt,"ArrangementHorizontal",51),Gt=new D(yt,"ArrangementFixedRoots",52),Ct=new D(yt,"LayerIndividual",60),Pt=new D(yt,"LayerSiblings",61),Ot=new D(yt,"LayerUniform",62);yt.className="TreeLayout";yt.PathDefault=zt; yt.PathDestination=At;yt.PathSource=Ht;yt.SortingForwards=Wt;yt.SortingReverse=Xt;yt.SortingAscending=Yt;yt.SortingDescending=Zt;yt.AlignmentCenterSubtrees=xu;yt.AlignmentCenterChildren=yu;yt.AlignmentStart=ou;yt.AlignmentEnd=lu;yt.AlignmentBus=au;yt.AlignmentBusBranching=Rt;yt.AlignmentTopLeftBus=bu;yt.AlignmentBottomRightBus=cu;yt.CompactionNone=fu;yt.CompactionBlock=hu;yt.StyleLayered=Bt;yt.StyleLastParents=Vt;yt.StyleAlternating=Ut;yt.StyleRootOnly=Tt;yt.ArrangementVertical=Dt; yt.ArrangementHorizontal=Gu;yt.ArrangementFixedRoots=Gt;yt.LayerIndividual=Ct;yt.LayerSiblings=Pt;yt.LayerUniform=Ot;function Et(a){eq.call(this,a)}la(Et,eq);Et.prototype.createVertex=function(){return new Ft(this)};Et.prototype.createEdge=function(){return new Iu(this)};Et.className="TreeNetwork"; -function Ft(a){sq.call(this,a);this.Y=!1;this.cb=null;this.u=[];this.hb=this.Ga=this.F=this.ga=0;this.od=null;this.S=new I(0,0);this.Ca=new K(0,0);this.ka=new I(0,0);this.Ql=this.Pl=this.Xz=!1;this.No=this.Bo=null;this.fd=Wt;this.Zc=zq;this.Gb=0;this.Fb=yu;this.uq=this.tq=0;this.vq=20;this.ae=50;this.$p=0;this.kp=hu;this.cp=0;this.Mq=25;this.jp=this.Lq=10;this.ip=20;this.Uq=!0;this.Cq=Wc;this.Tq=!0;this.gp=Wc}la(Ft,sq); -Ft.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.fd=a.sorting,this.Zc=a.comparer,this.Gb=a.angle,this.Fb=a.alignment,this.tq=a.nodeIndent,this.uq=a.nodeIndentPastParent,this.vq=a.nodeSpacing,this.ae=a.layerSpacing,this.$p=a.layerSpacingParentOverlap,this.kp=a.compaction,this.cp=a.breadthLimit,this.Mq=a.rowSpacing,this.Lq=a.rowIndent,this.jp=a.commentSpacing,this.ip=a.commentMargin,this.Uq=a.setsPortSpot,this.Cq=a.portSpot,this.Tq=a.setsChildPortSpot,this.gp=a.childPortSpot)}; -ma.Object.defineProperties(Ft.prototype,{initialized:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a)}},parent:{get:function(){return this.cb},set:function(a){this.cb!==a&&(this.cb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(null!==a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-nu(c))))):c.alignment===ou?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-nu(c))))):c.alignment===ou?(e=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-nu(c))))):c.alignment===ou?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-nu(c))))):c.alignment===ou?(e=d.left+b.x,0===b.x&&m.xc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);cc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c=a.length?a.push(c):a.splice(b,0,c):C("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)}function Da(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):C("Cannot remove an object from an HTMLCollection or NodeList at "+b)} function Ea(){var a=Fa.pop();return void 0===a?[]:a}function Ga(a){a.length=0;Fa.push(a)}function Ha(a){if("function"===typeof a){if(a.className)return a.className;if(a.name)return a.name;var b=a.toString();b=b.substring(9,b.indexOf("(")).trim();if(""!==b)return a._className=b}else if(ya(a)&&a.constructor)return Ha(a.constructor);return typeof a} function Ia(a){var b=a;ya(a)&&(a.text?b=a.text:a.name?b=a.name:void 0!==a.key?b=a.key:void 0!==a.id?b=a.id:a.constructor===Object&&(a.Text?b=a.Text:a.Name?b=a.Name:void 0!==a.Key?b=a.Key:void 0!==a.Id?b=a.Id:void 0!==a.ID&&(b=a.ID)));return void 0===b?"undefined":null===b?"null":b.toString()}function Ja(a,b){if(a.hasOwnProperty(b))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(b))return!0;var c=a.lA;if(c&&c[b])return!0;a=Object.getPrototypeOf(a)}return!1} function Ka(a,b,c){Object.defineProperty(La.prototype,a,{get:b,set:c})} function Ma(a){for(var b=[],c=0;256>c;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gthis.key)return!1;a=a.s;var b=a.length,c=++this.Wa,d=this.bf;if(null!==d)for(;cthis.key)return!1;a=a.s;var b=a.length,c=++this.Wa,d=this.cf;if(null!==d)for(;cthis.key)return!1;var b=--this.Wa;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.Xd();return!1};bb.prototype.ud=function(){return this.next()}; bb.prototype.first=function(){var a=this.xb;this.na=a.Ia;var b=a.s;this.Wa=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};bb.prototype.any=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)if(a(b[c]))return!0;return!1};bb.prototype.all=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)if(!a(b[c]))return!1;return!0}; bb.prototype.each=function(a){var b=this.xb;b.yg=null;b=b.s;var c=b.length;this.Wa=c;for(--c;0<=c;c--)a(b[c]);return this};bb.prototype.map=function(a){var b=this.xb;b.yg=null;var c=[];b=b.s;var d=b.length;this.Wa=d;for(--d;0<=d;d--)c.push(a(b[d]));a=new E;a.s=c;a.sb();return a.iterator};bb.prototype.filter=function(a){var b=this.xb;b.yg=null;var c=[];b=b.s;var d=b.length;this.Wa=d;for(--d;0<=d;d--){var e=b[d];a(e)&&c.push(e)}a=new E;a.s=c;a.sb();return a.iterator}; @@ -47,17 +47,17 @@ t.reverse=function(){this._isFrozen&&va(this);this.s.reverse();this.sb();return ma.Object.defineProperties(E.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new ab(this)}},iteratorBackwards:{ get:function(){if(0>=this.s.length)return Za;var a=this.yg;return null!==a?(a.reset(),a):new bb(this)}}});E.prototype.reverse=E.prototype.reverse;E.prototype.sortRange=E.prototype.ri;E.prototype.sort=E.prototype.sort;E.prototype.toSet=E.prototype.lv;E.prototype.toArray=E.prototype.Ea;E.prototype.removeRange=E.prototype.removeRange;E.prototype.removeAt=E.prototype.mb;E.prototype["delete"]=E.prototype.delete;E.prototype.remove=E.prototype.remove;E.prototype.insertAt=E.prototype.Cb; E.prototype.pop=E.prototype.pop;E.prototype.last=E.prototype.fc;E.prototype.first=E.prototype.first;E.prototype.set=E.prototype.set;E.prototype.setElt=E.prototype.Vc;E.prototype.get=E.prototype.get;E.prototype.elt=E.prototype.K;E.prototype.indexOf=E.prototype.indexOf;E.prototype.has=E.prototype.has;E.prototype.contains=E.prototype.contains;E.prototype.clear=E.prototype.clear;E.prototype.addAll=E.prototype.addAll;E.prototype.push=E.prototype.push;E.prototype.add=E.prototype.add;E.prototype.thaw=E.prototype.ja; -E.prototype.freeze=E.prototype.freeze;E.className="List";function fb(a){this.Wf=a;a.Pa=null;this.na=a.Ia;this.ra=null}fb.prototype.reset=function(){var a=this.Wf;a.Pa=null;this.na=a.Ia;this.ra=null};fb.prototype.next=function(){var a=this.Wf;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=b.value,this.key=b.key,!0;this.Xd();return!1};fb.prototype.ud=function(){return this.next()}; -fb.prototype.first=function(){var a=this.Wf;this.na=a.Ia;a=a.ea;if(null!==a){this.ra=a;var b=a.value;this.key=a.key;return this.value=b}return null};fb.prototype.any=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};fb.prototype.all=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};fb.prototype.each=function(a){var b=this.Wf;this.ra=b.Pa=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this}; -fb.prototype.map=function(a){var b=this.Wf;b.Pa=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator};fb.prototype.filter=function(a){var b=this.Wf;b.Pa=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};fb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.Wf.Pa=this};fb.prototype.toString=function(){return null!==this.ra?"SetIterator@"+this.ra.value:"SetIterator"}; -ma.Object.defineProperties(fb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Wf.Ob}}});fb.prototype.first=fb.prototype.first;fb.prototype.hasNext=fb.prototype.ud;fb.prototype.next=fb.prototype.next;fb.prototype.reset=fb.prototype.reset;fb.className="SetIterator"; -function G(a){Ra(this);this._isFrozen=!1;this.Pb={};this.Ob=0;this.Pa=null;this.Ia=0;this.Xe=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=G.prototype;t.sb=function(){var a=this.Ia;a++;999999999=this.Ob)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new fb(this)}}});G.prototype.toList=G.prototype.kv;G.prototype.toArray=G.prototype.Ea; G.prototype.clear=G.prototype.clear;G.prototype.retainAll=G.prototype.Wz;G.prototype.removeAll=G.prototype.Ko;G.prototype["delete"]=G.prototype.delete;G.prototype.remove=G.prototype.remove;G.prototype.first=G.prototype.first;G.prototype.containsAny=G.prototype.Ay;G.prototype.containsAll=G.prototype.zy;G.prototype.has=G.prototype.has;G.prototype.contains=G.prototype.contains;G.prototype.addAll=G.prototype.addAll;G.prototype.add=G.prototype.add;G.prototype.thaw=G.prototype.ja;G.prototype.freeze=G.prototype.freeze; var kb=1;G.className="Set";G.uniqueHash=Ra;G.hashIdUnique=gb;G.hashId=cb;function lb(a){this.la=a;this.na=a.Ia;this.ra=null}lb.prototype.reset=function(){this.na=this.la.Ia;this.ra=null};lb.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=this.key=a=b.key,!0;this.Xd();return!1};lb.prototype.ud=function(){return this.next()}; @@ -68,72 +68,72 @@ t.toString=function(){return"MapKeySet("+this.la.toString()+")"};t.add=function( mb.prototype.any=function(a){for(var b=this.la.ea;null!==b;){if(a(b.key))return!0;b=b.ta}return!1};mb.prototype.all=function(a){for(var b=this.la.ea;null!==b;){if(!a(b.key))return!1;b=b.ta}return!0};mb.prototype.each=function(a){for(var b=this.la.ea;null!==b;)a(b.key),b=b.ta;return this};mb.prototype.map=function(a){for(var b=new G,c=this.la.ea;null!==c;)b.add(a(c.key)),c=c.ta;return b};mb.prototype.filter=function(a){for(var b=new G,c=this.la.ea;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.ta}return b}; mb.prototype.copy=function(){return new mb(this.la)};mb.prototype.lv=function(){var a=new G,b=this.la.Pb,c;for(c in b)a.add(b[c].key);return a};mb.prototype.Ea=function(){var a=this.la.Pb,b=Array(this.la.Ob),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};mb.prototype.kv=function(){var a=new E,b=this.la.Pb,c;for(c in b)a.add(b[c].key);return a}; ma.Object.defineProperties(mb.prototype,{count:{get:function(){return this.la.Ob}},size:{get:function(){return this.la.Ob}},iterator:{get:function(){return 0>=this.la.Ob?Za:new lb(this.la)}}});mb.prototype.toList=mb.prototype.kv;mb.prototype.toArray=mb.prototype.Ea;mb.prototype.toSet=mb.prototype.lv;mb.prototype.first=mb.prototype.first;mb.prototype.clear=mb.prototype.clear;mb.prototype["delete"]=mb.prototype.delete; -mb.prototype.remove=mb.prototype.remove;mb.prototype.has=mb.prototype.has;mb.prototype.contains=mb.prototype.contains;mb.prototype.add=mb.prototype.add;mb.prototype.thaw=mb.prototype.ja;mb.prototype.freeze=mb.prototype.freeze;mb.className="MapKeySet";function nb(a){this.la=a;a.We=null;this.na=a.Ia;this.ra=null}nb.prototype.reset=function(){var a=this.la;a.We=null;this.na=a.Ia;this.ra=null}; +mb.prototype.remove=mb.prototype.remove;mb.prototype.has=mb.prototype.has;mb.prototype.contains=mb.prototype.contains;mb.prototype.add=mb.prototype.add;mb.prototype.thaw=mb.prototype.ja;mb.prototype.freeze=mb.prototype.freeze;mb.className="MapKeySet";function nb(a){this.la=a;a.Xe=null;this.na=a.Ia;this.ra=null}nb.prototype.reset=function(){var a=this.la;a.Xe=null;this.na=a.Ia;this.ra=null}; nb.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.value=b.value,this.key=b.key,!0;this.Xd();return!1};nb.prototype.ud=function(){return this.next()};nb.prototype.first=function(){var a=this.la;this.na=a.Ia;a=a.ea;if(null!==a){this.ra=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -nb.prototype.any=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};nb.prototype.all=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};nb.prototype.each=function(a){var b=this.la;this.ra=b.We=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this};nb.prototype.map=function(a){var b=this.la;this.ra=b.We=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator}; -nb.prototype.filter=function(a){var b=this.la;this.ra=b.We=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};nb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.We=this};nb.prototype.toString=function(){return null!==this.ra?"MapValueSetIterator@"+this.ra.value:"MapValueSetIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}}); +nb.prototype.any=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.ta}return!1};nb.prototype.all=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.ta}return!0};nb.prototype.each=function(a){var b=this.la;this.ra=b.Xe=null;for(b=b.ea;null!==b;)a(b.value),b=b.ta;return this};nb.prototype.map=function(a){var b=this.la;this.ra=b.Xe=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.ta;return c.iterator}; +nb.prototype.filter=function(a){var b=this.la;this.ra=b.Xe=null;var c=new E;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.ta}return c.iterator};nb.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.Xe=this};nb.prototype.toString=function(){return null!==this.ra?"MapValueSetIterator@"+this.ra.value:"MapValueSetIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}}); nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.ud;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset;nb.className="MapValueSetIterator";function jb(a,b){this.key=a;this.value=b;this.al=this.ta=null}jb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};jb.className="KeyValuePair";function ob(a){this.la=a;a.Pa=null;this.na=a.Ia;this.ra=null}ob.prototype.reset=function(){var a=this.la;a.Pa=null;this.na=a.Ia;this.ra=null}; ob.prototype.next=function(){var a=this.la;if(a.Ia!==this.na&&null===this.key)return!1;var b=this.ra;b=null===b?a.ea:b.ta;if(null!==b)return this.ra=b,this.key=b.key,this.value=b.value,!0;this.Xd();return!1};ob.prototype.ud=function(){return this.next()};ob.prototype.first=function(){var a=this.la;this.na=a.Ia;a=a.ea;return null!==a?(this.ra=a,this.key=a.key,this.value=a.value,a):null};ob.prototype.any=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(a(b))return!0;b=b.ta}return!1}; ob.prototype.all=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;){if(!a(b))return!1;b=b.ta}return!0};ob.prototype.each=function(a){var b=this.la;this.ra=b.Pa=null;for(b=b.ea;null!==b;)a(b),b=b.ta;return this};ob.prototype.map=function(a){var b=this.la;this.ra=b.Pa=null;var c=new E;for(b=b.ea;null!==b;)c.add(a(b)),b=b.ta;return c.iterator};ob.prototype.filter=function(a){var b=this.la;this.ra=b.Pa=null;var c=new E;for(b=b.ea;null!==b;)a(b)&&c.add(b),b=b.ta;return c.iterator}; ob.prototype.Xd=function(){this.value=this.key=null;this.na=-1;this.la.Pa=this};ob.prototype.toString=function(){return null!==this.ra?"MapIterator@"+this.ra:"MapIterator"};ma.Object.defineProperties(ob.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.la.Ob}}});ob.prototype.first=ob.prototype.first;ob.prototype.hasNext=ob.prototype.ud;ob.prototype.next=ob.prototype.next;ob.prototype.reset=ob.prototype.reset; -ob.className="MapIterator";function pb(a){Ra(this);this._isFrozen=!1;this.Pb={};this.Ob=0;this.We=this.Pa=null;this.Ia=0;this.Xe=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=pb.prototype;t.sb=function(){var a=this.Ia;a++;999999999=this.count)return Za;var a=this.Pa;return null!==a?(a.reset(),a):new ob(this)}},iteratorKeys:{get:function(){return 0>=this.count?Za:new lb(this)}},iteratorValues:{get:function(){if(0>=this.count)return Za; -var a=this.We;return null!==a?(a.reset(),a):new nb(this)}}});pb.prototype.toKeySet=pb.prototype.Bf;pb.prototype.toArray=pb.prototype.Ea;pb.prototype.clear=pb.prototype.clear;pb.prototype["delete"]=pb.prototype.delete;pb.prototype.remove=pb.prototype.remove;pb.prototype.get=pb.prototype.get;pb.prototype.getValue=pb.prototype.I;pb.prototype.has=pb.prototype.has;pb.prototype.contains=pb.prototype.contains;pb.prototype.first=pb.prototype.first;pb.prototype.addAll=pb.prototype.addAll; +var a=this.Xe;return null!==a?(a.reset(),a):new nb(this)}}});pb.prototype.toKeySet=pb.prototype.Cf;pb.prototype.toArray=pb.prototype.Ea;pb.prototype.clear=pb.prototype.clear;pb.prototype["delete"]=pb.prototype.delete;pb.prototype.remove=pb.prototype.remove;pb.prototype.get=pb.prototype.get;pb.prototype.getValue=pb.prototype.I;pb.prototype.has=pb.prototype.has;pb.prototype.contains=pb.prototype.contains;pb.prototype.first=pb.prototype.first;pb.prototype.addAll=pb.prototype.addAll; pb.prototype.set=pb.prototype.set;pb.prototype.add=pb.prototype.add;pb.prototype.thaw=pb.prototype.ja;pb.prototype.freeze=pb.prototype.freeze;pb.className="Map";function I(a,b){void 0===a?this.y=this.x=0:"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):C("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var qb,rb,sb,tb,ub;I.prototype.assign=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.h=function(a,b){this.x=a;this.y=b;return this}; -I.prototype.jg=function(a,b){this.x=a;this.y=b;return this};I.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.copy=function(){var a=new I;a.x=this.x;a.y=this.y;return a};t=I.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; +I.prototype.kg=function(a,b){this.x=a;this.y=b;return this};I.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};I.prototype.copy=function(){var a=new I;a.x=this.x;a.y=this.y;return a};t=I.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function vb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new I(c,e)}return new I}function wb(a){return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.C=function(a){return a instanceof I?this.x===a.x&&this.y===a.y:!1}; -t.bi=function(a,b){return this.x===a&&this.y===b};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)};t.add=function(a){this.x+=a.x;this.y+=a.y;return this};t.ie=function(a){this.x-=a.x;this.y-=a.y;return this};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; -I.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.x=a*b-d*c;this.y=d*b+a*c;return this};t=I.prototype;t.scale=function(a,b){this.x*=a;this.y*=b;return this};t.qf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};t.td=function(a,b){a-=this.x;b-=this.y;return a*a+b*b}; +t.bi=function(a,b){return this.x===a&&this.y===b};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)};t.add=function(a){this.x+=a.x;this.y+=a.y;return this};t.je=function(a){this.x-=a.x;this.y-=a.y;return this};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; +I.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.x=a*b-d*c;this.y=d*b+a*c;return this};t=I.prototype;t.scale=function(a,b){this.x*=a;this.y*=b;return this};t.rf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};t.td=function(a,b){a-=this.x;b-=this.y;return a*a+b*b}; t.normalize=function(){var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}t.yy=function(a,b){return J.sl(a.x,a.y,b.x,b.y,this.x,this.y)}; t.Mz=function(a,b,c,d){J.fh(a,b,c,d,this.x,this.y,this);return this};t.Nz=function(a,b){J.fh(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};t.aA=function(a,b,c,d){J.so(this.x,this.y,a,b,c,d,this);return this};t.bA=function(a,b){J.so(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};t.oi=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};t.pi=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this}; t.transform=function(a){a.Fa(this);return this};function yb(a,b){b.Ld(a);return a}function zb(a,b,c,d,e,f){var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k}function Ab(a,b,c,d){a=c-a;b=d-b;return a*a+b*b}function Bb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d} t.v=function(){return isFinite(this.x)&&isFinite(this.y)};I.alloc=function(){var a=Cb.pop();return void 0===a?new I:a};I.allocAt=function(a,b){var c=Cb.pop();if(void 0===c)return new I(a,b);c.x=a;c.y=b;return c};I.free=function(a){Cb.push(a)};I.prototype.isReal=I.prototype.v;I.prototype.setSpot=I.prototype.pi;I.prototype.setRectSpot=I.prototype.oi;I.prototype.snapToGridPoint=I.prototype.bA;I.prototype.snapToGrid=I.prototype.aA;I.prototype.projectOntoLineSegmentPoint=I.prototype.Nz; -I.prototype.projectOntoLineSegment=I.prototype.Mz;I.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return J.zl(a,b,c,d,e,f,g,h)};I.prototype.compareWithLineSegmentPoint=I.prototype.yy;I.compareWithLineSegment=function(a,b,c,d,e,f){return J.sl(a,b,c,d,e,f)};I.prototype.direction=I.prototype.direction;I.prototype.directionPoint=I.prototype.Ya;I.prototype.normalize=I.prototype.normalize;I.prototype.distanceSquared=I.prototype.td;I.prototype.distanceSquaredPoint=I.prototype.qf;I.prototype.scale=I.prototype.scale; -I.prototype.rotate=I.prototype.rotate;I.prototype.offset=I.prototype.offset;I.prototype.subtract=I.prototype.ie;I.prototype.add=I.prototype.add;I.prototype.equalsApprox=I.prototype.$a;I.prototype.equalTo=I.prototype.bi;I.prototype.equals=I.prototype.C;I.prototype.set=I.prototype.set;I.prototype.setTo=I.prototype.jg;var Cb=[];I.className="Point";I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb;I.Origin=qb=(new I(0,0)).ha(); +I.prototype.projectOntoLineSegment=I.prototype.Mz;I.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return J.zl(a,b,c,d,e,f,g,h)};I.prototype.compareWithLineSegmentPoint=I.prototype.yy;I.compareWithLineSegment=function(a,b,c,d,e,f){return J.sl(a,b,c,d,e,f)};I.prototype.direction=I.prototype.direction;I.prototype.directionPoint=I.prototype.Ya;I.prototype.normalize=I.prototype.normalize;I.prototype.distanceSquared=I.prototype.td;I.prototype.distanceSquaredPoint=I.prototype.rf;I.prototype.scale=I.prototype.scale; +I.prototype.rotate=I.prototype.rotate;I.prototype.offset=I.prototype.offset;I.prototype.subtract=I.prototype.je;I.prototype.add=I.prototype.add;I.prototype.equalsApprox=I.prototype.$a;I.prototype.equalTo=I.prototype.bi;I.prototype.equals=I.prototype.C;I.prototype.set=I.prototype.set;I.prototype.setTo=I.prototype.kg;var Cb=[];I.className="Point";I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb;I.Origin=qb=(new I(0,0)).ha(); I.InfiniteTopLeft=rb=(new I(-Infinity,-Infinity)).ha();I.InfiniteBottomRight=sb=(new I(Infinity,Infinity)).ha();I.SixPoint=tb=(new I(6,6)).ha();I.NoPoint=ub=(new I(NaN,NaN)).ha();I.parse=vb;I.stringify=wb;I.distanceLineSegmentSquared=zb;I.distanceSquared=Ab;I.direction=Bb; -function K(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):C("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Db,Hb,Ib,Jb,Kb,Lb,Mb;K.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.h=function(a,b){this.width=a;this.height=b;return this};K.prototype.jg=function(a,b){this.width=a;this.height=b;return this}; +function K(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):C("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Db,Eb,Ib,Jb,Kb,Lb,Mb;K.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.h=function(a,b){this.width=a;this.height=b;return this};K.prototype.kg=function(a,b){this.width=a;this.height=b;return this}; K.prototype.set=function(a){this.width=a.width;this.height=a.height;return this};K.prototype.copy=function(){var a=new K;a.width=this.width;a.height=this.height;return a};t=K.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; function Nb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new K(c,e)}return new K}function Ob(a){return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.C=function(a){return a instanceof K?this.width===a.width&&this.height===a.height:!1};t.bi=function(a,b){return this.width===a&&this.height===b}; -t.$a=function(a){return J.B(this.width,a.width)&&J.B(this.height,a.height)};t.v=function(){return isFinite(this.width)&&isFinite(this.height)};K.alloc=function(){var a=Pb.pop();return void 0===a?new K:a};K.free=function(a){Pb.push(a)};K.prototype.isReal=K.prototype.v;K.prototype.equalsApprox=K.prototype.$a;K.prototype.equalTo=K.prototype.bi;K.prototype.equals=K.prototype.C;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.jg;var Pb=[];K.className="Size";K.parse=Nb;K.stringify=Ob; -K.ZeroSize=Db=(new K(0,0)).ha();K.OneSize=Hb=(new K(1,1)).ha();K.SixSize=Ib=(new K(6,6)).ha();K.EightSize=Jb=(new K(8,8)).ha();K.TenSize=Kb=(new K(10,10)).ha();K.InfiniteSize=Lb=(new K(Infinity,Infinity)).ha();K.NoSize=Mb=(new K(NaN,NaN)).ha();K.parse=Nb;K.stringify=Ob; +t.$a=function(a){return J.B(this.width,a.width)&&J.B(this.height,a.height)};t.vc=function(a,b){a=this.width+a;this.width=0<=a?a:0;b=this.height+b;this.height=0<=b?b:0;return this};t.v=function(){return isFinite(this.width)&&isFinite(this.height)};K.alloc=function(){var a=Pb.pop();return void 0===a?new K:a};K.free=function(a){Pb.push(a)};K.prototype.isReal=K.prototype.v;K.prototype.inflate=K.prototype.vc;K.prototype.equalsApprox=K.prototype.$a;K.prototype.equalTo=K.prototype.bi; +K.prototype.equals=K.prototype.C;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.kg;var Pb=[];K.className="Size";K.parse=Nb;K.stringify=Ob;K.ZeroSize=Db=(new K(0,0)).ha();K.OneSize=Eb=(new K(1,1)).ha();K.SixSize=Ib=(new K(6,6)).ha();K.EightSize=Jb=(new K(8,8)).ha();K.TenSize=Kb=(new K(10,10)).ha();K.InfiniteSize=Lb=(new K(Infinity,Infinity)).ha();K.NoSize=Mb=(new K(NaN,NaN)).ha();K.parse=Nb;K.stringify=Ob; function M(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c,this.height=d):a instanceof I?(c=a.x,a=a.y,b instanceof I?(d=b.x,b=b.y,this.x=Math.min(c,d),this.y=Math.min(a,b),this.width=Math.abs(c-d),this.height=Math.abs(a-b)):b instanceof K?(this.x=c,this.y=a,this.width=b.width,this.height=b.height):C("Incorrect second argument supplied to Rect constructor "+ -b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Qb(a,b,c){a.width=b;a.height=c}t.jg=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; +b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}t=M.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Qb(a,b,c){a.width=b;a.height=c}t.kg=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; t.Wc=function(a){this.x=a.x;this.y=a.y;return this};t.$z=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.copy=function(){var a=new M;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};t=M.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function Rb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new M(c,e,f,g)}return new M} function Sb(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.C=function(a){return a instanceof M?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};t.bi=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};t.$a=function(a){return J.B(this.x,a.x)&&J.B(this.y,a.y)&&J.B(this.width,a.width)&&J.B(this.height,a.height)}; -function Vb(a,b){return J.ca(a.x,b.x)&&J.ca(a.y,b.y)&&J.ca(a.width,b.width)&&J.ca(a.height,b.height)}t.ba=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.De=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height}; -t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.Qc=function(a,b){return Wb(this,b,a,b,a)};t.fo=function(a){return Wb(this,a.top,a.right,a.bottom,a.left)};t.jv=function(a){return Wb(this,-a.top,-a.right,-a.bottom,-a.left)};t.oz=function(a,b,c,d){return Wb(this,a,b,c,d)};function Wb(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.hx=function(a){return Xb(this,a.x,a.y,a.width,a.height)}; +function Tb(a,b){return J.ca(a.x,b.x)&&J.ca(a.y,b.y)&&J.ca(a.width,b.width)&&J.ca(a.height,b.height)}t.ba=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Ee=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height}; +t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.vc=function(a,b){return Ub(this,b,a,b,a)};t.fo=function(a){return Ub(this,a.top,a.right,a.bottom,a.left)};t.jv=function(a){return Ub(this,-a.top,-a.right,-a.bottom,-a.left)};t.oz=function(a,b,c,d){return Ub(this,a,b,c,d)};function Ub(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.ix=function(a){return Xb(this,a.x,a.y,a.width,a.height)}; t.Gu=function(a,b,c,d){return Xb(this,a,b,c,d)};function Xb(a,b,c,d,e){var f=Math.max(a.x,b),g=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=g;a.width=Math.max(0,b-f);a.height=Math.max(0,c-g);return a}t.Sc=function(a){return this.Hu(a.x,a.y,a.width,a.height)}; -t.Hu=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function Yb(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Le=function(a){return Zb(this,a.x,a.y,0,0)};t.Xc=function(a){return Zb(this,a.x,a.y,a.width,a.height)}; +t.Hu=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function Yb(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Me=function(a){return Zb(this,a.x,a.y,0,0)};t.Xc=function(a){return Zb(this,a.x,a.y,a.width,a.height)}; t.nv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Zb(this,a,b,c,d)};function Zb(a,b,c,d,e){var f=Math.min(a.x,b),g=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=g;a.width=b-f;a.height=c-g;return a}t.pi=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};function $b(a,b,c,d,e,f,g,h){void 0===g&&(g=0);void 0===h&&(h=0);return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} function ac(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.v=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.vz=function(){return 0===this.width&&0===this.height};M.alloc=function(){var a=bc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=bc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){bc.push(a)}; ma.Object.defineProperties(M.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{ get:function(){return new I(this.x,this.y)},set:function(a){this.x=a.x;this.y=a.y}},size:{get:function(){return new K(this.width,this.height)},set:function(a){this.width=a.width;this.height=a.height}},center:{get:function(){return new I(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2}, -set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});M.prototype.isEmpty=M.prototype.vz;M.prototype.isReal=M.prototype.v;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return J.ix(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.pi;M.prototype.union=M.prototype.nv;M.prototype.unionRect=M.prototype.Xc;M.prototype.unionPoint=M.prototype.Le;M.prototype.intersects=M.prototype.Hu; -M.prototype.intersectsRect=M.prototype.Sc;M.prototype.intersect=M.prototype.Gu;M.prototype.intersectRect=M.prototype.hx;M.prototype.grow=M.prototype.oz;M.prototype.subtractMargin=M.prototype.jv;M.prototype.addMargin=M.prototype.fo;M.prototype.inflate=M.prototype.Qc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains;M.prototype.containsRect=M.prototype.De;M.prototype.containsPoint=M.prototype.ba;M.prototype.equalsApprox=M.prototype.$a;M.prototype.equalTo=M.prototype.bi; -M.prototype.equals=M.prototype.C;M.prototype.setSize=M.prototype.$z;M.prototype.setPoint=M.prototype.Wc;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.jg;var cc=null,dc=null,bc=[];M.className="Rect";M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac;M.ZeroRect=cc=(new M(0,0,0,0)).ha();M.NoRect=dc=(new M(NaN,NaN,NaN,NaN)).ha();M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac; -function ic(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}ic.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; -ic.prototype.jg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};ic.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};ic.prototype.copy=function(){var a=new ic;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=ic.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; +set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});M.prototype.isEmpty=M.prototype.vz;M.prototype.isReal=M.prototype.v;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return J.jx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.pi;M.prototype.union=M.prototype.nv;M.prototype.unionRect=M.prototype.Xc;M.prototype.unionPoint=M.prototype.Me;M.prototype.intersects=M.prototype.Hu; +M.prototype.intersectsRect=M.prototype.Sc;M.prototype.intersect=M.prototype.Gu;M.prototype.intersectRect=M.prototype.ix;M.prototype.grow=M.prototype.oz;M.prototype.subtractMargin=M.prototype.jv;M.prototype.addMargin=M.prototype.fo;M.prototype.inflate=M.prototype.vc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains;M.prototype.containsRect=M.prototype.Ee;M.prototype.containsPoint=M.prototype.ba;M.prototype.equalsApprox=M.prototype.$a;M.prototype.equalTo=M.prototype.bi; +M.prototype.equals=M.prototype.C;M.prototype.setSize=M.prototype.$z;M.prototype.setPoint=M.prototype.Wc;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.kg;var cc=null,dc=null,bc=[];M.className="Rect";M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac;M.ZeroRect=cc=(new M(0,0,0,0)).ha();M.NoRect=dc=(new M(NaN,NaN,NaN,NaN)).ha();M.parse=Rb;M.stringify=Sb;M.contains=$b;M.intersects=ac; +function ec(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}ec.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; +ec.prototype.kg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};ec.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};ec.prototype.copy=function(){var a=new ec;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=ec.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; -function jc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new ic;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new ic(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new ic(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new ic(c,e):new ic(c,e,f,g)}return new ic} -function kc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.C=function(a){return a instanceof ic?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.bi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.$a=function(a){return J.B(this.top,a.top)&&J.B(this.right,a.right)&&J.B(this.bottom,a.bottom)&&J.B(this.left,a.left)};t.v=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};ic.alloc=function(){var a=pc.pop();return void 0===a?new ic:a};ic.free=function(a){pc.push(a)};ic.prototype.isReal=ic.prototype.v;ic.prototype.equalsApprox=ic.prototype.$a;ic.prototype.equalTo=ic.prototype.bi;ic.prototype.equals=ic.prototype.C;ic.prototype.set=ic.prototype.set; -ic.prototype.setTo=ic.prototype.jg;var qc=null,rc=null,pc=[];ic.className="Margin";ic.parse=jc;ic.stringify=kc;ic.ZeroMargin=qc=(new ic(0,0,0,0)).ha();ic.TwoMargin=rc=(new ic(2,2,2,2)).ha();ic.parse=jc;ic.stringify=kc;function N(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1} -var sc,tc,uc,vc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,dd,ed,fd,gd,hd;N.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};N.prototype.jg=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};N.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; +function jc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new ec;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new ec(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new ec(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new ec(c,e):new ec(c,e,f,g)}return new ec} +function kc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.C=function(a){return a instanceof ec?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.bi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; +t.$a=function(a){return J.B(this.top,a.top)&&J.B(this.right,a.right)&&J.B(this.bottom,a.bottom)&&J.B(this.left,a.left)};t.v=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};ec.alloc=function(){var a=pc.pop();return void 0===a?new ec:a};ec.free=function(a){pc.push(a)};ec.prototype.isReal=ec.prototype.v;ec.prototype.equalsApprox=ec.prototype.$a;ec.prototype.equalTo=ec.prototype.bi;ec.prototype.equals=ec.prototype.C;ec.prototype.set=ec.prototype.set; +ec.prototype.setTo=ec.prototype.kg;var qc=null,rc=null,pc=[];ec.className="Margin";ec.parse=jc;ec.stringify=kc;ec.ZeroMargin=qc=(new ec(0,0,0,0)).ha();ec.TwoMargin=rc=(new ec(2,2,2,2)).ha();ec.parse=jc;ec.stringify=kc;function N(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this._isFrozen=!1} +var sc,tc,uc,vc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,dd,ed,fd,gd,hd;N.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};N.prototype.kg=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};N.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; N.prototype.copy=function(){var a=new N;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};t=N.prototype;t.ha=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function id(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} function jd(a){if("string"===typeof a){a=a.trim();if("None"===a)return sc;if("TopLeft"===a)return tc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return uc;if("TopRight"===a)return vc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return xc;if("Center"===a)return yc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return zc;if("BottomLeft"===a)return Ac;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Bc;if("BottomRight"===a)return Cc;if("TopSide"===a)return Dc;if("LeftSide"=== a)return Ec;if("RightSide"===a)return Gc;if("BottomSide"===a)return Hc;if("TopBottomSides"===a)return Ic;if("LeftRightSides"===a)return Jc;if("TopLeftSides"===a)return Kc;if("TopRightSides"===a)return Lc;if("BottomLeftSides"===a)return Mc;if("BottomRightSides"===a)return Nc;if("NotTopSide"===a)return Oc;if("NotLeftSide"===a)return Pc;if("NotRightSide"===a)return Qc;if("NotBottomSide"===a)return Uc;if("AllSides"===a)return Vc;if("Default"===a)return Wc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=J.yv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);J.yv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=J.yv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);J.yv=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Br:function(a,b,c,d,e,f,g,h,k,l,m,n){if(J.Tb(a,b,g,h,n,c,d)&&J.Tb(a,b,g,h,n,e,f))return J.Tb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var w=(d+q)/2,v=(c+u)/2;return J.Br(a, -b,p,r,d,c,w,v,k,l,m,n)||J.Br(w,v,q,u,e,f,g,h,k,l,m,n)},ty:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},sy:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Bb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},ql:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))Zb(l,a,b,0,0),Zb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ -2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.ql(a,b,m,n,d,c,q,u,k,l);J.ql(q,u,p,r,e,f,g,h,k,l)}return l},Ce:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.Ce(a,b,m,n,d,c,q,u,k,l);J.Ce(q,u,p,r,e,f,g,h,k,l)}return l},Tu:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,e,f,l,c,d))return J.Tb(a, +b,p,r,d,c,w,v,k,l,m,n)||J.Br(w,v,q,u,e,f,g,h,k,l,m,n)},Gw:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},ty:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Bb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},ql:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))Zb(l,a,b,0,0),Zb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ +2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.ql(a,b,m,n,d,c,q,u,k,l);J.ql(q,u,p,r,e,f,g,h,k,l)}return l},De:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,g,h,k,c,d)&&J.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;J.De(a,b,m,n,d,c,q,u,k,l);J.De(q,u,p,r,e,f,g,h,k,l)}return l},Tu:function(a,b,c,d,e,f,g,h,k,l){if(J.Tb(a,b,e,f,l,c,d))return J.Tb(a, b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2;return J.Tu(a,b,m,n,p,r,g,h,k,l)||J.Tu(p,r,c,d,e,f,g,h,k,l)},yA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},Su:function(a,b,c,d,e,f,g,h){if(J.Tb(a,b,e,f,g,c,d))Zb(h,a,b,0,0),Zb(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;J.Su(a,b,k,l,m,n,g,h);J.Su(m,n,c,d,e,f,g,h)}return h},Go:function(a,b,c,d,e,f,g,h){if(J.Tb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;J.Go(a,b,k,l,m,n,g,h);J.Go(m,n,c,d,e,f,g,h)}return h},io:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(J.Tb(a,b,g,h,p,c,d)&&J.Tb(a,b,g,h,p,e,f)){if(!J.zl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+w)/2;c=(u+v)/2;w=(w+e)/ 2;v=(v+f)/2;var z=(d+w)/2,y=(c+v)/2,A=Infinity,B=!1,F=0,L=0;J.io(a,b,q,u,d,c,z,y,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+w)/2;c=(u+v)/2;w=(w+e)/2;v=(v+f)/2;var z=(d+w)/2,y=(c+v)/2;r+=J.jo(a,b,q,u,d,c,z,y,k,l,m,n,p);r+=J.jo(z,y,w,v,e,f,g,h,k,l,m,n,p)}return r},fh:function(a,b,c,d,e,f,g){if(J.ca(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(J.ca(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, -b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(J.ca(h,g))return J.fh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(J.ca(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return J.fh(a,b,c,d,e,g*(e-a)+b,k)},wA:function(a,b,c,d,e){return J.Ie(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},uA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},vf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(J.Ie(a,b,a, -d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},tA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, -h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},Rr:function(a,b,c){return J.ix(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},ix:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):$b(a,b,c,d,e,f)||$b(a,b,c,d,g,h)||J.zl(a,b,k,b,e,f,g,h)||J.zl(k,b,k,l,e,f,g,h)||J.zl(k,l,a,l,e,f,g,h)||J.zl(a,l,a,b,e,f,g,h)?!0:!1},zl:function(a,b,c,d,e,f,g,h){return 0>=J.sl(a,b,c,d,e,f)*J.sl(a,b,c,d,g,h)&&0>=J.sl(e,f,g,h,a,b)*J.sl(e, -f,g,h,c,d)},sl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Eo:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Lw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5a)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a, +b),!1;k.h(a,c);return!0}g=(d-b)/(c-a);if(J.ca(h,g))return J.fh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(J.ca(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return J.fh(a,b,c,d,e,g*(e-a)+b,k)},wA:function(a,b,c,d,e){return J.Je(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},uA:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},wf:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(J.Je(a,b,a, +d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},tA:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a, +h=(f-h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},Rr:function(a,b,c){return J.jx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},jx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):$b(a,b,c,d,e,f)||$b(a,b,c,d,g,h)||J.zl(a,b,k,b,e,f,g,h)||J.zl(k,b,k,l,e,f,g,h)||J.zl(k,l,a,l,e,f,g,h)||J.zl(a,l,a,b,e,f,g,h)?!0:!1},zl:function(a,b,c,d,e,f,g,h){return 0>=J.sl(a,b,c,d,e,f)*J.sl(a,b,c,d,g,h)&&0>=J.sl(e,f,g,h,a,b)*J.sl(e, +f,g,h,c,d)},sl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},Eo:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},Mw:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fc,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case O.u:var b=new M(this.startX,this.startY,0,0);b.nv(this.endX,this.endY,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 O.F:b=new M(this.startX,this.startY,0,0);b.nv(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.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 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case O.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=y.x+b,c=y.y+c);a.h(b,c)}function f(){e(y);return y}function g(){e(z);return z}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?y:new I(2*y.x-z.x,2*y.y-z.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2"); a=a.replace(k,"$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(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;ag&&(g+=360),q.startAngle+=g);0>a&&(q.startAngle=180-q.startAngle,q.sweepAngle=-q.sweepAngle); 0>d&&(q.startAngle=-q.startAngle,q.sweepAngle=-q.sweepAngle);q.radiusX*=Math.sqrt(a*a+c*c);void 0!==q.radiusY&&(q.radiusY*=Math.sqrt(b*b+d*d));break;case Qd:g=q.endX;h=q.endY;q.endX=g*a+h*c+e;q.endY=g*b+h*d+f;if(0===q.radiusX||0===q.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),q.xAxisRotation+=g);0>a&&(q.xAxisRotation=180-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);0>d&&(q.xAxisRotation=-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);q.radiusX*=Math.sqrt(a*a+c*c); q.radiusY*=Math.sqrt(b*b+d*d);break;default:C("Unknown Segment type: "+q.type)}}}}this._isInvalidBounds=!0;return this}; -t.ba=function(a,b){void 0===b&&(b=0);var c=this.gd,d=this.hd,e=this.wc,f=this.xc;switch(this.type){case O.j:return J.Tb(c,d,e,f,b,a.x,a.y);case O.u:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ba(a);M.free(g);return a;case O.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case O.o:return Td(this,a,b,!0,!1);default:return!1}}; +t.ba=function(a,b){void 0===b&&(b=0);var c=this.gd,d=this.hd,e=this.xc,f=this.yc;switch(this.type){case O.j:return J.Tb(c,d,e,f,b,a.x,a.y);case O.u:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ba(a);M.free(g);return a;case O.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case O.m:return Td(this,a,b,!0,!1);default:return!1}}; function Td(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,r=p.length,q=0;q=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; -t.Xw=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; +t.Yw=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Cu=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Math.abs(e-c)?0<=a-h?90:270:1>Math.abs(a-h)?0<=e-c?0:180:180*Math.atan2(a-h,e-c)/Math.PI,b;g+=m}}return b}; -t.Yw=function(a){if(this.type===O.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=I.alloc();J.fh(b,c,d,e,f,a,h);a=h.x;f=h.y;I.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===O.u){g=this.startX;h=this.startY;var k=this.endX; +t.Zw=function(a){if(this.type===O.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=I.alloc();J.fh(b,c,d,e,f,a,h);a=h.x;f=h.y;I.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===O.u){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=I.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Ae=a,this.Oh=0,this.Ph=Math.max(d,0),this.Gg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ae=d,this.Oh=e,a===Md&&(f=Math.max(f,0)),this.Ph=f,"number"===typeof g?(a=== -Md&&(g=Math.max(g,0)),this.Gg=g):this.Gg=0);this.Ud=null}Yd.prototype.copy=function(){var a=new Yd;a.qa=this.qa;a.m=this.m&-2;a.wc=this.wc;a.xc=this.xc;a.Ae=this.Ae;a.Oh=this.Oh;a.Ph=this.Ph;a.Gg=this.Gg;return a};t=Yd.prototype; +function Yd(a,b,c,d,e,f,g,h){Ra(this);void 0===a&&(a=vd);this.qa=a;this.o=2;void 0!==b?this.xc=b:this.xc=0;void 0!==c?this.yc=c:this.yc=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===Qd?(a=f%360,0>a&&(a+=360),this.Be=a,this.Oh=0,this.Ph=Math.max(d,0),this.Gg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Be=d,this.Oh=e,a===Md&&(f=Math.max(f,0)),this.Ph=f,"number"===typeof g?(a=== +Md&&(g=Math.max(g,0)),this.Gg=g):this.Gg=0);this.Ud=null}Yd.prototype.copy=function(){var a=new Yd;a.qa=this.qa;a.o=this.o&-2;a.xc=this.xc;a.yc=this.yc;a.Be=this.Be;a.Oh=this.Oh;a.Ph=this.Ph;a.Gg=this.Gg;return a};t=Yd.prototype; t.$a=function(a){if(!(a instanceof Yd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Jd:case vd:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY);case Kd:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.point1X,a.point1X)&&J.B(this.point1Y,a.point1Y)&&J.B(this.point2X,a.point2X)&&J.B(this.point2Y,a.point2Y);case Ld:return J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.point1X,a.point1X)&&J.B(this.point1Y,a.point1Y);case Md:return J.B(this.startAngle, a.startAngle)&&J.B(this.sweepAngle,a.sweepAngle)&&J.B(this.centerX,a.centerX)&&J.B(this.centerY,a.centerY)&&J.B(this.radiusX,a.radiusX)&&J.B(this.radiusY,a.radiusY);case Qd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&J.B(this.xAxisRotation,a.xAxisRotation)&&J.B(this.endX,a.endX)&&J.B(this.endY,a.endY)&&J.B(this.radiusX,a.radiusX)&&J.B(this.radiusY,a.radiusY);default:return!1}};t.ob=function(a){a.classType===Yd&&(this.type=a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Jd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case vd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Kd:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ld:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Md:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Qd:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.ja=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function Rd(a,b){if(null!==a.Ud&&!1===b._isInvalidBounds)return a.Ud;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Ud=[],a.Ud;b=a.Ae;var e=a.Oh,f=J.Lw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=J.Lw(0,0,b>f?b:f,m,m+g,!0);f=md.alloc();f.reset();f.translate(c,d);f.rotate(a.Ae,0,0);f.scale(k,r);O.Ga(b,f); +function Rd(a,b){if(null!==a.Ud&&!1===b._isInvalidBounds)return a.Ud;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Ud=[],a.Ud;b=a.Be;var e=a.Oh,f=J.Mw(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=J.Mw(0,0,b>f?b:f,m,m+g,!0);f=md.alloc();f.reset();f.translate(c,d);f.rotate(a.Be,0,0);f.scale(k,r);O.Ga(b,f); md.free(f);a.Ud=b;return a.Ud} -ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.m&1)},set:function(a){this.m=a?this.m|1:this.m&-2}},_isInvalidBounds:{get:function(){return 0!==(this.m&2)},set:function(a){this.m=a?this.m|2:this.m&-3}},isClosed:{get:function(){return 0!==(this.m&8)},set:function(a){this.isClosed!==a&&(this.m=a?this.m|8:this.m&-9,this._isInvalidBounds=!0)}},type:{ -get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.wc},set:function(a){this._isFrozen&&va(this,a);this.wc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);this.xc=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ae},set:function(a){this._isFrozen&& -va(this,a);this.Ae=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Ph},set:function(a){this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Gg},set:function(a){this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},centerX:{ -get:function(){return this.Ae},set:function(a){this._isFrozen&&va(this,a);this.Ae=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Ph},set:function(a){0>a&&wa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Gg}, -set:function(a){0>a&&wa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.wc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.wc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.xc=a;this._isInvalidBounds=!0}},isClockwiseArc:{ -get:function(){return 0!==(this.m&4)},set:function(a){this._isFrozen&&va(this,a);this.m=a?this.m|4:this.m&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.m&16)},set:function(a){this._isFrozen&&va(this,a);this.m=a?this.m|16:this.m&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ae},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Ae=a;this._isInvalidBounds= +ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.o&1)},set:function(a){this.o=a?this.o|1:this.o&-2}},_isInvalidBounds:{get:function(){return 0!==(this.o&2)},set:function(a){this.o=a?this.o|2:this.o&-3}},isClosed:{get:function(){return 0!==(this.o&8)},set:function(a){this.isClosed!==a&&(this.o=a?this.o|8:this.o&-9,this._isInvalidBounds=!0)}},type:{ +get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);this.xc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.yc},set:function(a){this._isFrozen&&va(this,a);this.yc=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Be},set:function(a){this._isFrozen&& +va(this,a);this.Be=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Ph},set:function(a){this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Gg},set:function(a){this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},centerX:{ +get:function(){return this.Be},set:function(a){this._isFrozen&&va(this,a);this.Be=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Oh},set:function(a){this._isFrozen&&va(this,a);this.Oh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Ph},set:function(a){0>a&&wa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Ph=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Gg}, +set:function(a){0>a&&wa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Gg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.xc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.xc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.yc},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.yc=a;this._isInvalidBounds=!0}},isClockwiseArc:{ +get:function(){return 0!==(this.o&4)},set:function(a){this._isFrozen&&va(this,a);this.o=a?this.o|4:this.o&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.o&16)},set:function(a){this._isFrozen&&va(this,a);this.o=a?this.o|16:this.o&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Be},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Be=a;this._isInvalidBounds= !0}}});Yd.prototype.equalsApprox=Yd.prototype.$a;var Jd=new D(Yd,"Move",0),vd=new D(Yd,"Line",1),Kd=new D(Yd,"Bezier",2),Ld=new D(Yd,"QuadraticBezier",3),Md=new D(Yd,"Arc",4),Qd=new D(Yd,"SvgArc",4);Yd.className="PathSegment";Yd.Move=Jd;Yd.Line=vd;Yd.Bezier=Kd;Yd.QuadraticBezier=Ld;Yd.Arc=Md;Yd.SvgArc=Qd; -function $d(){this.H=null;this.cu=(new I(0,0)).freeze();this.Os=(new I(0,0)).freeze();this.ep=this.qq=0;this.fp=1;this.yh="";this.vr=this.xp=!1;this.vp=this.hp=0;this.ng=this.Pp=this.Vp=!1;this.Cp=null;this.qr=0;this.sd=this.lr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; -$d.prototype.clone=function(a){a.H=this.H;a.cu.assign(this.viewPoint);a.Os.assign(this.documentPoint);a.qq=this.qq;a.ep=this.ep;a.fp=this.fp;a.yh=this.yh;a.xp=this.xp;a.vr=this.vr;a.hp=this.hp;a.vp=this.vp;a.Vp=this.Vp;a.Pp=this.Pp;a.ng=this.ng;a.Cp=this.Cp;a.qr=this.qr;a.lr=this.lr;a.sd=this.sd;return a}; +function $d(){this.H=null;this.cu=(new I(0,0)).freeze();this.Os=(new I(0,0)).freeze();this.ep=this.qq=0;this.fp=1;this.yh="";this.vr=this.xp=!1;this.vp=this.hp=0;this.og=this.Pp=this.Vp=!1;this.Cp=null;this.qr=0;this.sd=this.lr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; +$d.prototype.clone=function(a){a.H=this.H;a.cu.assign(this.viewPoint);a.Os.assign(this.documentPoint);a.qq=this.qq;a.ep=this.ep;a.fp=this.fp;a.yh=this.yh;a.xp=this.xp;a.vr=this.vr;a.hp=this.hp;a.vp=this.vp;a.Vp=this.Vp;a.Pp=this.Pp;a.og=this.og;a.Cp=this.Cp;a.qr=this.qr;a.lr=this.lr;a.sd=this.sd;return a}; $d.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};$d.prototype.vo=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,this.event,a,b);return b}; $d.prototype.iz=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,this.event,a,b);b.assign(c.rs(b));return b}; ma.Object.defineProperties($d.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.cu},set:function(a){this.cu.assign(a)}},documentPoint:{get:function(){return this.Os},set:function(a){this.Os.assign(a)}},modifiers:{get:function(){return this.qq},set:function(a){this.qq=a}},button:{get:function(){return this.ep}, set:function(a){this.ep=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.fp},set:function(a){this.fp=a}},key:{get:function(){return this.yh},set:function(a){this.yh=a}},down:{get:function(){return this.xp},set:function(a){this.xp=a}},up:{get:function(){return this.vr},set:function(a){this.vr= -a}},clickCount:{get:function(){return this.hp},set:function(a){this.hp=a}},delta:{get:function(){return this.vp},set:function(a){this.vp=a}},isMultiTouch:{get:function(){return this.Vp},set:function(a){this.Vp=a}},handled:{get:function(){return this.Pp},set:function(a){this.Pp=a}},bubbles:{get:function(){return this.ng},set:function(a){this.ng=a}},event:{ +a}},clickCount:{get:function(){return this.hp},set:function(a){this.hp=a}},delta:{get:function(){return this.vp},set:function(a){this.vp=a}},isMultiTouch:{get:function(){return this.Vp},set:function(a){this.Vp=a}},handled:{get:function(){return this.Pp},set:function(a){this.Pp=a}},bubbles:{get:function(){return this.og},set:function(a){this.og=a}},event:{ get:function(){return this.Cp},set:function(a){this.Cp=a}},isTouchEvent:{get:function(){var a=x.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=x.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{get:function(){return this.qr},set:function(a){this.qr=a}},targetDiagram:{get:function(){return this.lr},set:function(a){this.lr=a}},targetObject:{ get:function(){return this.sd},set:function(a){this.sd=a}},control:{get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers| 2:this.modifiers&-3}},meta:{get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get: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},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get: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},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get: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},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}); $d.prototype.getMultiTouchDocumentPoint=$d.prototype.iz;$d.prototype.getMultiTouchViewPoint=$d.prototype.vo;$d.className="InputEvent";function be(){this.H=null;this.va="";this.zq=this.hr=null}be.prototype.copy=function(){var a=new be;a.H=this.H;a.va=this.va;a.hr=this.hr;a.zq=this.zq;return a};be.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; ma.Object.defineProperties(be.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.va},set:function(a){this.va=a}},subject:{get:function(){return this.hr},set:function(a){this.hr=a}},parameter:{get:function(){return this.zq},set:function(a){this.zq=a}}});be.className="DiagramEvent"; -function ce(){this.nm=de;this.cf=this.pq="";this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}ce.prototype.clear=function(){this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}; -ce.prototype.copy=function(){var a=new ce;a.nm=this.nm;a.pq=this.pq;a.cf=this.cf;a.ac=this.ac;a.H=this.H;a.xn=this.xn;var b=this.zn;a.zn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.yn;a.yn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.tn;a.tn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.sn;a.sn=ya(b)&&"function"===typeof b.J?b.J():b;return a};ce.prototype.ob=function(a){a.classType===ce&&(this.change=a)}; +function ce(){this.nm=de;this.df=this.pq="";this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}ce.prototype.clear=function(){this.sn=this.tn=this.yn=this.zn=this.xn=this.H=this.ac=null}; +ce.prototype.copy=function(){var a=new ce;a.nm=this.nm;a.pq=this.pq;a.df=this.df;a.ac=this.ac;a.H=this.H;a.xn=this.xn;var b=this.zn;a.zn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.yn;a.yn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.tn;a.tn=ya(b)&&"function"===typeof b.J?b.J():b;b=this.sn;a.sn=ya(b)&&"function"===typeof b.J?b.J():b;return a};ce.prototype.ob=function(a){a.classType===ce&&(this.change=a)}; ce.prototype.toString=function(){var a="";a=this.change===ee?a+"* ":this.change===de?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===ee?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ia(this.object)),null!==this.oldValue&&(a+=" old: "+Ia(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ia(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};ce.prototype.I=function(a){return a?this.oldValue:this.newValue};ce.prototype.kz=function(a){return a?this.oldParam:this.newParam};ce.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; ce.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};ce.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};ce.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -ma.Object.defineProperties(ce.prototype,{model:{get:function(){return this.ac},set:function(a){this.ac=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.nm},set:function(a){this.nm=a}},modelChange:{get:function(){return this.pq},set:function(a){this.pq=a}},propertyName:{get:function(){return this.cf}, -set:function(a){this.cf=a}},isTransactionFinished:{get:function(){return this.nm===ee&&("CommittedTransaction"===this.cf||"FinishedUndo"===this.cf||"FinishedRedo"===this.cf)}},object:{get:function(){return this.xn},set:function(a){this.xn=a}},oldValue:{get:function(){return this.zn},set:function(a){this.zn=a}},oldParam:{get:function(){return this.yn},set:function(a){this.yn=a}}, +ma.Object.defineProperties(ce.prototype,{model:{get:function(){return this.ac},set:function(a){this.ac=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.nm},set:function(a){this.nm=a}},modelChange:{get:function(){return this.pq},set:function(a){this.pq=a}},propertyName:{get:function(){return this.df}, +set:function(a){this.df=a}},isTransactionFinished:{get:function(){return this.nm===ee&&("CommittedTransaction"===this.df||"FinishedUndo"===this.df||"FinishedRedo"===this.df)}},object:{get:function(){return this.xn},set:function(a){this.xn=a}},oldValue:{get:function(){return this.zn},set:function(a){this.zn=a}},oldParam:{get:function(){return this.yn},set:function(a){this.yn=a}}, newValue:{get:function(){return this.tn},set:function(a){this.tn=a}},newParam:{get:function(){return this.sn},set:function(a){this.sn=a}}});ce.prototype.redo=ce.prototype.redo;ce.prototype.canRedo=ce.prototype.canRedo;ce.prototype.undo=ce.prototype.undo;ce.prototype.canUndo=ce.prototype.canUndo;ce.prototype.getParam=ce.prototype.kz;ce.prototype.getValue=ce.prototype.I;ce.prototype.clear=ce.prototype.clear; -var ee=new D(ce,"Transaction",-1),de=new D(ce,"Property",0),fe=new D(ce,"Insert",1),ge=new D(ce,"Remove",2);ce.className="ChangedEvent";ce.Transaction=ee;ce.Property=de;ce.Insert=fe;ce.Remove=ge;function he(){this.o=(new E).freeze();this.va="";this.j=!1}he.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.Vc(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.va},set:function(a){this.va=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.Vj;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; -he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.ut=new G;this.Ad=!1;this.u=(new E).freeze();this.re=-1;this.o=999;this.te=!1;this.qp=null;this.Vh=0;this.j=!1;this.we=(new E).freeze();this.Wk=new E;this.Ws=!0;this.ft=this.Tp=this.it=this.ht=!1} +ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.m}},name:{get:function(){return this.va},set:function(a){this.va=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.Vj;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; +he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.ut=new G;this.Ad=!1;this.u=(new E).freeze();this.se=-1;this.m=999;this.ue=!1;this.qp=null;this.Vh=0;this.j=!1;this.xe=(new E).freeze();this.Wk=new E;this.Ws=!0;this.ft=this.Tp=this.it=this.ht=!1} ie.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Kb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.K(d),null!==f&&f.clear(),b.mb(d),a.Tp=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.K(0),null!==f&&f.clear(),b.mb(0),a.re--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.re++);b.freeze()}a.isInternalTransaction||a.Kb("CommittedTransaction",c,e)}else{a.te=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| -a.Kb("RolledBackTransaction",c,e),a.te=!1}null!==e&&e.clear()}a.qp=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.K(e),null!==b&&b.undo(),c.ja(),c.mb(e);c.freeze()}return!1}ie.prototype.canUndo=function(){if(!this.isEnabled||0a.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Kb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.K(d),null!==f&&f.clear(),b.mb(d),a.Tp=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.K(0),null!==f&&f.clear(),b.mb(0),a.se--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.se++);b.freeze()}a.isInternalTransaction||a.Kb("CommittedTransaction",c,e)}else{a.ue=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| +a.Kb("RolledBackTransaction",c,e),a.ue=!1}null!==e&&e.clear()}a.qp=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.K(e),null!==b&&b.undo(),c.ja(),c.mb(e);c.freeze()}return!1}ie.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.Ws&&(a=a.diagram,null!==a&&!1===a.ji||xa("Change not within a transaction: "+c.toString()))}}; ie.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; ma.Object.defineProperties(ie.prototype,{models:{get:function(){return this.ut.iterator}},isEnabled:{get:function(){return this.Ad},set:function(a){this.Ad=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.K(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; ma.Object.defineProperties(ke.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.va},set:function(a){this.va=a}},isEnabled:{get:function(){return this.Ad},set:function(a){this.Ad=a}},isActive:{get:function(){return this.hb},set:function(a){this.hb=a}},transactionResult:{get:function(){return this.xi}, -set:function(a){this.xi=a}}});ke.prototype.startTransaction=ke.prototype.Da;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.cb=new E;this.nb=new E;this.Db=new E;this.F=this.Y=850;this.o=(new K(2,2)).ha();this.Ga=5E3;this.ga=te;this.u=ve;this.pp=this.j=null;this.uj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; +set:function(a){this.xi=a}}});ke.prototype.startTransaction=ke.prototype.Da;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.cb=new E;this.nb=new E;this.Db=new E;this.F=this.W=850;this.m=(new K(2,2)).ha();this.Ga=5E3;this.ga=te;this.u=ve;this.pp=this.j=null;this.uj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof ue&&this.pp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===we&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===xe){b.bubbles=!0;return}if(this.gestureBehavior===we)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Be;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=tf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=tf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.sx&&d.P("LinkRelinked",c,d.sx),c.toPort!==d.tx&&d.P("LinkRelinked",c,d.tx)):uf(e,g,f,k,h):uf(e,null,null,null,null)}}}}Be.prototype.doDragOver=function(){}; +function Ze(a,b,c){var d=!1,e=a.tg.length,f=0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ce;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=tf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=tf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.tx&&d.P("LinkRelinked",c,d.tx),c.toPort!==d.ux&&d.P("LinkRelinked",c,d.ux)):uf(e,g,f,k,h):uf(e,null,null,null,null)}}}}Be.prototype.doDragOver=function(){}; function vf(a,b){var c=a.diagram;a.dragsLink&&pf(a,!0);Ue(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;wf(a,e,f);f=sf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Ee){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Ee){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof V&&xf(c,d,a);M.free(a)}}}function wf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof qf||(c=a.mouseDrop,null!==c&&c(b))}function xf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.De(c)&&(d=!0);a=a.zu(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Md(b)&&c.isAvoiding&&c.ab()} +c.selection.iterator;b.next();)d=b.value,d instanceof V&&xf(c,d,a);M.free(a)}}}function wf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof qf||(c=a.mouseDrop,null!==c&&c(b))}function xf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Ee(c)&&(d=!0);a=a.zu(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Md(b)&&c.isAvoiding&&c.ab()} Be.prototype.doDropOnto=function(){};Be.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(bf(this,!1),He(a,this.copiedParts),df(this,this.copiedParts,!1),Ve(a,this.copiedParts)):this.mayMove()?(Xe(this),df(this,this.draggedParts,!0)):this.mayDragOut()?(bf(this,!1),df(this,this.copiedParts,!1)):Xe(this),ff(this,a.lastInput.documentPoint))}}; Be.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(Xe(this),bf(this,!0),He(a,this.copiedParts),df(this,this.copiedParts,!1),Ve(a,this.copiedParts),null!==this.copiedParts&&(a.P("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,Xe(this),this.mayMove()&&(df(this,this.draggedParts, -!0),ff(this,a.lastInput.documentPoint)));this.Gm=!0;vf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Bf():this.draggedParts.Bf();this.copiedParts=null;b&&yf(this);a.Va();Ve(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.P(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.P("ChangedSelection",a.selection)}}}; -Be.prototype.simulatedMouseMove=function(a,b,c){if(null===Ee)return!1;var d=Ee.diagram;c instanceof Q||(c=null);var e=Ie;c!==e&&(null!==e&&e!==d&&(e.kg(),Ee.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ie=c,null!==c&&c!==d&&($e(),e=c.toolManager.findTool("Dragging"),null!==e&&(De.contains(e)||De.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +!0),ff(this,a.lastInput.documentPoint)));this.Gm=!0;vf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Cf():this.draggedParts.Cf();this.copiedParts=null;b&&yf(this);a.Va();Ve(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.P(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.P("ChangedSelection",a.selection)}}}; +Be.prototype.simulatedMouseMove=function(a,b,c){if(null===Ee)return!1;var d=Ee.diagram;c instanceof Q||(c=null);var e=Ie;c!==e&&(null!==e&&e!==d&&(e.lg(),Ee.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ie=c,null!==c&&c!==d&&($e(),e=c.toolManager.findTool("Dragging"),null!==e&&(De.contains(e)||De.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null,!0));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;M.free(f); -f=a.br;g=new pb;h=I.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,cf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Fd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Za(),g.add(k,a.Fd(h))));I.free(h);a.copiedParts=g;Fe(a,g.Bf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,cf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ +f=a.br;g=new pb;h=I.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,cf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Fd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Za(),g.add(k,a.Fd(h))));I.free(h);a.copiedParts=g;Fe(a,g.Cf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,cf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ 2)));a.doUpdateCursor(null,!0)}}}Be.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.os=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.hn=null};Be.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new I}; ma.Object.defineProperties(Be.prototype,{isCopyEnabled:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ga},set:function(a){this.ga=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= a}},isComplexRoutingRealtime:{get:function(){return this.cb},set:function(a){this.cb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.C(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{ get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.C(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.C(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink= -a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Gc},set:function(a){this.Gc=a}},nodropCursor:{get:function(){return this.Hc},set:function(a){this.Hc=a}},currentPart:{get:function(){return this.Y}, -set:function(a){this.Y=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ga},set:function(a){this.Ga=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Bf():null!==this.draggedParts?this.draggedParts.Bf():this.ke}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= +a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Hc},set:function(a){this.Hc=a}},nodropCursor:{get:function(){return this.Ic},set:function(a){this.Ic=a}},currentPart:{get:function(){return this.W}, +set:function(a){this.W=a}},copiedParts:{get:function(){return this.m},set:function(a){this.m=a}},draggedParts:{get:function(){return this.Ga},set:function(a){this.Ga=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Cf():null!==this.draggedParts?this.draggedParts.Cf():this.le}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= a}},isDragOutStarted:{get:function(){return this.Db},set:function(a){this.Db=a}},startPoint:{get:function(){return this.br},set:function(a){this.br.C(a)||this.br.assign(a)}},delay:{get:function(){return this.wk},set:function(a){this.wk=a}}});Be.prototype.getDraggingSource=Be.prototype.hz;var Ee=null,Ie=null;Be.className="DraggingTool";De=new E; Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==Ee&&Ee.doCancel();ke.prototype.doCancel.call(this)}; -function Bf(){ke.call(this);this.ke=100;this.Ga=!1;this.u="pointer";var a=new T,b=new Cf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Cf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.vi=a;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Hb;a.add(b);a.selectable=!1;a.layerName="Tool";this.ui=a;this.j=b;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= -2;b.desiredSize=Hb;a.add(b);a.selectable=!1;a.layerName="Tool";this.wi=a;this.o=b;this.Hc=this.Gc=this.nb=this.cb=this.Db=null;this.ga=!0;this.Wo=new pb;this.Ef=this.bj=this.Ff=null}la(Bf,ke);Bf.prototype.doStop=function(){this.diagram.kg();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; -Bf.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.tf(),g=K.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;K.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=yc;f=I.alloc();c.location=b.ia(yc,f);I.free(f);d.angle=b.fi();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; -Bf.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Hb,b.fromSpot=sc,b.toSpot=sc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Bf.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; +function Bf(){ke.call(this);this.le=100;this.Ga=!1;this.u="pointer";var a=new T,b=new Cf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Cf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.vi=a;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Eb;a.add(b);a.selectable=!1;a.layerName="Tool";this.ui=a;this.j=b;a=new V;b=new Cf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= +2;b.desiredSize=Eb;a.add(b);a.selectable=!1;a.layerName="Tool";this.wi=a;this.m=b;this.Ic=this.Hc=this.nb=this.cb=this.Db=null;this.ga=!0;this.Wo=new pb;this.Ff=this.bj=this.Gf=null}la(Bf,ke);Bf.prototype.doStop=function(){this.diagram.lg();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; +Bf.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.uf(),g=K.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;K.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=yc;f=I.alloc();c.location=b.ia(yc,f);I.free(f);d.angle=b.fi();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; +Bf.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Eb,b.fromSpot=sc,b.toSpot=sc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Bf.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; Bf.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;this.targetPort=this.findTargetPort(this.isForwards);if(null!==this.targetPort&&this.targetPort.part instanceof V){var b=this.targetPort.part;this.isForwards?this.copyPortProperties(b,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(b,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort, !0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.Fr(a.lastInput.viewPoint)}};Bf.prototype.findValidLinkablePort=function(a,b){if(null===a)return null;var c=a.part;if(!(c instanceof V))return null;for(;null!==a;){var d=b?a.toLinkable:a.fromLinkable;if(!0===d&&(null!==a.portId||a instanceof V)&&(b?this.isValidTo(c,a):this.isValidFrom(c,a)))return a;if(!1===d)break;a=a.panel}return null}; -Bf.prototype.findTargetPort=function(a){var b=this.diagram,c=b.lastInput.documentPoint,d=this.portGravity;0>=d&&(d=.1);var e=this,f=b.gg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.ia(yc,I.alloc()),l=c.x-k.x,m=c.y-k.y;I.free(k);k=l*l+m*m;k=d&&(d=.1);var e=this,f=b.hg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.ia(yc,I.alloc()),l=c.x-k.x,m=c.y-k.y;I.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.ro(b).count>=c)return!1}return!0}; Bf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Kd(b).count>=c)return!1}return!0}; @@ -385,11 +385,11 @@ function Df(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLab Bf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Ef){if(d===Ff){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Gf(this,a,b,c,!0)}if(d===Hf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== a)return!1;return!Gf(this,a,b,c,!0)}if(d===If)return a===b?a=!0:(d=new G,d.add(b),a=Jf(this,d,a,b,c)),!a;if(d===Kf)return!Gf(this,a,b,c,!1);if(d===Lf)return a===b?a=!0:(d=new G,d.add(b),a=Tf(this,d,a,b,c)),!a}return!0};function Gf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Gf(a,g,c,d,e)))return!0}return!1} function Jf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Jf(a,b,g,d,e)))return!0}return!1}function Tf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Tf(a,b,h,d,e))return!0}}return!1} -ma.Object.defineProperties(Bf.prototype,{portGravity:{get:function(){return this.ke},set:function(a){0<=a&&(this.ke=a)}},isUnconnectedLinkValid:{get:function(){return this.Ga},set:function(a){this.Ga=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.vi},set:function(a){this.vi=a}},temporaryFromNode:{ -get:function(){return this.ui},set:function(a){if(this.ui=a)this.j=a.port}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.R.indexOf(this.j);b.mb(c);b.Cb(c,a)}}this.j=a}},temporaryToNode:{get:function(){return this.wi},set:function(a){if(this.wi=a)this.o=a.port}},temporaryToPort:{get:function(){return this.o},set:function(a){if(null!== -this.o){var b=this.o.panel;if(null!==b){var c=b.R.indexOf(this.o);b.mb(c);b.Cb(c,a)}}this.o=a}},originalLink:{get:function(){return this.Db},set:function(a){this.Db=a}},originalFromNode:{get:function(){return this.cb},set:function(a){this.cb=a}},originalFromPort:{get:function(){return this.nb},set:function(a){this.nb=a}},originalToNode:{get:function(){return this.Gc},set:function(a){this.Gc= -a}},originalToPort:{get:function(){return this.Hc},set:function(a){this.Hc=a}},isForwards:{get:function(){return this.ga},set:function(a){this.ga=a}},validPortsCache:{get:function(){return this.Wo}},targetPort:{get:function(){return this.Ff},set:function(a){this.Ff=a}},linkValidation:{get:function(){return this.bj},set:function(a){this.bj=a}},portTargeted:{ -get:function(){return this.Ef},set:function(a){this.Ef=a}}});Bf.className="LinkingBaseTool";function Uf(){Bf.call(this);this.name="Linking";this.Y={};this.F=null;this.L=Vf;this.Qd=null}la(Uf,Bf);Uf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Vr()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; +ma.Object.defineProperties(Bf.prototype,{portGravity:{get:function(){return this.le},set:function(a){0<=a&&(this.le=a)}},isUnconnectedLinkValid:{get:function(){return this.Ga},set:function(a){this.Ga=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.vi},set:function(a){this.vi=a}},temporaryFromNode:{ +get:function(){return this.ui},set:function(a){if(this.ui=a)this.j=a.port}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.R.indexOf(this.j);b.mb(c);b.Cb(c,a)}}this.j=a}},temporaryToNode:{get:function(){return this.wi},set:function(a){if(this.wi=a)this.m=a.port}},temporaryToPort:{get:function(){return this.m},set:function(a){if(null!== +this.m){var b=this.m.panel;if(null!==b){var c=b.R.indexOf(this.m);b.mb(c);b.Cb(c,a)}}this.m=a}},originalLink:{get:function(){return this.Db},set:function(a){this.Db=a}},originalFromNode:{get:function(){return this.cb},set:function(a){this.cb=a}},originalFromPort:{get:function(){return this.nb},set:function(a){this.nb=a}},originalToNode:{get:function(){return this.Hc},set:function(a){this.Hc= +a}},originalToPort:{get:function(){return this.Ic},set:function(a){this.Ic=a}},isForwards:{get:function(){return this.ga},set:function(a){this.ga=a}},validPortsCache:{get:function(){return this.Wo}},targetPort:{get:function(){return this.Gf},set:function(a){this.Gf=a}},linkValidation:{get:function(){return this.bj},set:function(a){this.bj=a}},portTargeted:{ +get:function(){return this.Ff},set:function(a){this.Ff=a}}});Bf.className="LinkingBaseTool";function Uf(){Bf.call(this);this.name="Linking";this.W={};this.F=null;this.L=Vf;this.Qd=null}la(Uf,Bf);Uf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Vr()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; Uf.prototype.findLinkablePort=function(){var a=this.diagram,b=this.startObject;null===b&&(b=a.ec(a.firstInput.documentPoint,null,null));if(null===b)return null;a=b.part;if(!(a instanceof V))return null;var c=this.direction;if(c===Vf||c===Wf){var d=this.findValidLinkablePort(b,!1);if(null!==d||this.startObject===a&&(d=a.port,this.findValidLinkablePort(d,!1)))return this.isForwards=!0,d}if(c===Vf||c===Xf)if(b=this.findValidLinkablePort(b,!0),null!==b||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b, !0)))return this.isForwards=!1,b;return null}; Uf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.Da(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.v()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof V&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, @@ -400,11 +400,11 @@ Uf.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=this.tr (b=this.originalFromNode,c=this.originalFromPort):null!==this.originalToNode&&this.isUnconnectedLinkValid&&(d=this.originalToNode,e=this.originalToPort);null!==b||null!==d?(f=this.insertLink(b,c,d,e),null!==f?(null===g&&(this.isForwards?f.defaultToPoint=a.lastInput.documentPoint:f.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.P("ChangingSelection",a.selection),a.clearSelection(!0),f.isSelected=!0),this.transactionResult=this.name,a.P("LinkDrawn",f)):this.doNoLink(b,c,d,e)):this.isForwards? this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),f&&a.allowSelect&&a.P("ChangedSelection",a.selection)}}};Uf.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(null===a)return!0;if(a instanceof T)return a.isTreeLink;var b=this.diagram;if(null===b)return!0;a=b.partManager.getLinkCategoryForData(a);b=b.partManager.findLinkTemplateForCategory(a);return null!==b?b.isTreeLink:!0}; Uf.prototype.insertLink=function(a,b,c,d){return this.diagram.partManager.insertLink(a,b,c,d)};Uf.prototype.doNoLink=function(){}; -ma.Object.defineProperties(Uf.prototype,{archetypeLinkData:{get:function(){return this.Y},set:function(a){this.Y=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.L},set:function(a){this.L=a}},startObject:{get:function(){return this.Qd},set:function(a){this.Qd=a}}}); +ma.Object.defineProperties(Uf.prototype,{archetypeLinkData:{get:function(){return this.W},set:function(a){this.W=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.L},set:function(a){this.L=a}},startObject:{get:function(){return this.Qd},set:function(a){this.Qd=a}}}); var Vf=new D(Uf,"Either",0),Wf=new D(Uf,"ForwardsOnly",0),Xf=new D(Uf,"BackwardsOnly",0);Uf.className="LinkingTool";Uf.Either=Vf;Uf.ForwardsOnly=Wf;Uf.BackwardsOnly=Xf; -function Se(){Bf.call(this);this.name="Relinking";var a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.Y=a;a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Qd=a;this.F=null;this.iw=new M}la(Se,Bf); -Se.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.yf()&&(c=a.Hj(b),null===c&&(c=this.makeAdornment(d,!1),a.Tg(b,c)))}null===c&&a.zf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.yf()&& -(c=a.Hj(b),null===c?(c=this.makeAdornment(d,!0),a.Tg(b,c)):c.w()));null===c&&a.zf(b)}};Se.prototype.makeAdornment=function(a,b){var c=new ue;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +function Se(){Bf.call(this);this.name="Relinking";var a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.W=a;a=new Cf;a.figure="Diamond";a.desiredSize=Jb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Qd=a;this.F=null;this.iw=new M}la(Se,Bf); +Se.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.zf()&&(c=a.Hj(b),null===c&&(c=this.makeAdornment(d,!1),a.Tg(b,c)))}null===c&&a.Af(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.v()&&a.isVisible()&&d.actualBounds.v()&&d.zf()&& +(c=a.Hj(b),null===c?(c=this.makeAdornment(d,!0),a.Tg(b,c)):c.w()));null===c&&a.Af(b)}};Se.prototype.makeAdornment=function(a,b){var c=new ue;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; Se.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.Vr()||!a.lastInput.left)return!1;var b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"));return null!==b}; Se.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof ue&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Da(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; this.originalFromPort=this.originalLink.fromPort;this.originalFromNode=this.originalLink.fromNode;this.originalToPort=this.originalLink.toPort;this.originalToNode=this.originalLink.toNode;this.iw.set(this.originalLink.actualBounds);null!==this.originalLink&&0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": +hg.prototype.updateResizeHandles=function(a,b){if(null!==a)if(!a.alignment.Sb()&&("pointer"===a.cursor||0=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};hg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -hg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.vc(),this.Da(this.name),this.wq.set(this.adornedObject.ia(this.handle.alignment.Qu())),this.An.set(this.adornedObject.part.location),this.hw.set(this.adornedObject.desiredSize),this.Ss=this.computeCellSize(),this.Us= -this.computeMinSize(),this.Ts=this.computeMaxSize(),this.isActive=!0))};hg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.le=this.handle=null;this.isActive=a.isMouseCaptured=!1};hg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b}; +hg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.wc(),this.Da(this.name),this.wq.set(this.adornedObject.ia(this.handle.alignment.Qu())),this.An.set(this.adornedObject.part.location),this.hw.set(this.adornedObject.desiredSize),this.Ss=this.computeCellSize(),this.Us= +this.computeMinSize(),this.Ts=this.computeMaxSize(),this.isActive=!0))};hg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.me=this.handle=null;this.isActive=a.isMouseCaptured=!1};hg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b}; hg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};hg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Us,c=this.Ts,d=this.Ss,e=this.adornedObject.Nr(a.lastInput.documentPoint,I.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.nd();I.free(e)}}; hg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Us,c=this.Ts,d=this.Ss,e=this.adornedObject.Nr(a.lastInput.documentPoint,I.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);I.free(e);a.Va();this.transactionResult=this.name;a.P("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -hg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Za();c=c.ia(this.handle.alignment.Qu());if(a instanceof qf){var d=new E;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ce;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ie(c),!0,e)}else a.location=a.location.copy().ie(c).add(this.oppositePoint);b.nd()}}; -hg.prototype.computeResize=function(a,b,c,d,e,f){b.Ec()&&(b=yc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=I.alloc();J.so(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* +hg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Za();c=c.ia(this.handle.alignment.Qu());if(a instanceof qf){var d=new E;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ce;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().je(c),!0,e)}else a.location=a.location.copy().je(c).add(this.oppositePoint);b.nd()}}; +hg.prototype.computeResize=function(a,b,c,d,e,f){b.Fc()&&(b=yc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=I.alloc();J.so(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), a.y=m-a.height)):1<=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width))):(a.width=Math.max(Math.min(p.x-h,d.width),c.width),f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):0>=b.y?(a.y=Math.max(p.y,m-d.height), @@ -456,43 +456,43 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig hg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};hg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ -d,b.y=-d);return a.ia(b)};og.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.le=this.handle=null;this.Jq=new I(NaN,NaN);this.isActive=a.isMouseCaptured=!1};og.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b};og.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.ia(b)};og.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.me=this.handle=null;this.Jq=new I(NaN,NaN);this.isActive=a.isMouseCaptured=!1};og.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.Vj();return b};og.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; og.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};og.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Va();this.transactionResult=this.name;a.P("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; -og.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Za();var c=b.locationObject,d=b.rotateObject;if(c===d||c.ig(d))c=this.An.copy(),b.location=c.ie(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.nd()}}; +og.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Za();var c=b.locationObject,d=b.rotateObject;if(c===d||c.jg(d))c=this.An.copy(),b.location=c.je(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.nd()}}; og.prototype.computeRotate=function(a){a=this.rotationPoint.Ya(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.fi());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -ma.Object.defineProperties(og.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof ue))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.le},set:function(a){if(null!==a&&a.part instanceof ue)throw Error("new handle must not be in an Adornment: "+ -a);this.le=a}},snapAngleMultiple:{get:function(){return this.ga},set:function(a){this.ga=a}},snapAngleEpsilon:{get:function(){return this.Y},set:function(a){this.Y=a}},originalAngle:{get:function(){return this.gw}},rotationPoint:{get:function(){return this.Jq},set:function(a){this.Jq=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= +ma.Object.defineProperties(og.prototype,{handleArchetype:{get:function(){return this.m},set:function(a){this.m=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof ue))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.me},set:function(a){if(null!==a&&a.part instanceof ue)throw Error("new handle must not be in an Adornment: "+ +a);this.me=a}},snapAngleMultiple:{get:function(){return this.ga},set:function(a){this.ga=a}},snapAngleEpsilon:{get:function(){return this.W},set:function(a){this.W=a}},originalAngle:{get:function(){return this.gw}},rotationPoint:{get:function(){return this.Jq},set:function(a){this.Jq=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});og.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function pg(){ke.call(this);this.name="ClickSelecting"}la(pg,ke);pg.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; pg.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};pg.className="ClickSelectingTool";function qg(){ke.call(this);this.name="Action";this.ck=null}la(qg,ke); qg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,b=a.lastInput,c=a.ec(b.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a});if(null!==c){if(!c.isActionable)return!1;this.ck=c;a.qk=a.ec(b.documentPoint,null,null);return!0}return!1};qg.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionDown&&b.actionDown(a,b))}else this.canStart()&&this.doActivate()}; qg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionMove&&b.actionMove(a,b))}};qg.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.ck;if(null===b)return;a.targetObject=b;null!==b.actionUp&&b.actionUp(a,b);this.standardMouseClick(function(a){for(;null!==a.panel&&(!a.isActionable||a!==b);)a=a.panel;return a},function(a){return a===b})}this.stopTool()}; -qg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};qg.prototype.doStop=function(){this.ck=null};qg.className="ActionTool";function rg(){ke.call(this);this.name="ClickCreating";this.Li=null;this.o=!0;this.j=!1;this.Rv=new I(0,0)}la(rg,ke); +qg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.ck;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};qg.prototype.doStop=function(){this.ck=null};qg.className="ActionTool";function rg(){ke.call(this);this.name="ClickCreating";this.Li=null;this.m=!0;this.j=!1;this.Rv=new I(0,0)}la(rg,ke); rg.prototype.canStart=function(){if(!this.isEnabled||null===this.archetypeNodeData)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(1===a.lastInput.clickCount&&(this.Rv=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.Rv))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.wl(a.lastInput.documentPoint,!0)?!1:!0}; rg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -rg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.P("ChangingSelection",b.selection);this.Da(this.name);if(c instanceof U)c.Tc()&&(kg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);ya(e)&&(b.model.kf(e),d=b.Dc(e))}if(null!==d){var f=I.allocAt(a.x,a.y);this.isGridSnapEnabled&&Ag(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);I.free(f)}b.Va();this.transactionResult= -this.name;b.P("PartCreated",d)}finally{this.stopTransaction(),b.P("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(rg.prototype,{archetypeNodeData:{get:function(){return this.Li},set:function(a){this.Li=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});rg.className="ClickCreatingTool"; -function Bg(){ke.call(this);this.name="DragSelecting";this.wk=175;this.o=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Cf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Bg,ke); +rg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.P("ChangingSelection",b.selection);this.Da(this.name);if(c instanceof U)c.Tc()&&(kg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);ya(e)&&(b.model.lf(e),d=b.Ec(e))}if(null!==d){var f=I.allocAt(a.x,a.y);this.isGridSnapEnabled&&Ag(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);I.free(f)}b.Va();this.transactionResult= +this.name;b.P("PartCreated",d)}finally{this.stopTransaction(),b.P("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(rg.prototype,{archetypeNodeData:{get:function(){return this.Li},set:function(a){this.Li=a}},isDoubleClick:{get:function(){return this.m},set:function(a){this.m=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});rg.className="ClickCreatingTool"; +function Bg(){ke.call(this);this.name="DragSelecting";this.wk=175;this.m=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Cf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Bg,ke); Bg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var b=a.lastInput;return!b.left||a.currentTool!==this&&(!this.isBeyondDragSize()||b.timestamp-a.firstInput.timestampe.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};Pg.prototype.doStart=function(){Zg=this;null!==this.textBlock&&this.doActivate()}; -Pg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ec(a.lastInput.documentPoint));if(null!==b&&b instanceof Qg&&(this.textBlock=b,null!==b.part)){a.animationManager.vc();this.isActive=!0;this.na=Wg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Sh=this.textBlock.copy();var d=new M(this.textBlock.ia(tc),this.textBlock.ia(Cc));a.bv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Pg.prototype.doCancel=function(){this.stopTool()}; +Pg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ec(a.lastInput.documentPoint));if(null!==b&&b instanceof Qg&&(this.textBlock=b,null!==b.part)){a.animationManager.wc();this.isActive=!0;this.na=Wg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Sh=this.textBlock.copy();var d=new M(this.textBlock.ia(tc),this.textBlock.ia(Cc));a.bv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Pg.prototype.doCancel=function(){this.stopTool()}; Pg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Pg.prototype.doMouseDown=function(){this.isActive&&this.acceptText($g)};Pg.prototype.acceptText=function(a){switch(a){case $g:if(this.na===bh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.na===Wg||this.na===Yg||this.na===Xg)this.na=ch,dh(this);break;case eh:case Ug:case Vg:if(Ug!==a||!0!==this.textBlock.isMultiline)if(this.na===Wg||this.na===Yg||this.na===Xg)this.na=ch,dh(this)}}; function dh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Da(a.name),a.na=bh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.P("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.na=Yg,a.doError(e,f))}} Pg.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};Pg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Pg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.na=Sg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Pg.prototype.doStop=function(){Zg=null}; -Pg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Pg.prototype.px=function(a){var b=this.Sh;b.text=a;b.measure(this.textBlock.zh,Infinity);return b}; -ma.Object.defineProperties(Pg.prototype,{textBlock:{get:function(){return this.ga},set:function(a){this.ga=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.Y},set:function(a){this.Y=a}},textValidation:{get:function(){return this.qj}, -set:function(a){this.qj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.na},set:function(a){this.na!==a&&(this.na=a)}}});Pg.prototype.measureTemporaryTextBlock=Pg.prototype.px; +Pg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Pg.prototype.qx=function(a){var b=this.Sh;b.text=a;b.measure(this.textBlock.zh,Infinity);return b}; +ma.Object.defineProperties(Pg.prototype,{textBlock:{get:function(){return this.ga},set:function(a){this.ga=a}},currentTextEditor:{get:function(){return this.m},set:function(a){this.m=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.W},set:function(a){this.W=a}},textValidation:{get:function(){return this.qj}, +set:function(a){this.qj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.na},set:function(a){this.na!==a&&(this.na=a)}}});Pg.prototype.measureTemporaryTextBlock=Pg.prototype.qx; var eh=new D(Pg,"LostFocus",0),$g=new D(Pg,"MouseDown",1),Vg=new D(Pg,"Tab",2),Ug=new D(Pg,"Enter",3),fh=new D(Pg,"SingleClick",0),Rg=new D(Pg,"SingleClickSelected",1),ah=new D(Pg,"DoubleClick",2),Sg=new D(Pg,"StateNone",0),Wg=new D(Pg,"StateActive",1),Xg=new D(Pg,"StateEditing",2),ch=new D(Pg,"StateValidating",3),Yg=new D(Pg,"StateInvalid",4),bh=new D(Pg,"StateValidated",5),Zg=null;Pg.className="TextEditingTool";Pg.LostFocus=eh;Pg.MouseDown=$g;Pg.Tab=Vg;Pg.Enter=Ug;Pg.SingleClick=fh; Pg.SingleClickSelected=Rg;Pg.DoubleClick=ah;Pg.StateNone=Sg;Pg.StateActive=Wg;Pg.StateEditing=Xg;Pg.StateValidating=ch;Pg.StateInvalid=Yg;Pg.StateValidated=bh;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); -function gh(a){hh||(ih(),hh=!0);this.H=le;this.Dk=this.zb=this.Xp=this.$b=!1;this.uw=!0;this.Ek=jh;this.lm=!1;this.wh=this.Ad=!0;this.tg=600;this.Hv=this.sw=!1;this.Sd=new G;this.Wd=new kh;this.Wd.Rd=this;this.yi=new G;this.Vt=new G;this.rr=new G;this.dl=new G;a&&Object.assign(this,a)}gh.prototype.Ke=function(a){this.H=a};gh.prototype.canStart=function(){return!0};function lh(a,b){a.Ad&&a.canStart(b)&&(a.Sd.add(b),a.defaultAnimation.isAnimating&&a.vc(),mh(a.H),a.zb=!0)} -function nh(a){if(a.Ad&&a.zb){var b=a.Wd,c=a.H,d=a.Sd.contains("Model");d&&(a.Dk=!0,a.Ek===jh?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ek===oh&&b.rc.clear(),a.uw=a.Ek===ph&&c.Jt.C(c.pa)?!0:!1,c.P("InitialAnimationStarting",a));d&&!a.wh||0===b.rc.count?(a.Sd.clear(),a.zb=!1,b.rc.clear(),qh(b,c),a.Dk=!1,c.N()):(a.Sd.clear(),c.bg=!1,d=b.rc.get(c),c.autoScale!==rh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.zb||b.$b||(c.Fe("temporaryPixelRatio")&&Ge(c),sh(c),a.zb=!1,b.start(),b.$b&&(th(a),c.Va(),uh(b,0),zf(c,!0),vh(a),c.P("AnimationStarting",a)))}))}}function wh(a){return a.Sd.contains("Trigger")&&1===a.Sd.count}function xh(a,b,c,d){a.isTicking||wh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.Wd.add(b,"position",c,d,!1)}t=gh.prototype;t.es=function(a){return this.Wd.es(a)};t.Ju=function(a){return this.Wd.Ju(a)}; +function gh(a){hh||(ih(),hh=!0);this.H=le;this.Dk=this.zb=this.Xp=this.$b=!1;this.uw=!0;this.Ek=jh;this.lm=!1;this.wh=this.Ad=!0;this.ug=600;this.Hv=this.sw=!1;this.Sd=new G;this.Wd=new kh;this.Wd.Rd=this;this.yi=new G;this.Vt=new G;this.rr=new G;this.dl=new G;a&&Object.assign(this,a)}gh.prototype.Le=function(a){this.H=a};gh.prototype.canStart=function(){return!0};function lh(a,b){a.Ad&&a.canStart(b)&&(a.Sd.add(b),a.defaultAnimation.isAnimating&&a.wc(),mh(a.H),a.zb=!0)} +function nh(a){if(a.Ad&&a.zb){var b=a.Wd,c=a.H,d=a.Sd.contains("Model");d&&(a.Dk=!0,a.Ek===jh?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ek===oh&&b.rc.clear(),a.uw=a.Ek===ph&&c.Jt.C(c.pa)?!0:!1,c.P("InitialAnimationStarting",a));d&&!a.wh||0===b.rc.count?(a.Sd.clear(),a.zb=!1,b.rc.clear(),qh(b,c),a.Dk=!1,c.N()):(a.Sd.clear(),c.cg=!1,d=b.rc.get(c),c.autoScale!==rh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.zb||b.$b||(c.Ge("temporaryPixelRatio")&&Ge(c),sh(c),a.zb=!1,b.start(),b.$b&&(th(a),c.Va(),uh(b,0),zf(c,!0),vh(a),c.P("AnimationStarting",a)))}))}}function wh(a){return a.Sd.contains("Trigger")&&1===a.Sd.count}function xh(a,b,c,d){a.isTicking||wh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.Wd.add(b,"position",c,d,!1)}t=gh.prototype;t.es=function(a){return this.Wd.es(a)};t.Ju=function(a){return this.Wd.Ju(a)}; function yh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function Bh(a,b){for(b=b.findLinksConnected();b.next();){var c=b.value;c.ef=c.points.copy();a.dl.add(c)}}function Oh(a,b,c,d,e){null===a&&(a=[0,0,0,0]);null===b&&(b=[0,0,0,0]);var f=a[0],g=a[1],h=a[2];a=a[3];var k=b[0],l=b[1],m=b[2];b=b[3];if(0===h||100===h)f=k,g=l;else if(0===m||100===m)k=f,l=g;180f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function ih(){function a(a,b,e,f,g,h){a.position=new I(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new pb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&wa(a,">= 1",gh,"duration");this.tg=a}},isAnimating:{get:function(){return this.$b}}, -isTicking:{get:function(){return this.Xp}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a}},defaultAnimation:{get:function(){return this.Wd}},activeAnimations:{get:function(){return this.yi}},initialAnimationStyle:{get:function(){return this.Ek},set:function(a){this.Ek=a}}});gh.prototype.stopAnimation=gh.prototype.vc; +ma.Object.defineProperties(gh.prototype,{animationReasons:{get:function(){return this.Sd}},isEnabled:{get:function(){return this.Ad},set:function(a){(this.Ad=a)&&this.yi.each(function(a){a.isAnimating||Infinity!==a.runCount||a.start()})}},duration:{get:function(){return this.ug},set:function(a){1>a&&wa(a,">= 1",gh,"duration");this.ug=a}},isAnimating:{get:function(){return this.$b}}, +isTicking:{get:function(){return this.Xp}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a}},defaultAnimation:{get:function(){return this.Wd}},activeAnimations:{get:function(){return this.yi}},initialAnimationStyle:{get:function(){return this.Ek},set:function(a){this.Ek=a}}});gh.prototype.stopAnimation=gh.prototype.wc; var Ph=null,hh=!1,jh=new D(gh,"Default",1),ph=new D(gh,"AnimateLocations",2),oh=new D(gh,"None",3);gh.className="AnimationManager";gh.defineAnimationEffect=function(a,b){hh||(ih(),hh=!0);Ph.add(a,b)};gh.Default=jh;gh.AnimateLocations=ph;gh.None=oh; -function kh(a){this.au=this.rw=this.Rd=this.H=null;this.Mk=this.$b=this.j=!1;this.Km=this.Gd=0;this.op=this.Rs=Qh;this.Lk=this.Kn=!1;this.It=1;this.Gt=0;this.yd=this.tg=NaN;this.Lv=0;this.Lm=null;this.o=qb;this.rc=new pb;this.yt=new pb;this.nl=new G;this.zt=new G;this.Iv=Rh;a&&Object.assign(this,a)}kh.prototype.suspend=function(){this.Mk=!0};kh.prototype.advanceTo=function(a,b){b&&(this.Mk=!1);this.Kn&&a>=this.yd&&(this.Lk=!0,a-=this.yd);this.Lv=a;zh(this,!0);th(this.Rd);zf(this.H);vh(this.Rd);this.H.redraw()}; -function qh(a,b){a.yt.clear();a.Lk=!1;a.Gt=0;a.yd=NaN;0=this.yd&&(this.Lk=!0,a-=this.yd);this.Lv=a;zh(this,!0);th(this.Rd);zf(this.H);vh(this.Rd);this.H.redraw()}; +function qh(a,b){a.yt.clear();a.Lk=!1;a.Gt=0;a.yd=NaN;0a.Km?a.yd:d-a.Gd;b&&(e=a.Lv,ea.Km&&(a.Kn&&!a.Lk?(a.Gd=+new Date,a.Km=a.Gd+a.yd,a.Lk=!0):a.ul(!1))}}} function uh(a,b){for(var c=a.yd,d=a.rc.iterator,e=a.Lk;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Ph,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.op,b,c,a)}}}t.stop=function(){if(!this.$b)return this;this.ul(!0);return this}; t.ul=function(a){null!==this.au&&this.au.Mn.remove(this.rw);if(this.$b){var b=this.H,c=this.Rd;this.Mk=this.$b=c.Dk=!1;th(c);for(var d=this.rc,e=this.nl.iterator;e.next();)b.remove(e.value);for(e=this.zt.iterator;e.next();)e.value.w();e=this.Kn;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.uu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.ou||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.ou?k[n]:l[n],this.op,this.yd,this.yd,this)}h.ou&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Wu&&g instanceof U&&g.Ub(!1)}b.Zr.clear();Ye(b,!1);b.Va();b.N();zf(b,!0);if(c.defaultAnimation===this){for(n=c.dl.iterator;n.next();)e=n.value,null!==e.df&&(e.points=e.df,e.df=null);c.dl.clear()}zf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Iv);vh(c);this.Gt++;!a&&this.It>this.Gt?(this.Lk=!1,this.start()):(this.Lm&&this.Lm(this),qh(this,null),c.ul(this),b.Mb())}}; +h.ou?k[n]:l[n],this.op,this.yd,this.yd,this)}h.ou&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Wu&&g instanceof U&&g.Ub(!1)}b.Zr.clear();Ye(b,!1);b.Va();b.N();zf(b,!0);if(c.defaultAnimation===this){for(n=c.dl.iterator;n.next();)e=n.value,null!==e.ef&&(e.points=e.ef,e.ef=null);c.dl.clear()}zf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.Iv);vh(c);this.Gt++;!a&&this.It>this.Gt?(this.Lk=!1,this.start()):(this.Lm&&this.Lm(this),qh(this,null),c.ul(this),b.Mb())}}; t.xj=function(a,b){var c=b.actualBounds,d=null;b instanceof qf&&(d=b.placeholder);null!==d?(c=d.ia(tc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new I(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof qf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.xj(d,b)}; t.vj=function(a,b){if(a.isVisible()){var c=null;b instanceof qf&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.rc;c.contains(a)&&(c.I(a).Wu=!0);if(a instanceof qf)for(a=a.memberParts;a.next();)c=a.value,c instanceof V&&this.vj(c,b)}};t.lz=function(a){var b=this.yt.get(a);null===b&&(b={},this.yt.add(a,b));return b}; -ma.Object.defineProperties(kh.prototype,{duration:{get:function(){return this.tg},set:function(a){1>a&&wa(a,">= 1",kh,"duration");this.tg=a}},reversible:{get:function(){return this.Kn},set:function(a){this.Kn=a}},runCount:{get:function(){return this.It},set:function(a){0a&&wa(a,">= 1",kh,"duration");this.ug=a}},reversible:{get:function(){return this.Kn},set:function(a){this.Kn=a}},runCount:{get:function(){return this.It},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}kh.className="Animation";kh.EaseLinear=function(a,b,c,d){return c*a/d+b};kh.EaseInOutQuad=Qh;kh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};kh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};kh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};kh.EaseOutExpo=Sh; -function Yh(a,b,c){this.start=a;this.end=b;this.uu={};this.ou=c;this.Wu=!1}Yh.className="AnimationState";function Zh(a,b,c){this.sd=null;this.cf=a;this.Vn=c||$h;this.hk=null;void 0!==b&&(this.hk=b,void 0===c&&(this.Vn=ai))}Zh.prototype.copy=function(){var a=new Zh(this.cf);a.Vn=this.Vn;var b=this.hk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.hk=c}return a}; -function bi(a,b){a=a.hk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.cf},set:function(a){this.cf=a}},animationSettings:{get:function(){return this.hk},set:function(a){this.hk=a}},startCondition:{get:function(){return this.Vn},set:function(a){this.Vn=a}}}); -var $h=new D(Zh,"Default",1),ai=new D(Zh,"Immediate",2),ci=new D(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Ra(this);this.H=null;this.Ma=new E;this.va="";this.tb=1;this.o=!1;this.j=this.Nh=this.u=this.Ii=this.Hi=this.Gi=this.Fi=this.Di=this.Ei=this.Ci=this.Ki=this.Bi=this.Ji=this.Ai=this.zi=!0;this.Bn=[];a&&Object.assign(this,a)}t=di.prototype;t.clear=function(){this.Ma.clear();this.Bn.length=0};t.Ke=function(a){this.H=a}; +function Yh(a,b,c){this.start=a;this.end=b;this.uu={};this.ou=c;this.Wu=!1}Yh.className="AnimationState";function Zh(a,b,c){this.sd=null;this.df=a;this.Vn=c||$h;this.hk=null;void 0!==b&&(this.hk=b,void 0===c&&(this.Vn=ai))}Zh.prototype.copy=function(){var a=new Zh(this.df);a.Vn=this.Vn;var b=this.hk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.hk=c}return a}; +function bi(a,b){a=a.hk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.df},set:function(a){this.df=a}},animationSettings:{get:function(){return this.hk},set:function(a){this.hk=a}},startCondition:{get:function(){return this.Vn},set:function(a){this.Vn=a}}}); +var $h=new D(Zh,"Default",1),ai=new D(Zh,"Immediate",2),ci=new D(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Ra(this);this.H=null;this.Ma=new E;this.va="";this.tb=1;this.m=!1;this.j=this.Nh=this.u=this.Ii=this.Hi=this.Gi=this.Fi=this.Di=this.Ei=this.Ci=this.Ki=this.Bi=this.Ji=this.Ai=this.zi=!0;this.Bn=[];a&&Object.assign(this,a)}t=di.prototype;t.clear=function(){this.Ma.clear();this.Bn.length=0};t.Le=function(a){this.H=a}; t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ma.iterator;h.next();){var k=h.value;k instanceof qf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof ue?g++:c++}h="";0c.nq||h.height*e>c.nq?b.tc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| +t.$h=function(a,b,c,d,e,f,g){if(!g||ig(b)){if(null!==d&&b instanceof T&&(b.isOrthogonal&&d.push(b),!1===b.xd))return;g=!1;for(d=b.containingGroup;null!==d;)g?null!==d.ib&&f.ix(d.ib):null!==d.ib&&(g=!0,f.assign(d.ib)),d=d.containingGroup;var h=b.actualBounds;d=!1;if(g&&b.isVisible()){if(!f.Sc(h))return;d=!f.Ee(h)}d&&(a.save(),a.beginPath(),a.rect(f.x,f.y,f.width,f.height),a.clip());h.width*e>c.nq||h.height*e>c.nq?b.tc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(gi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(gi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),gi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Ur()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Nc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.bb(de,a,this,b,c,d,e)};t.ii=function(a,b,c){var d=this.Ma;b.Ah=this;if(a>=d.count)a=d.count;else if(d.K(a)===b)return-1;d.Cb(a,b);b.yo(c);d=this.diagram;null!==d&&(c?d.N():d.ii(b));hi(this,a,b);return a}; +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Oc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.bb(de,a,this,b,c,d,e)};t.ii=function(a,b,c){var d=this.Ma;b.Ah=this;if(a>=d.count)a=d.count;else if(d.K(a)===b)return-1;d.Cb(a,b);b.yo(c);d=this.diagram;null!==d&&(c?d.N():d.ii(b));hi(this,a,b);return a}; t.lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.lc(a,b,c);var d=this.Ma;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.K(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.zo(c);d.mb(a);d=this.diagram;null!==d&&(c?d.N():d.lc(b));b.Ah=null;return a}; function hi(a,b,c){b=ii(a,b,c);if(c instanceof qf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ma.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.K(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.mb(b);a.Cb(f,c);return f}for(g=NaN;0<=--f&&(g=a.K(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.mb(b);a.Cb(h,c);return h}for(k=NaN;++h< e&&(k=a.K(h).zOrder,isNaN(k)););}return b} ma.Object.defineProperties(di.prototype,{parts:{get:function(){return this.Ma.iterator}},partsBackwards:{get:function(){return this.Ma.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.va},set:function(a){var b=this.va;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&C("Cannot rename default Layer to: "+a),c=c.layers;c.next();)c.value.name=== -a&&C("Layer.name is already present in this diagram: "+a);this.va=a;this.g("name",b,a);for(a=this.Ma.iterator;a.next();)a.value.layerName=this.va}}},opacity:{get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&((0>a||1a||1=a)return b;for(var c=this.Ua.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; function Ei(a){var b=a.Ha.Sa;b instanceof HTMLCanvasElement&&(a.addEventListener(b,"pointerdown",a.Wj,!1),a.addEventListener(b,"pointermove",a.Xj,!1),a.addEventListener(b,"pointerup",a.Zj,!1),a.addEventListener(b,"pointerout",a.Yj,!1),a.addEventListener(b,"pointerenter",a.Jy,!1),a.addEventListener(b,"pointerleave",a.Ky,!1),a.addEventListener(b,"wheel",a.Sj,!1),a.addEventListener(b,"keydown",a.yz,!1),a.addEventListener(b,"keyup",a.zz,!1),a.addEventListener(b,"blur",a.vy,!1),a.addEventListener(b,"focus", -a.wy,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(x,"resize",a.sv,!1),Qa&&a.addEventListener(b,"touchstart",function(a){a.preventDefault()},!1))}function Ge(a){30q&&(this.position=w.h(-(b.scrollWidth-this.Ba)+v-this.Ba/e+m,this.position.y))),a.$x&&this.allowVerticalScroll&&(hu&&(this.position= +"gray";c.strokeWidth=1;c.interval=10;b.add(c);c=new U;c.add(b);c.layerName="Grid";c.zOrder=0;c.isInDocumentBounds=!1;c.isAnimated=!1;c.pickable=!1;c.locationObjectName="GRID";a.add(c);a.partManager.parts.remove(c);b.visible=!1;return b}function Gi(){this.H.Mt?this.H.Mt=!1:this.H.isEnabled?this.H.Nw(this):Oi(this.H)}function Qi(a){this.H.isEnabled?(this.H.Rt=a.target.scrollTop,this.H.Pt=a.target.scrollLeft):Oi(this.H)} +Q.prototype.Nw=function(a){if(null!==this.Ha){var b=this.Qt,c=this.Nt;this.Nq=!0;var d=this.documentBounds,e=this.viewportBounds,f=this.mj,g=d.x-f.left,h=d.y-f.top,k=d.width+f.left+f.right,l=d.height+f.top+f.bottom,m=d.right+f.right;f=d.bottom+f.bottom;var n=e.x;d=e.y;var p=e.width,r=e.height,q=e.right,u=e.bottom;e=this.scale;var w=a.scrollLeft;if(this.$m)switch(this.Ht){case "negative":w=w+a.scrollWidth-a.clientWidth;break;case "reverse":w=a.scrollWidth-w-a.clientWidth}var v=w;pq&&(this.position=w.h(-(b.scrollWidth-this.Ba)+v-this.Ba/e+m,this.position.y))),a.ay&&this.allowVerticalScroll&&(hu&&(this.position= w.h(this.position.x,-(b.scrollHeight-this.Aa)+a.scrollTop-this.Aa/e+f))),I.free(w),Ri(this),this.Ti=this.Nq=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,q=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=q&&(c.style.width="1px"),r>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);mh(this);return Si(this,a)}; function Si(a,b){if(a.fixedBounds.v())return b.assign(a.fixedBounds),b.fo(a.ub),b;for(var c=!0,d=a.Ua.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Zi?(b=k>h?(g-a.Ab)/d:(f-a.Ab)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +function Ui(a,b){var c=a.sp;if(null===a.Ha)return c;a.Za();var d=a.documentBounds;if(!d.v())return c;var e=d.width;d=d.height;var f=a.Ba+(a.Of?a.Ab:0),g=a.Aa+(a.We?a.Ab:0),h=f/e,k=g/d;return b===Yi?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Zi?(b=k>h?(g-a.Ab)/d:(f-a.Ab)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} Q.prototype.zoomToFit=function(){var a=this.nj;this.nj=Rh;this.scale=Ui(this,Yi);a!==Rh&&(Ti(this,!1),Vi(this,this.documentBounds,this.Ba/this.xa,this.Aa/this.xa,this.mk,!1));this.nj=a};t=Q.prototype; -t.kA=function(a,b){void 0===b&&(b=Yi);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Yi||b===Zi)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ba;var f=this.Aa;e=b===Zi?f/d>e/c?(f-(this.Ve?this.Ab:0))/d:(e-(this.Nf?this.Ab:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new I(a.x,a.y)}}; -t.oy=function(a,b){this.Za();var c=this.documentBounds,d=this.viewportBounds;this.position=new I(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))};t.gz=function(a){if(a instanceof Y){this.Hp=a;var b=I.alloc();this.Ip=this.Ro(a.ia(tc,b));I.free(b)}else this.Hp=null,this.Ip=ub}; +t.kA=function(a,b){void 0===b&&(b=Yi);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Yi||b===Zi)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ba;var f=this.Aa;e=b===Zi?f/d>e/c?(f-(this.We?this.Ab:0))/d:(e-(this.Of?this.Ab:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new I(a.x,a.y)}}; +t.py=function(a,b){this.Za();var c=this.documentBounds,d=this.viewportBounds;this.position=new I(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))};t.gz=function(a){if(a instanceof Y){this.Hp=a;var b=I.alloc();this.Ip=this.Ro(a.ia(tc,b));I.free(b)}else this.Hp=null,this.Ip=ub}; function Vi(a,b,c,d,e,f){var g=I.allocAt(a.pa.x,a.pa.y),h=g.x,k=g.y;if(null!==a.Hp){var l=I.alloc();l=a.Hp.ia(tc,l);h=l.x-a.Ip.x/a.scale;k=l.y-a.Ip.y/a.scale;e=sc;I.free(l)}if(f||a.scrollMode===Rh)e.pb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.mj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.$k[0])b=a.$k[c];else return;c=a.Ha;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ba/c.width*c.left,b.clientY-a.Aa/c.height*c.top))}Q.prototype.Va=function(){this.Si||(this.Si=!0,this.Mb(!0))};function hj(a){a.cd||mh(a);a.Za()}Q.prototype.redraw=function(){this.wb||this.cd||(this.N(),Wi(this),this.nd())};t=Q.prototype;t.xz=function(){return this.bg}; -t.Ey=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.vc();b.isEnabled=!1;zf(this);this.Pf=!1;this.Jt=new I(NaN,NaN);b.isEnabled=c;this.cd=!0;var d=this;null!==a&&ta(function(){d.cd=!1;lh(b,"Model");a(d)},1)};t.Mb=function(a){void 0===a&&(a=!1);if(!0!==this.bg&&!(this.wb||!1===a&&this.cd)){this.bg=!0;var b=this;x.requestAnimationFrame(function(){b.bg&&b.nd()})}};t.nd=function(){if(!this.Nm||this.bg)this.Nm&&(this.Nm=!1),zf(this)}; +function ae(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.$k[0])b=a.$k[c];else return;c=a.Ha;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ba/c.width*c.left,b.clientY-a.Aa/c.height*c.top))}Q.prototype.Va=function(){this.Si||(this.Si=!0,this.Mb(!0))};function hj(a){a.cd||mh(a);a.Za()}Q.prototype.redraw=function(){this.wb||this.cd||(this.N(),Wi(this),this.nd())};t=Q.prototype;t.xz=function(){return this.cg}; +t.Ey=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.wc();b.isEnabled=!1;zf(this);this.Qf=!1;this.Jt=new I(NaN,NaN);b.isEnabled=c;this.cd=!0;var d=this;null!==a&&ta(function(){d.cd=!1;lh(b,"Model");a(d)},1)};t.Mb=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.wb||!1===a&&this.cd)){this.cg=!0;var b=this;x.requestAnimationFrame(function(){b.cg&&b.nd()})}};t.nd=function(){if(!this.Nm||this.cg)this.Nm&&(this.Nm=!1),zf(this)}; function Xi(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.wb||!a.Ti||Oi(a)||(b&&mh(a),c&&Ti(a,!1))} -function zf(a,b){if(!a.cd&&(a.bg=!1,null!==a.La||a.Zn.v())){a.cd=!0;var c=a.animationManager,d=a.Fn;if(!c.isAnimating&&0!==d.length){for(var e=d.s,f=e.length,g=0;gb;b++){var c=a.se.iterator;if(null===c||0===a.se.count)break;a.se=new G;a.rv(c,a.se)}a.nodes.each(function(a){a instanceof qf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} +function mh(a){if(0!==a.te.count&&(a.cd||!a.animationManager.isTicking)){for(var b=0;23>b;b++){var c=a.te.iterator;if(null===c||0===a.te.count)break;a.te=new G;a.rv(c,a.te)}a.nodes.each(function(a){a instanceof qf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} t.rv=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Tc()||c instanceof qf||(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof qf&&c.isVisible()&&mj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof ue&&c.isVisible()&&(c.mi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function mj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof qf?(nj(f)||oj(f)||pj(f))&&mj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;en&&(z=L.left,y= +Math.floor(k.y),Math.ceil(k.width),Math.ceil(k.height));f.clip();f.setTransform(h,0,0,h,0,0);f.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy);f.Pc();b=this.Ua.s;l=b.length;this.Pd(b,l,this,this.viewportBounds);rj(this,f);f.globalAlpha=this.tb;for(h=0;hn&&(z=L.left,y= L.right),v.height>F&&(A=L.top,B=L.bottom)):(z=L.left,y=L.right,A=L.top,B=L.bottom);L=v.width+z+y;var S=v.height+A+B;z=v.x-z;var R=e.x;y=v.right+y;var P=e.right+r;A=v.y-A;var H=e.y;v=v.bottom+B;B=e.bottom+q;var da="1px",X="1px";e=a.scale;u=L>u/e;w=S>w/e;a.scrollMode===Rh&&(u||w)&&(u&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(u=1,z+1P+1&&(u=Math.max((y-P)*e+a.Ba,u)),n+r+1B+1&&(u=Math.max((v-B)*e+a.Aa,u)),F+q+1P+1&&(r=Math.max((y-P)*e+a.Ba,r)),n+1B+1&&(q=Math.max((v-B)*e+r,q)),F+1P+1&&(b=a.position.x*e));if(a.$m)switch(a.Ht){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(F+1B+1&&(l.scrollTop=a.position.y*e));u=a.Ba;w=a.Aa;l.style.width=u+(a.Nf?a.Ab:0)+"px";l.style.height=w+(a.Ve?a.Ab:0)+"px";return c!==u||d!==w||a.animationManager.zb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; +(u=1,A+1B+1&&(u=Math.max((v-B)*e+a.Aa,u)),F+q+1P+1&&(r=Math.max((y-P)*e+a.Ba,r)),n+1B+1&&(q=Math.max((v-B)*e+r,q)),F+1P+1&&(b=a.position.x*e));if(a.$m)switch(a.Ht){case "negative":b=-(l.scrollWidth-b-l.clientWidth);break;case "reverse":b=l.scrollWidth-b-l.clientWidth}l.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(F+1B+1&&(l.scrollTop=a.position.y*e));u=a.Ba;w=a.Aa;l.style.width=u+(a.Of?a.Ab:0)+"px";l.style.height=w+(a.We?a.Ab:0)+"px";return c!==u||d!==w||a.animationManager.zb?(c=M.allocAt(f,g,h,k),a.onViewportBoundsChanged(c,a.viewportBounds,e,p),M.free(c),!1):!0}t=Q.prototype; t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Ij(a.layerName),null===b&&(b=this.Ij("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.ii(99999999,a,a.diagram===this);0<=c&&this.bb(fe,"parts",b,null,a,null,c);b.isTemporary||this.Va();a.D(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.ii=function(a){this.partManager.ii(a);var b=this;Aj(a,function(a){Bj(b,a)});(a instanceof ue||a instanceof qf&&null!==a.placeholder)&&a.w();null!==a.data&&Aj(a,function(a){Cj(b.partManager,a)});!0!==oj(a)&&!0!==pj(a)||this.se.add(a);Dj(a,!0,this);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()}; -t.lc=function(a){a.zj();this.partManager.lc(a);var b=this;null!==a.data&&Aj(a,function(a){Fj(b.partManager,a,b)});this.se.remove(a);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()};t.remove=function(a){Gj(this,a,!0)}; +t.ii=function(a){this.partManager.ii(a);var b=this;Aj(a,function(a){Bj(b,a)});(a instanceof ue||a instanceof qf&&null!==a.placeholder)&&a.w();null!==a.data&&Aj(a,function(a){Cj(b.partManager,a)});!0!==oj(a)&&!0!==pj(a)||this.te.add(a);Dj(a,!0,this);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()}; +t.lc=function(a){a.zj();this.partManager.lc(a);var b=this;null!==a.data&&Aj(a,function(a){Fj(b.partManager,a,b)});this.te.remove(a);Ej(a)?(a.actualBounds.v()&&this.N(yj(a,a.actualBounds)),this.Va()):a.isVisible()&&a.actualBounds.v()&&this.N(yj(a,a.actualBounds));this.Mb()};t.remove=function(a){Gj(this,a,!0)}; function Gj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.D(2),c&&b.Fj(),c=d.lc(-1,b,!1),0<=c&&a.bb(ge,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.hs=function(a,b){void 0===b&&(b=!1);if(za(a))for(var c=a.length,d=0;dd&&this.Va();return this}; -t.iy=function(a,b){Mj(this,a,b);a.Ke(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; +t.pl=function(a){Mj(this,a,null);a.Le(this);var b=this.Ua,c=b.count-1;if(!a.isTemporary)for(;0<=c&&b.K(c).isTemporary;)c--;b.Cb(c+1,a);null!==this.ac&&this.bb(fe,"layers",this,null,a,null,c+1);this.N();this.Va();return this}; +t.Aw=function(a,b){Mj(this,a,b);a.Le(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; +t.jy=function(a,b){Mj(this,a,b);a.Le(this);var c=this.Ua,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ac&&this.bb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Va();return this}; t.Rz=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ua,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ma.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ac&&this.bb(ge,"layers",this,a,null,c,null);this.N();this.Va()}}};t.Ij=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; -t.Cw=function(a){null===this.af&&(this.af=new E);this.af.add(a);this.model.Ug(a);return this};t.Tz=function(a){null!==this.af&&(this.af.remove(a),0===this.af.count&&(this.af=null));this.model.ak(a)};t.Ug=function(a){null===this.pg&&(this.pg=new E);this.pg.add(a);return this};t.ak=function(a){null!==this.pg&&(this.pg.remove(a),0===this.pg.count&&(this.pg=null))}; -t.Cr=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Fu(a);a.change!==ee&&(this.isModified=!0);if(null!==this.pg)for(var b=this.pg,c=b.length,d=0;dn.Ma.indexOf(r)&&n.ii(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.lc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof di&&(b?(r.Ke(this),this.Ua.Cb(p,r)):this.Ua.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};Q.prototype.Da=function(a){return this.undoManager.Da(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Af=function(){return this.undoManager.Af()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Da(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.eb(b):this.undoManager.Af(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):Qj(g,h,b?void 0:k));else if(g instanceof di){var m=!0===a.oldParam;"number"===typeof h&&k instanceof U&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Rb(),g.lc(m?h:-1,k,m)):g.ii(h,k,m))}else g instanceof Q?"number"===typeof h&&k instanceof di&&(b?this.Ua.mb(h):(k.Le(this),this.Ua.Cb(h,k))):C("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===ge){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof W)"number"===typeof p&&r instanceof Y?b?n.Cb(p,r):n.lc(p): +"number"===typeof p&&r instanceof Oj&&(r.isRow?Pj(n,p,b?r:void 0):Qj(n,p,b?r:void 0));else if(n instanceof di){var q=!0===a.newParam;"number"===typeof p&&r instanceof U&&(b?0>n.Ma.indexOf(r)&&n.ii(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.lc(q?p:-1,r,q)))}else n instanceof Q?"number"===typeof p&&r instanceof di&&(b?(r.Le(this),this.Ua.Cb(p,r)):this.Ua.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};Q.prototype.Da=function(a){return this.undoManager.Da(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Bf=function(){return this.undoManager.Bf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Da(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.eb(b):this.undoManager.Bf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.Uo=function(){this.partManager.Uo()}; -function Rj(a,b,c){var d=a.animationManager;if(a.wb||a.cd)a.xa=c,Ci(a),d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));else if(null===a.Ha)a.xa=c,Ci(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Ba,g=a.Aa;e.width=a.Ba/b;e.height=a.Aa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.wf(Ec)?h=0:l.wf(Gc)&&(h=f-1):h=l.pb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.wf(Dc)?k=0:l.wf(Hc)&&(k=g-1):k=l.pb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| +function Rj(a,b,c){var d=a.animationManager;if(a.wb||a.cd)a.xa=c,Ci(a),d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));else if(null===a.Ha)a.xa=c,Ci(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Ba,g=a.Aa;e.width=a.Ba/b;e.height=a.Aa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.xf(Ec)?h=0:l.xf(Gc)&&(h=f-1):h=l.pb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.xf(Dc)?k=0:l.xf(Hc)&&(k=g-1):k=l.pb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating|| (c=a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=I.allocAt(a.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;I.free(f);a.xa=c;Ci(a);a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.wb=!1;Ti(a,!1);d.zb&&(wh(d)||d.Wd.add(d.H,"scale",b,a.xa));a.N();Wi(a)}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.C(b)){void 0===d&&(d=!1);d||Wi(this);Ri(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==rh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.Kk&&e instanceof La&&(this.lastInput.documentPoint=this.rs(this.lastInput.viewPoint),ye(e,this));this.wb||this.invalidateViewport(a,b);jj(this);this.kd.scale=c;this.kd.position.x=a.x;this.kd.position.y=a.y;this.kd.bounds.assign(a);this.kd.Gw.width= -Math.round(a.width*c);this.kd.Gw.height=Math.round(a.height*c);this.kd.qx.width=this.Ba;this.kd.qx.height=this.Aa;this.kd.kx=d;this.P("ViewportBoundsChanged",this.kd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.ab()})}}; -function jj(a,b){var c=a.Yd;if(null!==c&&c.visible){for(var d=K.alloc(),e=1,f=1,g=c.R.s,h=g.length,k=0;km||(Sj(l.figure)?f=f*m/J.Ww(f,m):e=e*m/J.Ww(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.v()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=I.alloc();J.so(a,g,0,0,d.width,d.height, +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.C(b)){void 0===d&&(d=!1);d||Wi(this);Ri(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==rh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.Kk&&e instanceof La&&(this.lastInput.documentPoint=this.rs(this.lastInput.viewPoint),ye(e,this));this.wb||this.invalidateViewport(a,b);jj(this);this.kd.scale=c;this.kd.position.x=a.x;this.kd.position.y=a.y;this.kd.bounds.assign(a);this.kd.Hw.width= +Math.round(a.width*c);this.kd.Hw.height=Math.round(a.height*c);this.kd.sx.width=this.Ba;this.kd.sx.height=this.Aa;this.kd.lx=d;this.P("ViewportBoundsChanged",this.kd,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.ab()})}}; +function jj(a,b){var c=a.Zd;if(null!==c&&c.visible){for(var d=K.alloc(),e=1,f=1,g=c.R.s,h=g.length,k=0;km||(Sj(l.figure)?f=f*m/J.Xw(f,m):e=e*m/J.Xw(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.v()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=I.alloc();J.so(a,g,0,0,d.width,d.height, b);b.offset(-d.width,-d.height);K.free(d);c.part.location=b;I.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.P("ChangingSelection",b);for(var c=b.Ea(),d=c.length,e=0;e=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=I.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.$a(qb)||(b=new I(b.x+f.x/e,b.y+f.y/e)); -M.free(d);I.free(f);return b};t=Q.prototype;t.bs=function(){return null};t.Nu=function(){return null};t.my=function(a,b){this.Xx.add(a,b)};t.lu=function(a){(this.tw=a)||this.nodes.each(function(a){a instanceof qf&&(a.Dp=null)})}; -function yk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].Qk){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Fg.iterator;g.next();)if(!g.value[0].Qk){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Dz=function(a){if(!Og)return null;void 0===a&&(a={});a.returnType="Image";return this.nx(a)}; -t.nx=function(a){void 0===a&&(a={});return yk(this,this.Ez,a)}; +M.free(d);I.free(f);return b};t=Q.prototype;t.bs=function(){return null};t.Nu=function(){return null};t.ny=function(a,b){this.Yx.add(a,b)};t.lu=function(a){(this.tw=a)||this.nodes.each(function(a){a instanceof qf&&(a.Dp=null)})}; +function yk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].Qk){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Fg.iterator;g.next();)if(!g.value[0].Qk){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Dz=function(a){if(!Og)return null;void 0===a&&(a={});a.returnType="Image";return this.ox(a)}; +t.ox=function(a){void 0===a&&(a={});return yk(this,this.Ez,a)}; t.Ez=function(a,b,c){var d=zk(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Ak+"data":e=d.getImageData(0,0,c.width,c.height);break;case Ak:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";if("function"===typeof c.msToBlob)return b(c.msToBlob()),"msToBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function zk(a,b,c,d){a.animationManager.vc();a.nd();if(null===a.Ha)return null;"object"!==typeof b&&C("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new K(Infinity,Infinity):new K(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,r=b.elementFinished||null,q=b.showTemporary; -void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new ic(l):l instanceof ic||C("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.Zb.Nc(!0);n=new Bk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.Ba+Math.ceil(l.left+l.right);n.height=a.Aa+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, +function zk(a,b,c,d){a.animationManager.wc();a.nd();if(null===a.Ha)return null;"object"!==typeof b&&C("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new K(Infinity,Infinity):new K(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,r=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new ec(l):l instanceof ec||C("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.Zb.Oc(!0);n=new Bk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.Ba+Math.ceil(l.left+l.right);n.height=a.Aa+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, n.height,n.width,n.height);d.ownerDocument=p;d.po=r;tj(a,d.context,l,new K(n.width,n.height),a.xa,a.pa,k,m,q,b);return d.context}a.Fm=!1;tj(a,u,l,new K(n.width,n.height),a.xa,a.pa,k,m,q,b);a.Fm=!0;return n.context}var w=a.sp,v=a.documentBounds.copy();v.jv(a.ub);if(q)for(var z=a.Ua.s,y=z.length,A=0;Aw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=y):l=new ic(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&&(e=Math.min(e, +(e=B,v=A):isNaN(A)?(e=B,v=v.height*f):(e=v.width*f,v=A)):null!==e?e.v()?(f=Math.min(B/v.width,A/v.height),e=B,v=A):isNaN(A)?(f=B/v.width,e=B,v=v.height*f):(f=A/v.height,e=v.width*f,v=A):null!==f?"NaN"===f&&g.v()?(f=Math.min((g.width-h)/v.width,(g.height-y)/v.height),f>w?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=y):l=new ec(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&&(e=Math.min(e, w)),isFinite(g)&&(v=Math.min(v,g)));n.width=Math.ceil(e);n.height=Math.ceil(v);if("SVG"===c){if(null===d)return null;d.resize(n.width,n.height,n.width,n.height);d.ownerDocument=p;d.po=r;tj(a,d.context,l,new K(Math.ceil(e),Math.ceil(v)),f,z,k,m,q,b);return d.context}a.Fm=!1;tj(a,u,l,new K(Math.ceil(e),Math.ceil(v)),f,z,k,m,q,b);a.Fm=!0;return n.context} -ma.Object.defineProperties(Q.prototype,{div:{get:function(){return this.La},set:function(a){if(this.La!==a){var b=this.La;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Ha&&(b=this.Ha.Sa,this.removeEventListener(b,"pointermove",this.Xj,!1),this.removeEventListener(b,"pointerdown",this.Wj,!1),this.removeEventListener(b,"pointerup",this.Zj,!1),this.removeEventListener(b,"pointerout",this.Yj,!1),this.Ha.Ow()),this.cl&&(this.cl.disconnect(), -this.cl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Ha=null,this.removeEventListener(x,"resize",this.sv,!1),this.removeEventListener(x,"wheel",this.Sj,!0),le===this&&(le=null)):this.Pf=!1;this.La=null;if(null!==a){if(b=a.H)b.div=null;si(this,a);this.redraw()}}}},Ew:{ -get:function(){return this.rq}},ji:{get:function(){return this.Pf}},draggedLink:{get:function(){return this.Ps},set:function(a){this.Ps!==a&&(this.Ps=a,null!==a&&(this.At=a.fromPort,this.Bt=a.toPort))}},sx:{get:function(){return this.At},set:function(a){this.At=a}},tx:{get:function(){return this.Bt},set:function(a){this.Bt=a}},animationManager:{get:function(){return this.Rd}}, +ma.Object.defineProperties(Q.prototype,{div:{get:function(){return this.La},set:function(a){if(this.La!==a){var b=this.La;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Ha&&(b=this.Ha.Sa,this.removeEventListener(b,"pointermove",this.Xj,!1),this.removeEventListener(b,"pointerdown",this.Wj,!1),this.removeEventListener(b,"pointerup",this.Zj,!1),this.removeEventListener(b,"pointerout",this.Yj,!1),this.Ha.Pw()),this.cl&&(this.cl.disconnect(), +this.cl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Ha=null,this.removeEventListener(x,"resize",this.sv,!1),this.removeEventListener(x,"wheel",this.Sj,!0),le===this&&(le=null)):this.Qf=!1;this.La=null;if(null!==a){if(b=a.H)b.div=null;si(this,a);this.redraw()}}}},Ew:{ +get:function(){return this.rq}},ji:{get:function(){return this.Qf}},draggedLink:{get:function(){return this.Ps},set:function(a){this.Ps!==a&&(this.Ps=a,null!==a&&(this.At=a.fromPort,this.Bt=a.toPort))}},tx:{get:function(){return this.At},set:function(a){this.At=a}},ux:{get:function(){return this.Bt},set:function(a){this.Bt=a}},animationManager:{get:function(){return this.Rd}}, undoManager:{get:function(){return this.ac.undoManager}},skipsUndoManager:{get:function(){return this.Mg},set:function(a){this.Mg=a;this.ac.skipsUndoManager=a}},delaysLayout:{get:function(){return this.Ns},set:function(a){this.Ns=a}},opacity:{get:function(){return this.tb},set:function(a){var b=this.tb;b!==a&&((0>a||1= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.xt},set:function(a){var b=this.xt;b!==a&&(this.xt=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.Zs},set:function(a){var b=this.Zs;b!==a&&(this.Zs=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.nt}, -set:function(a){var b=this.nt;b!==a&&(this.nt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{get:function(){return this.Tv}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Ym&&this.re!==a.historyIndex:this.Ym},set:function(a){if(this.Ym!==a){this.Ym=a;var b=this.undoManager;!a&&b.isEnabled&&(this.re=b.historyIndex);a||Tj(this)}}},model:{ -get:function(){return this.ac},set:function(a){var b=this.ac;if(b!==a){this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&C("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.vc(!0);var c=Ai(this,!0);this.Pf=!1;this.Nm=!0;this.re=-2;this.bg=!1;var d=this.wb;this.wb=!0;lh(this.animationManager,"Model");b&&(null!==this.af&&this.af.each(function(a){b.ak(a)}),b.ak(this.Gc));this.ac=a;this.partManager=Uj(this.ac.type);for(var e= -0;ethis.scale&&(this.scale=a)):wa(a,"> 0",Q,"minScale"))}},maxScale:{get:function(){return this.pt},set:function(a){var b=this.pt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{get:function(){return this.eu},set:function(a){this.eu.C(a)||(this.eu=a=a.J())}},contentAlignment:{get:function(){return this.mk}, -set:function(a){var b=this.mk;b.C(a)||(this.mk=a=a.J(),this.g("contentAlignment",b,a),Ti(this,!1))}},initialContentAlignment:{get:function(){return this.Rp},set:function(a){var b=this.Rp;b.C(a)||(this.Rp=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.Va(),this.g("padding",b,a))}},partManager:{ -get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Ke(null),this.Hc=a,a.Ke(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{ -get:function(){return this.Jc},set:function(a){var b=this.Jc;b!==a&&(this.Jc=a,a.diagram=this,a.group=null,this.mh=!0,this.g("layout",b,a),this.Mb())}},isTreePathToChildren:{get:function(){return this.kt},set:function(a){var b=this.kt;if(b!==a&&(this.kt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ck(a.value)}},treeCollapsePolicy:{get:function(){return this.$t},set:function(a){var b= -this.$t;b!==a&&(a!==vi&&a!==Dk&&a!==Ek&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.$t=a,this.g("treeCollapsePolicy",b,a))}},He:{get:function(){return this.Vv},set:function(a){this.Vv=a}},avoidanceCellSize:{get:function(){return this.Fv},set:function(a){this.Qh=null;this.Fv=new K(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.Gv},set:function(a){this.Gv=Math.max(1, -a)}},autoScrollInterval:{get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(this.Yo=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.$o},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.$o;b.C(a)||(this.$o=a=a.J(),this.Va(),this.g("autoScrollRegion",b,a))}}}); -ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Fk.fc()},set:function(a){Fk.add(a.replace(/\s/g,""))}},version:{get:function(){return Gk}}});Q.prototype.makeImageData=Q.prototype.nx;Q.prototype.makeImage=Q.prototype.Dz;Q.prototype.cacheGroupExternalLinks=Q.prototype.lu;Q.prototype.addRenderer=Q.prototype.my;Q.prototype.makeSVG=Q.prototype.Nu;Q.prototype.makeSvg=Q.prototype.bs;Q.prototype.stopAutoScroll=Q.prototype.kg; +set:function(a){var b=this.mk;b.C(a)||(this.mk=a=a.J(),this.g("contentAlignment",b,a),Ti(this,!1))}},initialContentAlignment:{get:function(){return this.Rp},set:function(a){var b=this.Rp;b.C(a)||(this.Rp=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.Va(),this.g("padding",b,a))}},partManager:{ +get:function(){return this.Ic},set:function(a){var b=this.Ic;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Le(null),this.Ic=a,a.Le(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{ +get:function(){return this.Kc},set:function(a){var b=this.Kc;b!==a&&(this.Kc=a,a.diagram=this,a.group=null,this.mh=!0,this.g("layout",b,a),this.Mb())}},isTreePathToChildren:{get:function(){return this.kt},set:function(a){var b=this.kt;if(b!==a&&(this.kt=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ck(a.value)}},treeCollapsePolicy:{get:function(){return this.$t},set:function(a){var b= +this.$t;b!==a&&(a!==vi&&a!==Dk&&a!==Ek&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.$t=a,this.g("treeCollapsePolicy",b,a))}},Ie:{get:function(){return this.Vv},set:function(a){this.Vv=a}},avoidanceCellSize:{get:function(){return this.Fv},set:function(a){this.Qh=null;this.Fv=new K(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.Gv},set:function(a){this.Gv=Math.max(1, +a)}},autoScrollInterval:{get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(this.Yo=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.$o},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.$o;b.C(a)||(this.$o=a=a.J(),this.Va(),this.g("autoScrollRegion",b,a))}}}); +ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Fk.fc()},set:function(a){Fk.add(a.replace(/\s/g,""))}},version:{get:function(){return Gk}}});Q.prototype.makeImageData=Q.prototype.ox;Q.prototype.makeImage=Q.prototype.Dz;Q.prototype.cacheGroupExternalLinks=Q.prototype.lu;Q.prototype.addRenderer=Q.prototype.ny;Q.prototype.makeSVG=Q.prototype.Nu;Q.prototype.makeSvg=Q.prototype.bs;Q.prototype.stopAutoScroll=Q.prototype.lg; Q.prototype.doAutoScroll=Q.prototype.Fr;Q.prototype.isUnoccupied=Q.prototype.Pj;Q.prototype.raiseDiagramEvent=Q.prototype.P;Q.prototype.removeDiagramListener=Q.prototype.Il;Q.prototype.addDiagramListener=Q.prototype.wj;Q.prototype.findTreeRoots=Q.prototype.fz;Q.prototype.layoutDiagram=Q.prototype.Bz;Q.prototype.findTopLevelGroups=Q.prototype.Zy;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.$y;Q.prototype.ensureBounds=Q.prototype.Za;Q.prototype.findLinksByExample=Q.prototype.Ir; -Q.prototype.findNodesByExample=Q.prototype.Jr;Q.prototype.findLinkForData=Q.prototype.Cc;Q.prototype.findNodeForData=Q.prototype.ci;Q.prototype.findPartForData=Q.prototype.Dc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Lb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Od;Q.prototype.transformViewToDoc=Q.prototype.rs;Q.prototype.transformRectDocToView=Q.prototype.gA;Q.prototype.transformDocToView=Q.prototype.Ro; -Q.prototype.centerRect=Q.prototype.Dr;Q.prototype.scrollToRect=Q.prototype.bv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.rz;Q.prototype.highlight=Q.prototype.qz;Q.prototype.selectCollection=Q.prototype.Yz;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Uo;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Af; -Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prototype.Da;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.bb;Q.prototype.removeChangedListener=Q.prototype.ak;Q.prototype.addChangedListener=Q.prototype.Ug;Q.prototype.removeModelChangedListener=Q.prototype.Tz;Q.prototype.addModelChangedListener=Q.prototype.Cw;Q.prototype.findLayer=Q.prototype.Ij;Q.prototype.removeLayer=Q.prototype.Rz;Q.prototype.addLayerAfter=Q.prototype.iy; -Q.prototype.addLayerBefore=Q.prototype.Aw;Q.prototype.addLayer=Q.prototype.pl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Ej;Q.prototype.removeParts=Q.prototype.hs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.mu;Q.prototype.setProperties=Q.prototype.Vl;Q.prototype.attach=Q.prototype.ku;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.yx;Q.prototype.setInputOption=Q.prototype.Zz; -Q.prototype.getInputOption=Q.prototype.yl;Q.prototype.resetRenderingHints=Q.prototype.zx;Q.prototype.setRenderingHint=Q.prototype.Ex;Q.prototype.getRenderingHint=Q.prototype.Fe;Q.prototype.maybeUpdate=Q.prototype.nd;Q.prototype.requestUpdate=Q.prototype.Mb;Q.prototype.delayInitialization=Q.prototype.Ey;Q.prototype.isUpdateRequested=Q.prototype.xz;Q.prototype.invalidateDocumentBounds=Q.prototype.Va;Q.prototype.findObjectsNear=Q.prototype.gg;Q.prototype.findPartsNear=Q.prototype.Vy; -Q.prototype.findObjectsIn=Q.prototype.sf;Q.prototype.findPartsIn=Q.prototype.Vw;Q.prototype.findObjectsAt=Q.prototype.di;Q.prototype.findPartsAt=Q.prototype.Uy;Q.prototype.findObjectAt=Q.prototype.ec;Q.prototype.findPartAt=Q.prototype.wl;Q.prototype.focusObject=Q.prototype.gz;Q.prototype.alignDocument=Q.prototype.oy;Q.prototype.zoomToRect=Q.prototype.kA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Mw;Q.prototype.focus=Q.prototype.focus; +Q.prototype.findNodesByExample=Q.prototype.Jr;Q.prototype.findLinkForData=Q.prototype.Dc;Q.prototype.findNodeForData=Q.prototype.ci;Q.prototype.findPartForData=Q.prototype.Ec;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Lb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Od;Q.prototype.transformViewToDoc=Q.prototype.rs;Q.prototype.transformRectDocToView=Q.prototype.gA;Q.prototype.transformDocToView=Q.prototype.Ro; +Q.prototype.centerRect=Q.prototype.Dr;Q.prototype.scrollToRect=Q.prototype.bv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.rz;Q.prototype.highlight=Q.prototype.qz;Q.prototype.selectCollection=Q.prototype.Yz;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Uo;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Bf; +Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prototype.Da;Q.prototype.raiseChanged=Q.prototype.g;Q.prototype.raiseChangedEvent=Q.prototype.bb;Q.prototype.removeChangedListener=Q.prototype.ak;Q.prototype.addChangedListener=Q.prototype.Ug;Q.prototype.removeModelChangedListener=Q.prototype.Tz;Q.prototype.addModelChangedListener=Q.prototype.Cw;Q.prototype.findLayer=Q.prototype.Ij;Q.prototype.removeLayer=Q.prototype.Rz;Q.prototype.addLayerAfter=Q.prototype.jy; +Q.prototype.addLayerBefore=Q.prototype.Aw;Q.prototype.addLayer=Q.prototype.pl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Ej;Q.prototype.removeParts=Q.prototype.hs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.mu;Q.prototype.setProperties=Q.prototype.Vl;Q.prototype.attach=Q.prototype.ku;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.zx;Q.prototype.setInputOption=Q.prototype.Zz; +Q.prototype.getInputOption=Q.prototype.yl;Q.prototype.resetRenderingHints=Q.prototype.Ax;Q.prototype.setRenderingHint=Q.prototype.Fx;Q.prototype.getRenderingHint=Q.prototype.Ge;Q.prototype.maybeUpdate=Q.prototype.nd;Q.prototype.requestUpdate=Q.prototype.Mb;Q.prototype.delayInitialization=Q.prototype.Ey;Q.prototype.isUpdateRequested=Q.prototype.xz;Q.prototype.invalidateDocumentBounds=Q.prototype.Va;Q.prototype.findObjectsNear=Q.prototype.hg;Q.prototype.findPartsNear=Q.prototype.Vy; +Q.prototype.findObjectsIn=Q.prototype.tf;Q.prototype.findPartsIn=Q.prototype.Ww;Q.prototype.findObjectsAt=Q.prototype.di;Q.prototype.findPartsAt=Q.prototype.Uy;Q.prototype.findObjectAt=Q.prototype.ec;Q.prototype.findPartAt=Q.prototype.wl;Q.prototype.focusObject=Q.prototype.gz;Q.prototype.alignDocument=Q.prototype.py;Q.prototype.zoomToRect=Q.prototype.kA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Nw;Q.prototype.focus=Q.prototype.focus; var li=new pb,Di=null,Og=void 0!==x.document,yi=null,zi="",rh=new D(Q,"None",0),Yi=new D(Q,"Uniform",1),Zi=new D(Q,"UniformToFill",2),Ef=new D(Q,"CycleAll",10),If=new D(Q,"CycleNotDirected",11),Kf=new D(Q,"CycleNotDirectedFast",12),Lf=new D(Q,"CycleNotUndirected",13),Ff=new D(Q,"CycleDestinationTree",14),Hf=new D(Q,"CycleSourceTree",15),Rh=new D(Q,"DocumentScroll",1),Th=new D(Q,"InfiniteScroll",2),vi=new D(Q,"TreeParentCollapsed",21),Dk=new D(Q,"AllParentsCollapsed",22),Ek=new D(Q,"AnyParentsCollapsed", -23),Fk=new E,Gk="2.2.14",Ak="image",Hk=null,ji=!1; +23),Fk=new E,Gk="2.2.15",Ak="image",Hk=null,ji=!1; function ki(){if(Og){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d6038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",md.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",J.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])md.prototype.Ld=md.prototype.Fw; Hk=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){Og=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Og};Q.None=rh;Q.Uniform=Yi; -Q.UniformToFill=Zi;Q.CycleAll=Ef;Q.CycleNotDirected=If;Q.CycleNotDirectedFast=Kf;Q.CycleNotUndirected=Lf;Q.CycleDestinationTree=Ff;Q.CycleSourceTree=Hf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=vi;Q.AllParentsCollapsed=Dk;Q.AnyParentsCollapsed=Ek;function ri(){this.ay=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.pd=this.j=!0:this.pd=null} -function sj(a,b){b.Zb.setTransform(b.kc,0,0,b.kc,0,0);b.Zb.Oc();if(null===a.pd)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")];a.pd=!0;if(Og){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Fk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); +Q.UniformToFill=Zi;Q.CycleAll=Ef;Q.CycleNotDirected=If;Q.CycleNotDirectedFast=Kf;Q.CycleNotUndirected=Lf;Q.CycleDestinationTree=Ff;Q.CycleSourceTree=Hf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=vi;Q.AllParentsCollapsed=Dk;Q.AnyParentsCollapsed=Ek;function ri(){this.by=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.pd=this.j=!0:this.pd=null} +function sj(a,b){b.Zb.setTransform(b.kc,0,0,b.kc,0,0);b.Zb.Pc();if(null===a.pd)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")];a.pd=!0;if(Og){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Fk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); f=Ma(d[2]);if(-1g&&f!==Ma("7da71ca0ad381e90")&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=c[Ma("73a612b6fb191d")](Ma("7baa19a6f76c1988428554")));a.pd=!(0<=g&&gk.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0,1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Ma("79a417a0f0181a8946")]=d;if(x.document[Ma("78a712aa")]){x.document[Ma("78a712aa")][Ma("7bb806b6ed32388c4a875b")](g); k=x.getComputedStyle(g).getPropertyValue(Ma("78a704b7e62456904c9b12701b6532a8"));var l=x.getComputedStyle(g).getPropertyValue(Ma("75b817b0ea2202"));x.document[Ma("78a712aa")][Ma("68ad1bbcf533388c4a875b")](g);if(k)if(g=x[Ma("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.pd=!1;break}else if(g&&g(Ma("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& +"none",e.style.touchAction="none");a.Ha=e;a.Zb=e.context;d=a.Zb;a.kc=a.computePixelRatio();a.viewSize.v()||(a.Ba=a.La.clientWidth||1,a.Aa=a.La.clientHeight||1);zj(a,a.Ba,a.Aa);a.La.insertBefore(e.Sa,a.La.firstChild);e=new Bk(null);e.width=1;e.height=1;a.Ov=e;a.Ux=e.context;if(Og){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ba+"px";e.style.height=a.Aa+"px";e.style.zIndex="1";f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.La.appendChild(e); +e.appendChild(f);e.onscroll=Gi;e.addEventListener("pointerdown",Qi);e.H=a;e.$x=!0;e.ay=!0;a.Qt=e;a.Nt=f}a.Jo=sa(function(){a.Rh=null;a.N()},300);a.sv=sa(function(){sh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Sj=function(b){if(a.isEnabled){var c=cj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&& (d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0c||Math.abs(e.y-b.screenY)>c)?a.Yp++:a.Yp=1;d.clickCount=a.Yp;a.Zv=b.timeStamp;a.$v.jg(b.screenX,b.screenY); +b;else if(null!==c[1]&&c[1].pointerId===b.pointerId)c[1]=b,d=!0;else if(null===c[0])c[0]=b;else if(null===c[1])c[1]=b,d=!0;else{b.preventDefault();return}if(c="touch"===b.pointerType||"pen"===b.pointerType)a.Wt=!1,a.jt=!0;var e=d;d=fj(a,b,!0,!1,!0,e);dj(a,b,d);d.targetDiagram=ej(b,b.target);d.targetObject=null;e||d.clone(a.Fp);e=a.$v;c=c?25:10;b.timeStamp-a.Zvc||Math.abs(e.y-b.screenY)>c)?a.Yp++:a.Yp=1;d.clickCount=a.Yp;a.Zv=b.timeStamp;a.$v.kg(b.screenX,b.screenY); a.doMouseDown();1===b.button?b.preventDefault():gj(d,b)}};a.Xj=function(b){if(a.isEnabled){a.Kk=!0;var c=a.$k;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}if(c[0].pointerId===b.pointerId){c=fj(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX,b.clientY);null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b; d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;dj(a,f,c);c.targetObject=null;a.doMouseMove();gj(c,b)}}};a.Zj=function(b){if(a.isEnabled){a.Kk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Dt;if(c&&a.Wt)delete d[b.pointerId],b.preventDefault();else if(d=a.$k,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]=null;d=fj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY)); null!==e&&e.H instanceof Q&&e.H!==a&&dj(e.H,b,d);null===e&&(e=b.target);dj(a,b,d);d.clickCount=a.Yp;d.targetDiagram=ej(b,e);d.targetObject=null;a.doMouseUp();gj(d,b);c&&(a.jt=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Yj=function(b){if(a.isEnabled){a.Kk=!1;var c=a.Dt;c[b.pointerId]&&delete c[b.pointerId];c=a.$k;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.currentTool, -b.cancelWaitAfter(),b.standardMouseOver())}};a.Qs=d.Z["d"+Ik[1]+Ik[2]+"wI"+Ak.slice(1,5)]["b"+Jk.slice(1,b)](d.Z,Hk,b,b);d.Nc(!0);Ei(a)}}ri.className="DiagramHelper";function Te(a){this.j=void 0===a?new I:a;this.o=new I}ma.Object.defineProperties(Te.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Ik="DraggingInfo";Te.className="DraggingInfo"; +b.cancelWaitAfter(),b.standardMouseOver())}};a.Qs=d.Z["d"+Ik[1]+Ik[2]+"wI"+Ak.slice(1,5)]["b"+Jk.slice(1,b)](d.Z,Hk,b,b);d.Oc(!0);Ei(a)}}ri.className="DiagramHelper";function Te(a){this.j=void 0===a?new I:a;this.m=new I}ma.Object.defineProperties(Te.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.m},set:function(a){this.m=a}}});var Ik="DraggingInfo";Te.className="DraggingInfo"; function Kj(a,b,c){this.node=a;this.info=b;this.Eu=c}Kj.className="DraggingNodeInfoPair";function Ce(){this.reset()}Ce.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new K(NaN,NaN)).freeze();this.gridSnapCellSpot=tc;this.gridSnapOrigin=(new I(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Ce.className="DraggingOptions"; function Kk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;Lk(c);b&&c.Vl(b);return c}la(Kk,Q);function Lk(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=uc;a.layout=new Mk}Kk.prototype.reset=function(){Q.prototype.reset.call(this);Lk(this)};Kk.className="Palette"; -function Nk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.Y=null;c.Tm=!1;c.Um=!1;c.F=!0;c.u=!0;c.ga=0;c.o=!1;c.fl=null;c.Ex("drawShadows",!1);a=new U;var e=new Cf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= -"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new ic(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Ok,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new I(c.x-b.width/2,c.y-b.height/2)}};c.Ff=function(){d.Va();Pk(d)};c.Qd=function(){null!==d.observed&&(d.Va(),d.N())};c.Ga=function(){1>d.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Ef=function(){null!==d.observed&&Pk(d)};c.autoScale=Yi;c.wb=!1;b&&Object.assign(c,b);return c}la(Nk,Q);Nk.prototype.computePixelRatio=function(){return 1}; -Nk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Ha,b=this.Zb;if(null!==a&&null!==b){qj(this);if(null===this.fl){var c=new Bk(null);c.width=a.width;c.height=a.height;this.fl=c}try{this.Ha=this.fl,this.Zb=this.Ha.context,this.Zb.Nc(!0),this.Zb.setTransform(1,0,0,1,0,0),this.Zb.clearRect(0,0,this.Ha.width,this.Ha.height),Qk(this)}finally{this.Ha=a,this.Zb=b}}}Q.prototype.redraw.call(this)}; -Nk.prototype.tc=function(){null===this.La&&C("No div specified");null===this.Ha&&C("No canvas specified");if(!(this.Ha instanceof xj)&&(ei(this.box),this.bd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.ji){qj(this);var b=this.Ha;a=this.Zb;a.Nc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Qk(this):null!==this.fl&&(a.drawImage(this.fl.Sa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +function Nk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.W=null;c.Tm=!1;c.Um=!1;c.F=!0;c.u=!0;c.ga=0;c.m=!1;c.fl=null;c.Fx("drawShadows",!1);a=new U;var e=new Cf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new ec(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Ok,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new I(c.x-b.width/2,c.y-b.height/2)}};c.Gf=function(){d.Va();Pk(d)};c.Qd=function(){null!==d.observed&&(d.Va(),d.N())};c.Ga=function(){1>d.updateDelay?d.N():d.m||(d.m=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Ff=function(){null!==d.observed&&Pk(d)};c.autoScale=Yi;c.wb=!1;b&&Object.assign(c,b);return c}la(Nk,Q);Nk.prototype.computePixelRatio=function(){return 1}; +Nk.prototype.redraw=function(){if(this.m&&1<=this.updateDelay){this.m=!1;var a=this.Ha,b=this.Zb;if(null!==a&&null!==b){qj(this);if(null===this.fl){var c=new Bk(null);c.width=a.width;c.height=a.height;this.fl=c}try{this.Ha=this.fl,this.Zb=this.Ha.context,this.Zb.Oc(!0),this.Zb.setTransform(1,0,0,1,0,0),this.Zb.clearRect(0,0,this.Ha.width,this.Ha.height),Qk(this)}finally{this.Ha=a,this.Zb=b}}}Q.prototype.redraw.call(this)}; +Nk.prototype.tc=function(){null===this.La&&C("No div specified");null===this.Ha&&C("No canvas specified");if(!(this.Ha instanceof xj)&&(ei(this.box),this.bd)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.ji){qj(this);var b=this.Ha;a=this.Zb;a.Oc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Qk(this):null!==this.fl&&(a.drawImage(this.fl.Sa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.kc,this.kc),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ua.s;for(var c=b.length,d=0;da&&(a=0);this.ga!==a&&(this.ga=a)}}});Nk.className="Overview";function Ok(){Be.call(this);this.j=null}la(Ok,Be); Ok.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))};Rk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==rh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; Rk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===rh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Rk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==rh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Rk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; Rk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Rk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.vc();a.redraw();var c=a.position,d=a.scale;lh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.fu&&!isNaN(this.mt)&&a.documentBounds.C(this.du)?(a.scale=this.mt,a.position=this.Yv,this.fu=NaN,this.du=cc):(this.mt=d,this.Yv=c.copy(),a.zoomToFit(),this.fu=a.scale,this.du=a.documentBounds.copy());nh(b)};Rk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Rk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Za();if(null===a){try{null!==this.Uf&&(this.Uf.next()?a=this.Uf.value:this.Uf=null)}catch(k){this.Uf=null}null===a&&(0a&&(a+=360));return a}; -t.tf=function(){if(0!==(this.m&4096)===!1)return this.yk;var a=this.xa;return null!==this.panel?a*this.panel.tf():a};t.Nr=function(a,b){void 0===b&&(b=new I);b.assign(a);this.fe.Ld(b);return b};t.Or=function(a,b,c){return this.Kj(a.x,a.y,b.x,b.y,c)}; -t.Kj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,J.vf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=J.vf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +M.free(c);!h&&(J.Rr(a,d,e)||J.Rr(a,e,f)||J.Rr(a,f,g)||J.Rr(a,g,d))&&(h=!0)}I.free(d);I.free(e);I.free(f);I.free(g);return h};t.ia=function(a,b){void 0===b&&(b=new I);if(a instanceof N){var c=this.naturalBounds;b.h(a.x*c.width+a.offsetX,a.y*c.height+a.offsetY)}else b.set(a);this.ge.Fa(b);return b}; +t.gi=function(a){void 0===a&&(a=new M);var b=this.naturalBounds,c=this.ge,d=I.allocAt(0,0).transform(c);a.h(d.x,d.y,0,0);d.h(b.width,0).transform(c);Zb(a,d.x,d.y,0,0);d.h(b.width,b.height).transform(c);Zb(a,d.x,d.y,0,0);d.h(0,b.height).transform(c);Zb(a,d.x,d.y,0,0);I.free(d);return a};t.fi=function(){var a=this.ge;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a}; +t.uf=function(){if(0!==(this.o&4096)===!1)return this.yk;var a=this.xa;return null!==this.panel?a*this.panel.uf():a};t.Nr=function(a,b){void 0===b&&(b=new I);b.assign(a);this.ge.Ld(b);return b};t.Or=function(a,b,c){return this.Kj(a.x,a.y,b.x,b.y,c)}; +t.Kj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,J.wf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=J.wf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; Y.prototype.measure=function(a,b,c,d){if(!1!==nj(this)){var e=this.Ag,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=0;this instanceof Cf&&(g=this.strokeWidth);90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(il(this,!0)){case lg:g=e=0;h&&(b=a=Infinity); break;case td:isFinite(a)&&a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Vk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case Wk:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.yb>a.width)))c=!0;this.m=c?this.m|256:this.m&-257;this.Eb.v()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Eb.toString());this.Fl(f,this.Eb);jl(this,!1);M.free(f)};t=Y.prototype;t.Vg=function(){}; +this.kq>a.height||this.yb>a.width)))c=!0;this.o=c?this.o|256:this.o&-257;this.Eb.v()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Eb.toString());this.Fl(f,this.Eb);jl(this,!1);M.free(f)};t=Y.prototype;t.Vg=function(){}; function kl(a,b,c,d,e){a.Eb.h(b,c,d,e);if(!a.desiredSize.v()){var f=a.qc;c=a.Ag;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=il(a,!0);c===d&&f===e&&(b=lg);switch(b){case lg:if(c>d||f>e)ij(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:ij(a,!0);a.measure(d,e,0,0);break;case Vk:ij(a,!0);a.measure(d,f,0,0);break;case Wk:ij(a,!0),a.measure(c,e,0,0)}}} -t.Fl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ll(c,!0),this.N(),Vb(a,b)||(c.dh(),this.wn(c)))};t.wn=function(a){null!==this.portId&&(ll(a,!0),a instanceof V&&ml(a,this))}; -t.tc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn),e=this.Eb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Eb;d=this.bc;var g=this.areaBackground,h=this.Yb;null===g&&null===h||a.Oc();null!==g&&(gi(this,a,g,!0,!0,d,e),g instanceof nl&&g.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(g)):a.fillRect(e.x,e.y,e.width,e.height)); -null!==h&&(gi(this,a,h,!0,!1,d,e),h instanceof nl&&h.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(h)):a.fillRect(e.x,e.y,e.width,e.height));this.ai(a,b)}else if(!this.Pw(a,b)){this instanceof T&&this.Rj(!1);d=this.transform;g=this.panel;0!==(this.m&4096)===!0&&pl(this);var k=this.part;h=!1;var l=0;if(k&&b.Fe("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.kc}m=this.li();var n;if(!(n=b.Vi||!m)){var p=this.naturalBounds;n=this.lh;var r=n.m11,q= +t.Fl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ll(c,!0),this.N(),Tb(a,b)||(c.dh(),this.wn(c)))};t.wn=function(a){null!==this.portId&&(ll(a,!0),a instanceof V&&ml(a,this))}; +t.tc=function(a,b){if(this.visible){var c=this.opacity;if(0!==c){var d=this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn),e=this.Eb;if(d||0!==e.width&&0!==e.height&&!isNaN(e.x)&&!isNaN(e.y)){var f=1;1!==c&&(f=a.globalAlpha,a.globalAlpha=f*c);if(d){e=this.Eb;d=this.bc;var g=this.areaBackground,h=this.Yb;null===g&&null===h||a.Pc();null!==g&&(gi(this,a,g,!0,!0,d,e),g instanceof nl&&g.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(g)):a.fillRect(e.x,e.y,e.width,e.height)); +null!==h&&(gi(this,a,h,!0,!1,d,e),h instanceof nl&&h.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(h)):a.fillRect(e.x,e.y,e.width,e.height));this.ai(a,b)}else if(!this.Qw(a,b)){this instanceof T&&this.Rj(!1);d=this.transform;g=this.panel;0!==(this.o&4096)===!0&&pl(this);var k=this.part;h=!1;var l=0;if(k&&b.Ge("drawShadows")&&(h=k.isShadowed)){var m=k.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.kc}m=this.li();var n;if(!(n=b.Vi||!m)){var p=this.naturalBounds;n=this.lh;var r=n.m11,q= n.m21,u=n.dx,w=n.m12,v=n.m22,z=n.dy,y,A=y=0;n=y*r+A*q+u;var B=y*w+A*v+z;y=p.width+l;A=0;var F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);var L=Math.min(B,y);var S=Math.max(n+0,F)-A;var R=Math.max(B+0,y)-L;n=A;B=L;y=p.width+l;A=p.height+l;F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);L=Math.min(B,y);S=Math.max(n+S,F)-A;R=Math.max(B+R,y)-L;n=A;B=L;y=0;A=p.height+l;F=y*r+A*q+u;y=y*w+A*v+z;A=Math.min(n,F);L=Math.min(B,y);S=Math.max(n+S,F)-A;R=Math.max(B+R,y)-L;n=A;B=L;l=b.viewportBounds;p=l.x;r=l.y;n=!(n>l.width+ -p||p>S+n||B>l.height+r||r>R+B)}if(n){n=0!==(this.m&256);a.clipInsteadOfFill&&(n=!1);this instanceof Qg&&(a.font=this.font);if(n){B=g.je()?g.naturalBounds:g.actualBounds;null!==this.ib?(p=this.ib,S=p.x,R=p.y,l=p.width,p=p.height):(S=Math.max(e.x,B.x),R=Math.max(e.y,B.y),l=Math.min(e.right,B.right)-S,p=Math.min(e.bottom,B.bottom)-R);if(S>e.width+e.x||e.x>B.width+B.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(S,R,l,p);a.clip()}if(m){if(!k.isVisible()){1!==c&&(a.globalAlpha=f);return}h&& -(B=k.shadowOffset,a.iv(B.x*b.scale*b.kc,B.y*b.scale*b.kc,k.shadowBlur),ql(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?ql(a):h&&!1===this.shadowVisible&&rl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Oc(),gi(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof nl&&this.areaBackground.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.rf(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);h&&(null!== -g&&0!==(g.m&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)&&null===this.shadowVisible&&rl(a);null!==this.Yb&&(a.Oc(),sl(this,a,k,e));h&&(null!==this.Yb||null!==this.areaBackground||null!==g&&0!==(g.m&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)?(tl(this,!0),null===this.shadowVisible&&rl(a)):tl(this,!1);this.ai(a,b);h&&0!==(this.m&512)===!0&&ql(a);m&&h&&rl(a);n&&(a.restore(),a.Nc(this instanceof W));d.Ur()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22* -b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function sl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.Sv();a instanceof Cf&&(e=a.sa.bounds,f=e.x,g=e.y,h=e.width,e=e.height);gi(a,b,a.Yb,!0,!1,c,d);a.Yb instanceof nl&&a.Yb.type===ol?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.rf(a.Yb)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.Pw=function(){return!1};t.ai=function(){}; -function gi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===ul)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Cf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof vl)&&c.ne&&(c.type===wl||c.lk===h&&c.Hs===k))var m=c.ne;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ -c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===xl)m=b.createLinearGradient(n,p,r,q);else if(c.type===ol)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===wl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}if(c.type!==wl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ne=m,null!==m&&(c.lk=h,c.Hs=k),null=== -m&&c.type===wl&&-1!==c.lk)){c.lk=-1;var v=a.diagram;null!==v&&-1===c.lk&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.ig=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.yf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.yf():!0};t.xf=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function pl(a){if(0!==(a.m&2048)===!0){var b=a.Bb;b.reset();if(!a.Eb.v()||!a.qc.v()){yl(a,!1);return}b.translate(a.Eb.x-a.qc.x,a.Eb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.Qn(b,c.x,c.y,c.width,c.height)}yl(a,!1);zl(a,!0)}0!==(a.m&4096)===!0&&(b=a.panel,null===b?(a.lh.set(a.Bb),a.yk=a.scale,zl(a,!1)):null!==b.fe&&(c=a.lh,c.reset(),b.je()?c.multiply(b.lh):null!==b.panel&&c.multiply(b.panel.lh),c.multiply(a.Bb),a.yk=a.scale*b.yk,zl(a,!1)))} -t.Qn=function(a,b,c,d,e){1!==this.xa&&a.scale(this.xa);if(0!==this.Gb){var f=I.alloc();f.pi(b,c,d,e,yc);a.rotate(this.Gb,f.x,f.y);I.free(f)}};t.w=function(a){if(!nj(this)){void 0===a&&(a=!1);ij(this,!0);jl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Mj=function(){nj(this)||(ij(this,!0),jl(this,!0))};function Al(a){if(!oj(a)){var b=a.panel;null!==b?b.w():a.li()&&(b=a.diagram,null!==b&&(b.se.add(a),a instanceof V&&a.vd(),b.Mb()));jl(a,!0)}} -t.Jk=function(){0!==(this.m&2048)===!1&&(yl(this,!0),zl(this,!0))};t.Iu=function(){zl(this,!0)};t.N=function(){var a=this.part;null!==a&&a.N()}; +p||p>S+n||B>l.height+r||r>R+B)}if(n){n=0!==(this.o&256);a.clipInsteadOfFill&&(n=!1);this instanceof Qg&&(a.font=this.font);if(n){B=g.ke()?g.naturalBounds:g.actualBounds;null!==this.ib?(p=this.ib,S=p.x,R=p.y,l=p.width,p=p.height):(S=Math.max(e.x,B.x),R=Math.max(e.y,B.y),l=Math.min(e.right,B.right)-S,p=Math.min(e.bottom,B.bottom)-R);if(S>e.width+e.x||e.x>B.width+B.x){1!==c&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(S,R,l,p);a.clip()}if(m){if(!k.isVisible()){1!==c&&(a.globalAlpha=f);return}h&& +(B=k.shadowOffset,a.iv(B.x*b.scale*b.kc,B.y*b.scale*b.kc,k.shadowBlur),ql(a),a.shadowColor=k.shadowColor)}h&&!0===this.shadowVisible?ql(a):h&&!1===this.shadowVisible&&rl(a);k=this.naturalBounds;null!==this.areaBackground&&(a.Pc(),gi(this,a,this.areaBackground,!0,!0,k,e),this.areaBackground instanceof nl&&this.areaBackground.type===ol?(a.beginPath(),a.rect(e.x,e.y,e.width,e.height),a.sf(this.areaBackground)):a.fillRect(e.x,e.y,e.width,e.height));a.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);h&&(null!== +g&&0!==(g.o&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)&&null===this.shadowVisible&&rl(a);null!==this.Yb&&(a.Pc(),sl(this,a,k,e));h&&(null!==this.Yb||null!==this.areaBackground||null!==g&&0!==(g.o&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.vb()!==this)?(tl(this,!0),null===this.shadowVisible&&rl(a)):tl(this,!1);this.ai(a,b);h&&0!==(this.o&512)===!0&&ql(a);m&&h&&rl(a);n&&(a.restore(),a.Oc(this instanceof W));d.Ur()||(b=1/(d.m11*d.m22-d.m12*d.m21),a.transform(d.m22* +b,-d.m12*b,-d.m21*b,d.m11*b,b*(d.m21*d.dy-d.m22*d.dx),b*(d.m12*d.dx-d.m11*d.dy)))}}1!==c&&(a.globalAlpha=f)}}}};function sl(a,b,c,d){var e=a.naturalBounds,f=0,g=0,h=e.width;e=e.height;var k=a.Sv();a instanceof Cf&&(e=a.sa.bounds,f=e.x,g=e.y,h=e.width,e=e.height);gi(a,b,a.Yb,!0,!1,c,d);a.Yb instanceof nl&&a.Yb.type===ol?(b.beginPath(),b.rect(f-k/2,g-k/2,h+k,e+k),b.sf(a.Yb)):b.fillRect(f-k/2,g-k/2,h+k,e+k)}t.Qw=function(){return!1};t.ai=function(){}; +function gi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===ul)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Cf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof vl)&&c.oe&&(c.type===wl||c.lk===h&&c.Hs===k))var m=c.oe;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===xl)m=b.createLinearGradient(n,p,r,q);else if(c.type===ol)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===wl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}if(c.type!==wl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.oe=m,null!==m&&(c.lk=h,c.Hs=k),null=== +m&&c.type===wl&&-1!==c.lk)){c.lk=-1;var v=a.diagram;null!==v&&-1===c.lk&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.jg=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.zf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.zf():!0};t.yf=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; +function pl(a){if(0!==(a.o&2048)===!0){var b=a.Bb;b.reset();if(!a.Eb.v()||!a.qc.v()){yl(a,!1);return}b.translate(a.Eb.x-a.qc.x,a.Eb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;a.Qn(b,c.x,c.y,c.width,c.height)}yl(a,!1);zl(a,!0)}0!==(a.o&4096)===!0&&(b=a.panel,null===b?(a.lh.set(a.Bb),a.yk=a.scale,zl(a,!1)):null!==b.ge&&(c=a.lh,c.reset(),b.ke()?c.multiply(b.lh):null!==b.panel&&c.multiply(b.panel.lh),c.multiply(a.Bb),a.yk=a.scale*b.yk,zl(a,!1)))} +t.Qn=function(a,b,c,d,e){1!==this.xa&&a.scale(this.xa);if(0!==this.Gb){var f=I.alloc();f.pi(b,c,d,e,yc);a.rotate(this.Gb,f.x,f.y);I.free(f)}};t.w=function(a){if(!nj(this)){void 0===a&&(a=!1);ij(this,!0);jl(this,!0);var b=this.panel;null===b||a||b.w()}};t.Mj=function(){nj(this)||(ij(this,!0),jl(this,!0))};function Al(a){if(!oj(a)){var b=a.panel;null!==b?b.w():a.li()&&(b=a.diagram,null!==b&&(b.te.add(a),a instanceof V&&a.vd(),b.Mb()));jl(a,!0)}} +t.Jk=function(){0!==(this.o&2048)===!1&&(yl(this,!0),zl(this,!0))};t.Iu=function(){zl(this,!0)};t.N=function(){var a=this.part;null!==a&&a.N()}; function il(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===W.Table)return Bl(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===W.Auto&&d.vb()===a)return Cl(a,td,b);if(c===Xk){if(null!==d){if(d.type===W.Spot&&d.vb()===a)return Cl(a,td,b);c=d.defaultStretch;return c===Xk?Cl(a,lg,b):Cl(a,c,b)}return Cl(a,lg,b)}return Cl(a,c,b)} function Bl(a,b,c,d){var e=a.stretch;if(e!==Xk)return Cl(a,e,d);var f=e=null;switch(b.stretch){case Wk:f=!0;break;case td:f=!0}switch(c.stretch){case Vk:e=!0;break;case td:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===Vk||b===td);null===f&&(f=b===Wk||b===td);return!0===e&&!0===f?Cl(a,td,d):!0===e?Cl(a,Vk,d):!0===f?Cl(a,Wk,d):Cl(a,lg,d)} -function Cl(a,b,c){if(c)return b;if(b===lg)return lg;c=a.desiredSize;if(c.v())return lg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===Vk)return lg;if(b===td)return Wk}else{if(b===Wk)return lg;if(b===td)return Vk}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===Wk)return lg;if(b===td)return Vk}else{if(b===Vk)return lg;if(b===td)return Wk}return b}function tl(a,b){a.m=b?a.m|512:a.m&-513}function el(a){return 0!==(a.m&1024)}function Dl(a,b){a.m=b?a.m|1024:a.m&-1025} -function yl(a,b){a.m=b?a.m|2048:a.m&-2049}function zl(a,b){a.m=b?a.m|4096:a.m&-4097}function nj(a){return 0!==(a.m&8192)}function ij(a,b){a.m=b?a.m|8192:a.m&-8193}function oj(a){return 0!==(a.m&16384)}function jl(a,b){a.m=b?a.m|16384:a.m&-16385}t.ni=function(a){this.Tf=a};t.ns=function(){};t.fv=function(a){this.pa=a;Al(this);return!0};t.Ul=function(a,b){if(this.pa.x!==a||this.pa.y!==b)this.pa.h(a,b),this.Jk()};t.Sv=function(){return 0}; +function Cl(a,b,c){if(c)return b;if(b===lg)return lg;c=a.desiredSize;if(c.v())return lg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===Vk)return lg;if(b===td)return Wk}else{if(b===Wk)return lg;if(b===td)return Vk}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===Wk)return lg;if(b===td)return Vk}else{if(b===Vk)return lg;if(b===td)return Wk}return b}function tl(a,b){a.o=b?a.o|512:a.o&-513}function el(a){return 0!==(a.o&1024)}function Dl(a,b){a.o=b?a.o|1024:a.o&-1025} +function yl(a,b){a.o=b?a.o|2048:a.o&-2049}function zl(a,b){a.o=b?a.o|4096:a.o&-4097}function nj(a){return 0!==(a.o&8192)}function ij(a,b){a.o=b?a.o|8192:a.o&-8193}function oj(a){return 0!==(a.o&16384)}function jl(a,b){a.o=b?a.o|16384:a.o&-16385}t.ni=function(a){this.Uf=a};t.ns=function(){};t.fv=function(a){this.pa=a;Al(this);return!0};t.Ul=function(a,b){if(this.pa.x!==a||this.pa.y!==b)this.pa.h(a,b),this.Jk()};t.Sv=function(){return 0}; function El(a){var b=a.part;if(b instanceof V&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||ml(b,a)}}function Fl(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof W?a instanceof V?a.vd():a.$l(a,function(a){El(a)}):El(a))} t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new wi(a,b,c,d):e=a;e.sd=this;a=this.Yg();null!==a&&Gl(a)&&C("Cannot add a Binding to a template that has already been copied: "+e);null===this.localBindings&&(this.localBindings=new E);this.localBindings.add(e);return this};t.set=function(a){Object.assign(this,a);return this};t.ku=function(a){Hl(this,a);return this};t.apply=function(a){a(this);return this};t.Vl=function(a){uj(this,a);return this};t.Yy=function(){return this.Yg()}; t.Yg=function(){for(var a=this instanceof W?this:this.panel;null!==a;){if(null!==a.allBindings)return a;a=a.panel}return null};t.mv=function(a){a.sd=this;null===this.animationTriggers&&(this.animationTriggers=new pb);this.animationTriggers.add(a.propertyName,a);return this}; function Il(a,b){for(var c=1;ce)&&C("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&C("Must specify non-negative integer column for RowColumnDefinition "+ b+", not: "+e),a.isRow=!1,a.index=e);e=new Wa;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);uj(a,e)}else uj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function Ml(a,b){Jl.add(a,b)}function Nl(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} -ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.bp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new cl),this.A.bp=a)}},localBindings:{get:function(){return null!==this.A?this.A.Ef:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.Ef=a)}},srcBindings:{get:function(){return null!==this.A?this.A.Wo:null},set:function(a){this.srcBindings!== -a&&(null===this.A&&(this.A=new cl),this.A.Wo=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.wi:null},set:function(a){var b=this.shadowVisible;b!==a&&(bl(this),this.A.wi=a,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Gc:null},set:function(a){var b=this.enabledChanged;b!==a&&(bl(this),this.A.Gc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ +ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.bp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new cl),this.A.bp=a)}},localBindings:{get:function(){return null!==this.A?this.A.Ff:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.Ff=a)}},srcBindings:{get:function(){return null!==this.A?this.A.Wo:null},set:function(a){this.srcBindings!== +a&&(null===this.A&&(this.A=new cl),this.A.Wo=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.wi:null},set:function(a){var b=this.shadowVisible;b!==a&&(bl(this),this.A.wi=a,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Hc:null},set:function(a){var b=this.enabledChanged;b!==a&&(bl(this),this.A.Hc=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ get:function(){return null!==this.Ra?this.Ra.Oq:$f},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ra&&(this.Ra=new Ol),this.Ra.Oq=a,this.w(),this.g("segmentOrientation",b,a),a===$f&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ra?this.Ra.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ra&&(this.Ra=new Ol),this.Ra.u=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{ -get:function(){return null!==this.Ra?this.Ra.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&C("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.xa=a,this.w(),this.g("scale",b,a))}},angle:{get:function(){return this.Gb},set:function(a){var b=this.Gb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Gb=a,Fl(this),this.w(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.$c},set:function(a){var b=a.width,c=a.height,d=this.$c,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&& isNaN(c))||(this.$c=a=a.J(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",d,a),el(this)&&(a=this.part,null!==a&&(fl(this,a,"width"),fl(this,a,"height"))))}},width:{get:function(){return this.$c.width},set:function(a){var b=this.$c.width;b===a||isNaN(b)&&isNaN(a)||(b=this.$c,this.$c=a=(new K(a,this.$c.height)).freeze(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",b,a),el(this)&&(a=this.part,null!==a&&fl(this,a,"width")))}},height:{ get:function(){return this.$c.height},set:function(a){var b=this.$c.height;b===a||isNaN(b)&&isNaN(a)||(b=this.$c,this.$c=a=(new K(this.$c.width,a)).freeze(),this.w(),this instanceof Cf&&this.mc(),this.g("desiredSize",b,a),el(this)&&(a=this.part,null!==a&&fl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Db},set:function(a){var b=this.minSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), -bl(this),this.A.u=a,this.w(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Lb},set:function(a){var b=this.maxSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),bl(this),this.A.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.bc}},margin:{ -get:function(){return this.Ag},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.Ag;b.C(a)||(this.Ag=a=a.J(),this.w(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.m&2048)===!0&&pl(this);return this.Bb}},fe:{get:function(){0!==(this.m&4096)===!0&&pl(this);return this.lh}},animationTriggers:{get:function(){return null!==this.A?this.A.cb:null},set:function(a){this.animationTriggers!== -a&&(bl(this),this.A.cb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.ui:lg},set:function(a){this.reshapingBehavior!==a&&(bl(this),this.A.ui=a)}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(a.Ec()&&!a.Sb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Fb=a=a.J(),Al(this),this.g("alignment",b,a))}},column:{get:function(){return this.qg}, -set:function(a){a=Math.round(a);var b=this.qg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.qg=a,this.w(),this.g("column",b,a))}},columnSpan:{get:function(){return null!==this.A?this.A.Db:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),bl(this),this.A.Db=a,this.w(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Ln},set:function(a){a=Math.round(a);var b=this.Ln;b!==a&&(0>a&&wa(a,">= 0", +bl(this),this.A.u=a,this.w(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.m:Lb},set:function(a){var b=this.maxSize;b.C(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),bl(this),this.A.m=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.bc}},margin:{ +get:function(){return this.Ag},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.Ag;b.C(a)||(this.Ag=a=a.J(),this.w(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.o&2048)===!0&&pl(this);return this.Bb}},ge:{get:function(){0!==(this.o&4096)===!0&&pl(this);return this.lh}},animationTriggers:{get:function(){return null!==this.A?this.A.cb:null},set:function(a){this.animationTriggers!== +a&&(bl(this),this.A.cb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.ui:lg},set:function(a){this.reshapingBehavior!==a&&(bl(this),this.A.ui=a)}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(a.Fc()&&!a.Sb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Fb=a=a.J(),Al(this),this.g("alignment",b,a))}},column:{get:function(){return this.rg}, +set:function(a){a=Math.round(a);var b=this.rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.rg=a,this.w(),this.g("column",b,a))}},columnSpan:{get:function(){return null!==this.A?this.A.Db:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),bl(this),this.A.Db=a,this.w(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Ln},set:function(a){a=Math.round(a);var b=this.Ln;b!==a&&(0>a&&wa(a,">= 0", Y,"row"),this.Ln=a,this.w(),this.g("row",b,a))}},rowSpan:{get:function(){return null!==this.A?this.A.vi:1},set:function(a){a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),bl(this),this.A.vi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.xi:null},set:function(a){var b=this.spanAllocation;b!==a&&(bl(this),this.A.xi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{ -get:function(){return this.fk},set:function(a){var b=this.fk;b.C(a)||(this.fk=a=a.J(),this.w(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.Gn},set:function(a){var b=this.Gn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&Ql(c,this);this.Gn=a;null!==a&&null!==c&&(c.Ge=!0,Rl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!== +get:function(){return this.fk},set:function(a){var b=this.fk;b.C(a)||(this.fk=a=a.J(),this.w(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.Gn},set:function(a){var b=this.Gn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&Ql(c,this);this.Gn=a;null!==a&&null!==c&&(c.He=!0,Rl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!== this.aa?this.aa.tj:sc},set:function(a){var b=this.toSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.tj=a,this.g("toSpot",b,a),El(this))}},toEndSegmentLength:{get:function(){return null!==this.aa?this.aa.rj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",Y,"toEndSegmentLength"),this.Rc(),this.aa.rj=a,this.g("toEndSegmentLength",b,a),El(this))}},toShortLength:{get:function(){return null!==this.aa?this.aa.sj:0},set:function(a){var b= this.toShortLength;b!==a&&(this.Rc(),this.aa.sj=a,this.g("toShortLength",b,a),El(this))}},toLinkable:{get:function(){return null!==this.aa?this.aa.sr:null},set:function(a){var b=this.toLinkable;b!==a&&(this.Rc(),this.aa.sr=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.aa?this.aa.tr:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(0>a&&wa(a,">= 0",Y,"toMaxLinks"),this.Rc(),this.aa.tr=a,this.g("toMaxLinks", b,a))}},fromSpot:{get:function(){return null!==this.aa?this.aa.Qi:sc},set:function(a){var b=this.fromSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.Qi=a,this.g("fromSpot",b,a),El(this))}},fromEndSegmentLength:{get:function(){return null!==this.aa?this.aa.Oi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",Y,"fromEndSegmentLength"),this.Rc(),this.aa.Oi=a,this.g("fromEndSegmentLength",b,a),El(this))}},fromShortLength:{ @@ -968,16 +968,16 @@ this.fromMaxLinks;b!==a&&(0>a&&wa(a,">= 0",Y,"fromMaxLinks"),this.Rc(),this.aa.L get:function(){return null!==this.A?this.A.uh:null},set:function(a){var b=this.doubleClick;b!==a&&(bl(this),this.A.uh=a,this.g("doubleClick",b,a))}},contextClick:{get:function(){return null!==this.A?this.A.qh:null},set:function(a){var b=this.contextClick;b!==a&&(bl(this),this.A.qh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.mouseEnter;b!==a&&(bl(this),this.A.Fh= a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ih:null},set:function(a){var b=this.mouseLeave;b!==a&&(bl(this),this.A.Ih=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Jh:null},set:function(a){var b=this.mouseOver;b!==a&&(bl(this),this.A.Jh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Hh:null},set:function(a){var b= this.mouseHover;b!==a&&(bl(this),this.A.Hh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Gh:null},set:function(a){var b=this.mouseHold;b!==a&&(bl(this),this.A.Gh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Qd:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(bl(this),this.A.Qd=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{ -get:function(){return null!==this.A?this.A.Ff:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(bl(this),this.A.Ff=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{get:function(){return null!==this.A?this.A.Eh:null},set:function(a){var b=this.mouseDrop;b!==a&&(bl(this),this.A.Eh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.Y:null},set:function(a){var b=this.actionDown;b!==a&&(bl(this),this.A.Y=a,this.g("actionDown", +get:function(){return null!==this.A?this.A.Gf:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(bl(this),this.A.Gf=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{get:function(){return null!==this.A?this.A.Eh:null},set:function(a){var b=this.mouseDrop;b!==a&&(bl(this),this.A.Eh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.W:null},set:function(a){var b=this.actionDown;b!==a&&(bl(this),this.A.W=a,this.g("actionDown", b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ga:null},set:function(a){var b=this.actionMove;b!==a&&(bl(this),this.A.ga=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ga:null},set:function(a){var b=this.actionUp;b!==a&&(bl(this),this.A.Ga=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel; b!==a&&(bl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!==this.A?this.A.Th:null},set:function(a){var b=this.toolTip;b!==a&&(bl(this),this.A.Th=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.rh:null},set:function(a){var b=this.contextMenu;b!==a&&(bl(this),this.A.rh=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.mv;Y.prototype.findBindingPanel=Y.prototype.Yg; -Y.prototype.findTemplateBinder=Y.prototype.Yy;Y.prototype.setProperties=Y.prototype.Vl;Y.prototype.apply=Y.prototype.apply;Y.prototype.attach=Y.prototype.ku;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.xf;Y.prototype.isVisibleObject=Y.prototype.yf;Y.prototype.isContainedBy=Y.prototype.ig;Y.prototype.getNearestIntersectionPoint=Y.prototype.Or;Y.prototype.getLocalPoint=Y.prototype.Nr;Y.prototype.getDocumentScale=Y.prototype.tf;Y.prototype.getDocumentAngle=Y.prototype.fi; -Y.prototype.getDocumentBounds=Y.prototype.gi;Y.prototype.getDocumentPoint=Y.prototype.ia;Y.prototype.intersectsRect=Y.prototype.Sc;Y.prototype.containedInRect=Y.prototype.Wg;Y.prototype.containsRect=Y.prototype.De;Y.prototype.containsPoint=Y.prototype.ba;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.bb;Y.prototype.addCopyProperty=Y.prototype.zw;var Jl=null;Y.className="GraphObject";Jl=new pb; +Y.prototype.findTemplateBinder=Y.prototype.Yy;Y.prototype.setProperties=Y.prototype.Vl;Y.prototype.apply=Y.prototype.apply;Y.prototype.attach=Y.prototype.ku;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.yf;Y.prototype.isVisibleObject=Y.prototype.zf;Y.prototype.isContainedBy=Y.prototype.jg;Y.prototype.getNearestIntersectionPoint=Y.prototype.Or;Y.prototype.getLocalPoint=Y.prototype.Nr;Y.prototype.getDocumentScale=Y.prototype.uf;Y.prototype.getDocumentAngle=Y.prototype.fi; +Y.prototype.getDocumentBounds=Y.prototype.gi;Y.prototype.getDocumentPoint=Y.prototype.ia;Y.prototype.intersectsRect=Y.prototype.Sc;Y.prototype.containedInRect=Y.prototype.Wg;Y.prototype.containsRect=Y.prototype.Ee;Y.prototype.containsPoint=Y.prototype.ba;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.bb;Y.prototype.addCopyProperty=Y.prototype.zw;var Jl=null;Y.className="GraphObject";Jl=new pb; Ml("Button",function(){function a(a,b){return null!==a.diagram.ec(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Il(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Il(Cf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new N(0,0,2.76142374915397,2.761423749153969),spot2:new N(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.xf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; -b.mouseLeave=function(a,b){b.xf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.xf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Cf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram, -g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.xf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Cf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Il(Cf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new N(0,0,2.76142374915397,2.761423749153969),spot2:new N(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.yf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; +b.mouseLeave=function(a,b){b.yf()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Cf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.yf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Cf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Cf){var f=b.diagram, +g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.yf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Cf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); Ml("TreeExpanderButton",function(){var a=Il("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Il(Cf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Jb},(new wi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Fo()),{visible:!1},(new wi("visible","isTreeLeaf",function(a){return!a})).Fo());a.click=function(a,c){c=c.part;c instanceof ue&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); @@ -986,85 +986,85 @@ a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};r Ml("ContextMenu",function(){return Il(ue,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new I(0,3),shadowBlur:5},new wi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ml("ContextMenuButton",function(){var a=Il("Button");a.stretch=Vk;var b=a.fb("ButtonBorder");b instanceof Cf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); Ml("PanelExpanderButton",function(a){var b=Nl(a,"COLLAPSIBLE"),c=Il("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Il(Cf,{name:"ButtonIcon",strokeWidth:2},(new wi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Fo(b))); a=c.fb("ButtonBorder");a instanceof Cf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.Yg();null===e&&(e=c.part);null!==e&&(c=e.fb(b),null!==c&&(a.handled=!0,d.Da("Collapse/Expand Panel"),c.visible=!c.visible,d.eb("Collapse/Expand Panel")))}};return c}); -Ml("CheckBoxButton",function(a){var b=Nl(a);a=Il("Button",{desiredSize:new K(14,14)},Il(Cf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:ng,visible:!1},""!==b?(new wi("visible",b)).ox():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.fb("ButtonIcon");c.Da("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +Ml("CheckBoxButton",function(a){var b=Nl(a);a=Il("Button",{desiredSize:new K(14,14)},Il(Cf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:ng,visible:!1},""!==b?(new wi("visible",b)).px():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.fb("ButtonIcon");c.Da("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.eb("checkbox")}}};return a}); -Ml("CheckBox",function(a){a=Nl(a);a=Il("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ic(0,1,0,0)});var b=Il(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, +Ml("CheckBox",function(a){a=Nl(a);a=Il("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ec(0,1,0,0)});var b=Il(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});Y.None=lg=new D(Y,"None",0);Y.Default=Xk=new D(Y,"Default",0);Y.Vertical=Wk=new D(Y,"Vertical",4);Y.Horizontal=Vk=new D(Y,"Horizontal",5);Y.Fill=td=new D(Y,"Fill",3);Y.Uniform=ng=new D(Y,"Uniform",1); Y.UniformToFill=Yk=new D(Y,"UniformToFill",2);Y.FlipVertical=Zk=new D(Y,"FlipVertical",1);Y.FlipHorizontal=$k=new D(Y,"FlipHorizontal",2);Y.FlipBoth=al=new D(Y,"FlipBoth",3);Y.make=Il;Y.getBuilders=function(){var a=new pb,b;for(b in Jl)if(b!==b.toLowerCase()){var c=Jl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=Ml; Y.build=function(a,b){var c=Jl.I(a);if("function"===typeof c&&(c=c(null),c instanceof Y))return b&&c.set(b),c;C('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')};Y.takeBuilderArgument=Nl; -function cl(){this.ic=!1;this.va="";this.bp=-1;this.hb=this.Wo=this.Ef=null;this.j="";this.cb=this.xi=this.Gc=this.rh=this.Th=this.F=this.Ga=this.ga=this.Y=this.Eh=this.Ff=this.Qd=this.Gh=this.Hh=this.Jh=this.Ih=this.Fh=this.qh=this.uh=this.oh=null;this.u=Db;this.o=Lb;this.Zf=Xk;this.Db=this.vi=1;this.ui=lg;this.ke=this.wi=this.nb=null;this.Hc="category"} -cl.prototype.copy=function(){var a=new cl;a.va=this.va;a.bp=this.bp;a.Ef=this.Ef;a.hb=this.hb;a.j=this.j;a.oh=this.oh;a.uh=this.uh;a.qh=this.qh;a.Fh=this.Fh;a.Ih=this.Ih;a.Jh=this.Jh;a.Hh=this.Hh;a.Gh=this.Gh;a.Qd=this.Qd;a.Ff=this.Ff;a.Eh=this.Eh;a.Y=this.Y;a.ga=this.ga;a.Ga=this.Ga;a.F=this.F;a.Th=this.Th;a.rh=this.rh;a.Gc=this.Gc;a.xi=this.xi;a.cb=this.cb;a.u=this.u.J();a.o=this.o.J();a.Zf=this.Zf;a.vi=this.vi;a.Db=this.Db;a.ui=this.ui;a.nb=this.nb;a.wi=this.wi;a.ke=this.ke;a.Hc=this.Hc;return a}; -function Ol(){this.u=-Infinity;this.o=0;this.F=qb;this.Oq=$f;this.j=this.Y="None"}Ol.prototype.copy=function(){var a=new Ol;a.u=this.u;a.o=this.o;a.F=this.F.J();a.Oq=this.Oq;a.Y=this.Y;a.j=this.j;return a};Ol.className="LinkElementSettings";function dl(){this.tj=this.Qi=Wc;this.sj=this.Pi=this.rj=this.Oi=NaN;this.sr=this.Kp=null;this.tr=this.Lp=Infinity} +function cl(){this.ic=!1;this.va="";this.bp=-1;this.hb=this.Wo=this.Ff=null;this.j="";this.cb=this.xi=this.Hc=this.rh=this.Th=this.F=this.Ga=this.ga=this.W=this.Eh=this.Gf=this.Qd=this.Gh=this.Hh=this.Jh=this.Ih=this.Fh=this.qh=this.uh=this.oh=null;this.u=Db;this.m=Lb;this.$f=Xk;this.Db=this.vi=1;this.ui=lg;this.le=this.wi=this.nb=null;this.Ic="category"} +cl.prototype.copy=function(){var a=new cl;a.va=this.va;a.bp=this.bp;a.Ff=this.Ff;a.hb=this.hb;a.j=this.j;a.oh=this.oh;a.uh=this.uh;a.qh=this.qh;a.Fh=this.Fh;a.Ih=this.Ih;a.Jh=this.Jh;a.Hh=this.Hh;a.Gh=this.Gh;a.Qd=this.Qd;a.Gf=this.Gf;a.Eh=this.Eh;a.W=this.W;a.ga=this.ga;a.Ga=this.Ga;a.F=this.F;a.Th=this.Th;a.rh=this.rh;a.Hc=this.Hc;a.xi=this.xi;a.cb=this.cb;a.u=this.u.J();a.m=this.m.J();a.$f=this.$f;a.vi=this.vi;a.Db=this.Db;a.ui=this.ui;a.nb=this.nb;a.wi=this.wi;a.le=this.le;a.Ic=this.Ic;return a}; +function Ol(){this.u=-Infinity;this.m=0;this.F=qb;this.Oq=$f;this.j=this.W="None"}Ol.prototype.copy=function(){var a=new Ol;a.u=this.u;a.m=this.m;a.F=this.F.J();a.Oq=this.Oq;a.W=this.W;a.j=this.j;return a};Ol.className="LinkElementSettings";function dl(){this.tj=this.Qi=Wc;this.sj=this.Pi=this.rj=this.Oi=NaN;this.sr=this.Kp=null;this.tr=this.Lp=Infinity} dl.prototype.copy=function(){var a=new dl;a.Qi=this.Qi.J();a.tj=this.tj.J();a.Oi=this.Oi;a.rj=this.rj;a.Pi=this.Pi;a.sj=this.sj;a.Kp=this.Kp;a.sr=this.sr;a.Lp=this.Lp;a.tr=this.tr;return a};dl.className="LinkSettings";function Sl(){this.Ta=[1,0,0,1,0,0]}Sl.prototype.copy=function(){var a=new Sl;a.Ta[0]=this.Ta[0];a.Ta[1]=this.Ta[1];a.Ta[2]=this.Ta[2];a.Ta[3]=this.Ta[3];a.Ta[4]=this.Ta[4];a.Ta[5]=this.Ta[5];return a}; -Sl.prototype.translate=function(a,b){this.Ta[4]+=this.Ta[0]*a+this.Ta[2]*b;this.Ta[5]+=this.Ta[1]*a+this.Ta[3]*b};Sl.prototype.scale=function(a,b){this.Ta[0]*=a;this.Ta[1]*=a;this.Ta[2]*=b;this.Ta[3]*=b};Sl.className="STransform";function Tl(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Iw=[];this.pattern=null}Tl.prototype.addColorStop=function(a,b){this.Iw.push({offset:a,color:b})};Tl.className="SGradient"; +Sl.prototype.translate=function(a,b){this.Ta[4]+=this.Ta[0]*a+this.Ta[2]*b;this.Ta[5]+=this.Ta[1]*a+this.Ta[3]*b};Sl.prototype.scale=function(a,b){this.Ta[0]*=a;this.Ta[1]*=a;this.Ta[2]*=b;this.Ta[3]*=b};Sl.className="STransform";function Tl(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.Jw=[];this.pattern=null}Tl.prototype.addColorStop=function(a,b){this.Jw.push({offset:a,color:b})};Tl.className="SGradient"; function xj(a,b){this.ownerDocument=a=void 0===b?x.document:b;this.Jz="http://www.w3.org/2000/svg";void 0!==a&&(this.Sa=this.Vb("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Sa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Sa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.po=null;this.context=new Ul(this)} xj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.style.width=c+"px",this.style.height=d+"px",this.Sa.setAttributeNS(null,"width",c+"px"),this.Sa.setAttributeNS(null,"height",d+"px"),this.Sa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.bw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.bw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -xj.prototype.Vb=function(a,b,c){a=this.ownerDocument.createElementNS(this.Jz,a);if(ya(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};xj.prototype.getBoundingClientRect=function(){return this.Sa.getBoundingClientRect()};xj.prototype.focus=function(){this.Sa.focus()};xj.prototype.Ow=function(){this.ownerDocument=null}; +xj.prototype.Vb=function(a,b,c){a=this.ownerDocument.createElementNS(this.Jz,a);if(ya(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};xj.prototype.getBoundingClientRect=function(){return this.Sa.getBoundingClientRect()};xj.prototype.focus=function(){this.Sa.focus()};xj.prototype.Pw=function(){this.ownerDocument=null}; ma.Object.defineProperties(xj.prototype,{width:{get:function(){return this.Sa.width.baseVal.value},set:function(a){this.Sa.width=a}},height:{get:function(){return this.Sa.height.baseVal.value},set:function(a){this.Sa.height=a}},style:{get:function(){return this.Sa.style}}});xj.className="SVGSurface"; -function Ul(a){this.qs=a;this.svg=a.Sa;this.stack=[];this.md=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Lg=this.Yq=this.Xq=0;this.Xr=null;this.path=[];this.et=!1;this.Og=null;this.pj=0;this.Ee=new Sl; +function Ul(a){this.qs=a;this.svg=a.Sa;this.stack=[];this.md=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Lg=this.Yq=this.Xq=0;this.Xr=null;this.path=[];this.et=!1;this.Og=null;this.pj=0;this.Fe=new Sl; Vl(this,1,0,0,1,0,0);var b=kb++,c=this.Vb("clipPath",{id:"mainClip"+b});c.appendChild(this.Vb("rect",{x:0,y:0,width:a.width,height:a.height}));this.bw=c;this.qs.Sa.appendChild(c);this.md[0].setAttributeNS(null,"clip-path","url(#mainClip"+b+")");this.Lz={}}t=Ul.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,r=b+n,q=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,q,a-m,b-n]),this.path.push(["A",c,c,0,1,q,p,r])):1E-6=Math.PI),q,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[]};t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){}; -t.clip=function(){this.addPath("clipPath",this.path,this.Ee)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new Tl("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.clip=function(){this.addPath("clipPath",this.path,this.Fe)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new Tl("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.Lz;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+kb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Vb("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Vb(Ak,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; t.createRadialGradient=function(a,b,c,d,e,f){var g=new Tl("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g}; t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width,n=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=n);d=d||0;e=e||0;f=f||0;g=g||0;h=h||0;k=k||0;a={x:0,y:0,width:m||d,height:n||e,href:l};J.ca(d,h)&&J.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(a.preserveAspectRatio= -"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+kb++,g=this.Vb("clipPath",{id:f}),g.appendChild(this.Vb("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";Wl(this,Ak,a,this.Ee,l);this.addElement(Ak,a)};t.fill=function(){this.addPath("fill",this.path,this.Ee)}; -t.rf=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};Wl(this,"fill",a,this.Ee);this.addElement("rect",a)};t.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};Wl(this,"fill",b,this.Ee);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; +"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+kb++,g=this.Vb("clipPath",{id:f}),g.appendChild(this.Vb("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";Wl(this,Ak,a,this.Fe,l);this.addElement(Ak,a)};t.fill=function(){this.addPath("fill",this.path,this.Fe)}; +t.sf=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};Wl(this,"fill",a,this.Fe);this.addElement("rect",a)};t.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};Wl(this,"fill",b,this.Fe);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.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"])}; -t.restore=function(){this.Ee=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.lineDashOffset=a.lineDashOffset;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}; -t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;bb.offset?1:-1});for(e=0;eg.width+g.x||g.x> -k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;Vl(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.li()&&!this.isVisible())return!0;a.Ee.Ta=[1,0,0,1,0,0];(this instanceof Qg&&1g.width+g.x||g.x> +k.width+k.x||n>g.height+g.y||g.y>k.height+k.y)return!0;k=!0;Vl(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.li()&&!this.isVisible())return!0;a.Fe.Ta=[1,0,0,1,0,0];(this instanceof Qg&&1b?(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.pm?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.pm?this.clip():this.fill()};t.si=function(){this.pm||this.stroke()};t.iv=function(a,b,c){this.Xq=a;this.Yq=b;this.Lg=c}; -t.Gr=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Er=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(Yl),a.lineDashOffset=0)};t.Nc=function(a){a&&(this.Fs="");this.Es=this.Gs=""}; +t.save=function(){this.Pc();this.Z.save()};vl.prototype.rotate=function(a){this.rl.rotate(57.2958*a,0,0)};t=vl.prototype;t.setTransform=function(a,b,c,d,e,f){this.rl.setTransform(a,b,c,d,e,f)};t.scale=function(a,b){this.rl.scale(a,b)};t.translate=function(a,b){this.rl.translate(a,b)};t.stroke=function(){this.Z.stroke()}; +t.transform=function(a,b,c,d,e,f){if(1!==a||0!==b||0!==c||1!==d||0!==e||0!==f){var g=this.rl,h=g.m11*a+g.m21*b;a=g.m12*a+g.m22*b;b=g.m11*c+g.m21*d;c=g.m12*c+g.m22*d;g.dx=g.m11*e+g.m21*f+g.dx;g.dy=g.m12*e+g.m22*f+g.dy;g.m11=h;g.m12=a;g.m21=b;g.m22=c}};t.Pc=function(){var a=this.rl;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)}; +t.sf=function(a){if(a instanceof nl&&a.type===ol){var b=a.lk;a=a.Hs;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.pm?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.pm?this.clip():this.fill()};t.si=function(){this.pm||this.stroke()};t.iv=function(a,b,c){this.Xq=a;this.Yq=b;this.Lg=c}; +t.Gr=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Er=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(Yl),a.lineDashOffset=0)};t.Oc=function(a){a&&(this.Fs="");this.Es=this.Gs=""}; ma.Object.defineProperties(vl.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.Es!==a&&(this.Es=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.Fs!==a&&(this.Fs=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit= a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY= a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.Gs!==a&&(this.Gs=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},clipInsteadOfFill:{get:function(){return this.pm}, -set:function(a){this.pm=a}}});var Yl=Object.freeze([]);vl.className="CanvasSurfaceContext";function Zl(){this.F=this.o=this.u=this.j=0}Zl.className="ColorNumbers"; -function nl(a,b){$l||(am(),$l=!0);Ra(this);this._isFrozen=!1;void 0===a?(this.qa=ul,this.kk="black"):"string"===typeof a?(this.qa=ul,this.kk=a):(this.qa=a,this.kk="black");a=this.qa;a===xl?(this.Gd=uc,this.zk=Bc):this.zk=a===ol?this.Gd=yc:this.Gd=sc;this.cr=0;this.Ap=NaN;this.ne=this.Bq=this.me=null;this.Hs=this.lk=0;b&&Object.assign(this,b)} -nl.prototype.copy=function(){var a=new nl;a.qa=this.qa;a.kk=this.kk;a.Gd=this.Gd.J();a.zk=this.zk.J();a.cr=this.cr;a.Ap=this.Ap;null!==this.me&&(a.me=this.me.copy());a.Bq=this.Bq;return a};t=nl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.me&&this.me.freeze();return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.me&&this.me.ja();return this};t.ob=function(a){a.classType===nl&&(this.type=a)}; +set:function(a){this.pm=a}}});var Yl=Object.freeze([]);vl.className="CanvasSurfaceContext";function Zl(){this.F=this.m=this.u=this.j=0}Zl.className="ColorNumbers"; +function nl(a,b){$l||(am(),$l=!0);Ra(this);this._isFrozen=!1;void 0===a?(this.qa=ul,this.kk="black"):"string"===typeof a?(this.qa=ul,this.kk=a):(this.qa=a,this.kk="black");a=this.qa;a===xl?(this.Gd=uc,this.zk=Bc):this.zk=a===ol?this.Gd=yc:this.Gd=sc;this.cr=0;this.Ap=NaN;this.oe=this.Bq=this.ne=null;this.Hs=this.lk=0;b&&Object.assign(this,b)} +nl.prototype.copy=function(){var a=new nl;a.qa=this.qa;a.kk=this.kk;a.Gd=this.Gd.J();a.zk=this.zk.J();a.cr=this.cr;a.Ap=this.Ap;null!==this.ne&&(a.ne=this.ne.copy());a.Bq=this.Bq;return a};t=nl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.ne&&this.ne.freeze();return this};t.ja=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.ne&&this.ne.ja();return this};t.ob=function(a){a.classType===nl&&(this.type=a)}; t.toString=function(){var a="Brush(";if(this.type===ul)a+=this.color;else if(a=this.type===xl?a+"Linear ":this.type===ol?a+"Radial ":this.type===wl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&wa(a,"0 <= loc <= 1",nl,"addColorStop:loc");null===this.me&&(this.me=new pb);this.me.add(a,b);this.qa===ul&&(this.type=xl);this.ne=null;return this}; +t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&wa(a,"0 <= loc <= 1",nl,"addColorStop:loc");null===this.ne&&(this.ne=new pb);this.ne.add(a,b);this.qa===ul&&(this.type=xl);this.oe=null;return this}; t.Cz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?bm:b;if(this.type===ul)Uh(this.color),this.color=cm(a,b);else if((this.type===xl||this.type===ol)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,cm(a,b));return this};function dm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bm:c;Uh(a);return cm(b,c)} t.Dy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?bm:b;if(this.type===ul)Uh(this.color),this.color=cm(-a,b);else if((this.type===xl||this.type===ol)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,cm(-a,b));return this};function em(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?bm:c;Uh(a);return cm(-b,c)} -function fm(a,b,c){Uh(a);a=gm.j;var d=gm.u,e=gm.o,f=gm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((gm.j-a)*c+a)+", "+Math.round((gm.u-d)*c+d)+", "+Math.round((gm.o-e)*c+e)+", "+Math.round((gm.F-f)*c+f)+")"} -t.jx=function(){if(this.type===ul)return hm(this.color);if((this.type===xl||this.type===ol)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ol)return hm(a.first().value);if(null!==a.get(.5))return hm(a.get(.5));if(2===a.count)return a=a.Ea(),hm(fm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return hm(fm(a.get(c),a.get(d),1-f/e))}return!1}; -function hm(a){if(!a)return!1;if(a instanceof nl)return a.jx();Uh(a);return 128>(299*gm.j+587*gm.u+114*gm.o)/1E3} -function cm(a,b){switch(b){case bm:b=100*im(gm.j);var c=100*im(gm.u),d=100*im(gm.o);jm.j=.4124564*b+.3575761*c+.1804375*d;jm.u=.2126729*b+.7151522*c+.072175*d;jm.o=.0193339*b+.119192*c+.9503041*d;jm.F=gm.F;b=km(jm.j/lm[0]);c=km(jm.u/lm[1]);d=km(jm.o/lm[2]);mm.j=116*c-16;mm.u=500*(b-c);mm.o=200*(c-d);mm.F=jm.F;mm.j=Math.min(100,Math.max(0,mm.j+100*a));a=(mm.j+16)/116;b=a-mm.o/200;jm.j=lm[0]*nm(mm.u/500+a);jm.u=lm[1]*(mm.j>om*pm?Math.pow(a,3):mm.j/om);jm.o=lm[2]*nm(b);jm.F=mm.F;a=-.969266*jm.j+1.8760108* -jm.u+.041556*jm.o;b=.0556434*jm.j+-.2040259*jm.u+1.0572252*jm.o;gm.j=255*qm((3.2404542*jm.j+-1.5371385*jm.u+-.4985314*jm.o)/100);gm.u=255*qm(a/100);gm.o=255*qm(b/100);gm.F=jm.F;gm.j=Math.round(gm.j);255gm.j&&(gm.j=0);gm.u=Math.round(gm.u);255gm.u&&(gm.u=0);gm.o=Math.round(gm.o);255gm.o&&(gm.o=0);return"rgba("+gm.j+", "+gm.u+", "+gm.o+", "+gm.F+")";case rm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ -Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){$l||(am(),$l=!0);var b=sm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,gm.j=a[0],gm.u=a[1],gm.o=a[2],gm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,gm.j=0,gm.u=0,gm.o=0,gm.F=1)}} -function Vh(){var a=gm.j/255,b=gm.u/255,c=gm.o/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=gm.F}function im(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function qm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function fm(a,b,c){Uh(a);a=gm.j;var d=gm.u,e=gm.m,f=gm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((gm.j-a)*c+a)+", "+Math.round((gm.u-d)*c+d)+", "+Math.round((gm.m-e)*c+e)+", "+Math.round((gm.F-f)*c+f)+")"} +t.kx=function(){if(this.type===ul)return hm(this.color);if((this.type===xl||this.type===ol)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ol)return hm(a.first().value);if(null!==a.get(.5))return hm(a.get(.5));if(2===a.count)return a=a.Ea(),hm(fm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return hm(fm(a.get(c),a.get(d),1-f/e))}return!1}; +function hm(a){if(!a)return!1;if(a instanceof nl)return a.kx();Uh(a);return 128>(299*gm.j+587*gm.u+114*gm.m)/1E3} +function cm(a,b){switch(b){case bm:b=100*im(gm.j);var c=100*im(gm.u),d=100*im(gm.m);jm.j=.4124564*b+.3575761*c+.1804375*d;jm.u=.2126729*b+.7151522*c+.072175*d;jm.m=.0193339*b+.119192*c+.9503041*d;jm.F=gm.F;b=km(jm.j/lm[0]);c=km(jm.u/lm[1]);d=km(jm.m/lm[2]);mm.j=116*c-16;mm.u=500*(b-c);mm.m=200*(c-d);mm.F=jm.F;mm.j=Math.min(100,Math.max(0,mm.j+100*a));a=(mm.j+16)/116;b=a-mm.m/200;jm.j=lm[0]*nm(mm.u/500+a);jm.u=lm[1]*(mm.j>om*pm?Math.pow(a,3):mm.j/om);jm.m=lm[2]*nm(b);jm.F=mm.F;a=-.969266*jm.j+1.8760108* +jm.u+.041556*jm.m;b=.0556434*jm.j+-.2040259*jm.u+1.0572252*jm.m;gm.j=255*qm((3.2404542*jm.j+-1.5371385*jm.u+-.4985314*jm.m)/100);gm.u=255*qm(a/100);gm.m=255*qm(b/100);gm.F=jm.F;gm.j=Math.round(gm.j);255gm.j&&(gm.j=0);gm.u=Math.round(gm.u);255gm.u&&(gm.u=0);gm.m=Math.round(gm.m);255gm.m&&(gm.m=0);return"rgba("+gm.j+", "+gm.u+", "+gm.m+", "+gm.F+")";case rm:return Vh(),Wh.m=Math.min(100,Math.max(0,Wh.m+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.m+"%, "+ +Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){$l||(am(),$l=!0);var b=sm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,gm.j=a[0],gm.u=a[1],gm.m=a[2],gm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,gm.j=0,gm.u=0,gm.m=0,gm.F=1)}} +function Vh(){var a=gm.j/255,b=gm.u/255,c=gm.m/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.m=Math.round(100*e);Wh.F=gm.F}function im(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function qm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function km(a){return a>pm?Math.pow(a,1/3):(om*a+16)/116}function nm(a){var b=a*a*a;return b>pm?b:(116*a-16)/om}function Pl(a,b){"string"!==typeof a&&(a instanceof nl||C("Value for "+b+" must be a color string or a Brush, not "+a))}function am(){sm=Og?(new Bk(null)).context:null} -ma.Object.defineProperties(nl.prototype,{type:{get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this.start.Ec()&&(a===xl?this.start=uc:a===ol&&(this.start=yc));this.end.Ec()&&(a===xl?this.end=Bc:a===ol&&(this.end=yc));this.ne=null}},color:{get:function(){return this.kk},set:function(a){this._isFrozen&&va(this,a);this.kk=a;this.ne=null}},start:{get:function(){return this.Gd}, -set:function(a){this._isFrozen&&va(this,a);this.Gd=a.J();this.ne=null}},end:{get:function(){return this.zk},set:function(a){this._isFrozen&&va(this,a);this.zk=a.J();this.ne=null}},startRadius:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);0>a&&wa(a,">= zero",nl,"startRadius");this.cr=a;this.ne=null}},endRadius:{get:function(){return this.Ap},set:function(a){this._isFrozen&&va(this, -a);0>a&&wa(a,">= zero",nl,"endRadius");this.Ap=a;this.ne=null}},colorStops:{get:function(){return this.me},set:function(a){this._isFrozen&&va(this,a);this.me=a;this.ne=null}},pattern:{get:function(){return this.Bq},set:function(a){this._isFrozen&&va(this,a);this.Bq=a;this.ne=null}}});nl.prototype.isDark=nl.prototype.jx;nl.prototype.darkenBy=nl.prototype.Dy;nl.prototype.lightenBy=nl.prototype.Cz;nl.prototype.addColorStop=nl.prototype.addColorStop; +ma.Object.defineProperties(nl.prototype,{type:{get:function(){return this.qa},set:function(a){this._isFrozen&&va(this,a);this.qa=a;this.start.Fc()&&(a===xl?this.start=uc:a===ol&&(this.start=yc));this.end.Fc()&&(a===xl?this.end=Bc:a===ol&&(this.end=yc));this.oe=null}},color:{get:function(){return this.kk},set:function(a){this._isFrozen&&va(this,a);this.kk=a;this.oe=null}},start:{get:function(){return this.Gd}, +set:function(a){this._isFrozen&&va(this,a);this.Gd=a.J();this.oe=null}},end:{get:function(){return this.zk},set:function(a){this._isFrozen&&va(this,a);this.zk=a.J();this.oe=null}},startRadius:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);0>a&&wa(a,">= zero",nl,"startRadius");this.cr=a;this.oe=null}},endRadius:{get:function(){return this.Ap},set:function(a){this._isFrozen&&va(this, +a);0>a&&wa(a,">= zero",nl,"endRadius");this.Ap=a;this.oe=null}},colorStops:{get:function(){return this.ne},set:function(a){this._isFrozen&&va(this,a);this.ne=a;this.oe=null}},pattern:{get:function(){return this.Bq},set:function(a){this._isFrozen&&va(this,a);this.Bq=a;this.oe=null}}});nl.prototype.isDark=nl.prototype.kx;nl.prototype.darkenBy=nl.prototype.Dy;nl.prototype.lightenBy=nl.prototype.Cz;nl.prototype.addColorStop=nl.prototype.addColorStop; var pm=216/24389,om=24389/27,lm=[95.047,100,108.883],sm=null,gm=new Zl,Wh=new Zl,jm=new Zl,mm=new Zl,$l=!1;nl.className="Brush";var ul;nl.Solid=ul=new D(nl,"Solid",0);var xl;nl.Linear=xl=new D(nl,"Linear",1);var ol;nl.Radial=ol=new D(nl,"Radial",2);var wl;nl.Pattern=wl=new D(nl,"Pattern",4);var bm;nl.Lab=bm=new D(nl,"Lab",5);var rm;nl.HSL=rm=new D(nl,"HSL",6); nl.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a);b=Math.floor(a+Math.random()*c).toString(16);var d=Math.floor(a+Math.random()*c).toString(16);a=Math.floor(a+Math.random()*c).toString(16);2>b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+a}; nl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;$l||(am(),$l=!0);var b=sm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c};nl.lighten=function(a){return dm(a)};nl.lightenBy=dm;nl.darken=function(a){return em(a)};nl.darkenBy=em;nl.mix=fm;nl.isDark=hm;function Ll(){this.va="Base"}Ll.prototype.measure=function(){}; -Ll.prototype.Fz=function(a,b,c,d,e){a.measure(b,c,d,e)};Ll.prototype.arrange=function(){};Ll.prototype.qy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Ll.prototype.Pz=function(a){a.Mj()};Ll.prototype.tc=function(){};ma.Object.defineProperties(Ll.prototype,{name:{get:function(){return this.va},set:function(a){this.va=a}},classType:{get:function(){return W}}});Ll.prototype.remeasureObject=Ll.prototype.Pz;Ll.prototype.arrangeElement=Ll.prototype.qy; +Ll.prototype.Fz=function(a,b,c,d,e){a.measure(b,c,d,e)};Ll.prototype.arrange=function(){};Ll.prototype.sy=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Ll.prototype.Pz=function(a){a.Mj()};Ll.prototype.tc=function(){};ma.Object.defineProperties(Ll.prototype,{name:{get:function(){return this.va},set:function(a){this.va=a}},classType:{get:function(){return W}}});Ll.prototype.remeasureObject=Ll.prototype.Pz;Ll.prototype.arrangeElement=Ll.prototype.sy; Ll.prototype.measureElement=Ll.prototype.Fz;Ll.className="PanelLayout";function tm(){this.va="Base"}la(tm,Ll); tm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=um(a);for(var k=0;kS&&(eb=Math.max(S-hf,0));var mk=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;S=Math.max(S-(eb+(mk?hf:0)),0)}if(1===ec.columnSpan&& -(Gb===lg||Gb===Wk)){H=a.getColumnDefinition(Fb);var Ii=H.Pc();eb=Math.max(Mf-H.actual,0);eb+Ii>L&&(eb=Math.max(L-Ii,0));var Kn=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;L=Math.max(L-(eb+(Kn?Ii:0)),0)}gf&&ec.Mj()}}}}}Ga(z);var Nd=0,me=0;f=a.columnCount;for(var tg=0;tg=a.rowCount);Ne++)H=a.getRowDefinition(Na.row+Ne),eb=0,eb=Gb===td||Gb===Wk?Math.max(H.minimum,0===rd[Na.row+Ne]?H.maximum:Math.min(rd[Na.row+Ne],H.maximum)):Math.max(H.minimum,isNaN(H.zc)?H.maximum:Math.min(H.zc,H.maximum)),Ed.height+=eb,oc+=H.minimum;for(var Tc=1;Tc=a.columnCount);Tc++)H=a.getColumnDefinition(Na.column+ -Tc),eb=0,eb=Gb===td||Gb===Vk?Math.max(H.minimum,0===Fc[Na.column+Tc]?H.maximum:Math.min(Fc[Na.column+Tc],H.maximum)):Math.max(H.minimum,isNaN(H.zc)?H.maximum:Math.min(H.zc,H.maximum)),Ed.width+=eb,qk+=H.minimum;ib.width+=Ed.width;ib.height+=Ed.height;var Kh=Na.margin,nf=Kh.right+Kh.left,Ki=Kh.top+Kh.bottom;Na.measure(ib.width,ib.height,qk,oc);for(var Lh=Na.measuredBounds,Fd=Math.max(Lh.width+nf,0),Qf=Math.max(Lh.height+Ki,0),of=0,Mh=0;Mh=a.rowCount);Mh++)H=a.getRowDefinition(Na.row+ -Mh),of+=H.total||0;if(of=Oe)&&!(Na.row+pe>=a.rowCount);pe++){H=a.getRowDefinition(Na.row+pe);var Qe=H.ma||0,Rf=Pe(Na,H,Pd);H.actual=Math.min(H.maximum,Qe+Rf);H.ma!==Qe&&(Oe-=H.ma-Qe)}for(;0sd&&(H.actual=Math.min(H.maximum,sd+Oe),H.ma!==sd&&(Oe-=H.ma-sd));if(0===H.index)break;H=a.getRowDefinition(H.index-1)}}for(var wg=0,Re=0;Re=a.columnCount);Re++)H=a.getColumnDefinition(Na.column+Re),wg+=H.total||0;if(wg=xg)&&!(Na.column+Sf>=a.columnCount);Sf++){H=a.getColumnDefinition(Na.column+Sf);var Li=H.ma||0,Nn=qe(Na,H,Mn);H.actual=Math.min(H.maximum,Li+Nn);H.ma!==Li&&(xg-=H.ma-Li)}for(;0rk&&(H.actual=Math.min(H.maximum,rk+xg),H.ma!==rk&&(xg-=H.ma-rk));if(0=== -H.index)break;H=a.getColumnDefinition(H.index-1)}}}}Ga(y);K.free(Ed);K.free(ib);void 0!==rd&&Ga(rd);void 0!==Fc&&Ga(Fc);var yg=0,zg=0,sk=a.desiredSize,vr=a.maxSize;Gb=il(a,!0);var Mi=me=Nd=0,Ni=0;f=a.columnCount;for(var tk=0;tkS&&(eb=Math.max(S-hf,0));var mk=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;S=Math.max(S-(eb+(mk?hf:0)),0)}if(1===fc.columnSpan&& +(Hb===lg||Hb===Wk)){H=a.getColumnDefinition(Gb);var Ii=H.Qc();eb=Math.max(Mf-H.actual,0);eb+Ii>L&&(eb=Math.max(L-Ii,0));var Kn=0===H.ma;H.jc=H.jc+eb;H.actual=H.ma+eb;L=Math.max(L-(eb+(Kn?Ii:0)),0)}gf&&fc.Mj()}}}}}Ga(z);var Nd=0,me=0;f=a.columnCount;for(var tg=0;tg=a.rowCount);Ne++)H=a.getRowDefinition(Oa.row+Ne),eb=0,eb=Hb===td||Hb===Wk?Math.max(H.minimum,0===rd[Oa.row+Ne]?H.maximum:Math.min(rd[Oa.row+Ne],H.maximum)):Math.max(H.minimum,isNaN(H.Ac)?H.maximum:Math.min(H.Ac,H.maximum)),Ed.height+=eb,oc+=H.minimum;for(var Tc=1;Tc=a.columnCount);Tc++)H=a.getColumnDefinition(Oa.column+ +Tc),eb=0,eb=Hb===td||Hb===Vk?Math.max(H.minimum,0===Fc[Oa.column+Tc]?H.maximum:Math.min(Fc[Oa.column+Tc],H.maximum)):Math.max(H.minimum,isNaN(H.Ac)?H.maximum:Math.min(H.Ac,H.maximum)),Ed.width+=eb,qk+=H.minimum;ib.width+=Ed.width;ib.height+=Ed.height;var Kh=Oa.margin,nf=Kh.right+Kh.left,Ki=Kh.top+Kh.bottom;Oa.measure(ib.width,ib.height,qk,oc);for(var Lh=Oa.measuredBounds,Fd=Math.max(Lh.width+nf,0),Qf=Math.max(Lh.height+Ki,0),of=0,Mh=0;Mh=a.rowCount);Mh++)H=a.getRowDefinition(Oa.row+ +Mh),of+=H.total||0;if(of=Oe)&&!(Oa.row+pe>=a.rowCount);pe++){H=a.getRowDefinition(Oa.row+pe);var Qe=H.ma||0,Rf=Pe(Oa,H,Pd);H.actual=Math.min(H.maximum,Qe+Rf);H.ma!==Qe&&(Oe-=H.ma-Qe)}for(;0sd&&(H.actual=Math.min(H.maximum,sd+Oe),H.ma!==sd&&(Oe-=H.ma-sd));if(0===H.index)break;H=a.getRowDefinition(H.index-1)}}for(var wg=0,Re=0;Re=a.columnCount);Re++)H=a.getColumnDefinition(Oa.column+Re),wg+=H.total||0;if(wg=xg)&&!(Oa.column+Sf>=a.columnCount);Sf++){H=a.getColumnDefinition(Oa.column+Sf);var Li=H.ma||0,Nn=qe(Oa,H,Mn);H.actual=Math.min(H.maximum,Li+Nn);H.ma!==Li&&(xg-=H.ma-Li)}for(;0rk&&(H.actual=Math.min(H.maximum,rk+xg),H.ma!==rk&&(xg-=H.ma-rk));if(0=== +H.index)break;H=a.getColumnDefinition(H.index-1)}}}}Ga(y);K.free(Ed);K.free(ib);void 0!==rd&&Ga(rd);void 0!==Fc&&Ga(Fc);var yg=0,zg=0,sk=a.desiredSize,vr=a.maxSize;Hb=il(a,!0);var Mi=me=Nd=0,Ni=0;f=a.columnCount;for(var tk=0;tk=a.rowCount);H++){var da=a.getRowDefinition(z+H);0!==da.ma&&(v.height+=da.total)}for(H=1;H=a.columnCount);H++)da=a.getColumnDefinition(A+H),0!==da.ma&&(v.width+=da.total);var X=B.ma+v.width,na=y.ma+v.height;H=h;da=k;var Ba=X,db=na,hb=h,Eb=k,eb=X,Je=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Je=Math.max(c.height-k,0));var Ta=R.alignment;if(Ta.Sb()){Ta=a.defaultAlignment;Ta.pb()||(Ta=yc);var od=Ta.x;var Fb=Ta.y;var Ke=Ta.offsetX; -Ta=Ta.offsetY;var wc=B.alignment,Rc=y.alignment;wc.pb()&&(od=wc.x,Ke=wc.offsetX);Rc.pb()&&(Fb=Rc.y,Ta=Rc.offsetY)}else od=Ta.x,Fb=Ta.y,Ke=Ta.offsetX,Ta=Ta.offsetY;if(isNaN(od)||isNaN(Fb))Fb=od=.5,Ta=Ke=0;wc=P.width;Rc=P.height;var lc=R.margin,ec=lc.left+lc.right,gf=lc.top+lc.bottom,pd=Bl(R,y,B,!1);!isNaN(R.desiredSize.width)||pd!==td&&pd!==Vk||(wc=Math.max(X-ec,0));!isNaN(R.desiredSize.height)||pd!==td&&pd!==Wk||(Rc=Math.max(na-gf,0));X=R.maxSize;na=R.minSize;wc=Math.min(X.width,wc);Rc=Math.min(X.height, -Rc);wc=Math.max(na.width,wc);Rc=Math.max(na.height,Rc);X=Rc+gf;H+=Ba*od-(wc+ec)*od+Ke+lc.left;da+=db*Fb-X*Fb+Ta+lc.top;R.visible&&($b(hb,Eb,eb,Je,H,da,P.width,P.height)?R.arrange(H,da,wc,Rc):R.arrange(H,da,wc,Rc,new M(hb,Eb,eb,Je)))}}K.free(v);for(a=0;a=a.rowCount);H++){var da=a.getRowDefinition(z+H);0!==da.ma&&(v.height+=da.total)}for(H=1;H=a.columnCount);H++)da=a.getColumnDefinition(A+H),0!==da.ma&&(v.width+=da.total);var X=B.ma+v.width,oa=y.ma+v.height;H=h;da=k;var Ba=X,db=oa,hb=h,Fb=k,eb=X,Je=oa;h+X>c.width&&(eb=Math.max(c.width-h,0));k+oa>c.height&&(Je=Math.max(c.height-k,0));var Ua=R.alignment;if(Ua.Sb()){Ua=a.defaultAlignment; +Ua.pb()||(Ua=yc);var od=Ua.x;var Gb=Ua.y;var Ke=Ua.offsetX;Ua=Ua.offsetY;var wc=B.alignment,Rc=y.alignment;wc.pb()&&(od=wc.x,Ke=wc.offsetX);Rc.pb()&&(Gb=Rc.y,Ua=Rc.offsetY)}else od=Ua.x,Gb=Ua.y,Ke=Ua.offsetX,Ua=Ua.offsetY;if(isNaN(od)||isNaN(Gb))Gb=od=.5,Ua=Ke=0;wc=P.width;Rc=P.height;var lc=R.margin,fc=lc.left+lc.right,gf=lc.top+lc.bottom,pd=Bl(R,y,B,!1);!isNaN(R.desiredSize.width)||pd!==td&&pd!==Vk||(wc=Math.max(X-fc,0));!isNaN(R.desiredSize.height)||pd!==td&&pd!==Wk||(Rc=Math.max(oa-gf,0));X=R.maxSize; +oa=R.minSize;wc=Math.min(X.width,wc);Rc=Math.min(X.height,Rc);wc=Math.max(oa.width,wc);Rc=Math.max(oa.height,Rc);X=Rc+gf;H+=Ba*od-(wc+fc)*od+Ke+lc.left;da+=db*Gb-X*Gb+Ua+lc.top;R.visible&&($b(hb,Fb,eb,Je,H,da,P.width,P.height)?R.arrange(H,da,wc,Rc):R.arrange(H,da,wc,Rc,new M(hb,Fb,eb,Je)))}}K.free(v);for(a=0;a=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.R.s,u=q.length,w=0;wy)){v=Sj(v.figure);for(var A=0;Ay&&z.push(B))}}}}q= +Im.prototype.tc=function(a,b,c){c=a.uf()*c.scale;0>=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.R.s,u=q.length,w=0;wy)){v=Sj(v.figure);for(var A=0;Ay&&z.push(B))}}}}q= a.R.s;u=q.length;for(w=0;we*v*c))){y=F.segmentIndex;if(!isFinite(y)||isNaN(y))y=0;0>y&&(y=v-Math.min(-y,v));y=Math.round(y%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}B=r[w];var L=!1,S=F.strokeDashArray;null!==S&&(L=!0,b.Gr(S,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),y=z.measuredBounds,c.Xc(y),r.push(y);else{var A=z.segmentIndex,B=z.segmentFraction,F=z.alignmentFocus;F.Ec()&&(F=yc);var L=z.segmentOrientation,S=z.segmentOffset;if(isNaN(A)){var R=k.sa;y=Ea();R.Cu(B,y);var P=I.allocAt(y[0],y[1]);P.add(k.i(0));R.type=== -O.j?P.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&P.offset(-R.startX,-R.startY));R=y[2];if(L!==$f){var H=k.computeAngle(z,L,R);z.Gb=H}H=P.x-b.x;var da=P.y-b.y;I.free(P);Ga(y)}else if(A<-n||A>=n)y=I.alloc(),k.lg(),k.computeMidPoint(y),R=k.midAngle,L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H),H=y.x-b.x,da=y.y-b.y,I.free(y);else{H=0;0<=A?(da=m.K(A),y=AX+10?0<=A?R.Ya(da):da.Ya(R):X>P+10?0<=A?y.Ya(H):H.Ya(y):0<=A?R.Ya(H):H.Ya(R)}else R=0<=A?da.Ya(y):y.Ya(da);L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H);H=da.x+(y.x-da.x)*B-b.x;da=da.y+(y.y-da.y)*B-b.y}z.measure(Infinity,Infinity,0,0);y=z.measuredBounds;P=z.naturalBounds;var na=0;z instanceof Cf&&(na=z.strokeWidth);X=P.width+na;var Ba=P.height+na;q.reset();q.translate(-y.x,-y.y);q.scale(z.scale,z.scale);q.rotate(L===$f?z.angle:R,X/2,Ba/2);L!==Mm&&L!==Nm||q.rotate(90, -X/2,Ba/2);L!==Om&&L!==Pm||q.rotate(-90,X/2,Ba/2);L===Qm&&(45R||225R)&&q.rotate(-R,X/2,Ba/2);P=new M(0,0,X,Ba);u.oi(P,F);q.Fa(u);F=-u.x+na/2*z.scale;z=-u.y+na/2*z.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;Ba=Ba/2+3;var hb=45<=R&&135>=R,Eb=225<=R&&315>=R;L===$f&&(hb||Eb)?(w.x=db?X:S.y,w.y=na?Ba:S.x,hb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-Ba):Eb&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-Ba),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-Ba),w.rotate(R))}else w.rotate(R); -H+=w.x;da+=w.y;P.set(y);P.h(H+F,da+z,y.width,y.height);r.push(P);c.Xc(P)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.ag=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);Qb(e,c.width||0,c.height||0);md.free(q);I.free(u);I.free(w)}}}}; -Km.prototype.arrange=function(a,b){var c=b.length;if(a instanceof ue||a instanceof T){var d=a,e=null;a instanceof ue&&(e=a,d=e.adornedPart);var f=a instanceof ue?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=I.alloc(),r=n,w=q,r.lg(),r.computeMidPoint(w),r=n.midAngle,l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,w=q.y, -I.free(q);else{u=0;0<=h?(q=b.s[h],w=hz+10?0<=h?r.Ya(q):q.Ya(r):z>v+10?0<=h?w.Ya(u):u.Ya(w):0<=h?r.Ya(u):u.Ya(r)}else r=0<=h?q.Ya(w):w.Ya(q);l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(w.x-q.x)*k;w=q.y+(w.y-q.y)*k}if(p.Wr())g.location=new I(n,w);else{p.Ec()&&(p=yc);q=md.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, +B)&&b.fillRect(P,0,F,k)}else if("BarH"===F.figure&&null!==F.fill)for(gi(a,b,F.fill,!0,!1,f,g),F=F.height,isNaN(F)&&(F=d),R=S=Math.floor((n-d)/d);R<=S+m;R++)P=R*d+n,0<=P+F&&P<=k&&Jm(R,z,y,B)&&b.fillRect(0,P,h,F);L&&b.Er();1!==v&&(b.globalAlpha=A)}}b.restore();b.Oc(!1)};function Jm(a,b,c,d){if(0>b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),y=z.measuredBounds,c.Xc(y),r.push(y);else{var A=z.segmentIndex,B=z.segmentFraction,F=z.alignmentFocus;F.Fc()&&(F=yc);var L=z.segmentOrientation,S=z.segmentOffset;if(isNaN(A)){var R=k.sa;y=Ea();R.Cu(B,y);var P=I.allocAt(y[0],y[1]);P.add(k.i(0));R.type=== +O.j?P.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&P.offset(-R.startX,-R.startY));R=y[2];if(L!==$f){var H=k.computeAngle(z,L,R);z.Gb=H}H=P.x-b.x;var da=P.y-b.y;I.free(P);Ga(y)}else if(A<-n||A>=n)y=I.alloc(),k.mg(),k.computeMidPoint(y),R=k.midAngle,L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H),H=y.x-b.x,da=y.y-b.y,I.free(y);else{H=0;0<=A?(da=m.K(A),y=AX+10?0<=A?R.Ya(da):da.Ya(R):X>P+10?0<=A?y.Ya(H):H.Ya(y):0<=A?R.Ya(H):H.Ya(R)}else R=0<=A?da.Ya(y):y.Ya(da);L!==$f&&(H=k.computeAngle(z,L,R),z.Gb=H);H=da.x+(y.x-da.x)*B-b.x;da=da.y+(y.y-da.y)*B-b.y}z.measure(Infinity,Infinity,0,0);y=z.measuredBounds;P=z.naturalBounds;var oa=0;z instanceof Cf&&(oa=z.strokeWidth);X=P.width+oa;var Ba=P.height+oa;q.reset();q.translate(-y.x,-y.y);q.scale(z.scale,z.scale);q.rotate(L===$f?z.angle:R,X/2,Ba/2);L!==Mm&&L!==Nm||q.rotate(90, +X/2,Ba/2);L!==Om&&L!==Pm||q.rotate(-90,X/2,Ba/2);L===Qm&&(45R||225R)&&q.rotate(-R,X/2,Ba/2);P=new M(0,0,X,Ba);u.oi(P,F);q.Fa(u);F=-u.x+oa/2*z.scale;z=-u.y+oa/2*z.scale;w.assign(S);oa=isNaN(S.x);var db=isNaN(S.y);if(oa||db){X=X/2+3;Ba=Ba/2+3;var hb=45<=R&&135>=R,Fb=225<=R&&315>=R;L===$f&&(hb||Fb)?(w.x=db?X:S.y,w.y=oa?Ba:S.x,hb?0<=A||isNaN(A)&&.5>B||!oa||(w.y=-Ba):Fb&&((0<=A||isNaN(A)&&.5>B)&&oa&&(w.y=-Ba),db&&(w.x=-X))):(oa&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-Ba),w.rotate(R))}else w.rotate(R); +H+=w.x;da+=w.y;P.set(y);P.h(H+F,da+z,y.width,y.height);r.push(P);c.Xc(P)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.bg=c;a.position.h(b.x+c.x,b.y+c.y);a.location.h(NaN,NaN);Qb(e,c.width||0,c.height||0);md.free(q);I.free(u);I.free(w)}}}}; +Km.prototype.arrange=function(a,b){var c=b.length;if(a instanceof ue||a instanceof T){var d=a,e=null;a instanceof ue&&(e=a,d=e.adornedPart);var f=a instanceof ue?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)q=I.alloc(),r=n,w=q,r.mg(),r.computeMidPoint(w),r=n.midAngle,l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n),n=q.x,w=q.y, +I.free(q);else{u=0;0<=h?(q=b.s[h],w=hz+10?0<=h?r.Ya(q):q.Ya(r):z>v+10?0<=h?w.Ya(u):u.Ya(w):0<=h?r.Ya(u):u.Ya(r)}else r=0<=h?q.Ya(w):w.Ya(q);l!==$f&&(n=n.computeAngle(g,l,r),g.angle=n);n=q.x+(w.x-q.x)*k;w=q.y+(w.y-q.y)*k}if(p.Wr())g.location=new I(n,w);else{p.Fc()&&(p=yc);q=md.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle, 0,0);var y=g.naturalBounds;u=M.allocAt(0,0,y.width,y.height);v=I.alloc();v.oi(u,p);q.Fa(v);p=-v.x;z=-v.y;var A=y.width,B=y.height;y=I.alloc();y.assign(m);var F=isNaN(m.x),L=isNaN(m.y);if(F||L){A=A/2+3;B=B/2+3;var S=45<=r&&135>=r,R=225<=r&&315>=r;l===$f&&(S||R)?(y.x=L?A:m.y,y.y=F?B:m.x,S?0<=h||isNaN(h)&&.5>k||!F||(y.y=-B):R&&((0<=h||isNaN(h)&&.5>k)&&F&&(y.y=-B),L&&(y.x=-A))):(F&&(y.x=0<=h||isNaN(h)&&.5>k?A:-A),L&&(y.y=-B),y.rotate(r))}else y.rotate(r);n+=y.x;w+=y.y;q.So(u);p+=u.x;z+=u.y;h=I.allocAt(n+ p,w+z);g.move(h);I.free(h);I.free(y);I.free(v);M.free(u);md.free(q)}}null!==e?e.Rj(!1):d.Rj(!1)}}; -function Lm(a,b,c,d){if(!1!==nj(d)){var e=d.strokeWidth;0===e&&a instanceof ue&&a.type===W.Link&&a.adornedObject instanceof Cf&&(e=a.adornedObject.strokeWidth);e*=d.xa;a instanceof T&&null!==a.sa?(a=a.sa.bounds,d.ue(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof ue&&null!==a.adornedPart.sa?(a=a.adornedPart.sa.bounds,d.ue(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.ue(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.v()||null===d.sa?d.bc.h(0,0,e.width,e.height):d.bc.assign(d.sa.bounds);ij(d,!1)}} +function Lm(a,b,c,d){if(!1!==nj(d)){var e=d.strokeWidth;0===e&&a instanceof ue&&a.type===W.Link&&a.adornedObject instanceof Cf&&(e=a.adornedObject.strokeWidth);e*=d.xa;a instanceof T&&null!==a.sa?(a=a.sa.bounds,d.ve(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof ue&&null!==a.adornedPart.sa?(a=a.adornedPart.sa.bounds,d.ve(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.ve(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.v()||null===d.sa?d.bc.h(0,0,e.width,e.height):d.bc.assign(d.sa.bounds);ij(d,!1)}} function Rm(){this.va="Base"}la(Rm,Ll); Rm.prototype.measure=function(a,b,c,d,e,f,g){var h=a.vb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var r=h.geometry,q=h.strokeWidth,u=r.flattenedSegments,w=r.flattenedLengths,v=r.flattenedTotalLength,z=u.length,y=0,A=0,B=Ea(),F=0;FX&&(X+=360);S.push(X)}y=H;A=da}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],Ba=a.R.s,db=Ba.length,hb=0;hbJe))for(var Ta=0;TaJe&&eb.push(Fb)}}}}a.graduatedIntervals=na}var Ke=a.graduatedIntervals;var wc=a.R.s,Rc=wc.length,lc=0,ec=0,gf=v;a.graduatedMarks=[];for(var pd, -Dh=0;DhHi*Gb*v/a.graduatedRange&&null===mc.graduatedSkip)){var sg=w[0][0],Bd=0,fc=0;ec=v*mc.graduatedStart-1E-4;gf=v*mc.graduatedEnd+1E-4;var Mf=Hi*Gb,nc=a.graduatedTickBase;if(nca.graduatedMin+Mf&&(nc-=Math.floor((nc-a.graduatedMin)/Mf)*Mf);for(var mk=Ke[Dh],Ii=nc,Kn=1E-6*a.graduatedMax,Nd= -1;nc<=a.graduatedMax+Kn;Nd++){a:{for(var me=mk.length,tg=0;tg-Eh){var kf=!1;break a}}kf=!0}if(kf&&(nc>a.graduatedMax&&(nc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Qg&&!mc.graduatedSkip(nc,mc)||mc instanceof Cf&&!mc.graduatedSkip(nc,mc))&&(lc=(nc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),ec<=lc&&lc<=gf)){for(var Od=B[Bd][fc],Le=w[Bd][fc];Bdsg&&fcne&&.4995ne?0ne||.9995ug){var Gh=1-Math.abs(.5-ne);Od=(qd*Gh+Dd*(1-Gh))%360;break a}}}Od=qd}if(mc instanceof Qg){var bd="";null!==mc.graduatedFunction?(bd=mc.graduatedFunction(nc,mc),bd=null!==bd&&void 0!==bd?bd.toString():""):bd=(+nc.toFixed(2)).toString();""!==bd&&pd.push({Hl:Fh,angle:Od,text:bd})}else pd.push({Hl:Fh,angle:Od})}nc=Ii+Nd*Mf}}}a.graduatedMarks.push(pd)}Ga(B); -var ib=a.graduatedMarks;if(null!==ib)for(var Ji=d.length,Tb=0;Tbcd;cd++){switch(cd){case 0:hc.h(Ed,rd);break;case 1:hc.h(Ed+Hh,rd);break;case 2:hc.h(Ed,rd+Pf);break;case 3:hc.h(Ed+Hh,rd+Pf)}hc.rotate(Na+Ua.angle);hc.offset(pk,Jh);0===Ih&&0===cd?Fc.h(hc.x,hc.y,0,0):Fc.Le(hc);hc.offset(-pk,-Jh);hc.rotate(-Na-Ua.angle)}I.free(hc);null!==oe.graduatedBounds&&oe.graduatedBounds.push(Fc);Zb(Me,Fc.x,Fc.y,Fc.width,Fc.height)}else if(Ua instanceof Qg){var Sc=a,qk=e;null===Sc.temporaryTextBlock&&(Sc.temporaryTextBlock=new Qg);var oc=Sc.temporaryTextBlock;Sm(oc,Ua); -var Ne=Ua.alignmentFocus;Ne.Ec()&&(Ne=uc);for(var Tc=Ua.segmentOrientation,Kh=Ua.segmentOffset,nf=new M,Ki=0,Lh=0,Fd=0,Qf=0,of=0,Mh=Ub.length,Oe=0;OeX&&(X+=360);S.push(X)}y=H;A=da}B.push(S)}if(null===a.graduatedIntervals){for(var oa=[],Ba=a.R.s,db=Ba.length,hb=0;hbJe))for(var Ua=0;UaJe&&eb.push(Gb)}}}}a.graduatedIntervals=oa}var Ke=a.graduatedIntervals;var wc=a.R.s,Rc=wc.length,lc=0,fc=0,gf=v;a.graduatedMarks=[];for(var pd, +Dh=0;DhHi*Hb*v/a.graduatedRange&&null===mc.graduatedSkip)){var sg=w[0][0],Bd=0,gc=0;fc=v*mc.graduatedStart-1E-4;gf=v*mc.graduatedEnd+1E-4;var Mf=Hi*Hb,nc=a.graduatedTickBase;if(nca.graduatedMin+Mf&&(nc-=Math.floor((nc-a.graduatedMin)/Mf)*Mf);for(var mk=Ke[Dh],Ii=nc,Kn=1E-6*a.graduatedMax,Nd= +1;nc<=a.graduatedMax+Kn;Nd++){a:{for(var me=mk.length,tg=0;tg-Eh){var kf=!1;break a}}kf=!0}if(kf&&(nc>a.graduatedMax&&(nc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Qg&&!mc.graduatedSkip(nc,mc)||mc instanceof Cf&&!mc.graduatedSkip(nc,mc))&&(lc=(nc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),fc<=lc&&lc<=gf)){for(var Od=B[Bd][gc],Le=w[Bd][gc];Bdsg&&gcne&&.4995ne?0ne||.9995ug){var Gh=1-Math.abs(.5-ne);Od=(qd*Gh+Dd*(1-Gh))%360;break a}}}Od=qd}if(mc instanceof Qg){var bd="";null!==mc.graduatedFunction?(bd=mc.graduatedFunction(nc,mc),bd=null!==bd&&void 0!==bd?bd.toString():""):bd=(+nc.toFixed(2)).toString();""!==bd&&pd.push({Hl:Fh,angle:Od,text:bd})}else pd.push({Hl:Fh,angle:Od})}nc=Ii+Nd*Mf}}}a.graduatedMarks.push(pd)}Ga(B); +var ib=a.graduatedMarks;if(null!==ib)for(var Ji=d.length,Vb=0;Vbcd;cd++){switch(cd){case 0:ic.h(Ed,rd);break;case 1:ic.h(Ed+Hh,rd);break;case 2:ic.h(Ed,rd+Pf);break;case 3:ic.h(Ed+Hh,rd+Pf)}ic.rotate(Oa+Va.angle);ic.offset(pk,Jh);0===Ih&&0===cd?Fc.h(ic.x,ic.y,0,0):Fc.Me(ic);ic.offset(-pk,-Jh);ic.rotate(-Oa-Va.angle)}I.free(ic);null!==oe.graduatedBounds&&oe.graduatedBounds.push(Fc);Zb(Me,Fc.x,Fc.y,Fc.width,Fc.height)}else if(Va instanceof Qg){var Sc=a,qk=e;null===Sc.temporaryTextBlock&&(Sc.temporaryTextBlock=new Qg);var oc=Sc.temporaryTextBlock;Sm(oc,Va); +var Ne=Va.alignmentFocus;Ne.Fc()&&(Ne=uc);for(var Tc=Va.segmentOrientation,Kh=Va.segmentOffset,nf=new M,Ki=0,Lh=0,Fd=0,Qf=0,of=0,Mh=Wb.length,Oe=0;OeFd||225Fd)&&sd.rotate(-Fd,Qe/2,Rf/2);var wg=M.allocAt(0,0,Qe,Rf),Re=I.alloc();Re.oi(wg,Ne);sd.Fa(Re);var xg=-Re.x,Mn=-Re.y,qe=I.alloc();qe.assign(Kh);isNaN(qe.x)&&(qe.x=Qe/2+3);isNaN(qe.y)&&(qe.y=-(Rf/2+3));qe.rotate(Fd);Ki+=qe.x+xg;Lh+=qe.y+Mn;var Sf=new M(Ki,Lh,Pe.width,Pe.height),Li=new M(Pe.x,Pe.y,Pe.width,Pe.height),Nn=new M(pe.x,pe.y,pe.width,pe.height); -Pd.Az=Qf;Pd.lineCount=oc.lineCount;Pd.lines=[oc.yb,oc.zh,oc.Se,oc.ze,oc.Ic,oc.Wb,oc.pe];Pd.actualBounds=Sf;Pd.measuredBounds=Li;Pd.naturalBounds=Nn;0===Oe?nf.assign(Sf):nf.Xc(Sf);I.free(qe);I.free(Re);M.free(wg);md.free(sd)}null!==Sc.graduatedBounds&&Sc.graduatedBounds.push(nf);Zb(qk,nf.x,nf.y,nf.width,nf.height)}ij(Ua,!1)}}}; +Pd.Az=Qf;Pd.lineCount=oc.lineCount;Pd.lines=[oc.yb,oc.zh,oc.Te,oc.Ae,oc.Jc,oc.Wb,oc.qe];Pd.actualBounds=Sf;Pd.measuredBounds=Li;Pd.naturalBounds=Nn;0===Oe?nf.assign(Sf):nf.Xc(Sf);I.free(qe);I.free(Re);M.free(wg);md.free(sd)}null!==Sc.graduatedBounds&&Sc.graduatedBounds.push(nf);Zb(qk,nf.x,nf.y,nf.width,nf.height)}ij(Va,!1)}}}; Rm.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=e&&(e=1);for(var g=f.actualBounds,h=a.R.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* -n.scale,w=n.alignmentFocus;w.Ec()&&(w=uc);for(var v=0;v=e&&(e=1);for(var g=f.actualBounds,h=a.R.s,k=a.graduatedMarks,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e&&null===n.graduatedSkip)){var q=n.measuredBounds,u=n.strokeWidth* +n.scale,w=n.alignmentFocus;w.Fc()&&(w=uc);for(var v=0;vf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){gi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.Gr(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-=p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ub;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Er()}}}} -function Vm(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=Xm(a,!0),l=Xm(a,!1),m=0;mp)){var r=n.Pc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= +function Vm(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=Xm(a,!0),l=Xm(a,!1),m=0;mp)){var r=n.Qc(),q=n.separatorStrokeWidth;isNaN(q)&&(q=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))q=0;r-= q;q=n.position+q;r+=n.actual;q+r>p&&(r=p-q);0>=r||(p=a.ub,gi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,q+p.top,g.width-(p.left+p.right),r):b.fillRect(q+p.left,p.top,r,g.height-(p.top+p.bottom)))}}}}function Xm(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(q),I.free(q));I.free(m);f&&e.transform(g);return l}; t.w=function(a){if(!nj(this)){Y.prototype.w.call(this,a);a=null;if(this.qa===W.Auto||this.qa===W.Link)a=this.vb();for(var b=this.R.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.w(!0);this.measure(c+h,d+g,0,0);break;case Vk:this.w(!0);this.measure(c+h,f+g,0,0);break;case Wk:this.w(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.ag)}}; +t.Jk=function(){if(0!==(this.o&2048)===!1){yl(this,!0);zl(this,!0);for(var a=this.R.s,b=a.length,c=0;cc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.w(!0);this.measure(c+h,d+g,0,0);break;case Vk:this.w(!0);this.measure(c+h,f+g,0,0);break;case Wk:this.w(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.bg)}}; t.Xg=function(a){var b=this.naturalBounds,c=um(this);if($b(0,0,b.width,b.height,a.x,a.y)){b=this.R.s;for(var d=b.length,e=I.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(yb(e.set(a),f.transform),f.ba(e))return I.free(e),!0}I.free(e);return null===this.Yb&&null===this.areaBackground?!1:!0}return!1};t.Hr=function(a){if(this.bindingId===a)return this;for(var b=this.R.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=md.alloc();p.set(g); -if(null!==m?m.sf(a,b,c,d,e,p):hl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);md.free(p)}}}void 0===f&&md.free(g);return d}void 0===f&&md.free(g);return!1};function dn(a,b,c,d){for(var e=a.R.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&dn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} -t.gg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.je(),k=h?a:yb(I.allocAt(a.x,a.y),this.transform),l=h?b:yb(I.allocAt(b.x,b.y),this.transform),m=k.qf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(q.je()?(u=q.transform,yb(k.set(a),u),yb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof W?q:null,null!==q?q.gg(k,l,c,d,e,f):u.Uw(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}I.free(k);I.free(l)}return e?n:g}return!1}; +t.tf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=md.alloc(),g.reset());g.multiply(this.transform);if(this.Wg(a,g))return dn(this,b,c,e),void 0===f&&md.free(g),!0;if(this.Sc(a,g)){if(!this.isAtomic)for(var h=um(this),k=this.R.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=md.alloc();p.set(g); +if(null!==m?m.tf(a,b,c,d,e,p):hl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);md.free(p)}}}void 0===f&&md.free(g);return d}void 0===f&&md.free(g);return!1};function dn(a,b,c,d){for(var e=a.R.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&dn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.hg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.ke(),k=h?a:yb(I.allocAt(a.x,a.y),this.transform),l=h?b:yb(I.allocAt(b.x,b.y),this.transform),m=k.rf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(q.ke()?(u=q.transform,yb(k.set(a),u),yb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof W?q:null,null!==q?q.hg(k,l,c,d,e,f):u.Vw(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}I.free(k);I.free(l)}return e?n:g}return!1}; function Am(a){var b=null;a instanceof Cf&&(b=a.spot1,b===Wc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=tc);return b}function Bm(a){var b=null;a instanceof Cf&&(b=a.spot2,b===Wc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Cc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Cb(a,b);if(0===a||b.isPanelMain)this.Qg=null;nj(this)||this.w();b.w(!1);null!==b.portId?this.Ge=!0:b instanceof W&&!0===b.Ge&&(this.Ge=!0);this.graduatedIntervals=null;this.xf()||en(this,b,!1);c=this.part;null!==c&&(c.Kh=null,c.Rf=NaN,this.Ge&&c instanceof V&&(c.Ge=!0),c.Ge&&c instanceof V&&(c.sc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.bb(ge,"elements",this,b,null,d,null),c.bb(fe,"elements",this,null,b,null,a)))};function fn(a,b){a.m=b?a.m|16777216:a.m&-16777217}t.remove=function(a){for(var b=this.R.s,c=b.length,d=-1,e=0;e=e.count&&a>=e.count)return; +e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Cb(a,b);if(0===a||b.isPanelMain)this.Qg=null;nj(this)||this.w();b.w(!1);null!==b.portId?this.He=!0:b instanceof W&&!0===b.He&&(this.He=!0);this.graduatedIntervals=null;this.yf()||en(this,b,!1);c=this.part;null!==c&&(c.Kh=null,c.Sf=NaN,this.He&&c instanceof V&&(c.He=!0),c.He&&c instanceof V&&(c.sc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.bb(ge,"elements",this,b,null,d,null),c.bb(fe,"elements",this,null,b,null,a)))};function fn(a,b){a.o=b?a.o|16777216:a.o&-16777217}t.remove=function(a){for(var b=this.R.s,c=b.length,d=-1,e=0;ea&&wa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Oj;c.ni(this);c.isRow=!0;c.index=a;b[a]=c;this.bb(fe,"rowdefs",this,null,c,null,a)}return b[a]};W.prototype.Vz=function(a){0>a&&wa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.bb(ge,"rowdefs",this,c,null,a,null);this.w()}}}; function Pj(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof Oj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}}W.prototype.getColumnDefinition=function(a){0>a&&wa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Oj;c.ni(this);c.isRow=!1;c.index=a;b[a]=c;this.bb(fe,"coldefs",this,null,c,null,a)}return b[a]};t=W.prototype; t.Qz=function(a){0>a&&wa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.bb(ge,"coldefs",this,c,null,a,null);this.w()}}};function Qj(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof Oj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} t.Wy=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;ea;)this.lc(this.R.length-1,!1);jn(this,this.itemArray)}; -function jn(a,b){var c=bn(a);if(null===b||0===b.length)for(;a.R.length>c;)a.lc(a.R.length-1,!1);else if(a.R.length<=c){c=b.length;for(var d=0;dc)){var e=ln(a,b);e=mn(a,e);if(null!==e){kg(e);e=e.copy();if(0!==(e.m&16777216)){var f=a.Yg();null!==f&&fn(f,!0)}"object"===typeof b&&(null===a.Zd&&(a.Zd=new pb),a.Zd.add(b,e));f=c+bn(a);a.Cb(f,e);d&&(e.qb=b,nn(a,f,c),e.qb=null);e.data=b}}} +function jn(a,b){var c=bn(a);if(null===b||0===b.length)for(;a.R.length>c;)a.lc(a.R.length-1,!1);else if(a.R.length<=c){c=b.length;for(var d=0;dc)){var e=ln(a,b);e=mn(a,e);if(null!==e){kg(e);e=e.copy();if(0!==(e.o&16777216)){var f=a.Yg();null!==f&&fn(f,!0)}"object"===typeof b&&(null===a.$d&&(a.$d=new pb),a.$d.add(b,e));f=c+bn(a);a.Cb(f,e);d&&(e.qb=b,nn(a,f,c),e.qb=null);e.data=b}}} function nn(a,b,c){for(a=a.R;ba&&wa(a,">= 0",W,"padding"), -a=new ic(a)):(0>a.left&&wa(a.left,">= 0",W,"padding:value.left"),0>a.right&&wa(a.right,">= 0",W,"padding:value.right"),0>a.top&&wa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.w(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Bm},set:function(a){var b=this.Bm;b.C(a)||(this.Bm=a=a.J(),this.w(),this.g("defaultAlignment",b,a))}},defaultStretch:{ -get:function(){return this.Jf},set:function(a){var b=this.Jf;b!==a&&(this.Jf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.T?this.T.tp:qc},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.defaultSeparatorPadding;b.C(a)||(a=a.J(),null===this.T&&(this.T=new sn),this.T.tp=a,this.w(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== +a=new ec(a)):(0>a.left&&wa(a.left,">= 0",W,"padding:value.left"),0>a.right&&wa(a.right,">= 0",W,"padding:value.right"),0>a.top&&wa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.w(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Bm},set:function(a){var b=this.Bm;b.C(a)||(this.Bm=a=a.J(),this.w(),this.g("defaultAlignment",b,a))}},defaultStretch:{ +get:function(){return this.Kf},set:function(a){var b=this.Kf;b!==a&&(this.Kf=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.T?this.T.tp:qc},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.defaultSeparatorPadding;b.C(a)||(a=a.J(),null===this.T&&(this.T=new sn),this.T.tp=a,this.w(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== this.T?this.T.ga:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof nl)&&(a instanceof nl&&a.freeze(),null===this.T&&(this.T=new sn),this.T.ga=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.T?this.T.Ga:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.T&&(this.T=new sn),this.T.Ga=a,this.w(), -this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.T?this.T.Y:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.T&&(this.T=new sn),this.T.Db=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.T?this.T.cb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ -a),null===this.T&&(this.T=new sn),this.T.cb=a,this.w(),this.g("leftIndex",b,a))}},data:{get:function(){return this.qb},set:function(a){var b=this.qb;if(b!==a){var c=this instanceof U&&!(this instanceof ue);kg(this);this.qb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.Qe.remove(b),null!==a&&c.Qe.add(a,this)):this instanceof U&&(null!==b&&c.Re.remove(b),null!==a&&c.Re.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b), -null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ka()}}},itemIndex:{get:function(){return this.fn},set:function(a){var b=this.fn;b!==a&&(this.fn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.hb=a)}},itemArray:{get:function(){return this.xh}, +a),null===this.T&&(this.T=new sn),this.T.cb=a,this.w(),this.g("leftIndex",b,a))}},data:{get:function(){return this.qb},set:function(a){var b=this.qb;if(b!==a){var c=this instanceof U&&!(this instanceof ue);kg(this);this.qb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.Re.remove(b),null!==a&&c.Re.add(a,this)):this instanceof U&&(null!==b&&c.Se.remove(b),null!==a&&c.Se.add(a,this))):(c=this.panel,null!==c&&null!==c.$d&&(null!==b&&c.$d.remove(b), +null!==a&&c.$d.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ka()}}},itemIndex:{get:function(){return this.fn},set:function(a){var b=this.fn;b!==a&&(this.fn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new cl),this.A.hb=a)}},itemArray:{get:function(){return this.xh}, set:function(a){var b=this.xh;if(b!==a||null!==a&&hn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Fj(c.partManager,this,c),this.xh=a,null!==c&&null!==a&&Cj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||jn(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new pb}var b=this.itemTemplateMap.I(""); -b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Vu())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.ke:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););bl(this);this.A.ke=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| -this.Vu()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Hc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(bl(this),this.A.Hc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(this.m^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.m&2097152)}, -set:function(a){var b=0!==(this.m&2097152);b!==a&&(this.m^=2097152,this instanceof qf&&(this.ib=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.m&33554432)},set:function(a){var b=0!==(this.m&33554432);b!==a&&(this.m^=33554432,this.w(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);if(b!==a){var c=null===this.panel||this.panel.xf(); -this.m^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&en(this,this,a)}}},alignmentFocusName:{get:function(){return this.Oe},set:function(a){var b=this.Oe;b!==a&&(this.Oe=a,this.w(),this.g("alignmentFocusName",b,a))}}}); +b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Vu())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.le:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););bl(this);this.A.le=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| +this.Vu()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Ic:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(bl(this),this.A.Ic=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.o&2097152)}, +set:function(a){var b=0!==(this.o&2097152);b!==a&&(this.o^=2097152,this instanceof qf&&(this.ib=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.o&33554432)},set:function(a){var b=0!==(this.o&33554432);b!==a&&(this.o^=33554432,this.w(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);if(b!==a){var c=null===this.panel||this.panel.yf(); +this.o^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&en(this,this,a)}}},alignmentFocusName:{get:function(){return this.Pe},set:function(a){var b=this.Pe;b!==a&&(this.Pe=a,this.w(),this.g("alignmentFocusName",b,a))}}}); ma.Object.defineProperties(W,{Position:{get:function(){return Kl.I("Position")}},Horizontal:{get:function(){return Kl.I("Horizontal")}},Vertical:{get:function(){return Kl.I("Vertical")}},Spot:{get:function(){return Kl.I("Spot")}},Auto:{get:function(){return Kl.I("Auto")}},Table:{get:function(){return Kl.I("Table")}},Viewbox:{ get:function(){return Kl.I("Viewbox")}},TableRow:{get:function(){return Kl.I("TableRow")}},TableColumn:{get:function(){return Kl.I("TableColumn")}},Link:{get:function(){return Kl.I("Link")}},Grid:{get:function(){return Kl.I("Grid")}},Graduated:{get:function(){return Kl.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Vu; -W.prototype.findItemPanelForData=W.prototype.Tw;W.prototype.updateTargetBindings=W.prototype.Ka;W.prototype.copyTemplate=W.prototype.By;W.prototype.graduatedValueForPoint=W.prototype.nz;W.prototype.graduatedPointForValue=W.prototype.mz;W.prototype.findColumnForLocalX=W.prototype.Oy;W.prototype.findRowForLocalY=W.prototype.Wy;W.prototype.removeColumnDefinition=W.prototype.Qz;W.prototype.removeRowDefinition=W.prototype.Vz;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove; +W.prototype.findItemPanelForData=W.prototype.Uw;W.prototype.updateTargetBindings=W.prototype.Ka;W.prototype.copyTemplate=W.prototype.By;W.prototype.graduatedValueForPoint=W.prototype.nz;W.prototype.graduatedPointForValue=W.prototype.mz;W.prototype.findColumnForLocalX=W.prototype.Oy;W.prototype.findRowForLocalY=W.prototype.Wy;W.prototype.removeColumnDefinition=W.prototype.Qz;W.prototype.removeRowDefinition=W.prototype.Vz;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove; W.prototype.insertAt=W.prototype.Cb;W.prototype.elt=W.prototype.K;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.fb;W.prototype.findInVisualTree=W.prototype.vl;W.prototype.walkVisualTreeFrom=W.prototype.$l;W.prototype.findMainElement=W.prototype.vb;var pn=!1,qn=null,Kl=new pb;W.className="Panel";W.definePanelLayout=rn;rn("Position",new tm);rn("Vertical",new wm);rn("Auto",new zm);rn("Link",new Km); -function tn(){this.Np=0;this.F=100;this.ga=10;this.Y=0;this.Sh=this.o=this.j=this.u=null}tn.prototype.copy=function(){var a=new tn;a.Np=this.Np;a.F=this.F;a.ga=this.ga;a.Y=this.Y;a.u=this.u;a.j=this.j;a.o=this.o;a.Sh=this.Sh;return a};tn.className="GradPanelSettings";function sn(){this.Hc=[];this.Gc=[];this.j=this.nb=un;this.cb=this.Db=0;this.tp=qc;this.Ga=1;this.Y=this.ga=null;this.F=1;this.hb=this.o=this.u=null} -sn.prototype.copy=function(a){for(var b=new sn,c=this.Hc,d=c.length,e=b.Hc,f=0;fa&&wa(a,">= 0",Oj,"height"),this.zc=a,this.actual=this.ma,null!==this.panel&&this.panel.w(), -this.Kb("height",b,a))}},width:{get:function(){return this.zc},set:function(a){var b=this.zc;b!==a&&(0>a&&wa(a,">= 0",Oj,"width"),this.zc=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("width",b,a))}},minimum:{get:function(){return this.ej},set:function(a){var b=this.ej;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Oj,"minimum"),this.ej=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("minimum",b,a))}},maximum:{ -get:function(){return this.cj},set:function(a){var b=this.cj;b!==a&&(0>a&&wa(a,">= 0",Oj,"maximum"),this.cj=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("maximum",b,a))}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(this.Fb=a.J(),null!==this.panel&&this.panel.w(),this.Kb("alignment",b,a))}},stretch:{get:function(){return this.Zf},set:function(a){var b=this.Zf;b!==a&&(this.Zf= -a,null!==this.panel&&this.panel.w(),this.Kb("stretch",b,a))}},separatorPadding:{get:function(){return this.Vf},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.Vf;null!==a&&null!==b&&b.C(a)||(null!==a&&(a=a.J()),this.Vf=a,null!==this.panel&&this.panel.w(),this.Kb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.On},set:function(a){var b=this.On;b!==a&&(null!==a&&Pl(a,"RowColumnDefinition.separatorStroke"), +ma.Object.defineProperties(Oj.prototype,{panel:{get:function(){return this.Uf}},isRow:{get:function(){return this.Wp},set:function(a){this.Wp=a}},index:{get:function(){return this.Wa},set:function(a){this.Wa=a}},height:{get:function(){return this.Ac},set:function(a){var b=this.Ac;b!==a&&(0>a&&wa(a,">= 0",Oj,"height"),this.Ac=a,this.actual=this.ma,null!==this.panel&&this.panel.w(), +this.Kb("height",b,a))}},width:{get:function(){return this.Ac},set:function(a){var b=this.Ac;b!==a&&(0>a&&wa(a,">= 0",Oj,"width"),this.Ac=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("width",b,a))}},minimum:{get:function(){return this.ej},set:function(a){var b=this.ej;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Oj,"minimum"),this.ej=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("minimum",b,a))}},maximum:{ +get:function(){return this.cj},set:function(a){var b=this.cj;b!==a&&(0>a&&wa(a,">= 0",Oj,"maximum"),this.cj=a,this.actual=this.ma,null!==this.panel&&this.panel.w(),this.Kb("maximum",b,a))}},alignment:{get:function(){return this.Fb},set:function(a){var b=this.Fb;b.C(a)||(this.Fb=a.J(),null!==this.panel&&this.panel.w(),this.Kb("alignment",b,a))}},stretch:{get:function(){return this.$f},set:function(a){var b=this.$f;b!==a&&(this.$f= +a,null!==this.panel&&this.panel.w(),this.Kb("stretch",b,a))}},separatorPadding:{get:function(){return this.Wf},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.Wf;null!==a&&null!==b&&b.C(a)||(null!==a&&(a=a.J()),this.Wf=a,null!==this.panel&&this.panel.w(),this.Kb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.On},set:function(a){var b=this.On;b!==a&&(null!==a&&Pl(a,"RowColumnDefinition.separatorStroke"), a instanceof nl&&a.freeze(),this.On=a,null!==this.panel&&this.panel.w(),this.Kb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Pn},set:function(a){var b=this.Pn;b!==a&&(this.Pn=a,null!==this.panel&&this.panel.w(),this.Kb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.oj},set:function(a){var b=this.oj;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Ga(w);return}e>q?(z=e-q,e=q):z=0;var y=Math.sqrt(e*e/(1+p*p));0>n&&(y=-y);h+=y;k+=p*y;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.ai(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){v++;if(v===w.length){Ga(w);return}q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Ga(w)}} -t.ai=function(a,b){var c=this.Mc,d=this.Ak;if(null!==c||null!==d){var e=this.sa;if(null!==e){a.Oc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&gi(this,a,d,!0,!1,g,f);var h=this.part,k=this.$f;null===c||0!==k||null===h||!this.isPanelMain&&h.vb()!==this||(k=h.type===W.Link&&h instanceof ue&&"Selection"===h.category&&h.adornedObject instanceof Cf&&h.adornedPart.vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(gi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= -this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Fe("drawShadows")&&(f=h.isShadowed);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.Gr(k,this.strokeDashOffset));if(e.type===O.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.si();else if(e.type===O.u){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n-k);a.beginPath();a.rect(e, -p,l,k);null!==d&&a.rf(d);if(null!==c){h&&f&&rl(a);if(0===l||0===k)a.beginPath(),a.rect(e,p,Math.max(l,.1),Math.max(k,.1));a.si();h&&f&&ql(a)}}else if(e.type===O.F)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+J.mg*e,k-p,l+e,k-J.mg*p,l+e,k),a.bezierCurveTo(l+e,k+J.mg*p,l+J.mg*e,k+p,l,k+p),a.bezierCurveTo(l-J.mg*e,k+p,l-e,k+J.mg*p,l-e,k),a.bezierCurveTo(l-e,k-J.mg*p,l-J.mg*e,k-p,l,k-p), -a.closePath(),null!==d&&a.rf(d),null!==c&&(h&&f?(rl(a),a.si(),ql(a)):a.si());else if(e.type===O.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==r?r.endX:l.startX,null!==r?r.endY:l.startY)}else if(r=Rd(u,l),w=r.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;v(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return J.Tb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== -O.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Qc(-d,-d);if(f.ba(a))return M.free(f),!1;f.Qc(d,d)}null!==this.stroke&&f.Qc(e,e);a=f.ba(a);M.free(f);return a}if(c.type===O.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===O.o)return M.free(f),null===this.fill?Vd(c,a.x,a.y,e):Td(c,a,e,1(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return J.Tb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== +O.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.vc(-d,-d);if(f.ba(a))return M.free(f),!1;f.vc(d,d)}null!==this.stroke&&f.vc(e,e);a=f.ba(a);M.free(f);return a}if(c.type===O.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), +!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===O.m)return M.free(f),null===this.fill?Vd(c,a.x,a.y,e):Td(c,a,e,1=this.strokeWidth)m=J.Ie(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), -d=m*b);b=Ea();a=new I;J.Ie(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Ie(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* -(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),v-=q,z-= -u;r.contains(v,z);)v-=q,z-=u;e.x=h;e.y=k;for(u=0;u=this.strokeWidth)m=J.Je(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), +d=m*b);b=Ea();a=new I;J.Je(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new I;J.Je(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* +(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),v-=q,z-= +u;r.contains(v,z);)v-=q,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||J.ca(k.y,a))&&(k.yb||J.ca(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} -t.Uw=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Xg(a,!0))return!0;var e=a.qf(b),f=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.Xg(a,!0))return!0;var e=a.rf(b),f=e;1.5=e||Ab(b,f,0,-n)>=e||Ab(b, -f,0,n)>=e||Ab(b,f,m,0)>=e?!1:!0}else if(b.type===O.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&zb(a.x,a.y,f,h,k,h)>e&&zb(a.x,a.y,k,l,f,l)>e&&zb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Vd(b,a.x,a.y,f):Td(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Kd:var p=Ea();J.Ce(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Ld:p=Ea();J.Go(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Md:case Qd:p=n.type===Md?Rd(n,f):Sd(n,f,g,m);var r=p.length;if(0===r){g=n.type===Md?n.centerX:n.endX;m=n.type===Md?n.centerY:n.endY;if(a.td(g,m)>e)return!1; -break}n=null;for(var q=Ea(),u=0;u=e||Ab(b,f,m,0)>=e?!1:!0}else if(b.type===O.m){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&zb(a.x,a.y,f,h,k,h)>e&&zb(a.x,a.y,k,l,f,l)>e&&zb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Vd(b,a.x,a.y,f):Td(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Kd:var p=Ea();J.De(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Ld:p=Ea();J.Go(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.td(g,m)>e)return!1;break;case Md:case Qd:p=n.type===Md?Rd(n,f):Sd(n,f,g,m);var r=p.length;if(0===r){g=n.type===Md?n.centerX:n.endX;m=n.type===Md?n.centerY:n.endY;if(a.td(g,m)>e)return!1; +break}n=null;for(var q=Ea(),u=0;u= 0",Cf,"strokeWidth:value")}},strokeCap:{ +ma.Object.defineProperties(Cf.prototype,{geometry:{get:function(){return null!==this.sa?this.sa:this.Hd},set:function(a){var b=this.sa,c=this.Hd;if(b!==a){null!==a?this.Hd=this.sa=a.freeze():this.Hd=this.sa=null;var d=this.part;null!==d&&(d.Sf=NaN);this.w();this.g("geometry",b||c,a);el(this)&&(a=this.part,null!==a&&fl(this,a,"geometryString"))}}},geometryString:{get:function(){return null===this.geometry?"":this.geometry.toString()},set:function(a){a= +O.parse(a);var b=a.normalize();this.geometry=a;this.position=a=I.allocAt(-b.x,-b.y);I.free(a)}},isGeometryPositioned:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{get:function(){return this.Ak},set:function(a){var b=this.Ak;b!==a&&(null!==a&&Pl(a,"Shape.fill"),a instanceof nl&&a.freeze(),this.Ak=a,this.N(),this.g("fill", +b,a))}},stroke:{get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(null!==a&&Pl(a,"Shape.stroke"),a instanceof nl&&a.freeze(),this.Nc=a,this.N(),this.g("stroke",b,a))}},strokeWidth:{get:function(){return this.ag},set:function(a){var b=this.ag;if(b!==a)if(0<=a){this.ag=a;this.w();var c=this.part;null!==c&&(c.Sf=NaN);this.g("strokeWidth",b,a)}else wa(a,"value >= 0",Cf,"strokeWidth:value")}},strokeCap:{ get:function(){return null!==this.Na?this.Na.dr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?wa(a,'"butt", "round", or "square"',Cf,"strokeCap"):(wn(this),this.Na.dr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.er:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?wa(a,'"miter", "bevel", or "round"', -Cf,"strokeJoin"):(wn(this),this.Na.er=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.fr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){wn(this);this.Na.fr=a;this.N();var c=this.part;null!==c&&(c.Rf=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Og},set:function(a){var b=this.Og;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.Zb!==a&&(c=!1);!1===b.Fe("textGreeking")&& -(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case $k:a.translate(e,0);a.scale(-1,1);break;case Zk:a.translate(0,f);a.scale(1,-1);break;case al:a.translate(e,f),a.scale(-1,-1)}a.Oc();m=this.dd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.pe)n=this.yb,n>e&&(n=e),this.$h(this.pe,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Ic&&null!==this.Wb)for(p=0;pe&&(r=e);d+=b;this.$h(this.Wb[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case $k:a.scale(-1, +function Sm(a,b){a.o=b.o|6144;a.tb=b.opacity;a.Yb=b.background;a.areaBackground=b.areaBackground;a.$c=b.desiredSize.J();a.minSize=b.minSize.J();a.maxSize=b.maxSize.J();null!==b.Ib?a.Ib=b.Ib.copy():a.Ib=null;a.xa=b.scale;a.Gb=b.angle;a.stretch=b.stretch;a.Ag=b.margin.J();a.Fb=b.alignment.J();a.fk=b.alignmentFocus.J();a.segmentFraction=b.segmentFraction;a.segmentOffset=b.segmentOffset.J();a.segmentOrientation=b.segmentOrientation;null!==b.ib&&(a.ib=b.ib.copy());a.shadowVisible=b.shadowVisible;a.cc= +b.cc;a.Nc=b.Nc;a.re=b.re;null!==a.fa&&(a.fa=b.fa.copy());null!==b.da&&(a.da=b.da.ic?b.da:b.da.copy());a.zh=b.zh}t.ob=function(a){a.classType===Qg?this.wrap=a:Y.prototype.ob.call(this,a)};t.toString=function(){return 22(n*n+m*m)*p*p&&(c=!0);b.Zb!==a&&(c=!1);!1===b.Ge("textGreeking")&& +(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case $k:a.translate(e,0);a.scale(-1,1);break;case Zk:a.translate(0,f);a.scale(1,-1);break;case al:a.translate(e,f),a.scale(-1,-1)}a.Pc();m=this.dd;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.qe)n=this.yb,n>e&&(n=e),this.$h(this.qe,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Jc&&null!==this.Wb)for(p=0;pe&&(r=e);d+=b;this.$h(this.Wb[p],a,0,d,e,g,r,c,h,k,l);d+=g+n}switch(this.flip){case $k:a.scale(-1, 1);a.translate(-e,0);break;case Zk:a.scale(1,-1);a.translate(0,-f);break;case al:a.scale(-1,-1),a.translate(-e,-f)}}}; t.$h=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==Tn?Tn(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==Un?Un(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ n+g,d),b.stroke()))}; -t.El=function(a,b,c,d){this.zh=a;var e=this.qe;null!==In&&Vn!==e&&(Vn=In.font=e);this.yb=this.ze=0;this.pe=this.Wb=this.Ic=this.Se=null;var f;if(isNaN(this.desiredSize.width)){e=this.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===Wn&&(g=g.trim());f=Math.max(f,Xn(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=Xn(e);e=Math.min(e, -a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=Yn(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.yb&&null!==this.Ic&&null!==this.Wb&&this.overflow===Zn&&(b=this.qe,b=this.overflow===Zn?$n(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,Sn(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.Wb.length))){k=this.Wb[h];for(b=Math.max(1, -a-b);Xn(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===fo){a.ze=1;var l=Xn(b);if(0===k||l<=c)a.yb=Math.max(a.yb,l),co(a,b,a.yb),null!==d&&d.h(l,h);else{f=go(a,g);g=g.substr(f.length);b=go(a,g);for(l=Xn(f+b);0 +t.El=function(a,b,c,d){this.zh=a;var e=this.re;null!==In&&Vn!==e&&(Vn=In.font=e);this.yb=this.Ae=0;this.qe=this.Wb=this.Jc=this.Te=null;var f;if(isNaN(this.desiredSize.width)){e=this.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.formatting===Wn&&(g=g.trim());f=Math.max(f,Xn(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=Xn(e);e=Math.min(e, +a/this.scale);e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=Yn(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.yb&&null!==this.Jc&&null!==this.Wb&&this.overflow===Zn&&(b=this.re,b=this.overflow===Zn?$n(b):0,k=this.spacingAbove+this.spacingBelow,k=Math.max(0,Sn(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.Wb.length))){k=this.Wb[h];for(b=Math.max(1, +a-b);Xn(k)>b&&1=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===fo){a.Ae=1;var l=Xn(b);if(0===k||l<=c)a.yb=Math.max(a.yb,l),co(a,b,a.yb),null!==d&&d.h(l,h);else{f=go(a,g);g=g.substr(f.length);b=go(a,g);for(l=Xn(f+b);0 c&&1c;){var n=1;l=Xn(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Xn(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);co(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.dd+k>a.maxLines)break}m=go(a,g);for(l=Xn(b+m);0a.maxLines))break}a.ze=Math.min(a.maxLines,k);a.yb=Math.max(a.yb,f);null!==d&&d.h(a.yb,h*a.ze)}} -function go(a,b){if(a.wrap===ho)return b.substr(0,1);for(var c=b.length,d=0,e=io;d=b.length?b:b.substr(0,d)}function Xn(a){return null===In?8*a.length:In.measureText(a).width}function Sn(a){if(null!==a.Se)return a.Se;var b=a.qe;if(null===In){var c=16;return a.Se=c}void 0!==ko[b]&&5E3>lo?c=ko[b]:(c=1.3*In.measureText("M").width,ko[b]=c,lo++);return a.Se=c} +l=Xn(l);e&&(b=b.trim());if(""!==b&&("\u00ad"===b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=Xn(b),f=Math.max(f,m)),co(a,b,n),k++,a.dd+k>a.maxLines))break}a.Ae=Math.min(a.maxLines,k);a.yb=Math.max(a.yb,f);null!==d&&d.h(a.yb,h*a.Ae)}} +function go(a,b){if(a.wrap===ho)return b.substr(0,1);for(var c=b.length,d=0,e=io;d=b.length?b:b.substr(0,d)}function Xn(a){return null===In?8*a.length:In.measureText(a).width}function Sn(a){if(null!==a.Te)return a.Te;var b=a.re;if(null===In){var c=16;return a.Te=c}void 0!==ko[b]&&5E3>lo?c=ko[b]:(c=1.3*In.measureText("M").width,ko[b]=c,lo++);return a.Te=c} function $n(a){if(null===In)return 6;if(void 0!==mo[a]&&5E3>no)var b=mo[a];else b=In.measureText(ao).width,mo[a]=b,no++;return b} -function Yn(a,b){var c=a.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Sn(a)+d);if(0===c.length)return a.yb=0,a.dd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.dd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==fo){a.ze=0;var k=K.alloc();eo(a,f,b,k);e+=k.height;K.free(k);a.dd+=a.ze}else eo(a,f,b,null),e+=d,a.dd++;a.dd===a.maxLines&&(h=!0)}f=g+1}return a.kq=e} -ma.Object.defineProperties(Qg.prototype,{font:{get:function(){return this.qe},set:function(a){var b=this.qe;b!==a&&(this.qe=a,this.Se=null,this.w(),this.g("font",b,a))}},text:{get:function(){return this.cc},set:function(a){var b=this.cc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.cc=a,this.w(),this.g("text",b,a))}},textAlign:{get:function(){return null!==this.da?this.da.mr:"start"},set:function(a){var b= -this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(Jn(this),this.da.mr=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Mf:lg},set:function(a){var b=this.flip;b!==a&&(Jn(this),this.da.Mf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.xr:Zc},set:function(a){var b=this.verticalAlignment;b.C(a)||(a=a.J(),Jn(this),this.da.xr= -a,Al(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.bc.v()){var a=K.alloc();eo(this,this.cc,999999,a);var b=a.width;K.free(a);a=Yn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Qb(this.bc,b,a)}return this.bc}},isMultiline:{get:function(){return 0!==(this.m&2097152)},set:function(a){var b=0!==(this.m&2097152);b!==a&&(this.m^=2097152,this.w(),this.g("isMultiline",b, -a))}},isUnderline:{get:function(){return 0!==(this.m&4194304)},set:function(a){var b=0!==(this.m&4194304);b!==a&&(this.m^=4194304,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.m&8388608)},set:function(a){var b=0!==(this.m&8388608);b!==a&&(this.m^=8388608,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.Ar:oo},set:function(a){var b= -this.wrap;b!==a&&(Jn(this),this.da.Ar=a,this.w(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.yq:po},set:function(a){var b=this.overflow;b!==a&&(Jn(this),this.da.yq=a,this.w(),this.g("overflow",b,a))}},stroke:{get:function(){return this.Mc},set:function(a){var b=this.Mc;b!==a&&(null!==a&&Pl(a,"TextBlock.stroke"),a instanceof nl&&a.freeze(),this.Mc=a,this.N(),this.g("stroke",b,a))}},lineCount:{ -get:function(){return this.dd}},lineHeight:{get:function(){return Sn(this)}},editable:{get:function(){return 0!==(this.m&1048576)},set:function(a){var b=0!==(this.m&1048576);b!==a&&(this.m^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.pr:null},set:function(a){var b=this.textEditor;b!==a&&(Jn(this),this.da.pr=a,this.g("textEditor",b,a))}},errorFunction:{ +function Yn(a,b){var c=a.cc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Sn(a)+d);if(0===c.length)return a.yb=0,a.dd=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.dd=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.wrap!==fo){a.Ae=0;var k=K.alloc();eo(a,f,b,k);e+=k.height;K.free(k);a.dd+=a.Ae}else eo(a,f,b,null),e+=d,a.dd++;a.dd===a.maxLines&&(h=!0)}f=g+1}return a.kq=e} +ma.Object.defineProperties(Qg.prototype,{font:{get:function(){return this.re},set:function(a){var b=this.re;b!==a&&(this.re=a,this.Te=null,this.w(),this.g("font",b,a))}},text:{get:function(){return this.cc},set:function(a){var b=this.cc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.cc=a,this.w(),this.g("text",b,a))}},textAlign:{get:function(){return null!==this.da?this.da.mr:"start"},set:function(a){var b= +this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(Jn(this),this.da.mr=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Nf:lg},set:function(a){var b=this.flip;b!==a&&(Jn(this),this.da.Nf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.xr:Zc},set:function(a){var b=this.verticalAlignment;b.C(a)||(a=a.J(),Jn(this),this.da.xr= +a,Al(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.bc.v()){var a=K.alloc();eo(this,this.cc,999999,a);var b=a.width;K.free(a);a=Yn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Qb(this.bc,b,a)}return this.bc}},isMultiline:{get:function(){return 0!==(this.o&2097152)},set:function(a){var b=0!==(this.o&2097152);b!==a&&(this.o^=2097152,this.w(),this.g("isMultiline",b, +a))}},isUnderline:{get:function(){return 0!==(this.o&4194304)},set:function(a){var b=0!==(this.o&4194304);b!==a&&(this.o^=4194304,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.o&8388608)},set:function(a){var b=0!==(this.o&8388608);b!==a&&(this.o^=8388608,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.Ar:oo},set:function(a){var b= +this.wrap;b!==a&&(Jn(this),this.da.Ar=a,this.w(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.yq:po},set:function(a){var b=this.overflow;b!==a&&(Jn(this),this.da.yq=a,this.w(),this.g("overflow",b,a))}},stroke:{get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(null!==a&&Pl(a,"TextBlock.stroke"),a instanceof nl&&a.freeze(),this.Nc=a,this.N(),this.g("stroke",b,a))}},lineCount:{ +get:function(){return this.dd}},lineHeight:{get:function(){return Sn(this)}},editable:{get:function(){return 0!==(this.o&1048576)},set:function(a){var b=0!==(this.o&1048576);b!==a&&(this.o^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.pr:null},set:function(a){var b=this.textEditor;b!==a&&(Jn(this),this.da.pr=a,this.g("textEditor",b,a))}},errorFunction:{ get:function(){return null!==this.da?this.da.zd:null},set:function(a){var b=this.errorFunction;b!==a&&(Jn(this),this.da.zd=a,this.g("errorFunction",b,a))}},interval:{get:function(){return null!==this.fa?this.fa.Ik:1},set:function(a){var b=this.interval;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.fa&&(this.fa=new Gn);this.fa.Ik=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{ get:function(){return null!==this.fa?this.fa.u:0},set:function(a){var b=this.graduatedStart;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Qg,"maxLines"),Jn(this),this.da.iq=a,this.w(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Ic?this.Ic:[this.yb],arrText:null!==this.Wb?this.Wb:[this.pe],maxLineWidth:this.yb,fontHeight:this.Se}}},choices:{get:function(){return this.om},set:function(a){var b=this.om;b!==a&&(this.om=a,this.g("choices",b,a))}}}); +set:function(a){var b=this.maxLines;b!==a&&(a=Math.floor(a),0>=a&&wa(a,"> 0",Qg,"maxLines"),Jn(this),this.da.iq=a,this.w(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Jc?this.Jc:[this.yb],arrText:null!==this.Wb?this.Wb:[this.qe],maxLineWidth:this.yb,fontHeight:this.Te}}},choices:{get:function(){return this.om},set:function(a){var b=this.om;b!==a&&(this.om=a,this.g("choices",b,a))}}}); var Tn=null,Un=null,fo=new D(Qg,"None",0),bo=new D(Qg,"WrapFit",1),oo=new D(Qg,"WrapDesiredSize",2),ho=new D(Qg,"WrapBreakAll",3),po=new D(Qg,"OverflowClip",0),Zn=new D(Qg,"OverflowEllipsis",1),Wn=new D(Qg,"FormatTrim",0),jo=new D(Qg,"FormatNone",0),io=/[ \u200b\u00ad]/,ko=new Wa,lo=0,mo=new Wa,no=0,ao="...",Vn="",In=null,Hn=!1;Qg.className="TextBlock"; -function Rn(){this.ic=!1;this.zd=null;this.Mf=lg;this.Jp=Wn;this.iq=Infinity;this.yq=po;this.ar=this.$q=0;this.mr="start";this.qj=this.pr=this.nr=null;this.xr=Zc;this.Ar=oo}Rn.prototype.copy=function(){var a=new Rn;a.zd=this.zd;a.Mf=this.Mf;a.Jp=this.Jp;a.iq=this.iq;a.yq=this.yq;a.$q=this.$q;a.ar=this.ar;a.mr=this.mr;a.nr=this.nr;a.pr=this.pr;a.qj=this.qj;a.xr=this.xr;a.Ar=this.Ar;return a};Qg.getEllipsis=function(){return ao};Qg.setEllipsis=function(a){ao=a;mo=new Wa;no=0};Qg.getBaseline=function(){return Tn}; +function Rn(){this.ic=!1;this.zd=null;this.Nf=lg;this.Jp=Wn;this.iq=Infinity;this.yq=po;this.ar=this.$q=0;this.mr="start";this.qj=this.pr=this.nr=null;this.xr=Zc;this.Ar=oo}Rn.prototype.copy=function(){var a=new Rn;a.zd=this.zd;a.Nf=this.Nf;a.Jp=this.Jp;a.iq=this.iq;a.yq=this.yq;a.$q=this.$q;a.ar=this.ar;a.mr=this.mr;a.nr=this.nr;a.pr=this.pr;a.qj=this.qj;a.xr=this.xr;a.Ar=this.Ar;return a};Qg.getEllipsis=function(){return ao};Qg.setEllipsis=function(a){ao=a;mo=new Wa;no=0};Qg.getBaseline=function(){return Tn}; Qg.setBaseline=function(a){Tn=a};Qg.getUnderline=function(){return Un};Qg.setUnderline=function(a){Un=a};Qg.isValidFont=function(a){Hn||(In=Og?(new Bk(null)).context:null,Hn=!0);if(null===In)return!0;var b=In.font;if(a===b||"10px sans-serif"===a)return!0;In.font="10px sans-serif";In.font=a;var c=In.font;if("10px sans-serif"!==c)return In.font=b,!0;In.font="19px serif";var d=In.font;In.font=a;c=In.font;In.font=b;return c!==d};Qg.FormatNone=jo;Qg.FormatTrim=Wn;Qg.None=fo;Qg.OverflowClip=po; -Qg.OverflowEllipsis=Zn;Qg.WrapBreakAll=ho;Qg.WrapDesiredSize=oo;Qg.WrapFit=bo;function Gn(){this.Ik=1;this.u=0;this.j=1;this.o=this.F=null}Gn.prototype.copy=function(){var a=new Gn;a.Ik=this.Ik;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};Gn.className="GradElementSettings"; -function Wj(a,b){Y.call(this);this.ug=null;this.Tn="";this.Ng=dc;this.Ck=td;this.Pg=this.zd=null;this.Bk=yc;this.Mf=lg;this.kl=null;this.Xm=!1;this.Mm=!0;this.Qk=!1;this.gl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var qo;la(Wj,Y);Wj.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.ug;a.Tn=this.Tn;a.Ng=this.Ng.J();a.Ck=this.Ck;a.Mf=this.Mf;a.zd=this.zd;a.Pg=this.Pg;a.Bk=this.Bk.J();a.Mm=this.Mm;a.gl=this.gl}; +Qg.OverflowEllipsis=Zn;Qg.WrapBreakAll=ho;Qg.WrapDesiredSize=oo;Qg.WrapFit=bo;function Gn(){this.Ik=1;this.u=0;this.j=1;this.m=this.F=null}Gn.prototype.copy=function(){var a=new Gn;a.Ik=this.Ik;a.u=this.u;a.j=this.j;a.F=this.F;a.m=this.m;return a};Gn.className="GradElementSettings"; +function Wj(a,b){Y.call(this);this.vg=null;this.Tn="";this.Ng=dc;this.Ck=td;this.Pg=this.zd=null;this.Bk=yc;this.Nf=lg;this.kl=null;this.Xm=!1;this.Mm=!0;this.Qk=!1;this.gl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var qo;la(Wj,Y);Wj.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.vg;a.Tn=this.Tn;a.Ng=this.Ng.J();a.Ck=this.Ck;a.Nf=this.Nf;a.zd=this.zd;a.Pg=this.Pg;a.Bk=this.Bk.J();a.Mm=this.Mm;a.gl=this.gl}; Wj.prototype.ob=function(a){a===lg||a===ng||a===Yk?this.imageStretch=a:Y.prototype.ob.call(this,a)};Wj.prototype.toString=function(){return"Picture("+this.source+")#"+cb(this)};function Bi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new Wa,ro=0)} -function so(a,b){b.Vx||(b.fq=function(c){b.Up=!0;b.Sm=!1;var d=b.rg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src")||"";var g=e.Fg.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case ng:case Yk:p===ng?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===Yk&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ -d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.tf()*b.scale;var q=m*p*n*p,u=h*g/q,w=c.__goCache;p=null;var v=to;if(c.Up&&void 0!==w&&4v*v)for(null===w.Zh&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.Zh,l=k.length,q=0;qv*v)for(null===w.Zh&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.Zh,l=k.length,q=0;qa)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=J.Cf[d];if(void 0!==e)return e;var f=a*J.mg;e=(new O).add((new Xd(a,0,!0)).add(new Yd(vd,b-a,0)).add(new Yd(Kd,b,a,b-f,0,b,f)).add(new Yd(vd,b,c-a)).add(new Yd(Kd,b-a,c,b,c-f,b-f,c)).add(new Yd(vd,a,c)).add(new Yd(Kd,0,c-a,f,c,0,c-f)).add(new Yd(vd,0,a)).add((new Yd(Kd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=J.Df[d];if(void 0!==e)return e;var f=a*J.ng;e=(new O).add((new Xd(a,0,!0)).add(new Yd(vd,b-a,0)).add(new Yd(Kd,b,a,b-f,0,b,f)).add(new Yd(vd,b,c-a)).add(new Yd(Kd,b-a,c,b,c-f,b-f,c)).add(new Yd(vd,a,c)).add(new Yd(Kd,0,c-a,f,c,0,c-f)).add(new Yd(vd,0,a)).add((new Yd(Kd,a,0,0,f,f,0)).close()));1e.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righte.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.He){b.He=!0;var c=new G;c.add(this);fp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.He=!1}};function fp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ie){b.Ie=!0;var c=new G;c.add(this);fp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.Ie=!1}};function fp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.He){b.He=!0;var c=new G;c.add(this);hp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.He=!1}}; +V.prototype.expandTree=function(a){void 0===a&&(a=2);2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ie){b.Ie=!0;var c=new G;c.add(this);hp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===vi);b.Ie=!1}}; function hp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.ro():a.Kd();k.next();){var l=k.value;l.isTreeLink&&(h||l.xd||l.ab(),l=l.wo(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ub(!0),l.dh(),g&&e.xj(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, -a.h(b.x,b.y,0,0));return a};ma.Object.defineProperties(jg.prototype,{padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ic(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.g("padding",b,a),this.w())}}});jg.className="Placeholder"; -function T(a){U.call(this,W.Link);this.Oa=8;this.Te=null;this.Ue="";this.gf=this.Om=null;this.hf="";this.Xn=null;this.dk=$f;this.wm=0;this.ym=$f;this.zm=NaN;this.kj=mp;this.Sn=.5;this.rd=null;this.Jb=(new E).freeze();this.df=this.Eg=null;this.bl=new M;this.sa=new O;this.u=this.o=this.Hf=this.Lf=null;this.Yt=new I;this.Gp=this.qw=this.pw=null;this.Ys=NaN;this.aa=null;this.j=[];a&&Object.assign(this,a)}la(T,U); -T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Oa=this.Oa&-113;a.Ue=this.Ue;a.Om=this.Om;a.hf=this.hf;a.Xn=this.Xn;a.dk=this.dk;a.wm=this.wm;a.ym=this.ym;a.zm=this.zm;a.kj=this.kj;a.Sn=this.Sn;null!==this.aa&&(a.aa=this.aa.copy())};t=T.prototype;t.pf=function(a){U.prototype.pf.call(this,a);this.Ue=a.Ue;this.hf=a.hf;a.Eg=null;a.ab();a.Hf=this.Hf;var b=a.fromPort;null!==b&&Zo(b);a=a.toPort;null!==a&&Zo(a)}; +a.h(b.x,b.y,0,0));return a};ma.Object.defineProperties(jg.prototype,{padding:{get:function(){return this.ub},set:function(a){"number"===typeof a&&(a=new ec(a));var b=this.ub;b.C(a)||(this.ub=a=a.J(),this.g("padding",b,a),this.w())}}});jg.className="Placeholder"; +function T(a){U.call(this,W.Link);this.Oa=8;this.Ue=null;this.Ve="";this.hf=this.Om=null;this.jf="";this.Xn=null;this.dk=$f;this.wm=0;this.ym=$f;this.zm=NaN;this.kj=mp;this.Sn=.5;this.rd=null;this.Jb=(new E).freeze();this.ef=this.Eg=null;this.bl=new M;this.sa=new O;this.u=this.m=this.If=this.Mf=null;this.Yt=new I;this.Gp=this.qw=this.pw=null;this.Ys=NaN;this.aa=null;this.j=[];a&&Object.assign(this,a)}la(T,U); +T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Oa=this.Oa&-113;a.Ve=this.Ve;a.Om=this.Om;a.jf=this.jf;a.Xn=this.Xn;a.dk=this.dk;a.wm=this.wm;a.ym=this.ym;a.zm=this.zm;a.kj=this.kj;a.Sn=this.Sn;null!==this.aa&&(a.aa=this.aa.copy())};t=T.prototype;t.qf=function(a){U.prototype.qf.call(this,a);this.Ve=a.Ve;this.jf=a.jf;a.Eg=null;a.ab();a.If=this.If;var b=a.fromPort;null!==b&&Zo(b);a=a.toPort;null!==a&&Zo(a)}; t.ob=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===cg||a===Zf||a===Yf?this.curve=a:a===np||a===op||a===pp?this.adjusting=a:a!==mp&&a!==$f&&C("Unknown Link enum value for a Link property: "+a):U.prototype.ob.call(this,a)};t.Rc=function(){null===this.aa&&(this.aa=new dl)};t.mi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(oj(a)||pj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),oj(a)||pj(a))?!1:!0};t.fv=function(){return!1}; t.ns=function(){};t.Tc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case $f:a=0;break;case Tm:a=b;break;case Mm:a=b+90;break;case Om:a=b-90;break;case qp:a=b+180;break;case Um:a=J.Eo(b);90a&&(a-=180);break;case Nm:a=J.Eo(b+90);90a&&(a-=180);break;case Pm:a=J.Eo(b-90);90a&&(a-=180);break;case Qm:a=J.Eo(b);if(45a||225a)return 0;90a&&(a-=180)}return J.Eo(a)}; -function To(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Rw(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.ph;if(c!==b){null!==c&&Oo(c,a);a.ph=b;null!==b&&No(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.$,g.$=!0);e(a,c,b);null!==g&&(g.$=f)}!a.xd||a.pw!==c&&a.qw!==c||a.ab()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; +function To(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Sw(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.ph;if(c!==b){null!==c&&Oo(c,a);a.ph=b;null!==b&&No(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.$,g.$=!0);e(a,c,b);null!==g&&(g.$=f)}!a.xd||a.pw!==c&&a.qw!==c||a.ab()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; t.dh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.dh.call(this)};t.wo=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.jz=function(a){var b=this.fromPort;return a===b?this.toPort:b};function cp(a,b){null===a.rd&&(a.rd=new G);a.rd.add(b);a.w()} -t.yo=function(a){U.prototype.yo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Te;var b=null;null!==a&&(b=this.fromPort,ap(a,this,b));var c=this.gf;if(null!==c){var d=this.toPort;c===a&&d===b||ap(c,this,d)}sp(this)}};t.zo=function(a){U.prototype.zo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Te;var b=null;null!==a&&(b=this.fromPort,bp(a,this,b));var c=this.gf;if(null!==c){var d=this.toPort;c===a&&d===b||bp(c,this,d)}tp(this)}}; +t.yo=function(a){U.prototype.yo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Ue;var b=null;null!==a&&(b=this.fromPort,ap(a,this,b));var c=this.hf;if(null!==c){var d=this.toPort;c===a&&d===b||ap(c,this,d)}sp(this)}};t.zo=function(a){U.prototype.zo.call(this,a);rp(this)&&this.Ao(this.actualBounds);if(!a){a=this.Ue;var b=null;null!==a&&(b=this.fromPort,bp(a,this,b));var c=this.hf;if(null!==c){var d=this.toPort;c===a&&d===b||bp(c,this,d)}tp(this)}}; t.Fj=function(){this.xd=!0;if(null!==this.rd){var a=this.diagram;if(null!==a)for(var b=this.rd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};T.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; T.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?U.prototype.move.call(this,a,!1):(a=I.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),I.free(a));cf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; T.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};T.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; -T.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(ub),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Bu(.5,a),a.add(this.i(0)),c=this.sa.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===cg){if(3===b)return this.i(1);d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);var e=this.i(c+1), -f=this.i(c+2);c=this.i(c+3);J.ty(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a}; -T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Ya(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Xw(.5);if(this.computeCurve()===cg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return J.sy(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0c/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- +b.y)));return a}; +T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Ya(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===cg))return this.sa.Yw(.5);if(this.computeCurve()===cg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return J.ty(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.Ya(d)};t=T.prototype;t.i=function(a){return this.Jb.s[a]};t.Wc=function(a,b){this.Jb.Vc(a,b)};t.M=function(a,b,c){this.Jb.Vc(a,new I(b,c))};t.sz=function(a,b){this.Jb.Cb(a,b)}; -t.l=function(a,b,c){this.Jb.Cb(a,new I(b,c))};t.ee=function(a){this.Jb.add(a)};t.lf=function(a,b){this.Jb.add(new I(a,b))};t.Yu=function(a){this.Jb.mb(a)};t.Aj=function(){this.Jb.clear()}; -function cf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.xd,e=new E,f=a.Jb.iterator;f.next();){var g=f.value;e.add((new I(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Jb;a.Jb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.zb?a.w():(a.ce.h(a.ce.x+b,a.ce.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Al(a));d?up(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= -a.i(a.pointsCount-1)));null!==g&&g.animationManager.zb&&(b=g.animationManager,a.df=e,b.dl.add(a));a.g("points",f,e)}}t.jh=function(){null===this.Eg&&(this.Eg=this.Jb,this.Jb=this.Jb.copy())}; -t.nf=function(){if(null!==this.Eg){for(var a=this.Eg,b=this.Jb,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= -(0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,z=q;J.B(k,0)?z=0k?-1:1)*n+r,z=m*(v-r)+q);this.Aj();this.ee(f);this.lf(u,w);this.lf(v,z);this.ee(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,J.B(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ee(d),this.lf(f,h),this.ee(e);else{this.ee(d);this.ee(e);h=M.alloc();b.gi(h);k=h.ba(e);p.gi(h);l=h.ba(d);if(k||l)g=b.ia(zp(g),new I),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ia(zp(c),new I),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Aj();var y=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r= -this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>y&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(w+=Math.abs(y)*(m?1:2)),0===r?q=w:90===r?u=w:180===r?q=-w:270===r?u=-w:(q=w*Math.cos(r*Math.PI/180),u=w*Math.sin(r*Math.PI/180)),g.Ec()&&l&&(w=b.ia(yc,I.alloc()),v=I.allocAt(w.x+1E3*q,w.y+1E3*u),this.getLinkPointFromPoint(a,b,w,v,!0,n),I.free(w),I.free(v));w=this.getLinkPoint(d,e,c,!1,m,a,b);var A=z=v=0;if(m||!k||l){var B=this.computeEndSegmentLength(d,e, -c,!1);A=this.getLinkDirection(d,e,w,c,!1,m,a,b);l&&(k||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(A+=m?0:30,0>y&&(A+=180));0>A?A+=360:360<=A&&(A-=360);l&&(B+=Math.abs(y)*(m?1:2));0===A?v=B:90===A?z=B:180===A?v=-B:270===A?z=-B:(v=B*Math.cos(A*Math.PI/180),z=B*Math.sin(A*Math.PI/180));c.Ec()&&l&&(c=e.ia(yc,I.alloc()),g=I.allocAt(c.x+1E3*v,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,w),I.free(c),I.free(g))}c=n;if(m||!h||l)c=new I(n.x+q,n.y+u);g=w;if(m||!k||l)g=new I(w.x+v,w.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} -T.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new I);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.je()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.fe;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Kj(e,d,g,c,f);null!== +(0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,z=q;J.B(k,0)?z=0k?-1:1)*n+r,z=m*(v-r)+q);this.Aj();this.fe(f);this.mf(u,w);this.mf(v,z);this.fe(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,J.B(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.fe(d),this.mf(f,h),this.fe(e);else{this.fe(d);this.fe(e);h=M.alloc();b.gi(h);k=h.ba(e);p.gi(h);l=h.ba(d);if(k||l)g=b.ia(zp(g),new I),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ia(zp(c),new I),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Aj();var y=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r= +this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>y&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(w+=Math.abs(y)*(m?1:2)),0===r?q=w:90===r?u=w:180===r?q=-w:270===r?u=-w:(q=w*Math.cos(r*Math.PI/180),u=w*Math.sin(r*Math.PI/180)),g.Fc()&&l&&(w=b.ia(yc,I.alloc()),v=I.allocAt(w.x+1E3*q,w.y+1E3*u),this.getLinkPointFromPoint(a,b,w,v,!0,n),I.free(w),I.free(v));w=this.getLinkPoint(d,e,c,!1,m,a,b);var A=z=v=0;if(m||!k||l){var B=this.computeEndSegmentLength(d,e, +c,!1);A=this.getLinkDirection(d,e,w,c,!1,m,a,b);l&&(k||g.C(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(A+=m?0:30,0>y&&(A+=180));0>A?A+=360:360<=A&&(A-=360);l&&(B+=Math.abs(y)*(m?1:2));0===A?v=B:90===A?z=B:180===A?v=-B:270===A?z=-B:(v=B*Math.cos(A*Math.PI/180),z=B*Math.sin(A*Math.PI/180));c.Fc()&&l&&(c=e.ia(yc,I.alloc()),g=I.allocAt(c.x+1E3*v,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,w),I.free(c),I.free(g))}c=n;if(m||!h||l)c=new I(n.x+q,n.y+u);g=w;if(m||!k||l)g=new I(w.x+v,w.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +T.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new I);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.ke()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.ge;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Kj(e,d,g,c,f);null!== a&&f.transform(a);return f};function Bp(a,b){var c=b.Hn;null===c&&(c=new Cp,c.port=b,c.node=b.part,b.Hn=c);return Dp(c,a)} -T.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new I);if(c.pb()&&!yp(c))return b.ia(c,h),h;if(c.Uc()){var k=Bp(this,b);if(null!==k){h.assign(k.Co);if(e&&this.routing===Ep){var l=Bp(this,g);if(null!==l&&k.tl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.wf(Dc)||c.wf(Hc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);I.free(k);I.free(l)}}return h}}c= +T.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new I);if(c.pb()&&!yp(c))return b.ia(c,h),h;if(c.Uc()){var k=Bp(this,b);if(null!==k){h.assign(k.Co);if(e&&this.routing===Ep){var l=Bp(this,g);if(null!==l&&k.tl=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.xf(Dc)||c.xf(Hc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);I.free(k);I.free(l)}}return h}}c= b.ia(zp(c),I.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=Ap(c,g.copy()))):(k=this.computeSpot(!d,g),f=I.alloc(),g=g.ia(zp(k),f),e&&(g=Ap(c,g)),I.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);I.free(c);return h}; -T.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.pb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Ap(k,h.copy()):c):(c=I.alloc(),h=h.ia(yc,c),I.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= -k.x?0:180:h.y>=k.y?90:270;I.free(k);k=c}d.Ec()&&g.Md(a)&&(k+=180,360<=k&&(k-=360));if(yp(d))return k;a=b.fi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Uc()&&(a=Bp(this,b),null!==a))return a.tu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; +T.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.pb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Ap(k,h.copy()):c):(c=I.alloc(),h=h.ia(yc,c),I.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +k.x?0:180:h.y>=k.y?90:270;I.free(k);k=c}d.Fc()&&g.Md(a)&&(k+=180,360<=k&&(k-=360));if(yp(d))return k;a=b.fi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Uc()&&(a=Bp(this,b),null!==a))return a.tu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; T.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=yc:(b=this.fromSpot,b.Sb()&&(b=a.fromSpot),a=b===Wc?sc:b)):(a=b?b:this.toPort,null===a?a=yc:(b=this.toSpot,b.Sb()&&(b=a.toSpot),a=b===Wc?sc:b));return a};function yp(a){return a===sc||.5===a.x&&.5===a.y}function zp(a){return.5===a.x&&.5===a.y?a:yc} T.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==$f&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=md.alloc();n.set(g); -if(m instanceof W)h=m.sf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Cf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.Wg(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.De(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var w=I.alloc(),v=I.alloc(),z=I.alloc(),y=md.alloc();y.set(q);y.Ou(m.transform);y.Tr();v.x=p;v.y=u;v.transform(y);w.x=h;w.y=u;w.transform(y);q=!1;Cn(m,w,v,z)?q=!0:(w.x=p,w.y=r,w.transform(y),Cn(m,w,v,z)?q=!0:(v.x= +T.prototype.tf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=md.alloc(),g.reset());g.multiply(this.transform);if(this.Wg(a,g))return dn(this,b,c,e),void 0===f&&md.free(g),!0;if(this.Sc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.R.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=md.alloc();n.set(g); +if(m instanceof W)h=m.tf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Cf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.Wg(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Ee(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var w=I.alloc(),v=I.alloc(),z=I.alloc(),y=md.alloc();y.set(q);y.Ou(m.transform);y.Tr();v.x=p;v.y=u;v.transform(y);w.x=h;w.y=u;w.transform(y);q=!1;Cn(m,w,v,z)?q=!0:(w.x=p,w.y=r,w.transform(y),Cn(m,w,v,z)?q=!0:(v.x= h,v.y=r,v.transform(y),Cn(m,w,v,z)?q=!0:(w.x=h,w.y=u,w.transform(y),Cn(m,w,v,z)&&(q=!0))));md.free(y);I.free(w);I.free(v);I.free(z);h=q}}else h=m.Wg(h,n)}else h=hl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));md.free(n)}}}void 0===f&&md.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&md.free(g);return!1}; -T.prototype.computeCurve=function(){if(null===this.Lf){var a=this.fromPort,b=this.isOrthogonal;this.Lf=null!==a&&a===this.toPort&&!b}return this.Lf?cg:this.curve};T.prototype.computeCorner=function(){if(this.curve===cg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; +T.prototype.computeCurve=function(){if(null===this.Mf){var a=this.fromPort,b=this.isOrthogonal;this.Mf=null!==a&&a===this.toPort&&!b}return this.Mf?cg:this.curve};T.prototype.computeCorner=function(){if(this.curve===cg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; T.prototype.findMidLabel=function(){for(var a=this.path,b=this.R.s,c=b.length,d=0;dk?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);J.ca(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.Wc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.M(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Wc(c,d)}}return!0;case pp:f=this.i(a);n=this.i(c);if(!f.$a(b)||!n.$a(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Wc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.v()&&k.v()){h.Qc(Hp,Hp);k.Qc(Hp,Hp);h.Le(a);k.Le(c);var l=I.alloc(),m=I.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +T.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.v()&&k.v()){h.vc(Hp,Hp);k.vc(Hp,Hp);h.Me(a);k.Me(c);var l=I.alloc(),m=I.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ba(a)||h.ba(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left,m.x=l.x, @@ -1581,17 +1583,17 @@ a.y,c.x,c.y,!1):c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ba(a)||h.ba(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=Kp&&(ik(r),h.Qc(r.lo*r.lx,r.ko*r.mx),Ip(r,a,b,n,d,h,!1),k=Jp(r, +Math.min(a.y,l.y),Math.abs(a.x-l.x),Math.abs(a.y-l.y))&&r.Pj(Math.min(l.x,m.x),Math.min(l.y,m.y),Math.abs(l.x-m.x),Math.abs(l.y-m.y))&&r.Pj(Math.min(m.x,n.x),Math.min(m.y,n.y),Math.abs(m.x-n.x),Math.abs(m.y-n.y)))b=!1;else{e=a;f=n;var q=c=null;if(p.isVirtualized){p=r.bounds.copy();p.vc(-r.lo,-r.ko);var u=I.alloc();jk(r,a.x,a.y)||(J.wf(p.x,p.y,p.x+p.width,p.y+p.height,a.x,a.y,l.x,l.y,u)?(c=a=u.copy(),b=u.Ya(l)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,l.x,l.y,m.x,m.y,u)?(c=a=u.copy(),b=u.Ya(m)):J.wf(p.x, +p.y,p.x+p.width,p.y+p.height,m.x,m.y,n.x,n.y,u)&&(c=a=u.copy(),b=u.Ya(n)));jk(r,n.x,n.y)||(J.wf(p.x,p.y,p.x+p.width,p.y+p.height,n.x,n.y,m.x,m.y,u)?(q=n=u.copy(),d=m.Ya(u)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,m.x,m.y,l.x,l.y,u)?(q=n=u.copy(),d=l.Ya(u)):J.wf(p.x,p.y,p.x+p.width,p.y+p.height,l.x,l.y,a.x,a.y,u)&&(q=n=u.copy(),d=a.Ya(u)));I.free(u)}h=h.copy().Xc(k);h.vc(r.lo*r.ps,r.ko*r.ps);Ip(r,a,b,n,d,h,!0);k=Jp(r,n.x,n.y);!r.abort&&k>=Kp&&(ik(r),h.vc(r.lo*r.mx,r.ko*r.nx),Ip(r,a,b,n,d,h,!1),k=Jp(r, n.x,n.y));if(!r.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.M(2,h.x,h.y),this.l(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)J.B(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.M(2,h,a.y),this.M(3,h,g.y)):J.B(h.y,g.y)?(Math.abs(a.y-h.y)<=r.ko/2&&(this.M(2,h.x,a.y),this.M(3,g.x,a.y)),this.l(2,h.x,a.y)):this.M(2,a.x,h.y);else if(90===b||270===b)J.B(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): -Math.min(h.y,a.y),this.M(2,a.x,h),this.M(3,g.x,h)):J.B(h.x,g.x)?(Math.abs(a.x-h.x)<=r.lo/2&&(this.M(2,a.x,h.y),this.M(3,a.x,g.y)),this.l(2,a.x,h.y)):this.M(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.lf(f.x,q.y):this.lf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ee(l.copy()),this.ee(m.copy()));I.free(l);I.free(m)}}; +Math.min(h.y,a.y),this.M(2,a.x,h),this.M(3,g.x,h)):J.B(h.x,g.x)?(Math.abs(a.x-h.x)<=r.lo/2&&(this.M(2,a.x,h.y),this.M(3,a.x,g.y)),this.l(2,a.x,h.y)):this.M(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.l(2,a.x,g.y):this.l(2,g.x,a.y):0===b||180===b?this.l(2,e.x,c.y):this.l(2,c.x,e.y));null!==q&&(0===d||180===d?this.mf(f.x,q.y):this.mf(q.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.fe(l.copy()),this.fe(m.copy()));I.free(l);I.free(m)}}; T.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Uc()||this.computeSpot(!1,this.toPort).Uc()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function Lj(a){if(null===a.diagram||!a.isAvoiding||!dk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=ek(a.diagram,!0,a.containingGroup,null);for(var d=1;dMp&&Jp(b,m,n)!==l-1&&(Jp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Jp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Jp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Jp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>Mp&&Jp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>Mp)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ -k)*k+k/2;l>Mp&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Jp(b,g,m)===l-1?Lp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Jp(b,g,m)===l-1&&Lp(a,b,g,m,f,!1,f)));a.lf(c,d)}T.prototype.Ny=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=zb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gMp&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Jp(b,g,m)===l-1?Lp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Jp(b,g,m)===l-1&&Lp(a,b,g,m,f,!1,f)));a.mf(c,d)}T.prototype.Ny=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=zb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=O.j,this.Zl=!0,a;var c=!1,d=this.diagram;null!==d&&rp(this)&&d.th.contains(this)&&(0!==this.bl.width||0!==this.bl.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Jb.s;var g=this.computeCurve();if(g===cg&&3<=b&&!J.ca(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kw?q>r?(f.x= v-y,f.y=r-y,e.x=v+u,e.y=r+u):(f.x=v-y,f.y=r+y,e.x=v+u,e.y=r-u):q>r?(f.x=v+y,f.y=r-y,e.x=v-u,e.y=r+u):(f.x=v+y,f.y=r+y,e.x=v-u,e.y=r-u));J.ca(w,v)&&J.ca(r,q)&&(r>p?(z>v?(f.x=v-y,f.y=r-y,e.x=v+u):(f.x=v+y,f.y=r-y,e.x=v-u),e.y=r+u):(z>v?(f.x=v-y,f.y=r+y,e.x=v+u):(f.x=v+y,f.y=r+y,e.x=v-u),e.y=r-u));if(J.ca(w,v)&&J.ca(v,z)||J.ca(p,r)&&J.ca(r,q))w=.5*(w+z),p=.5*(p+q),f.x=w,f.y=p,e.x=w,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&J.ca(g.x,this.i(0).x)&&J.ca(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x), c.y=.5*(g.y+l.y));yd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=Np(this,m.copy(),!1,qb));l=.5*(l+m.x);g=.5*(g+m.y);yd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);I.free(b);I.free(c);I.free(f);I.free(e)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=Np(this,g.copy(),!1,qb)),yd(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=I.alloc();f.assign(this.i(0)); @@ -1603,42 +1605,42 @@ function Op(a,b,c,d){for(var e=a.pointsCount,f=b;J.ca(b.x,f.x)&&J.ca(b.y,f.y);){ function Qp(a,b,c,d,e,f,g){if(!g&&rp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=Rp(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===Zf?xd(b,n,r,!1):yd(b,p,m,n,m,n,r)}else if(J.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===Zf?xd(b,r,m,!1):yd(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function Rp(a,b,c,d){var e=a.diagram;if(null===e||b.C(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ma.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,w)n&&!J.B(g,w)){h.x=q;h.y=n;m=!0;break a}}else if(!J.B(n,r)&& J.B(g,w)&&Math.min(n,r)g&&Math.min(q,u)m&&!J.B(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}I.free(h)}function rp(a){a=a.curve;return a===Yf||a===Zf}function vp(a,b){if(b||rp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.th.contains(a)||0===a.bl.width&&0===a.bl.height||b.th.add(a,a.bl.copy())} T.prototype.Ao=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ma.s;for(var g=e.length,h=0;ha&&wa(a,">= 0",T,"fromEndSegmentLength"),this.Rc(),this.aa.Oi=a,this.g("fromEndSegmentLength", b,a),this.ab())}},fromShortLength:{get:function(){return null!==this.aa?this.aa.Pi:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(this.Rc(),this.aa.Pi=a,this.mc(!0),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.aa?this.aa.tj:Wc},set:function(a){var b=this.toSpot;b.C(a)||(a=a.J(),this.Rc(),this.aa.tj=a,this.g("toSpot",b,a),(b.Uc()||a.Uc())&&null!==this.toNode&&Zo(this.toPort),this.ab())}},toEndSegmentLength:{ get:function(){return null!==this.aa?this.aa.rj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&wa(a,">= 0",T,"toEndSegmentLength"),this.Rc(),this.aa.rj=a,this.g("toEndSegmentLength",b,a),this.ab())}},toShortLength:{get:function(){return null!==this.aa?this.aa.sj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(this.Rc(),this.aa.sj=a,this.mc(!0),this.g("toShortLength",b,a))}},isLabeledLink:{get:function(){return null=== this.rd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);J.ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Le(f),e=2;ed&&(d=-d)):J.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.qf(e));a.push(d)}}return this.Gp}},flattenedTotalLength:{get:function(){var a=this.Ys;if(isNaN(a)){for(var b= +get:function(){this.mg();var a=this.bl,b=Infinity,c=Infinity,d=this.pointsCount;if(0===d)a.h(NaN,NaN,0,0);else{if(1===d)d=this.i(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.h(d.x,d.y,0,0);else if(2===d){d=this.i(0);var e=this.i(1);b=Math.min(d.x,e.x);c=Math.min(d.y,e.y);a.h(d.x,d.y,0,0);a.Me(e)}else if(this.computeCurve()===cg&&3<=d&&!this.isOrthogonal)if(e=this.i(0),b=e.x,c=e.y,a.h(b,c,0,0),3===d){d=this.i(1);b=Math.min(d.x,b);c=Math.min(d.y,c);var f=this.i(2);b=Math.min(f.x,b);c=Math.min(f.y, +c);J.ql(e.x,e.y,d.x,d.y,d.x,d.y,f.x,f.y,.5,a)}else for(f=3;f=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);J.ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Me(f),e=2;ed&&(d=-d)):J.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.rf(e));a.push(d)}}return this.Gp}},flattenedTotalLength:{get:function(){var a=this.Ys;if(isNaN(a)){for(var b= this.flattenedLengths,c=b.length,d=a=0;d=this.pointsCount?0:this.isOrthogonal||!yp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!yp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.dk},set:function(a){var b=this.dk;b!== +get:function(){return this.m},set:function(a){this.m=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return 2===(this.kj.value&2)}},isAvoiding:{get:function(){return 4===(this.kj.value&4)}},Zl:{get:function(){return 0!==(this.Oa&128)},set:function(a){0!==(this.Oa&128)!==a&&(this.Oa^=128)}},geometry:{ +get:function(){this.Zl||(this.mg(),this.sa=this.makeGeometry());return this.sa}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!yp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!yp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.dk},set:function(a){var b=this.dk;b!== a&&(this.dk=a,this.g("adjusting",b,a))}},corner:{get:function(){return this.wm},set:function(a){var b=this.wm;b!==a&&(this.wm=a,this.mc(!0),this.g("corner",b,a))}},curve:{get:function(){return this.ym},set:function(a){var b=this.ym;b!==a&&(this.ym=a,this.ab(),this.mc(!0),vp(this,b===Zf||b===Yf||a===Zf||a===Yf),this.g("curve",b,a))}},curviness:{get:function(){return this.zm},set:function(a){var b=this.zm;b!== -a&&(this.zm=a,this.ab(),this.mc(!1),this.g("curviness",b,a))}},routing:{get:function(){return this.kj},set:function(a){var b=this.kj;b!==a&&(this.kj=a,this.Lf=null,this.ab(),vp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.mc(!0),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram; -if(null!==a&&a.model.ki())return a.model.uc(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Ao;T.prototype.findClosestSegment=T.prototype.Ny;T.prototype.updateRoute=T.prototype.lg;T.prototype.invalidateRoute=T.prototype.ab;T.prototype.rollbackRoute=T.prototype.$u;T.prototype.commitRoute=T.prototype.nf;T.prototype.startRoute=T.prototype.jh;T.prototype.clearPoints=T.prototype.Aj;T.prototype.removePoint=T.prototype.Yu;T.prototype.addPointAt=T.prototype.lf;T.prototype.addPoint=T.prototype.ee; +a&&(this.zm=a,this.ab(),this.mc(!1),this.g("curviness",b,a))}},routing:{get:function(){return this.kj},set:function(a){var b=this.kj;b!==a&&(this.kj=a,this.Mf=null,this.ab(),vp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.mc(!0),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram; +if(null!==a&&a.model.ki())return a.model.uc(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Ao;T.prototype.findClosestSegment=T.prototype.Ny;T.prototype.updateRoute=T.prototype.mg;T.prototype.invalidateRoute=T.prototype.ab;T.prototype.rollbackRoute=T.prototype.$u;T.prototype.commitRoute=T.prototype.pf;T.prototype.startRoute=T.prototype.jh;T.prototype.clearPoints=T.prototype.Aj;T.prototype.removePoint=T.prototype.Yu;T.prototype.addPointAt=T.prototype.mf;T.prototype.addPoint=T.prototype.fe; T.prototype.insertPointAt=T.prototype.l;T.prototype.insertPoint=T.prototype.sz;T.prototype.setPointAt=T.prototype.M;T.prototype.setPoint=T.prototype.Wc;T.prototype.getPoint=T.prototype.i;T.prototype.getOtherPort=T.prototype.jz;T.prototype.getOtherNode=T.prototype.wo; var wp=null,xp=null,mp=new D(T,"Normal",1),Vp=new D(T,"Orthogonal",2),Wp=new D(T,"AvoidsNodes",6),Ep=new D(T,"AvoidsNodesStraight",7),$f=new D(T,"None",0),cg=new D(T,"Bezier",9),Zf=new D(T,"JumpGap",10),Yf=new D(T,"JumpOver",11),np=new D(T,"End",17),op=new D(T,"Scale",18),pp=new D(T,"Stretch",19),Tm=new D(T,"OrientAlong",21),Mm=new D(T,"OrientPlus90",22),Om=new D(T,"OrientMinus90",23),qp=new D(T,"OrientOpposite",24),Um=new D(T,"OrientUpright",25),Nm=new D(T,"OrientPlus90Upright",26),Pm=new D(T,"OrientMinus90Upright", 27),Qm=new D(T,"OrientUpright45",28),Gp=16,Fp=14,Hp=8;T.className="Link";T.Normal=mp;T.Orthogonal=Vp;T.AvoidsNodes=Wp;T.AvoidsNodesStraight=Ep;T.None=$f;T.Bezier=cg;T.JumpGap=Zf;T.JumpOver=Yf;T.End=np;T.Scale=op;T.Stretch=pp;T.OrientAlong=Tm;T.OrientPlus90=Mm;T.OrientMinus90=Om;T.OrientOpposite=qp;T.OrientUpright=Um;T.OrientPlus90Upright=Nm;T.OrientMinus90Upright=Pm;T.OrientUpright45=Qm;T.EndSegmentStep=8;T.CurvinessStart=Gp;T.SpacingMin=Fp;T.OrthoShortCut=Hp; -function Up(a,b,c,d){Ra(this);this.te=this.Sp=!1;this.cs=a;this.ux=b;this.Pu=c;this.vx=d;this.links=[]}Up.prototype.Al=function(){if(!this.Sp){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Dd=Math.floor((a.x-this.nc)/this.nc)*this.nc;this.Ed=Math.floor((b-this.oc)/this.oc)*this.oc;this.ln=Math.ceil((c+2*this.nc)/this.nc)*this.nc;this.mn=Math.ceil((d+2*this.oc)/this.oc)*this.oc;a=1+(Math.ceil((this.ln-this.Dd)/this.nc)|0);b=1+(Math.ceil((this.mn-this.Ed)/this.oc)|0);if(null===this.Xb||this.Wh=Mp&&(c[d]=Xp)} fk.prototype.Pj=function(a,b,c,d){if(a>this.ln||a+cthis.mn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Wh)|0;for(c=Math.min(b+e-1,this.Xh)|0;a<=d;a++){e=this.Xb[a];for(var f=b;f<=c;f++)if(e[f]===kk)return!1}return!0}; @@ -1650,79 +1652,79 @@ a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:be)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===bq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==bq){g.push(k);g.push(l);if(aq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=bq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} ma.Object.defineProperties(fk.prototype,{bounds:{get:function(){return new M(this.Dd,this.Ed,this.ln-this.Dd,this.mn-this.Ed)}},lo:{get:function(){return this.nc},set:function(a){0=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> -a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Cp.prototype.Al=function(){this.ge.length=0}; -function Dp(a,b){var c=a.ge;if(0===c.length){a:if(!a.Do){c=a.Do;a.Do=!0;var d=null,e=a.node,f=e instanceof qf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Sw();else{if(!f.actualBounds.v()){a.Do=c;break a}d=f;g=d.vu()}f=a.ge.length=0;var h=a.port.ia(tc,I.alloc()),k=a.port.ia(Cc,I.alloc());e=M.allocAt(h.x,h.y,0,0);e.Le(k);I.free(h);I.free(k);h=I.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.fi();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& -l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Md(d),n=l.computeSpot(m,a.port);if(n.Uc()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.Ya(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=cq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.ge[f];void 0===r?(r=new dq(l,p,n),a.ge[f]=r):(r.link=l,r.angle=p,r.Fc= -n);r.Ru.set(m);f++}}}}I.free(h);a.ge.sort(Cp.prototype.j);k=a.ge.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(y)?(z=Math.abs(y)/r,r=Math.abs(y)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(y)?(z=Math.abs(y)/ -m,m=Math.abs(y)):z=1}v=0}var F=A.Co;if(d===jp){A=A.link.computeThickness();A*=z;F.set(B);switch(q){case 8:F.x=B.x+u/2+p/2-v-A/2;break;case 2:F.y=B.y+y/2+r/2-v-A/2;break;case 1:F.x=B.x+u/2-n/2+v+A/2;break;default:case 4:F.y=B.y+y/2-m/2+v+A/2}v+=A}else{var L=.5;d===Vo&&(L=(A.xo+1)/(A.tl+1));F.x=B.x+u*L;F.y=B.y+y*L}}}I.free(h);I.free(k);I.free(g);I.free(l);B=a.ge;for(f=0;fb.Fc?1:a.angleb.angle?1:0}; -Cp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.xo;if(0>d)return c;var e=a.tl;if(1>=e||!b.isOrthogonal)return c;b=a.Ru;var f=a.Co;if(2===a.Fc||8===a.Fc)d=e-1-d;return((a=2===a.Fc||4===a.Fc)?b.y180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Cp.prototype.Al=function(){this.he.length=0}; +function Dp(a,b){var c=a.he;if(0===c.length){a:if(!a.Do){c=a.Do;a.Do=!0;var d=null,e=a.node,f=e instanceof qf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Tw();else{if(!f.actualBounds.v()){a.Do=c;break a}d=f;g=d.vu()}f=a.he.length=0;var h=a.port.ia(tc,I.alloc()),k=a.port.ia(Cc,I.alloc());e=M.allocAt(h.x,h.y,0,0);e.Me(k);I.free(h);I.free(k);h=I.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.fi();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Md(d),n=l.computeSpot(m,a.port);if(n.Uc()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var r=p.findVisibleNode();null!==r&&r!==p&&(p=r,m=p.port);m=l.computeOtherPoint(p,m);p=h.Ya(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=cq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.he[f];void 0===r?(r=new dq(l,p,n),a.he[f]=r):(r.link=l,r.angle=p,r.Gc= +n);r.Ru.set(m);f++}}}}I.free(h);a.he.sort(Cp.prototype.j);k=a.he.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(y)?(z=Math.abs(y)/r,r=Math.abs(y)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(y)?(z=Math.abs(y)/ +m,m=Math.abs(y)):z=1}v=0}var F=A.Co;if(d===jp){A=A.link.computeThickness();A*=z;F.set(B);switch(q){case 8:F.x=B.x+u/2+p/2-v-A/2;break;case 2:F.y=B.y+y/2+r/2-v-A/2;break;case 1:F.x=B.x+u/2-n/2+v+A/2;break;default:case 4:F.y=B.y+y/2-m/2+v+A/2}v+=A}else{var L=.5;d===Vo&&(L=(A.xo+1)/(A.tl+1));F.x=B.x+u*L;F.y=B.y+y*L}}}I.free(h);I.free(k);I.free(g);I.free(l);B=a.he;for(f=0;fb.Gc?1:a.angleb.angle?1:0}; +Cp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.xo;if(0>d)return c;var e=a.tl;if(1>=e||!b.isOrthogonal)return c;b=a.Ru;var f=a.Co;if(2===a.Gc||8===a.Gc)d=e-1-d;return((a=2===a.Gc||4===a.Gc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; qi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof T)&&(gq(h),this.gh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof qf&&(h.gh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= 0,c=b,d+=f+20,f=0):e++}}};qi.prototype.gh=function(a){return!a.location.v()||a instanceof qf&&a.gh?!0:!1};function fq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof qf?null===k.layout?fq(a,b,k.memberParts,!1,e,f,g,h):(gq(k),b.add(k)):(gq(k),b.add(k))):g&&k instanceof T?b.add(k):!h||!k.Tc()||k instanceof V||(gq(k),b.add(k)))}} function gq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Za()}qi.prototype.hi=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -qi.prototype.Hw=function(a){var b=new G;a instanceof Q?(fq(this,b,a.nodes,!0,null,!0,!0,!0),fq(this,b,a.links,!0,null,!0,!0,!0),fq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof qf?fq(this,b,a.memberParts,!1,null,!0,!0,!0):fq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +qi.prototype.Iw=function(a){var b=new G;a instanceof Q?(fq(this,b,a.nodes,!0,null,!0,!0,!0),fq(this,b,a.links,!0,null,!0,!0,!0),fq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof qf?fq(this,b,a.memberParts,!1,null,!0,!0,!0):fq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; qi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ia(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};qi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};qi.prototype.workerLayout=function(){return!1}; -function hq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.lj&&(c.running=iq(a.lj));null!==a.cg&&(c.waiting=iq(a.cg));a.workerStateChanged(c,a)}}function iq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}qi.prototype.uy=function(){var a=jq(this.constructor);a&&(null!==a.Me&&a.Me.terminate(),a.Me=null,a.Cl.iteratorValues.each(function(a){a.zr=!1;a.lj=null;a.cg=null;a.ir=!1;hq(a)}),a.Cl.clear())}; -function kq(a,b){var c=jq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function jq(a){var b=null;if("function"===typeof a){if(b=lq.get(a),!b){var c=Ha(a);b=lq.get(c);b||(b=new mq,b.pu=a,b.name=c,b.j=a.name,b.gx=nq,lq.set(c,b),lq.set(a,b),lq.set(a.name,b))}}else"string"===typeof a&&(b=lq.get(a));return b} -qi.prototype.qv=function(){if("undefined"===typeof Worker||!oq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.zr&&(this.ir=!0,this.cg=this.lj=null,hq(this)),!1;var a=jq(this.constructor);if(null===a)return!1;null===a.Me&&(a.Me=new Worker(oq),a.Me.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Me.j=function(a){xa("Worker serialization error: "+a)},a.Me.onmessage= -function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)xa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Cl.get(c.id)){a.Cl.remove(c.id);b.zr=!1;b.lj=null;if(b.ir)b.ir=!1,b.cg=null;else{var d=pq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}hq(b,c.time);c=b.cg;if(null!==c)b.cg=null;else for(d=a.Cl.iteratorValues;d.next();){var e=d.value;c=e.cg;if(null!==c){e.cg=null;break}}null!==c&&qq(b,c)}},a.Me.postMessage({_GoJS:"_GoJS", -url:a.gx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Me.postMessage({_GoJS:"_GoJS",url:b})}),a.Me.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.lj?this.cg=this.network:qq(this,this.network);hq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function qq(a,b){a.zr=!0;var c=jq(a.constructor),d=rq(a,b,!0);d._GoJS="_GoJS";c.Me.postMessage(d);c.Cl.set(cb(a),a);a.lj=b} +function hq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.lj&&(c.running=iq(a.lj));null!==a.dg&&(c.waiting=iq(a.dg));a.workerStateChanged(c,a)}}function iq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}qi.prototype.uy=function(){var a=jq(this.constructor);a&&(null!==a.Ne&&a.Ne.terminate(),a.Ne=null,a.Cl.iteratorValues.each(function(a){a.zr=!1;a.lj=null;a.dg=null;a.ir=!1;hq(a)}),a.Cl.clear())}; +function kq(a,b){var c=jq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function jq(a){var b=null;if("function"===typeof a){if(b=lq.get(a),!b){var c=Ha(a);b=lq.get(c);b||(b=new mq,b.pu=a,b.name=c,b.j=a.name,b.hx=nq,lq.set(c,b),lq.set(a,b),lq.set(a.name,b))}}else"string"===typeof a&&(b=lq.get(a));return b} +qi.prototype.qv=function(){if("undefined"===typeof Worker||!oq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.zr&&(this.ir=!0,this.dg=this.lj=null,hq(this)),!1;var a=jq(this.constructor);if(null===a)return!1;null===a.Ne&&(a.Ne=new Worker(oq),a.Ne.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Ne.j=function(a){xa("Worker serialization error: "+a)},a.Ne.onmessage= +function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&Q.version&&c.version!==Q.version)xa("Failure: GoJS v"+Q.version+" Worker v"+c.version);else if(b=a.Cl.get(c.id)){a.Cl.remove(c.id);b.zr=!1;b.lj=null;if(b.ir)b.ir=!1,b.dg=null;else{var d=pq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}hq(b,c.time);c=b.dg;if(null!==c)b.dg=null;else for(d=a.Cl.iteratorValues;d.next();){var e=d.value;c=e.dg;if(null!==c){e.dg=null;break}}null!==c&&qq(b,c)}},a.Ne.postMessage({_GoJS:"_GoJS", +url:a.hx}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Ne.postMessage({_GoJS:"_GoJS",url:b})}),a.Ne.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.lj?this.dg=this.network:qq(this,this.network);hq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function qq(a,b){a.zr=!0;var c=jq(a.constructor),d=rq(a,b,!0);d._GoJS="_GoJS";c.Ne.postMessage(d);c.Cl.set(cb(a),a);a.lj=b} function rq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?cb(a):a.id,layout:Ha(a.constructor),p:d,hA:e,Ly:f};a.onNetworkSerialization(2,c,b,d);return d} -function pq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.hA,g=new pb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Lb(a.key));null!==b?b=e.yj(b):(b=e.createVertex(),e.eg(b));c&&null!==a.key&&(b.data={yh:a.key});g.set(a.id,b)});var h=b.Ly,k=new pb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.ol(f);f.link=b;c&&null!==a.key&&(f.data={yh:a.key});k.set(a.id, +function pq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.hA,g=new pb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Lb(a.key));null!==b?b=e.yj(b):(b=e.createVertex(),e.fg(b));c&&null!==a.key&&(b.data={yh:a.key});g.set(a.id,b)});var h=b.Ly,k=new pb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.ol(f);f.link=b;c&&null!==a.key&&(f.data={yh:a.key});k.set(a.id, f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.deserializeVertexProperties(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}qi.prototype.onNetworkSerialization=function(){}; -ma.Object.defineProperties(qi.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.Zm},set:function(a){this.Zm!==a&&(this.Zm=a)}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a;a||(this.dn=!0)}}, +ma.Object.defineProperties(qi.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.m},set:function(a){this.m!==a&&(this.m=a,null!==a&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.Zm},set:function(a){this.Zm!==a&&(this.Zm=a)}},isInitial:{get:function(){return this.wh},set:function(a){this.wh=a;a||(this.dn=!0)}}, isViewportSized:{get:function(){return this.en},set:function(a){this.en!==a&&(this.en=a)&&this.D()}},isRouting:{get:function(){return this.bn},set:function(a){this.bn!==a&&(this.bn=a)}},isRealtime:{get:function(){return this.an},set:function(a){this.an!==a&&(this.an=a)}},isValidLayout:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a,a||(a=this.diagram,null!== a&&(a.mh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.mm},set:function(a){this.mm!==a&&(this.mm=a,this.D())}},arrangementOrigin:{get:function(){return this.im},set:function(a){this.im.C(a)||(this.im.assign(a),this.D())}},id:{get:function(){return this.u},set:function(a){this.u= -a}},mayUseWorkerFunction:{get:function(){return this.nn},set:function(a){this.nn!==a&&(this.nn=a)}},workerStateChanged:{get:function(){return this.ao},set:function(a){this.ao!==a&&(this.ao=a)}}});qi.prototype.useWorker=qi.prototype.qv;qi.declareWorkerLayout=kq;qi.prototype.cancelWorker=qi.prototype.uy;qi.prototype.collectParts=qi.prototype.Hw;qi.prototype.getLayoutBounds=qi.prototype.hi;qi.prototype.invalidateLayout=qi.prototype.D; +a}},mayUseWorkerFunction:{get:function(){return this.nn},set:function(a){this.nn!==a&&(this.nn=a)}},workerStateChanged:{get:function(){return this.ao},set:function(a){this.ao!==a&&(this.ao=a)}}});qi.prototype.useWorker=qi.prototype.qv;qi.declareWorkerLayout=kq;qi.prototype.cancelWorker=qi.prototype.uy;qi.prototype.collectParts=qi.prototype.Iw;qi.prototype.getLayoutBounds=qi.prototype.hi;qi.prototype.invalidateLayout=qi.prototype.D; var lq=new pb,nq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",oq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";qi.className="Layout";qi.GoJSScriptURL=nq;qi.declareWorkerLayout=kq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:Q.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=jq(a.layout));var d=null;c&&c.pu&&(d=new c.pu);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=pq(d,a,!0); -d.workerLayout=function(){var a=rq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new E)}});function mq(){this.pu=null;this.gx=this.j=this.name="";this.scripts=[];this.Me=null;this.Cl=new pb}function eq(a){Ra(this);this.Jc=a;this.jf=new G;this.oe=new G;this.ds=new pb;this.Yr=new pb} -eq.prototype.clear=function(){if(this.jf)for(var a=this.jf.iterator;a.next();)a.value.clear();if(this.oe)for(a=this.oe.iterator;a.next();)a.value.clear();this.jf=new G;this.oe=new G;this.ds=new pb;this.Yr=new pb}; -eq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.jf.count+" edges: "+this.oe.count;if(1=a)return b;b+=" vertexes: "+this.kf.count+" edges: "+this.pe.count;if(1b?1:0):1:null!==b?-1:0} -ma.Object.defineProperties(sq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.wd._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Jd._dataArray}},data:{get:function(){return this.qb},set:function(a){this.qb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{get:function(){return this.Lh}, -set:function(a){if(this.Lh!==a){this.Lh=a;a.Za();var b=this.network.layout,c=M.alloc(),d=b.hi(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof qf)&&(a=a.locationObject.ia(yc),a.v())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.C(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.C(a)|| -this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(b.ja(),b.x=a-this.o.x,b.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(b.ja(),b.y=a-this.o.y,b.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},focusY:{ -get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},x:{get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},y:{get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},width:{get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.ja(),b.width= +ma.Object.defineProperties(sq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.wd._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Jd._dataArray}},data:{get:function(){return this.qb},set:function(a){this.qb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.m.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{get:function(){return this.Lh}, +set:function(a){if(this.Lh!==a){this.Lh=a;a.Za();var b=this.network.layout,c=M.alloc(),d=b.hi(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof qf)&&(a=a.locationObject.ia(yc),a.v())){this.m.h(a.x-b,a.y-e);return}this.m.h(f/2,d/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.C(a)||this.j.assign(a)}},focus:{get:function(){return this.m},set:function(a){this.m.C(a)|| +this.m.assign(a)}},centerX:{get:function(){return this.j.x+this.m.x},set:function(a){var b=this.j;b.x+this.m.x!==a&&(b.ja(),b.x=a-this.m.x,b.freeze())}},centerY:{get:function(){return this.j.y+this.m.y},set:function(a){var b=this.j;b.y+this.m.y!==a&&(b.ja(),b.y=a-this.m.y,b.freeze())}},focusX:{get:function(){return this.m.x},set:function(a){var b=this.m;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},focusY:{ +get:function(){return this.m.y},set:function(a){var b=this.m;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},x:{get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.ja(),b.x=a,b.freeze())}},y:{get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.ja(),b.y=a,b.freeze())}},width:{get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.ja(),b.width= a,b.freeze())}},height:{get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.ja(),b.height=a,b.freeze())}},network:{get:function(){return this.nb},set:function(a){this.nb=a}},sourceVertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new G,b= this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.wd.iterator}},destinationEdges:{get:function(){return this.Jd.iterator}},edges:{get:function(){for(var a= new E,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{get:function(){return this.wd.count+this.Jd.count}}});sq.prototype.deleteDestinationEdge=sq.prototype.qu;sq.prototype.addDestinationEdge=sq.prototype.gu;sq.prototype.deleteSourceEdge=sq.prototype.ru;sq.prototype.addSourceEdge=sq.prototype.iu;sq.className="LayoutVertex";sq.standardComparer=zq; sq.smartComparer=function(a,b){if(null!==a){if(null!==b){a=a.Lh;var c=b.Lh;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Da("Layout");d=[];switch(this.alignment){case Iq:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0g)d.push(new M(0,u,g+h,v)),w=0,q=r,u+=v,v=0;v=Math.max(v,F);switch(p){case Hq:A=-A.width;break;default:A= 0}y.moveTo(q+A,u);switch(p){case Hq:q-=B;break;default:q+=B}w++}d.push(new M(0,u,g+h,v));M.free(l);break;case Aq:k=g;m=f;n=b;p=c;g=M.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=I.alloc();for(q=0;q=l&&(k-=l);l=y=0;B=Math.max(this.cellSize.height,1);A=f=0;F=!0;w=I.alloc() m&&u>m-1||0k){d.push(new M(0,F?z-f:z,k+n,A+f+p));for(S=0;Sl&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -ma.Object.defineProperties(Mk.prototype,{wrappingWidth:{get:function(){return this.co},set:function(a){this.co!==a&&(0n)){var u=n+bn(q);q.lc(u,!0);nn(q,u,n)}}b.isModified=!0}}finally{b.$=!0}}}}};mi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ka(a);for(b=this.nodes.iterator;b.next();)b.value.Ka(a);for(b=this.links.iterator;b.next();)b.value.Ka(a)}; -mi.prototype.Uo=function(){for(var a=this.H.model,b=new G,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new Va;e.add("[");c&&1=d)return"[]";var e=new Ta;e.add("[");c&&1d)return;Da(a.Lc,d)}ur(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.To(b)}t.Uz=function(a){if(za(a))for(var b=a.length,c=0;cd)return;Da(a.Mc,d)}ur(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.To(b)}t.Uz=function(a){if(za(a))for(var b=a.length,c=0;cb&&(b=a.length);Ca(a,b,c);ur(this,"",fe,"",a,null,c,null,b)};t.Xu=function(a,b){void 0===b&&(b=-1);a===this.Lc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",ge,"",a,c,null,b,null)}; +t.ho=function(a,b){if(b){var c=this.lb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.iy=function(a,b){this.Qr(a,-1,b)};t.Qr=function(a,b,c){0>b&&(b=a.length);Ca(a,b,c);ur(this,"",fe,"",a,null,c,null,b)};t.Xu=function(a,b){void 0===b&&(b=-1);a===this.Mc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",ge,"",a,c,null,b,null)}; t.uo=function(a){if(null===a)return"";var b=this.gj;if(""===b)return"";b=on(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.Rl=function(a,b){if(null!==a){var c=this.gj;if(""!==c)if(this.lb(a)){var d=on(a,c);void 0===d&&(d="");d!==b&&(Nj(a,c,b),ur(this,"nodeCategory",de,c,a,d,b))}else Nj(a,c,b)}};t.Tl=function(a,b){this.Rl(b,this.uo(a))};t.Bl=function(){return!1};t.Nj=function(){return!1};t.ki=function(){return!1}; t.Vr=function(){return!1};t.Oj=function(){return!1};function oi(){return new Z}function pr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return pr(a,b.constructor);return typeof b}function tr(a){return yr[a]?yr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} function on(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c}function Nj(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){}} ma.Object.defineProperties(Z.prototype,{name:{get:function(){return this.va},set:function(a){var b=this.va;b!==a&&(this.va=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Am},set:function(a){var b=this.Am;b!==a&&(this.Am=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.xg},set:function(a){var b=this.xg;b!==a&&(this.xg=a,this.g("isReadOnly",b,a))}},modelData:{ -get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(this.j=a,this.g("modelData",b,a),this.Ka(a))}},undoManager:{get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(null!==b&&b.xx(this),this.o=a,null!==a&&a.Bw(this))}},skipsUndoManager:{get:function(){return this.Mg},set:function(a){this.Mg=a}},nodeKeyProperty:{get:function(){return this.Mh},set:function(a){var b=this.Mh; -b!==a&&(""===a&&C("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;ya(a)&&"number"===typeof c&&(d=this.uc(a),b?(this.Qf.add(a),this.ed[c]!==a&&this.ed.splice(c,0,a),void 0!==d&&this.rb.add(d,a)):(this.Qf.remove(a),this.ed[c]=== -a&&this.ed.splice(c,1),void 0!==d&&this.rb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.uf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=Ar.prototype;t.Dl=function(a){if(void 0!==a){var b=this.Li;if(null!==b){var c=this.dc(a);null===c&&(c=this.copyNodeData(b),Nj(c,this.nodeKeyProperty,a),this.kf(c))}return a}}; -t.Zw=function(a){return Wq(this,a,!0)};t.cv=function(a,b){dr(this,a,b,!0)};t.bx=function(a){return Wq(this,a,!1)};t.gv=function(a,b){dr(this,a,b,!1)};function Wq(a,b,c){if(null!==b&&(a=c?a.Ye:a.Ze,""!==a&&(a=on(b,a),void 0!==a))){if(Yq(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function dr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.Ye:a.Ze;if(""!==e)if(c=a.Dl(c),a.Bc(b)){var f=on(b,e);f!==c&&(br(a,f,b),Nj(b,e,c),null===a.dc(c)&&cr(a,c,b),ur(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.$w=function(a){return Vq(this,a,!0)};t.dv=function(a,b){er(this,a,b,!0)};t.ex=function(a){return Vq(this,a,!1)};t.hv=function(a,b){er(this,a,b,!1)}; -function Vq(a,b,c){if(null===b)return"";a=c?a.$i:a.aj;if(""===a)return"";b=on(b,a);return void 0===b?"":b}function er(a,b,c,d){if(null!==b){var e=d?a.$i:a.aj;if(""!==e)if(a.Bc(b)){var f=on(b,e);void 0===f&&(f="");f!==c&&(Nj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.uf=function(a){if(null===a)return Dr;var b=this.be;if(""===b)return Dr;a=on(a,b);return void 0===a?Dr:a}; -t.ls=function(a,b){if(null!==a){var c=this.be;if(""!==c)if(this.Bc(a)){var d=on(a,c);void 0===d&&(d=Dr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Bc(a)&&(br(this,b,a),ur(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.uc=function(a){if(null!==a){var b=this.Bh;if(""!==b&&(b=on(a,b),void 0!==b)){if(Yq(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.ks=function(a,b){if(null!==a){var c=this.Bh;if(""!==c)if(this.Bc(a)){var d=on(a,c);d!==b&&null===this.Zg(b)&&(Nj(a,c,b),void 0!==d&&this.rb.remove(d),this.rb.add(b,a),ur(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.Ka(a,c))}else Nj(a,c,b)}};t.Zg=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Yq(a)?this.rb.I(a):null}; -t.$r=function(a){if(null!==a){var b=this.Bh;if(""!==b){var c=this.uc(a);if(void 0===c||this.rb.contains(c)){var d=this.Sk;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.rb.contains(c))){Nj(a,b,c);return}if("string"===typeof c){for(d=2;this.rb.contains(c+d);)d++;Nj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.rb.count-1;this.rb.contains(c);)c--;Nj(a,b,c)}}}}};t.Bc=function(a){return null===a?!1:this.Qf.contains(a)};t.Yh=function(a){null!==a&&(gb(a),this.Bc(a)||$q(this,a,!0))}; -function $q(a,b,c){if(""!==a.linkKeyProperty){var d=a.uc(b);if(void 0!==d&&a.rb.I(d)===b)return;a.$r(b);d=a.uc(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.rb.add(d,b)}a.Qf.add(b);d=null;c&&(d=a.ed.length,a.ed.splice(d,0,b));ur(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Er(a,b)}t.ky=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ed.splice(d,1)}ur(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=Wq(a,b,!0);br(a,c,b);c=Wq(a,b,!1);br(a,c,b);d=a.uf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;ya(a)&&"number"===typeof c&&(d=this.uc(a),b?(this.Rf.add(a),this.ed[c]!==a&&this.ed.splice(c,0,a),void 0!==d&&this.rb.add(d,a)):(this.Rf.remove(a),this.ed[c]=== +a&&this.ed.splice(c,1),void 0!==d&&this.rb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.vf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=Ar.prototype;t.Dl=function(a){if(void 0!==a){var b=this.Li;if(null!==b){var c=this.dc(a);null===c&&(c=this.copyNodeData(b),Nj(c,this.nodeKeyProperty,a),this.lf(c))}return a}}; +t.$w=function(a){return Wq(this,a,!0)};t.cv=function(a,b){dr(this,a,b,!0)};t.ex=function(a){return Wq(this,a,!1)};t.gv=function(a,b){dr(this,a,b,!1)};function Wq(a,b,c){if(null!==b&&(a=c?a.Ze:a.$e,""!==a&&(a=on(b,a),void 0!==a))){if(Yq(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function dr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.Ze:a.$e;if(""!==e)if(c=a.Dl(c),a.Cc(b)){var f=on(b,e);f!==c&&(br(a,f,b),Nj(b,e,c),null===a.dc(c)&&cr(a,c,b),ur(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.ax=function(a){return Vq(this,a,!0)};t.dv=function(a,b){er(this,a,b,!0)};t.gx=function(a){return Vq(this,a,!1)};t.hv=function(a,b){er(this,a,b,!1)}; +function Vq(a,b,c){if(null===b)return"";a=c?a.$i:a.aj;if(""===a)return"";b=on(b,a);return void 0===b?"":b}function er(a,b,c,d){if(null!==b){var e=d?a.$i:a.aj;if(""!==e)if(a.Cc(b)){var f=on(b,e);void 0===f&&(f="");f!==c&&(Nj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.Ka(b,e))}else Nj(b,e,c)}}t.vf=function(a){if(null===a)return Dr;var b=this.ce;if(""===b)return Dr;a=on(a,b);return void 0===a?Dr:a}; +t.ls=function(a,b){if(null!==a){var c=this.ce;if(""!==c)if(this.Cc(a)){var d=on(a,c);void 0===d&&(d=Dr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Cc(a)&&(br(this,b,a),ur(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.uc=function(a){if(null!==a){var b=this.Bh;if(""!==b&&(b=on(a,b),void 0!==b)){if(Yq(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; +t.ks=function(a,b){if(null!==a){var c=this.Bh;if(""!==c)if(this.Cc(a)){var d=on(a,c);d!==b&&null===this.Zg(b)&&(Nj(a,c,b),void 0!==d&&this.rb.remove(d),this.rb.add(b,a),ur(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.Ka(a,c))}else Nj(a,c,b)}};t.Zg=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Yq(a)?this.rb.I(a):null}; +t.$r=function(a){if(null!==a){var b=this.Bh;if(""!==b){var c=this.uc(a);if(void 0===c||this.rb.contains(c)){var d=this.Sk;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.rb.contains(c))){Nj(a,b,c);return}if("string"===typeof c){for(d=2;this.rb.contains(c+d);)d++;Nj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.rb.count-1;this.rb.contains(c);)c--;Nj(a,b,c)}}}}};t.Cc=function(a){return null===a?!1:this.Rf.contains(a)};t.Yh=function(a){null!==a&&(gb(a),this.Cc(a)||$q(this,a,!0))}; +function $q(a,b,c){if(""!==a.linkKeyProperty){var d=a.uc(b);if(void 0!==d&&a.rb.I(d)===b)return;a.$r(b);d=a.uc(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.rb.add(d,b)}a.Rf.add(b);d=null;c&&(d=a.ed.length,a.ed.splice(d,0,b));ur(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Er(a,b)}t.ly=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.ed.splice(d,1)}ur(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=Wq(a,b,!0);br(a,c,b);c=Wq(a,b,!1);br(a,c,b);d=a.vf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new E;b.addAll(a.iterator);a=new E;var c=new E;var d=this.sort(b);var e,f,g=this.mp;var h=this.arrangement;var k=this.nodeDiameterFormula;var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle; isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===Vr&&k===Wr?h=Hr:h===Vr&&k!==Wr&&(h=this.arrangement);if((this.direction===Qr||this.direction===Rr)&&this.sorting!==Kr){for(k=0;!(k>=d.length);k+=2){a.add(d.K(k));if(k+1>=d.length)break;c.add(d.K(k+1))}this.direction===Qr?(this.arrangement===Vr&&a.reverse(),d=new E,d.addAll(a),d.addAll(c)):(this.arrangement===Vr&&c.reverse(),d=new E,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;r< d.length;r++){var q=n+p*f*(this.direction===Jr?1:-1)/k,u=d.K(r).diameter;isNaN(u)&&(u=Yr(d.K(r),q));360>p&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===Vr){isNaN(b)&&(b=6);if(h!==Hr&&h!==Vr){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g= -r/(360<=p?k:k-1)}this.Pv=h;this.hc=l;this.Hm=m;this.Qv=n;this.zp=p;this.Ni=b;this.de=f;this.mp=g;b=d;d=this.Pv;h=this.hc;l=this.Qv;m=this.zp;n=this.Ni;p=this.de;k=this.mp;if(this.direction!==Qr&&this.direction!==Rr||d!==Vr)if(this.direction===Qr||this.direction===Rr){g=0;switch(d){case Ur:g=180*as(this,h,p,l,k)/Math.PI;break;case Hr:k=b=0;g=a.first();null!==g&&(b=Yr(g,Math.PI/2));g=c.first();null!==g&&(k=Yr(g,Math.PI/2));g=180*as(this,h,p,l,n+(b+k)/2)/Math.PI;break;case Tr:g=m/b.length}if(this.direction=== +r/(360<=p?k:k-1)}this.Pv=h;this.hc=l;this.Hm=m;this.Qv=n;this.zp=p;this.Ni=b;this.ee=f;this.mp=g;b=d;d=this.Pv;h=this.hc;l=this.Qv;m=this.zp;n=this.Ni;p=this.ee;k=this.mp;if(this.direction!==Qr&&this.direction!==Rr||d!==Vr)if(this.direction===Qr||this.direction===Rr){g=0;switch(d){case Ur:g=180*as(this,h,p,l,k)/Math.PI;break;case Hr:k=b=0;g=a.first();null!==g&&(b=Yr(g,Math.PI/2));g=c.first();null!==g&&(k=Yr(g,Math.PI/2));g=180*as(this,h,p,l,n+(b+k)/2)/Math.PI;break;case Tr:g=m/b.length}if(this.direction=== Qr){switch(d){case Ur:bs(this,a,l,Sr);break;case Hr:cs(this,a,l,Sr);break;case Tr:ds(this,a,m/2,l,Sr)}switch(d){case Ur:bs(this,c,l+g,Jr);break;case Hr:cs(this,c,l+g,Jr);break;case Tr:ds(this,c,m/2,l+g,Jr)}}else{switch(d){case Ur:bs(this,c,l,Sr);break;case Hr:cs(this,c,l,Sr);break;case Tr:ds(this,c,m/2,l,Sr)}switch(d){case Ur:bs(this,a,l+g,Jr);break;case Hr:cs(this,a,l+g,Jr);break;case Tr:ds(this,a,m/2,l+g,Jr)}}}else switch(d){case Ur:bs(this,b,l,this.direction);break;case Hr:cs(this,b,l,this.direction); -break;case Tr:ds(this,b,m,l,this.direction);break;case Vr:es(this,b,m,l,this.direction)}else es(this,b,m,l-m/2,Jr)}this.updateParts();this.network=null;this.isValidLayout=!0};function ds(a,b,c,d,e){var f=a.zp,g=a.hc;a=a.de;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===Jr?f:-f);0>f;)f+=360;f%=360;180c){for(f=d+(e===Jr?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;hs(a,k,l,m,n,e,f)||is(a,k,l,m,n,e,f);k=f.x;l=f.y}I.free(f);a.hj++;if(!(23Math.abs(r)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.hj?a.hc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;hs(a,k,l,n,p,e,m)||is(a,k,l,n,p,e,m);k=m.x;l=m.y}I.free(m);a.hj++;if(!(23a.hj?a.hc-f/(2*Math.PI):a.hc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function is(a,b,c,d,e,f,g){var h=a.hc,k=a.de,l=0;a=(d[e].height+d[e+1].height)/2+a.Ni;d=!1;if(0<=b!==(f===Jr)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Gr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -Gr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new I(0,0):(c.x=this.arrangementOrigin.x+this.hc,c.y=this.arrangementOrigin.y+this.de);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.Za(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ie(c.ie(a)),this.group.move(b),this.Dv=b.ie(a))}; -Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function $r(a,b,c,d,e){var f=a.Yx;if(.001>Math.abs(a.Hm-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.hj?a.hc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;hs(a,k,l,n,p,e,m)||is(a,k,l,n,p,e,m);k=m.x;l=m.y}I.free(m);a.hj++;if(!(23a.hj?a.hc-f/(2*Math.PI):a.hc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function is(a,b,c,d,e,f,g){var h=a.hc,k=a.ee,l=0;a=(d[e].height+d[e+1].height)/2+a.Ni;d=!1;if(0<=b!==(f===Jr)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Gr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +Gr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new I(0,0):(c.x=this.arrangementOrigin.x+this.hc,c.y=this.arrangementOrigin.y+this.ee);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.Za(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.je(c.je(a)),this.group.move(b),this.Dv=b.je(a))}; +Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function $r(a,b,c,d,e){var f=a.Zx;if(.001>Math.abs(a.Hm-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} function Zr(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?$r(a,1,c,d,e):$r(a,1,c))}function as(a,b,c,d,e){if(.001>Math.abs(a.Hm-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} Gr.prototype.sort=function(a){switch(this.sorting){case Or:break;case Pr:a.reverse();break;case Mr:a.sort(this.comparer);break;case Nr:a.sort(this.comparer);a.reverse();break;case Kr:return this.Vj(js(a));default:C("Invalid sorting type.")}return a}; function js(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.K(f));b[f]=-1;f=a.K(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} @@ -1956,36 +1958,36 @@ c.indexOf(b[l][z]),0<=B&&(B=Math.abs(u-(B>=u?B+1:B)),v+=Br||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.jl=a:this.jl=360,this.D())}},arrangement:{get:function(){return this.Nb},set:function(a){this.Nb===a||a!==Vr&&a!==Hr&&a!==Ur&&a!==Tr||(this.Nb=a,this.D())}},direction:{get:function(){return this.L},set:function(a){this.L===a||a!==Jr&&a!==Sr&&a!==Qr&&a!==Rr||(this.L=a,this.D())}},sorting:{get:function(){return this.fd},set:function(a){this.fd===a||a!==Or&&a!==Pr&& -a!==Mr&&!Nr&&a!==Kr||(this.fd=a,this.D())}},comparer:{get:function(){return this.Zc},set:function(a){this.Zc!==a&&(this.Zc=a,this.D())}},spacing:{get:function(){return this.ff},set:function(a){this.ff!==a&&(this.ff=a,this.D())}},nodeDiameterFormula:{get:function(){return this.un},set:function(a){this.un===a||a!==Lr&&a!==Wr||(this.un=a,this.D())}},actualXRadius:{get:function(){return this.hc}}, -actualYRadius:{get:function(){return this.de}},actualSpacing:{get:function(){return this.Ni}},actualCenter:{get:function(){return this.Dv}}}); +a!==Mr&&!Nr&&a!==Kr||(this.fd=a,this.D())}},comparer:{get:function(){return this.Zc},set:function(a){this.Zc!==a&&(this.Zc=a,this.D())}},spacing:{get:function(){return this.gf},set:function(a){this.gf!==a&&(this.gf=a,this.D())}},nodeDiameterFormula:{get:function(){return this.un},set:function(a){this.un===a||a!==Lr&&a!==Wr||(this.un=a,this.D())}},actualXRadius:{get:function(){return this.hc}}, +actualYRadius:{get:function(){return this.ee}},actualSpacing:{get:function(){return this.Ni}},actualCenter:{get:function(){return this.Dv}}}); var Hr=new D(Gr,"ConstantSpacing",0),Ur=new D(Gr,"ConstantDistance",1),Tr=new D(Gr,"ConstantAngle",2),Vr=new D(Gr,"Packed",3),Jr=new D(Gr,"Clockwise",4),Sr=new D(Gr,"Counterclockwise",5),Qr=new D(Gr,"BidirectionalLeft",6),Rr=new D(Gr,"BidirectionalRight",7),Or=new D(Gr,"Forwards",8),Pr=new D(Gr,"Reverse",9),Mr=new D(Gr,"Ascending",10),Nr=new D(Gr,"Descending",11),Kr=new D(Gr,"Optimized",12),Lr=new D(Gr,"Pythagorean",13),Wr=new D(Gr,"Circular",14);Gr.className="CircularLayout";Gr.ConstantSpacing=Hr; Gr.ConstantDistance=Ur;Gr.ConstantAngle=Tr;Gr.Packed=Vr;Gr.Clockwise=Jr;Gr.Counterclockwise=Sr;Gr.BidirectionalLeft=Qr;Gr.BidirectionalRight=Rr;Gr.Forwards=Or;Gr.Reverse=Pr;Gr.Ascending=Mr;Gr.Descending=Nr;Gr.Optimized=Kr;Gr.Pythagorean=Lr;Gr.Circular=Wr;function Ir(){this.xl=-Infinity;this.cm=this.bk=null} Ir.prototype.compare=function(a,b){if(0this.xl||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+p.height/2,l[0]=new I(p.x+p.width+d.width,p.y),l[1]=new I(p.x,p.y+p.height+d.height),h=2):(k=ps(l,h,e,f,p.width,p.height,d),n=l[k],r=new I(n.x+ -p.width+d.width,n.y),p=new I(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.Sc(c)&&(a++,2a.network.vertexes.count)return!1;a.Sg=a.network.vertexes.Ea();a=a.Sg;a.sort(function(a,b){return null===a||null===b||a===b?0:b.Nd-a.Nd});for(b=a.length-1;0<=b&&1>=a[b].Nd;)b--;return 1=g))){for(var l=h=0,m=k.count-g;mr&& -(r=1);h=J.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new I(p.x+g,p.y+h)}}a.network=d;return c}function ts(a,b){for(var c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.Je){var e=d.Je.K(d.av);d.Nd=e.ts;var f=e.wv,g=e.xv;d.bounds=new M(d.centerX-f,d.centerY-g,e.us,e.ss);d.focus=new I(f,g);d.av--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function us(a,b){var c=b.Bj;if(null!==c&&0!==c.count){var d=b.centerX,e=b.centerY,f=b.width,g=b.height;null!==b.Je&&0=n.Nd?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=g))){for(var l=h=0,m=k.count-g;mr&& +(r=1);h=J.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new I(p.x+g,p.y+h)}}a.network=d;return c}function ts(a,b){for(var c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.Ke){var e=d.Ke.K(d.av);d.Nd=e.ts;var f=e.wv,g=e.xv;d.bounds=new M(d.centerX-f,d.centerY-g,e.us,e.ss);d.focus=new I(f,g);d.av--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} +function us(a,b){var c=b.Bj;if(null!==c&&0!==c.count){var d=b.centerX,e=b.centerY,f=b.width,g=b.height;null!==b.Ke&&0=n.Nd?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=d+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} function ps(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,J.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,J.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.Of;var l=d=h=0;for(f= +function xs(a){null===a.Sg&&(a.Sg=a.network.vertexes.Ea());var b=a.Sg;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.Pf;var l=d=h=0;for(f= 0;fc||l-k>c){if(e)break}else if(m-r>c||r-m>c){if(!e)break}else{var q=ws(g,p);1>q?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new ys),q=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*q):kr?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new ys),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;eu&&0u&&0a[this.yc]&&(this.Dh=a[c]-1,this.yc=c),a[c]u&&0u&&0a[this.zc]&&(this.Dh=a[c]-1,this.zc=c),a[c]g)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.mf===l.mf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lg)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.nf===l.nf||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lu||n===u&&r>q)&&h++;wn||u===n&&q>r)&&h++}}}if(0>=c)for(k=d[g].destinationEdgesArrayAccess,l=0;lu||n===u&&m>w)&&h++,qn||u===n&&w>m)&&h++);f[g*e+g]=h;for(k=g+ 1;k=c)for(h=d[g].destinationEdgesArrayAccess,y=d[k].destinationEdgesArrayAccess,l=0;l>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}Ls(a,b,d);return f}function Ts(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&Ts(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&Ts(a,k,c,d,e,f)}} function Us(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)Us(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)Us(a,b.value.fromVertex,c,d,e,f)}} Bs.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.rk){default:case Vs:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==Ws(a);){for(e=Xs(a);null!==e;)d[c]=e,c--,e.valid=!1,e=Xs(a);for(e=Ys(a);null!==e;)d[b]=e,b++,e.valid=!1,e=Ys(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& -k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.Ol(b),b.rev=!0);break;case Cs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.fg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Cg=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -Zs(this,b);for(d.reset();d.next();)b=d.value,-1===b.fg&&Zs(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.fgd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cb.toVertex.index&&(a.Ol(b),b.rev=!0);break;case Cs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.gg=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Cg=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +Zs(this,b);for(d.reset();d.next();)b=d.value,-1===b.gg&&Zs(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.ggd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cf+1&&(p+=4*(z-f),r+=4*(z-(f+1)))}A=d[f].destinationEdges.iterator;for(A.reset();A.next();)if(z=A.value,y=z.toVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;z===f+1&&(r+=1)}A=d[f+1].sourceEdges.iterator;for(A.reset();A.next();)if(z=A.value,y=z.fromVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;zf+1&&(p+=4*(z-(f+1)),r+=4*(z-f))}A=d[f+1].destinationEdges.iterator; for(A.reset();A.next();)if(z=A.value,y=z.toVertex,z.valid&&y.layer===b){for(z=0;d[z]!==y;)z++;z===f&&(p+=1)}z=y=0;A=g[d[f].index];var B=h[d[f].index],F=g[d[f+1].index],L=h[d[f+1].index];-1!==A&&(y+=Math.abs(A-q),z+=Math.abs(A-v));-1!==B&&(y+=Math.abs(B-q),z+=Math.abs(B-v));-1!==F&&(y+=Math.abs(F-u),z+=Math.abs(F-w));-1!==L&&(y+=Math.abs(L-u),z+=Math.abs(L-w));if(r>1)+8*d;this.Ja*=8}if(0!==(this.Sf&2))for(c=!0;c;){c=!1;for(b=this.yc+1;b<=this.wa;b++)c=ot(this,b,1)|| -c;for(b=this.yc-1;0<=b;b--)c=ot(this,b,-1)||c;c=ot(this,this.yc,0)||c}if(0!==(this.Sf&4)){for(b=this.yc+1;b<=this.wa;b++)pt(this,b,1);for(b=this.yc-1;0<=b;b--)pt(this,b,-1);pt(this,this.yc,0)}a&&(qt(this,-1),qt(this,1));if(0!==(this.Sf&2))for(c=!0;c;){c=!1;c=ot(this,this.yc,0)||c;for(b=this.yc+1;b<=this.wa;b++)c=ot(this,b,0)||c;for(b=this.yc-1;0<=b;b--)c=ot(this,b,0)||c}};function ot(a,b,c){for(var d=!1;rt(a,b,c);)d=!0;return d} +Bs.prototype.straightenAndPack=function(){var a=0!==(this.Tf&1);var b=0!==(this.Tf&nt);1E3>1)+8*d;this.Ja*=8}if(0!==(this.Tf&2))for(c=!0;c;){c=!1;for(b=this.zc+1;b<=this.wa;b++)c=ot(this,b,1)|| +c;for(b=this.zc-1;0<=b;b--)c=ot(this,b,-1)||c;c=ot(this,this.zc,0)||c}if(0!==(this.Tf&4)){for(b=this.zc+1;b<=this.wa;b++)pt(this,b,1);for(b=this.zc-1;0<=b;b--)pt(this,b,-1);pt(this,this.zc,0)}a&&(qt(this,-1),qt(this,1));if(0!==(this.Tf&2))for(c=!0;c;){c=!1;c=ot(this,this.zc,0)||c;for(b=this.zc+1;b<=this.wa;b++)c=ot(this,b,0)||c;for(b=this.zc-1;0<=b;b--)c=ot(this,b,0)||c}};function ot(a,b,c){for(var d=!1;rt(a,b,c);)d=!0;return d} function rt(a,b,c){var d,e=Ks(a,b),f=a.Hb[b],g=Rs(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?r=m-1:r=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var q=p=0,u=0;if(0>=c)for(var w=e[d].sourceEdges.iterator;w.next();){var v=w.value;var z=v.fromVertex; if(v.valid&&z.layer!==b){var y=Ms(v);var A=v.portFromColOffset;v=v.portToColOffset;z=z.column;p+=(Math.abs(m+v-(z+A))+1)*y;q+=(Math.abs(r+v-(z+A))+1)*y;u+=(Math.abs(n+v-(z+A))+1)*y}}if(0<=c)for(w=e[d].destinationEdges.iterator;w.next();)v=w.value,z=v.toVertex,v.valid&&z.layer!==b&&(y=Ms(v),A=v.portFromColOffset,v=v.portToColOffset,z=z.column,p+=(Math.abs(m+A-(z+v))+1)*y,q+=(Math.abs(r+A-(z+v))+1)*y,u+=(Math.abs(n+A-(z+v))+1)*y);v=A=y=0;w=g[e[d].index];z=h[e[d].index];-1!==w&&(y+=Math.abs(w-m),A+= Math.abs(w-r),v+=Math.abs(w-n));-1!==z&&(y+=Math.abs(z-m),A+=Math.abs(z-r),v+=Math.abs(z-n));if(q=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} function tt(a,b){var c=b+1;var d,e=[],f=[];for(d=0;d<=a.wa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.wa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} function qt(a,b){for(var c=0;c<=a.Ja;c++)for(;st(a,c););a.normalize();for(c=0;cf?Os(a,e):gb)for(c=a.Ja;0<=c;c--)for(e=Ns(a),f=Qs(a),d=f+1;ff?Os(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Kc);a.Kc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Us(a,b,a.Kc,-1,!0,!0),a.Kc++);var f;b=[];for(f=0;fc)for(g=a.Ja;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +function ut(a,b,c){a.Lc=0;for(var d=a.network.vertexes.iterator;d.next();)d.value.component=-1;if(0c)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Lc);a.Lc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Us(a,b,a.Lc,-1,!0,!0),a.Lc++);var f;b=[];for(f=0;fc)for(g=a.Ja;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} Bs.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Is(this,!0),b=Is(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.nu();this.isRouting&&this.commitLinks()};function Is(a,b){return 270===a.L?b?ad:fd:90===a.L?b?fd:ad:180===a.L?b?dd:ed:b?ed:dd} -Bs.prototype.commitNodes=function(){this.$d=[];this.Cd=[];this.Bd=[];this.Qa=[];for(var a=0;a<=this.wa;a++)this.$d[a]=0,this.Cd[a]=0,this.Bd[a]=0,this.Qa[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.$d[c]=Math.max(this.$d[c],this.nodeMinLayerSpace(b,!0));this.Cd[c]=Math.max(this.Cd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ae;for(var d=0;d<=this.wa;d++){var e=c;0>=this.$d[d]+this.Cd[d]&&(e=0);0=this.ae[d]+this.Cd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.l(q++,A,n+F),b.l(q++,A,n),b.l(q++,A,n-y)):(b.l(q++,A,B+F),b.l(q++,A,B),b.l(q++,A,B-y)):270===this.L?B<=n.bounds.y?(n=n.bounds.y,b.l(q++,A,n-y),b.l(q++,A,n),b.l(q++,A,n+F)):(b.l(q++,A,B-y),b.l(q++,A,B),b.l(q++,A,B+F)):0===this.L&&(A>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.l(q++,n+F,B),b.l(q++,n,B),b.l(q++,n-y,B)):(b.l(q++,A+F,B),b.l(q++,A,B),b.l(q++,A-y,B)));else{b.l(q++,v,z);var L=0;if(180===this.L||0===this.L){if(180===this.L?A>=n.bounds.right: -A<=n.bounds.x)L=(0===this.L?-y:F)/2;b.l(q++,v+L,B)}else{if(270===this.L?B>=n.bounds.bottom:B<=n.bounds.y)L=(90===this.L?-y:F)/2;b.l(q++,A,z+L)}b.l(q++,A,B)}}else y=Math.max(10,this.$d[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):90===this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)): +A<=n.bounds.x)L=(0===this.L?-y:F)/2;b.l(q++,v+L,B)}else{if(270===this.L?B>=n.bounds.bottom:B<=n.bounds.y)L=(90===this.L?-y:F)/2;b.l(q++,A,z+L)}b.l(q++,A,B)}}else y=Math.max(10,this.ae[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):90===this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)): 270===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):b.l(q++,A,B)}n=w}if(null===h||l!==sc||p)if(v=b.i(q-1).x,z=b.i(q-1).y,A=b.i(q).x,B=b.i(q).y,p)u=this.Cd[m.layer],180===this.L||0===this.L?(p=z,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.L?A>=m.bounds.x:A<=m.bounds.right)&&(n=m.centerX+(180=== -this.L?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.L?B>=m.bounds.y:B<=m.bounds.bottom)&&(n=m.centerY+(270===this.L?-u:u),p=m.bounds.x?(n=m.bounds.x+ -m.bounds.width,b.M(q-2,n,z),b.M(q-1,n+F,z)):90===this.L&&B<=m.bounds.bottom?(n=m.bounds.y,b.M(q-2,v,n),b.M(q-1,v,n-y)):270===this.L&&B>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.M(q-2,v,n),b.M(q-1,v,n+F)):0===this.L&&A<=m.bounds.right&&(n=m.bounds.x,b.M(q-2,n,z),b.M(q-1,n-y,z));else{y=Math.max(10,this.$d[m.layer]);F=Math.max(10,this.Cd[m.layer]);p=0;if(180===this.L||0===this.L){if(180===this.L?A<=m.bounds.x:A>=m.bounds.right)p=(0===this.L?F:-y)/2;b.l(q++,A+p,z)}else{if(270===this.L?B<=m.bounds.y: +this.L?-u:u),p=m.bounds.x&&p<=m.bounds.right&&(270===this.L?B>=m.bounds.y:B<=m.bounds.bottom)&&(n=m.centerY+(270===this.L?-u:u),p=m.bounds.x?(n=m.bounds.x+ +m.bounds.width,b.M(q-2,n,z),b.M(q-1,n+F,z)):90===this.L&&B<=m.bounds.bottom?(n=m.bounds.y,b.M(q-2,v,n),b.M(q-1,v,n-y)):270===this.L&&B>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.M(q-2,v,n),b.M(q-1,v,n+F)):0===this.L&&A<=m.bounds.right&&(n=m.bounds.x,b.M(q-2,n,z),b.M(q-1,n-y,z));else{y=Math.max(10,this.ae[m.layer]);F=Math.max(10,this.Cd[m.layer]);p=0;if(180===this.L||0===this.L){if(180===this.L?A<=m.bounds.x:A>=m.bounds.right)p=(0===this.L?F:-y)/2;b.l(q++,A+p,z)}else{if(270===this.L?B<=m.bounds.y: B>=m.bounds.bottom)p=(90===this.L?F:-y)/2;b.l(q++,v,B+p)}b.l(q++,A,B)}}else{for(;null!==m&&m!==n;){y=w=null;for(m=m.destinationEdges.iterator;m.next()&&(v=m.value,v.link!==c.link||(w=v.toVertex,y=v.fromVertex,null!==y.node&&(y=null),null!==w.node)););if(null===w)break;w!==n&&(v=b.i(q-1).x,z=b.i(q-1).y,A=w.centerX,B=w.centerY,p?180===this.L||0===this.L?(null!==y?y.centerY:z)!==B&&(y=this.Qa[w.layer]+this.Yc.x,q===b.firstPickIndex+1&&(y=0===this.L?Math.max(y,v):Math.min(y,v)),b.l(q++,y,z),b.l(q++,y, -B)):(null!==y?y.centerX:v)!==A&&(y=this.Qa[w.layer]+this.Yc.y,q===b.firstPickIndex+1&&(y=90===this.L?Math.max(y,z):Math.min(y,z)),b.l(q++,v,y),b.l(q++,A,y)):(y=Math.max(10,this.$d[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):90===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):270=== +B)):(null!==y?y.centerX:v)!==A&&(y=this.Qa[w.layer]+this.Yc.y,q===b.firstPickIndex+1&&(y=90===this.L?Math.max(y,z):Math.min(y,z)),b.l(q++,v,y),b.l(q++,A,y)):(y=Math.max(10,this.ae[w.layer]),F=Math.max(10,this.Cd[w.layer]),r?180===this.L?(b.l(q++,A+F+u,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A-y-u,B)):90===this.L?(b.l(q++,A,B-y-u),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B+F+u)):270=== this.L?(b.l(q++,A,B+F+u),b.l(q++,A,Math.max(B+F-u/2,B)),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,A,Math.min(B-y+u/2,B)),b.l(q++,A,B-y-u)):(b.l(q++,A-y-u,B),b.l(q++,Math.min(A-y+u/2,A),B),b.l(q++,A,B),b.l(q++,A,B),b.l(q++,Math.max(A+F-u/2,A),B),b.l(q++,A+F+u,B)):180===this.L?(b.l(q++,A+F,B),b.l(q++,A-y,B)):90===this.L?(b.l(q++,A,B-y),b.l(q++,A,B+F)):270===this.L?(b.l(q++,A,B+F),b.l(q++,A,B-y)):(b.l(q++,A-y,B),b.l(q++,A+F,B))));m=w}p&&(v=b.i(q-1).x,z=b.i(q-1).y,A=b.i(q).x,B=b.i(q).y,180===this.L||0===this.L? z!==B&&(y=0===this.L?Math.min(Math.max((A+v)/2,this.Qa[n.layer]+this.Yc.x),A):Math.max(Math.min((A+v)/2,this.Qa[n.layer]+this.Yc.x),A),b.l(q++,y,z),b.l(q++,y,B)):v!==A&&(y=90===this.L?Math.min(Math.max((B+z)/2,this.Qa[n.layer]+this.Yc.y),B):Math.max(Math.min((B+z)/2,this.Qa[n.layer]+this.Yc.y),B),b.l(q++,v,y),b.l(q++,A,y)))}null!==d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.C(d)||b.M(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.v()||l.set(e.actualBounds.center),b.M(0,l.x,l.y)), -null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.C(l)||b.M(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.v()||e.set(f.actualBounds.center),b.M(b.pointsCount-1,e.x,e.y)));b.nf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.C(l)||b.M(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.v()||e.set(f.actualBounds.center),b.M(b.pointsCount-1,e.x,e.y)));b.pf();c.commit()}}}this.avoidOrthogonalOverlaps()}; Bs.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new E,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.ldb.ld?1:a.Acb.Ac?1:0:0};t.Ax=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.firstb.first||a.jb.j||a.ldb.ld?1:a.Acb.Ac?1:0:0}; -t.js=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.fcb.fc||a.jb.j||a.ldb.ld?1:a.Acb.Ac?1:0:0};t.B=function(a,b){a-=b;return-1a}; +k.x*k.x+k.y;h.fc=l.x*l.x+l.y;h.ld=Math.min(f.x,g.x);h.Bc=Math.max(f.x,g.x);h.index=e;h.link=d;if(e+2f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.ldb.ld?1:a.Bcb.Bc?1:0:0};t.Bx=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.firstb.first||a.jb.j||a.ldb.ld?1:a.Bcb.Bc?1:0:0}; +t.js=function(a,b){return a instanceof vt&&b instanceof vt&&a!==b?a.fcb.fc||a.jb.j||a.ldb.ld?1:a.Bcb.Bc?1:0:0};t.B=function(a,b){a-=b;return-1a}; t.ri=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&C("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.ve.length){var d=[];for(var e=0;e=a.we.length){var d=[];for(var e=0;ea&&(this.Sf=a,this.D())}},setsPortSpots:{get:function(){return this.ef},set:function(a){this.ef!==a&&(this.ef=a,this.D())}}, -linkSpacing:{get:function(){return this.jn},set:function(a){this.jn!==a&&0<=a&&(this.jn=a,this.D())}},maxLayer:{get:function(){return this.wa}},maxIndex:{get:function(){return this.Dh}},maxColumn:{get:function(){return this.Ja}},minIndexLayer:{get:function(){return this.Bg}},maxIndexLayer:{get:function(){return this.yc}}}); +get:function(){return this.Xi},set:function(a){this.Xi!==a&&0<=a&&(this.Xi=a,this.D())}},aggressiveOption:{get:function(){return this.ek},set:function(a){this.ek===a||a!==lt&&a!==Fs&&a!==mt||(this.ek=a,this.D())}},packOption:{get:function(){return this.Tf},set:function(a){this.Tf!==a&&0<=a&&8>a&&(this.Tf=a,this.D())}},setsPortSpots:{get:function(){return this.ff},set:function(a){this.ff!==a&&(this.ff=a,this.D())}}, +linkSpacing:{get:function(){return this.jn},set:function(a){this.jn!==a&&0<=a&&(this.jn=a,this.D())}},maxLayer:{get:function(){return this.wa}},maxIndex:{get:function(){return this.Dh}},maxColumn:{get:function(){return this.Ja}},minIndexLayer:{get:function(){return this.Bg}},maxIndexLayer:{get:function(){return this.zc}}}); var Cs=new D(Bs,"CycleDepthFirst",0),Vs=new D(Bs,"CycleGreedy",1),Hs=new D(Bs,"CycleFromLayers",2),Ds=new D(Bs,"LayerOptimalLinkLength",0),$s=new D(Bs,"LayerLongestPathSink",1),bt=new D(Bs,"LayerLongestPathSource",2),Es=new D(Bs,"InitDepthFirstOut",0),ht=new D(Bs,"InitDepthFirstIn",1),ft=new D(Bs,"InitNaive",2),lt=new D(Bs,"AggressiveNone",0),Fs=new D(Bs,"AggressiveLess",1),mt=new D(Bs,"AggressiveMore",2),nt=8;Bs.className="LayeredDigraphLayout";Bs.CycleDepthFirst=Cs;Bs.CycleGreedy=Vs; -Bs.CycleFromLayers=Hs;Bs.LayerOptimalLinkLength=Ds;Bs.LayerLongestPathSink=$s;Bs.LayerLongestPathSource=bt;Bs.InitDepthFirstOut=Es;Bs.InitDepthFirstIn=ht;Bs.InitNaive=ft;Bs.AggressiveNone=lt;Bs.AggressiveLess=Fs;Bs.AggressiveMore=mt;Bs.PackNone=0;Bs.PackExpand=1;Bs.PackStraighten=2;Bs.PackMedian=4;Bs.PackAll=15;function vt(){this.index=this.Ac=this.ld=this.fc=this.first=this.layer=0;this.link=null;this.j=0}vt.className="SegInfo";function Gs(a){eq.call(this,a)}la(Gs,eq);Gs.prototype.createVertex=function(){return new wt(this)}; -Gs.prototype.createEdge=function(){return new xt(this)};Gs.className="LayeredDigraphNetwork";function wt(a){sq.call(this,a);this.Wa=this.qg=this.Ah=-1;this.u=NaN;this.F=null;this.valid=!1;this.finish=this.fg=NaN;this.mf=0;this.Tj=this.Uj=null}la(wt,sq); -wt.prototype.serializeVertexProperties=function(a,b){sq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?cb(this.near):null;a.valid=this.valid;a.fg=this.fg;a.finish=this.finish;a.mf=this.mf;a.Uj=this.Uj;a.Tj=this.Tj}; -wt.prototype.deserializeVertexProperties=function(a,b,c,d){sq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.fg=a.fg;this.finish=a.finish;this.mf=a.mf;this.Uj=a.Uj;this.Tj=a.Tj}; -ma.Object.defineProperties(wt.prototype,{layer:{get:function(){return this.Ah},set:function(a){this.Ah!==a&&(this.Ah=a)}},column:{get:function(){return this.qg},set:function(a){this.qg!==a&&(this.qg=a)}},index:{get:function(){return this.Wa},set:function(a){this.Wa!==a&&(this.Wa=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{ -get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}});wt.className="LayeredDigraphVertex";function xt(a){tq.call(this,a);this.j=this.ga=this.Ga=!1;this.Y=this.u=NaN;this.F=this.o=0}la(xt,tq); +Bs.CycleFromLayers=Hs;Bs.LayerOptimalLinkLength=Ds;Bs.LayerLongestPathSink=$s;Bs.LayerLongestPathSource=bt;Bs.InitDepthFirstOut=Es;Bs.InitDepthFirstIn=ht;Bs.InitNaive=ft;Bs.AggressiveNone=lt;Bs.AggressiveLess=Fs;Bs.AggressiveMore=mt;Bs.PackNone=0;Bs.PackExpand=1;Bs.PackStraighten=2;Bs.PackMedian=4;Bs.PackAll=15;function vt(){this.index=this.Bc=this.ld=this.fc=this.first=this.layer=0;this.link=null;this.j=0}vt.className="SegInfo";function Gs(a){eq.call(this,a)}la(Gs,eq);Gs.prototype.createVertex=function(){return new wt(this)}; +Gs.prototype.createEdge=function(){return new xt(this)};Gs.className="LayeredDigraphNetwork";function wt(a){sq.call(this,a);this.Wa=this.rg=this.Ah=-1;this.u=NaN;this.F=null;this.valid=!1;this.finish=this.gg=NaN;this.nf=0;this.Tj=this.Uj=null}la(wt,sq); +wt.prototype.serializeVertexProperties=function(a,b){sq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?cb(this.near):null;a.valid=this.valid;a.gg=this.gg;a.finish=this.finish;a.nf=this.nf;a.Uj=this.Uj;a.Tj=this.Tj}; +wt.prototype.deserializeVertexProperties=function(a,b,c,d){sq.prototype.deserializeVertexProperties.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.gg=a.gg;this.finish=a.finish;this.nf=a.nf;this.Uj=a.Uj;this.Tj=a.Tj}; +ma.Object.defineProperties(wt.prototype,{layer:{get:function(){return this.Ah},set:function(a){this.Ah!==a&&(this.Ah=a)}},column:{get:function(){return this.rg},set:function(a){this.rg!==a&&(this.rg=a)}},index:{get:function(){return this.Wa},set:function(a){this.Wa!==a&&(this.Wa=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{ +get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}});wt.className="LayeredDigraphVertex";function xt(a){tq.call(this,a);this.j=this.ga=this.Ga=!1;this.W=this.u=NaN;this.F=this.m=0}la(xt,tq); xt.prototype.serializeEdgeProperties=function(a,b){tq.prototype.serializeEdgeProperties.call(this,a,b);a.valid=this.valid;a.rev=this.rev;a.forest=this.forest;a.portFromPos=this.portFromPos;a.portToPos=this.portToPos;a.portFromColOffset=this.portFromColOffset;a.portToColOffset=this.portToColOffset}; xt.prototype.deserializeEdgeProperties=function(a,b,c,d){tq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; ma.Object.defineProperties(xt.prototype,{fromVertex:{get:function(){return this.ad},set:function(a){this.ad!==a&&(this.ad=a)}},toVertex:{get:function(){return this.jd},set:function(a){this.jd!==a&&(this.jd=a)}},valid:{get:function(){return this.Ga},set:function(a){this.Ga!==a&&(this.Ga=a)}},rev:{get:function(){return this.ga},set:function(a){this.ga!==a&&(this.ga=a)}},forest:{ -get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F}, -set:function(a){this.F!==a&&(this.F=a)}}});xt.className="LayeredDigraphEdge";function yt(a){qi.call(this);this.Qb=new G;this.En=zt;this.qd=At;this.Yn=Bt;this.aq=Ct;this.Ev=[];this.od=!0;this.Nb=Dt;this.Td=(new K(10,10)).freeze();var b=new Et(this);this.V=new Ft(b);this.W=new Ft(b);this.Xt=[];a&&Object.assign(this,a)}la(yt,qi); -yt.prototype.cloneProtected=function(a){qi.prototype.cloneProtected.call(this,a);a.En=this.En;a.Yn=this.Yn;a.aq=this.aq;a.od=this.od;a.Nb=this.Nb;a.Td.assign(this.Td);a.V.copyInheritedPropertiesFrom(this.V);a.W.copyInheritedPropertiesFrom(this.W)}; +get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a)}},portFromColOffset:{get:function(){return this.m},set:function(a){this.m!==a&&(this.m=a)}},portToColOffset:{get:function(){return this.F}, +set:function(a){this.F!==a&&(this.F=a)}}});xt.className="LayeredDigraphEdge";function yt(a){qi.call(this);this.Qb=new G;this.En=zt;this.qd=At;this.Yn=Bt;this.aq=Ct;this.Ev=[];this.od=!0;this.Nb=Dt;this.Td=(new K(10,10)).freeze();var b=new Et(this);this.V=new Ft(b);this.Y=new Ft(b);this.Xt=[];a&&Object.assign(this,a)}la(yt,qi); +yt.prototype.cloneProtected=function(a){qi.prototype.cloneProtected.call(this,a);a.En=this.En;a.Yn=this.Yn;a.aq=this.aq;a.od=this.od;a.Nb=this.Nb;a.Td.assign(this.Td);a.V.copyInheritedPropertiesFrom(this.V);a.Y.copyInheritedPropertiesFrom(this.Y)}; yt.prototype.ob=function(a){a.classType===yt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:C("Unknown enum value: "+a):qi.prototype.ob.call(this,a)};yt.prototype.createNetwork=function(){return new Et(this)}; -yt.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof T){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.dg(a.nodes,!0,b),c.dg(a.links,!0,b)):a instanceof qf?c.dg(a.memberParts,!1,b):c.dg(a.iterator,!1,b);return c}; +yt.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof T){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof Q?(c.eg(a.nodes,!0,b),c.eg(a.links,!0,b)):a instanceof qf?c.eg(a.memberParts,!1,b):c.eg(a.iterator,!1,b);return c}; yt.prototype.doLayout=function(a){null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Gt&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===zt&&null!==b?this.qd=b.isTreePathToChildren?At:Ht:this.qd=this.path===zt?At:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0}yt.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ee?pu(a,g,X,v,z):qu(a,g,X,v,z);X=z.x;v=z.width;z=z.height;break;case bu:for(A=0;An&&(Shb&&(vu(a,-hb,0,da,na-1),wu(A,-hb,0),wu(B,-hb,0),hb=0)}Ba.S.h(hb,R);v=Math.max(v,F);z=Math.max(z,y+(0===P?0:q)+db.height);S=F}else{0n&&(Rhb&&(vu(a,0,-hb,da,na-1),wu(A,0,-hb),wu(B,0,-hb),hb=0);Ba.S.h(S,hb);z=Math.max(z,L);v=Math.max(v,y+(0===P?0:q)+db.width);R=L}H++}0e?pu(a,g,X,v,z):qu(a,g,X,v,z);X=z.x;v=z.width;z=z.height;break;case bu:for(A=0;An&&(Shb&&(vu(a,-hb,0,da,oa-1),wu(A,-hb,0),wu(B,-hb,0),hb=0)}Ba.S.h(hb,R);v=Math.max(v,F);z=Math.max(z,y+(0===P?0:q)+db.height);S=F}else{0n&&(Rhb&&(vu(a,0,-hb,da,oa-1),wu(A,0,-hb),wu(B,0,-hb),hb=0);Ba.S.h(S,hb);z=Math.max(z,L);v=Math.max(v,y+(0===P?0:q)+db.width);R=L}H++}0l&&(l=0),135u&&(u=0), k===cu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Bu(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=zu(a,v,l),0>l&&(g-=l,l=0),135z&&(z=Bu(k,0,w-z),g=z.x,h=z.y,z=w,u=0):z=Au(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(l+d,0),P[1].h(P[0].x,w),P[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?pu(b,e,H,y,A): +lu;h=$t(l);var p=Math.max(0,b.breadthLimit);k=mu(b);var r=b.nodeSpacing,q=nu(b),u=m||n?0:q/2,w=b.rowSpacing,v=0;if(m||n||b.Pl||b.Ql&&1===b.maxGenerationCount)v=Math.max(0,b.rowIndent);m=b.width;var z=b.height,y=0,A=0,B=0,F=0,L=0,S=0,R=0,P=0,H=0;h&&!du(l)&&135d?pu(b,e,H,y,A): qu(b,e,H,y,A);H=A.x;y=A.width;A=A.height;break;case bu:for(a=0;ap&&(Fp&&(Lp&&(Fp&&(Ln&&(n=0),135v&&(v=0));b.ka.h(n,v);b.Ca.h(y,A)}} @@ -2177,7 +2179,7 @@ function Cu(a,b){var c=b.length,d=a.Xt[c];void 0===d&&(d=[],a.Xt[c]=d);d.push(b) yt.prototype.arrangeTrees=function(){if(this.Nb===Gt)for(var a=this.Qb.iterator;a.next();){var b=a.value;if(b instanceof Ft){var c=b.node;if(null!==c){var d=c.position;c=d.x;d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);Fu(this,b,c,d)}}}else{a=[];for(b=this.Qb.iterator;b.next();)c=b.value,c instanceof Ft&&a.push(c);switch(this.sorting){case Wt:break;case Xt:a.reverse();break;case Yt:a.sort(this.comparer);break;case Zt:a.sort(this.comparer);a.reverse();break;default:C("Unhandled sorting value "+this.sorting.toString())}c= this.arrangementOrigin;b=c.x;c=c.y;for(d=0;d=a?0:135>=a?90:225>=a?180:315>=a?270:0}function mu(a){var b=ku(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.V.nodeIndentPastParent=a,this.D())}},nodeSpacing:{get:function(){return this.V.nodeSpacing},set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.D())}},layerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!== a&&(this.V.layerSpacing=a,this.D())}},layerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.D())}},compaction:{get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==fu&&a!==hu||(this.V.compaction=a,this.D())}},breadthLimit:{get:function(){return this.V.breadthLimit}, set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.D())}},rowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.D())}},rowIndent:{get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.D())}},commentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!== a&&(this.V.commentSpacing=a,this.D())}},commentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.D())}},setsPortSpot:{get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.D())}},portSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.C(a)||(this.V.portSpot= -a,this.D())}},setsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.D())}},childPortSpot:{get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.C(a)||(this.V.childPortSpot=a,this.D())}},alternateSorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Wt&&a!==Xt&& -a!==Yt&&!Zt||(this.W.sorting=a,this.D())}},alternateComparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.D())}},alternateAngle:{get:function(){return this.W.angle},set:function(a){this.W.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.W.angle=a,this.D())}},alternateAlignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!== -a&&(this.W.alignment=a,this.D())}},alternateNodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.D())}},alternateNodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.D())}},alternateNodeSpacing:{get:function(){return this.W.nodeSpacing}, -set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.D())}},alternateLayerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.D())}},alternateLayerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.D())}},alternateCompaction:{ -get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==fu&&a!==hu||(this.W.compaction=a,this.D())}},alternateBreadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.D())}},alternateRowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.D())}},alternateRowIndent:{ -get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.D())}},alternateCommentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.D())}},alternateCommentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.D())}},alternateSetsPortSpot:{ -get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.D())}},alternatePortSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.C(a)||(this.W.portSpot=a,this.D())}},alternateSetsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.D())}},alternateChildPortSpot:{ -get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.C(a)||(this.W.childPortSpot=a,this.D())}}}); +a,this.D())}},setsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.D())}},childPortSpot:{get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.C(a)||(this.V.childPortSpot=a,this.D())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Wt&&a!==Xt&& +a!==Yt&&!Zt||(this.Y.sorting=a,this.D())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.D())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.Y.angle=a,this.D())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!== +a&&(this.Y.alignment=a,this.D())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.D())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.D())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing}, +set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.D())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.D())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.D())}},alternateCompaction:{ +get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==fu&&a!==hu||(this.Y.compaction=a,this.D())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.D())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.D())}},alternateRowIndent:{ +get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.D())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.D())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.D())}},alternateSetsPortSpot:{ +get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.D())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.C(a)||(this.Y.portSpot=a,this.D())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.D())}},alternateChildPortSpot:{ +get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.C(a)||(this.Y.childPortSpot=a,this.D())}}}); var zt=new D(yt,"PathDefault",-1),At=new D(yt,"PathDestination",0),Ht=new D(yt,"PathSource",1),Wt=new D(yt,"SortingForwards",10),Xt=new D(yt,"SortingReverse",11),Yt=new D(yt,"SortingAscending",12),Zt=new D(yt,"SortingDescending",13),xu=new D(yt,"AlignmentCenterSubtrees",20),yu=new D(yt,"AlignmentCenterChildren",21),ou=new D(yt,"AlignmentStart",22),lu=new D(yt,"AlignmentEnd",23),au=new D(yt,"AlignmentBus",24),Rt=new D(yt,"AlignmentBusBranching",25),bu=new D(yt,"AlignmentTopLeftBus",26),cu=new D(yt, "AlignmentBottomRightBus",27),fu=new D(yt,"CompactionNone",30),hu=new D(yt,"CompactionBlock",31),Bt=new D(yt,"StyleLayered",40),Vt=new D(yt,"StyleLastParents",41),Ut=new D(yt,"StyleAlternating",42),Tt=new D(yt,"StyleRootOnly",43),Dt=new D(yt,"ArrangementVertical",50),Gu=new D(yt,"ArrangementHorizontal",51),Gt=new D(yt,"ArrangementFixedRoots",52),Ct=new D(yt,"LayerIndividual",60),Pt=new D(yt,"LayerSiblings",61),Ot=new D(yt,"LayerUniform",62);yt.className="TreeLayout";yt.PathDefault=zt; yt.PathDestination=At;yt.PathSource=Ht;yt.SortingForwards=Wt;yt.SortingReverse=Xt;yt.SortingAscending=Yt;yt.SortingDescending=Zt;yt.AlignmentCenterSubtrees=xu;yt.AlignmentCenterChildren=yu;yt.AlignmentStart=ou;yt.AlignmentEnd=lu;yt.AlignmentBus=au;yt.AlignmentBusBranching=Rt;yt.AlignmentTopLeftBus=bu;yt.AlignmentBottomRightBus=cu;yt.CompactionNone=fu;yt.CompactionBlock=hu;yt.StyleLayered=Bt;yt.StyleLastParents=Vt;yt.StyleAlternating=Ut;yt.StyleRootOnly=Tt;yt.ArrangementVertical=Dt; yt.ArrangementHorizontal=Gu;yt.ArrangementFixedRoots=Gt;yt.LayerIndividual=Ct;yt.LayerSiblings=Pt;yt.LayerUniform=Ot;function Et(a){eq.call(this,a)}la(Et,eq);Et.prototype.createVertex=function(){return new Ft(this)};Et.prototype.createEdge=function(){return new Iu(this)};Et.className="TreeNetwork"; -function Ft(a){sq.call(this,a);this.Y=!1;this.cb=null;this.u=[];this.hb=this.Ga=this.F=this.ga=0;this.od=null;this.S=new I(0,0);this.Ca=new K(0,0);this.ka=new I(0,0);this.Ql=this.Pl=this.Xz=!1;this.No=this.Bo=null;this.fd=Wt;this.Zc=zq;this.Gb=0;this.Fb=yu;this.uq=this.tq=0;this.vq=20;this.ae=50;this.$p=0;this.kp=hu;this.cp=0;this.Mq=25;this.jp=this.Lq=10;this.ip=20;this.Uq=!0;this.Cq=Wc;this.Tq=!0;this.gp=Wc}la(Ft,sq); -Ft.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.fd=a.sorting,this.Zc=a.comparer,this.Gb=a.angle,this.Fb=a.alignment,this.tq=a.nodeIndent,this.uq=a.nodeIndentPastParent,this.vq=a.nodeSpacing,this.ae=a.layerSpacing,this.$p=a.layerSpacingParentOverlap,this.kp=a.compaction,this.cp=a.breadthLimit,this.Mq=a.rowSpacing,this.Lq=a.rowIndent,this.jp=a.commentSpacing,this.ip=a.commentMargin,this.Uq=a.setsPortSpot,this.Cq=a.portSpot,this.Tq=a.setsChildPortSpot,this.gp=a.childPortSpot)}; -ma.Object.defineProperties(Ft.prototype,{initialized:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a)}},parent:{get:function(){return this.cb},set:function(a){this.cb!==a&&(this.cb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(null!==a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-nu(c))))):c.alignment===ou?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-nu(c))))):c.alignment===ou?(e=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-nu(c))))):c.alignment===ou?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-nu(c))))):c.alignment===ou?(e=d.left+b.x,0===b.x&&m.xGoJS This is in place of changing the Diagram.scale.

                      - The current model in JSON format: + The current model in JSON format, automatically updated as the diagram is modified:

                      @@ -143,9 +143,9 @@

                      GoJS

                      // end of GanttLayout -var GridCellHeight = 20; // document units -var GridCellWidth = 12; // document units per day -var TimelineHeight = 24; // document units +var GridCellHeight = 20; // document units; cannot be changed dynamically +var GridCellWidth = 12; // document units per day; this can be modified -- see rescale() +var TimelineHeight = 24; // document units; cannot be changed dynamically const MsPerDay = 24 * 60 * 60 * 1000; @@ -170,6 +170,7 @@

                      GoJS

                      return convertDaysToUnits(x / GridCellWidth); } +// these four functions are used in TwoWay Bindings on the task/node template function convertDurationToW(duration) { return convertUnitsToDays(duration) * GridCellWidth; } @@ -188,10 +189,10 @@

                      GoJS

                      var StartDate = new Date(); // set from Model.modelData.origin -function valueToText(n) { // N is in days since StartDate +function valueToText(n) { // N document units after StartDate const startDate = StartDate; const startDateMs = startDate.getTime() + startDate.getTimezoneOffset() * 60000; - const date = new Date(startDateMs + n * MsPerDay / GridCellWidth); + const date = new Date(startDateMs + (n / GridCellWidth) * MsPerDay); return date.toLocaleDateString(); } @@ -200,7 +201,7 @@

                      GoJS

                      const startDateMs = startDate.getTime() + startDate.getTimezoneOffset() * 60000; const dateInMs = d.getTime() + d.getTimezoneOffset() * 60000; const msSinceStart = dateInMs - startDateMs; - return msSinceStart / MsPerDay * GridCellWidth; + return (msSinceStart / MsPerDay) * GridCellWidth; } @@ -249,12 +250,13 @@

                      GoJS

                      }; } -// the left side of the whole diagram +// the tree on the left side of the page const myTasks = new go.Diagram("myTasksDiv", { initialContentAlignment: go.Spot.Right, - padding: new go.Margin(TimelineHeight, 0, 0, 0), + // make room on top for myTimeline and a bit of spacing; on bottom for whole task row and a bit more + padding: new go.Margin(TimelineHeight+4, 0, GridCellHeight, 0), // needs to be the same vertically as for myGantt hasVerticalScrollbar: false, allowMove: false, allowCopy: false, @@ -272,6 +274,7 @@

                      GoJS

                      childPortSpot: go.Spot.Left, arrangementSpacing: new go.Size(0, 0) }), + mouseLeave: (e, node) => myHighlightTask.visible = false, "animationManager.isInitial": false, "TreeCollapsed": e => myGantt.layoutDiagram(true), "TreeExpanded": e => myGantt.layoutDiagram(true), @@ -279,7 +282,21 @@

                      GoJS

                      myTasks.nodeTemplate = $(go.Node, "Horizontal", - { height: 20 }, + { + selectionAdorned: false, + height: GridCellHeight, + mouseEnter: (e, node) => { + node.background = "rgba(0,0,255,0.2)"; + myHighlightTask.position = new go.Point(myGrid.actualBounds.x, node.actualBounds.y); + myHighlightTask.width = myGrid.actualBounds.width; + myHighlightTask.visible = true; + }, + mouseLeave: (e, node) => { + node.background = node.isSelected ? "dodgerblue" : "transparent"; + myHighlightTask.visible = false; + } + }, + new go.Binding("background", "isSelected", s => s ? "dodgerblue" : "transparent").ofObject(), new go.Binding("isTreeExpanded").makeTwoWay(), $("TreeExpanderButton", { portId: "", scale: 0.85 }), $(go.TextBlock, @@ -304,13 +321,14 @@

                      GoJS

                      )); -// the right side of the whole diagram +// the right side of the page, holding both the timeline and all of the task bars myGantt = new go.Diagram("myGanttDiv", { - initialPosition: new go.Point(-7, -100), // show labels - padding: new go.Margin(TimelineHeight, 0, 0, 0), - scrollMargin: new go.Margin(0, GridCellWidth*7, 0, 0), // show a week beyond + initialPosition: new go.Point(-10, -100), // show labels + // make room on top for myTimeline and a bit of spacing; on bottom for whole task row and a bit more + padding: new go.Margin(TimelineHeight+4, GridCellWidth*7, GridCellHeight, 0), // needs to be the same vertically as for myTasks + scrollMargin: new go.Margin(0, GridCellWidth*7, 0, 0), // and allow scrolling to a week beyond that allowCopy: false, "commandHandler.deletesTree": true, "draggingTool.isGridSnapEnabled": true, @@ -320,26 +338,83 @@

                      GoJS

                      "resizingTool.cellSize": new go.Size(GridCellWidth, GridCellHeight), "resizingTool.minSize": new go.Size(GridCellWidth, GridCellHeight), layout: $(GanttLayout), + mouseOver: e => { + if (!myGrid || !myHighlightDay) return; + const lp = myGrid.getLocalPoint(e.documentPoint); + const day = Math.floor(convertXToStart(lp.x)); // floor gets start of day + myHighlightDay.position = new go.Point(convertStartToX(day), myGrid.position.y); + myHighlightDay.width = GridCellWidth; // 1 day + myHighlightDay.height = myGrid.actualBounds.height; + myHighlightDay.visible = true; + }, + mouseLeave: e => myHighlightDay.visible = false, "animationManager.isInitial": false, "SelectionMoved": e => e.diagram.layoutDiagram(true), "DocumentBoundsChanged": e => { // the grid extends to only the area needed const b = e.diagram.documentBounds; - const gridpart = e.diagram.parts.first(); - if (gridpart !== null && gridpart.type === go.Panel.Grid) { - gridpart.desiredSize = new go.Size(b.right - gridpart.position.x, b.bottom); - } - // the timeline only covers the needed area - myTimeline.findObject("MAIN").width = b.right; - myTimeline.findObject("TICKS").height = e.diagram.viewportBounds.height; - myTimeline.graduatedMax = b.right; + myGrid.desiredSize = new go.Size(b.width + GridCellWidth*7, b.bottom); + // the timeline, which is not in the documentBounds, only covers the needed area + // widen to cover whole weeks + myTimeline.graduatedMax = Math.ceil(b.width / (GridCellWidth*7)) * (GridCellWidth*7); + myTimeline.findObject("MAIN").width = myTimeline.graduatedMax; + myTimeline.findObject("TICKS").height = Math.max(e.diagram.documentBounds.height, e.diagram.viewportBounds.height); } }); -myGantt.add($(go.Part, "Grid", - { layerName: "Grid", position: new go.Point(-10, 0), gridCellSize: new go.Size(3000, GridCellHeight) }, - $(go.Shape, "LineH", { strokeWidth: 0.5 }) -)); +const myTimeline = // the timeline at the top of the myGantt viewport + $(go.Part, "Graduated", + { + layerName: "Adornment", + pickable: false, + position: new go.Point(-26, 0), // position will be set in "ViewportBoundsChanged" listener + graduatedTickUnit: GridCellWidth // each tick is one day + // assume graduatedMax == length of line + }, + $(go.Shape, "LineH", + { + name: "MAIN", + strokeWidth: 0, // don't draw the actual line + height: TimelineHeight, // width will be set in "DocumentBoundsChanged" listener + background: "lightgray" + }), + $(go.Shape, "LineV", + { + name: "TICKS", + interval: 7, // once per week + alignmentFocus: new go.Spot(0.5, 0, 0, -TimelineHeight/2), // tick marks cross over the timeline itself + stroke: "lightgray", strokeWidth: 0.5 + }), + $(go.TextBlock, + { + alignmentFocus: go.Spot.Left, + interval: 7, // once per week + graduatedFunction: valueToText, + graduatedSkip: (val, tb) => val > tb.panel.graduatedMax - GridCellWidth * 7 // don't show last label + } + ) + ); +myGantt.add(myTimeline); + +const myGrid = // the grid of horizontal lines + $(go.Part, "Grid", + { layerName: "Grid", pickable: false, position: new go.Point(0, 0), gridCellSize: new go.Size(3000, GridCellHeight) }, + $(go.Shape, "LineH", { strokeWidth: 0.5 }) + ); +myGantt.add(myGrid); + +const myHighlightDay = // the vertical highlighter covering the day where the mouse is + $(go.Part, + { layerName: "Grid", visible: false, pickable: false, background: "rgba(255,0,0,0.2)", + position: new go.Point(0, 0), width: GridCellWidth, height: GridCellHeight }); +myGantt.add(myHighlightDay); + +const myHighlightTask = // the horizontal highlighter covering the current task + $(go.Part, + { + layerName: "Grid", visible: false, pickable: false, background: "rgba(0,0,255,0.2)", + position: new go.Point(0, 0), width: GridCellWidth, height: GridCellHeight }); +myGantt.add(myHighlightTask); myGantt.nodeTemplate = $(go.Node, "Spot", @@ -377,7 +452,8 @@

                      GoJS

                      cursor: 'e-resize' } ) - ) + ), + mouseOver: (e, node) => myGantt.mouseOver(e) }, standardContextMenus(), new go.Binding("position", "start", convertStartToPosition).makeTwoWay(convertPositionToStart), @@ -410,29 +486,6 @@

                      GoJS

                      )); -// the timeline -const myTimeline = - $(go.Part, "Graduated", - { - layerName: "Adornment", - location: new go.Point(0, 0), - locationSpot: go.Spot.Left, - locationObjectName: "MAIN", - graduatedTickUnit: GridCellWidth - }, - $(go.Shape, "LineH", { name: "MAIN", strokeWidth: 0, height: TimelineHeight, background: "lightgray" }), - $(go.Shape, { name: "TICKS", geometryString: "M0 0 V1000", interval: 7, stroke: "lightgray", strokeWidth: 0.5 }), - $(go.TextBlock, - { - alignmentFocus: go.Spot.Left, - interval: 7, // once per week - graduatedFunction: valueToText - } - ) - ); -myGantt.add(myTimeline); - - // The Model that is shared by both Diagrams const myModel = new go.GraphLinksModel( { @@ -443,7 +496,7 @@

                      GoJS

                      [ { key: 0, text: "Project X" }, { key: 1, text: "Task 1", color: "darkgreen" }, - { key: 11, text: "Task 1.1", color: "green", duration: convertDaysToUnits(10) }, + { key: 11, text: "Task 1.1", color: "green", duration: convertDaysToUnits(7) }, { key: 12, text: "Task 1.2", color: "green" }, { key: 121, text: "Task 1.2.1", color: "lightgreen", duration: convertDaysToUnits(3) }, { key: 122, text: "Task 1.2.2", color: "lightgreen", duration: convertDaysToUnits(5) }, @@ -494,18 +547,12 @@

                      GoJS

                      }); StartDate = new Date(myModel.modelData.origin); + // share model myTasks.model = myModel; myGantt.model = myModel; myModel.undoManager.isEnabled = true; -// just for debugging: -myModel.addChangedListener(e => { - if (e.isTransactionFinished) { // show the model data in the page's TextArea - document.getElementById("mySavedModel").textContent = e.model.toJson(); - } -}) - // sync viewports var changingView = false; // for preventing recursive updates myTasks.addDiagramListener("ViewportBoundsChanged", e => { @@ -513,7 +560,7 @@

                      GoJS

                      changingView = true; myGantt.scale = myTasks.scale; myGantt.position = new go.Point(myGantt.position.x, myTasks.position.y); - myTimeline.position = new go.Point(myTimeline.position.x, myTasks.viewportBounds.position.y); + myTimeline.position = new go.Point(myTimeline.position.x, myGantt.viewportBounds.position.y); changingView = false; }); myGantt.addDiagramListener("ViewportBoundsChanged", e => { @@ -521,6 +568,7 @@

                      GoJS

                      changingView = true; myTasks.scale = myGantt.scale; myTasks.position = new go.Point(myTasks.position.x, myGantt.position.y); + myGantt.position = new go.Point(myGantt.position.x, myTasks.position.y); // don't scroll more if myTasks can't scroll more myTimeline.position = new go.Point(myTimeline.position.x, myGantt.viewportBounds.position.y); changingView = false; }); @@ -538,10 +586,17 @@

                      GoJS

                      diag.layout.cellHeight = GridCellHeight; diag.layoutDiagram(true); myTimeline.graduatedTickUnit = GridCellWidth; - diag.padding = new go.Margin(TimelineHeight, 0, 0, 0); - myTasks.padding = new go.Margin(TimelineHeight, 0, 0, 0); + diag.padding = new go.Margin(TimelineHeight+4, GridCellWidth*7, GridCellHeight, 0); + myTasks.padding = new go.Margin(TimelineHeight+4, 0, GridCellHeight, 0); }, null); // skipsUndoManager } + +// just for debugging: +myModel.addChangedListener(e => { + if (e.isTransactionFinished) { // show the model data in the page's TextArea + document.getElementById("mySavedModel").textContent = e.model.toJson(); + } +});
                      diff --git a/samples/indexList.js b/samples/indexList.js index 1df81e755..734908b06 100644 --- a/samples/indexList.js +++ b/samples/indexList.js @@ -1113,7 +1113,7 @@ arr.push([ ]); arr.push([ - "../extensions/PackedLayout", + "../extensionsJSM/PackedLayout", "Packed Layout", "A custom Layout that positions nodes in a packed area.", "PackedLayout", diff --git a/samples/shapes.html b/samples/shapes.html index 75c94f52f..b2b94ef9a 100644 --- a/samples/shapes.html +++ b/samples/shapes.html @@ -51,6 +51,7 @@

                      GoJS

                      +